-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Hello, Thanks for making this wonderful library.
When I use this with Promise, I need to map and flatMap inside Optional value.
UseCase is like this.
const pNum = Promise.resolve(Optional.of(1));
const num = await pNum;
const plusOneNum: Optional<number> = num.map(n => n + 1);
If I have OptionalT
const pOTNum = OptionalT.from(Promise.resolve(Optional.of(1)));
const plusOneNum: OptionalT<Promise, number> = pOTNum.map(n => n + 1);
const result = (await plusOneNum.value).get();
You can see detail of OptionT(It's implement in scala, but I think you can understand it!)
Metadata
Metadata
Assignees
Labels
No labels