Type alias IsNever<T>

IsNever<T>: Equals<T, never>

Checks if a given type T is never. The never type represents a value that never occurs, for example a function that always errors out.

Type Parameters

  • T

Returns

true if T is never, otherwise false.

Example

type Never = IsNever<never>; => true
type NotNever = IsNever<string>; => false