Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 527 Bytes

File metadata and controls

43 lines (31 loc) · 527 Bytes

typelab / assertions / IsNever

type IsNever<T> = IfNever<T, true, false>;

Checks if a given type T is a never type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is a never type, false otherwise.

Example

type Valid = IsNever<never>; // true
type Invalid = IsNever<string>; // false