Add Resolve<T> utility type
This commit is contained in:
7
app/soapbox/utils/types.ts
Normal file
7
app/soapbox/utils/types.ts
Normal 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 };
|
||||
Reference in New Issue
Block a user