yayoc / optional-chain

⛓Optional chaining implementation in TypeScript
https://github.com/yayoc/optional-chain
MIT License
19 stars 2 forks source link

Matcher functions should be optional in Optional.match #11

Open fredvollmer opened 5 years ago

fredvollmer commented 5 years ago

Is there any reason why both some and none have to specified in the object passed to the match function? Often times I only need to take action if the Option is defined, so I only want to pass some.

yayoc commented 5 years ago

There is no particular reason. Probably, We might be able to make both some and none properties optional.