Type Extractors
baetheus opened this issue · comments
Brandon Blaylock commented
Almost every exported Kind and Type in fun could use an extraction type. The goal of this issue is:
- Decide on a cohesive naming design for the type level extractors.
- Implement type extractors for all exported types that can use it.
A type extractor looks like the following:
type MyArray<A> = readonly A[];
type ExtractMyArray<T> = T extends MyArray<infer A> ? A : never;