Type alias OptionalNeverKeys<T>

OptionalNeverKeys<T>: RemoveNeverKeys<T> & Partial<T>

this utility type optionalizes all property keys that are of the never type.

type MyType = { a: number, b: never, c: never, d: { e: never, f: string } }
type MyType_OptionallyCleansed = RemoveNeverKeys<MyType>
// type MyType_OptionallyCleansed === { a: number, b?: never, c?: never, d: { e: never, f: string } }

Type Parameters

  • T

Generated using TypeDoc