Closed broerjuang closed 3 years ago
Yeah, I think it would be nice to be able to use this easily with fp-ts types... I have tried making a generalized version, but it completely removes inference:
const matchTag = makeMatch('_tag')
pipe(
O.fromNullable(...),
matchTag({
Some: () => ...,
None: () => ...
})
)
I think this is the better route, but not sure if the inference is workable.
We're gonna target v2
(https://github.com/pfgray/ts-adt/issues/8) for this feature
I use this package side-by-side by fp-ts and under the hood fp-ts is using
_tag
as type signature. See this.