oofdere / crabrave

better typescript enums (also Option<T>, Result<T, E>)
https://crabrave.vercel.app
1 stars 0 forks source link

don't require a value when packing if the enum variant is `undefined` #6

Open oofdere opened 1 year ago

oofdere commented 3 months ago

bad idea for anything but maybe undefined which I'll keep thinking about

oofdere commented 3 months ago

indeed a terrible idea for any and unknown (and obviously never) I should document that type narrowing makes it very hard to use the _ fallback when you do this