Add Resolve<T> utility type

This commit is contained in:
Alex Gleason
2023-06-13 22:12:42 -05:00
parent db070150d9
commit 60eaf01940
3 changed files with 13 additions and 2 deletions

View File

@ -0,0 +1,7 @@
/**
* Resolve a type into a flat POJO interface if it's been wrapped by generics.
* https://gleasonator.com/@alex/posts/AWfK4hyppMDCqrT2y8
*/
type Resolve<T> = Pick<T, keyof T>;
export type { Resolve };