Skip to content

Instantly share code, notes, and snippets.

@theory-of-soul
Created December 14, 2022 08:24
Show Gist options
  • Save theory-of-soul/1e3a94f021317abc885d17b07d190f3a to your computer and use it in GitHub Desktop.
Save theory-of-soul/1e3a94f021317abc885d17b07d190f3a to your computer and use it in GitHub Desktop.
KeysMatchingType
export type KeysMatchingType<T, V> = { [K in keyof T]-?: T[K] extends V ? K : never }[keyof T];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment