question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hey guys,

Have you planned to implement the Option type/class ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
supermacrocommented, Apr 22, 2021

Using Options with neverthrow is, in my opinion, just a matter of using a pattern such as the above to use whichever Option implementation a user may want.

Now - if the problem is that current Option implementations aren’t “good” for whatever reason, then that’s something I’m open to discussing. But realistically that would still live in its own repo / npm lib.

1reaction
chestercharlescommented, Apr 9, 2021

@supermacro are you still considering adding an Option to neverthrow?

Introducing Result has been a game changer for some of our teams in terms of enabling them to write JavaScript in a more pure, functional style without too much overhead. The only thing we are missing is an Option to so we can “never null” as well as “never throw” 😉 .

It looks like there might be a few libraries out there we could use, but I’d far prefer using one with a similar implementation and API to neverthrow. If it is something you are still considering, I would be interested in contributing, too.

Thanks for a great library!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What are Options? Types, Spreads, Example, and Risk Metrics
The term option refers to a financial instrument that is based on the value of underlying securities such as stocks. An options contract...
Read more >
Option Definition & Meaning - Merriam-Webster
a · the power or right to choose : freedom of choice ; b · a privilege of demanding fulfillment of a contract...
Read more >
Option (finance) - Wikipedia
An option is a contract that allows the holder the right to buy or sell an underlying asset or financial instrument at a...
Read more >
Option.com
Option is a publicly quoted technology company, headquartered in Leuven, Belgium. Option specializes in the design, development, production and ...
Read more >
OPTION | definition in the Cambridge English Dictionary
one thing that can be chosen from a set of possibilities, or the freedom to make a choice: The program helps students explore...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found