Last active
March 17, 2019 09:42
-
-
Save sledorze/101e5f6b059001311c8c575ea5c30575 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ResolveURI helps resolving the URI for a Type | |
* Usage: type U = ResolveURI<Option<any>> // 'Option' | |
*/ | |
export type ResolveURI<X> = { [k in keyof URI2HKT<any>]: URI2HKT<any>[k] extends X ? k : never }[keyof URI2HKT<any>] | |
export type ResolveURI2<X> = { | |
[k in keyof URI2HKT2<any, any>]: URI2HKT2<any, any>[k] extends X ? k : never | |
}[keyof URI2HKT2<any, any>] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment