UNPKG

typedash

Version:

modern, type-safe collection of utility functions

9 lines (7 loc) 274 B
/** * Gets the value at key of object. Similar to `keyof T`, but gets the keys of all the types in a union. * * See https://stackoverflow.com/a/49402091/2677913 for more details. */ type KeysOfUnion<T> = T extends T ? keyof T : never; export type { KeysOfUnion as K };