pfgray / ts-adt

Generate Algebraic Data Types and pattern matchers
MIT License
314 stars 13 forks source link

How ts-adt match an option array? #27

Open damoco opened 3 years ago

damoco commented 3 years ago

How ts-adt match an option array? I found a lib for this: https://dev.to/gvergnaud/bringing-pattern-matching-to-typescript-introducing-ts-pattern-v3-0-o1k?signin=true

Don't know if it is the best way so far...

pfgray commented 3 years ago

I'm not sure I understand the question... Are you asking how to use match with a value of type Option<Array<X>>?