this utility type returns a union of all the keys that have been assigned as never.
never
type MyType = { a: number, b: never, c: never, d: { e: never, f: string } }type AllofMyNeverKeys = NeverKeys<MyType>// type AllofMyNeverKeys === ("b" | "c") Copy
type MyType = { a: number, b: never, c: never, d: { e: never, f: string } }type AllofMyNeverKeys = NeverKeys<MyType>// type AllofMyNeverKeys === ("b" | "c")
Generated using TypeDoc
this utility type returns a union of all the keys that have been assigned as
never
.