DEV Community

Discussion on: Pipeable Pattern Matching in Typescript

Collapse
 
stefano_regosa profile image
Stefano Regosa

you are right in fact it isn't !!!
if we look at the fp-ts pipe signature and all the types overload ... the first params is a Generic and doesn't have to be a function :

gcanti.github.io/fp-ts/modules/fun...

for this reason, we can pass the Option
gcanti.github.io/fp-ts/modules/Opt... as the first argument and then pipe its model inside the M.matchW('_tag')