Unleash TypeScript's full potential 👉 http://type-level-typescript.com
github.com/gvergnaud/ts...
github.com/gvergnaud/ts...
👇
www.typescriptlang.org/play/#code/F...
👇
www.typescriptlang.org/play/#code/F...
To extract a member of a discriminated union, I find that using the builtin Extract utility is the simplest, but I've noticed that the way Extract works isn't immediately intuitive to most people
To extract a member of a discriminated union, I find that using the builtin Extract utility is the simplest, but I've noticed that the way Extract works isn't immediately intuitive to most people
If you are also a heavy user of unions of objects, give it a try!
If you are also a heavy user of unions of objects, give it a try!
No need for pesky `Extract`s or `Exclude`s 🔥
No need for pesky `Extract`s or `Exclude`s 🔥