UNPKG

@cuppachino/type-space

Version:

A collection of type utilities for TypeScript.

7 lines (6 loc) 155 B
/** * Extracts the keys of a `T` where the value extends `U`. */ export type Where<T, U> = { [K in keyof T]: T[K] extends U ? K : never; }[keyof T];