Skip to content

Instantly share code, notes, and snippets.

@shhider
Created October 28, 2021 06:47
Show Gist options
  • Save shhider/9c94c443fdb6d73f5a0cda1d56d52732 to your computer and use it in GitHub Desktop.
Save shhider/9c94c443fdb6d73f5a0cda1d56d52732 to your computer and use it in GitHub Desktop.
[TypeScript Utility Types] #typescript
/**
* Mapped Type
* - Omit
* - Pick
* - Required
* - Partial
*
* Function
* - Parameters
* - ReturnType
*/
// Customize
type MapValueType<A> = A extends Map<any, infer V> ? V : never;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment