Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 554 Bytes

File metadata and controls

43 lines (31 loc) · 554 Bytes

typelab / assertions / IsUndefined

type IsUndefined<T> = _IsTrue<IfUndefined<T, true, false>>;

Checks if a given type T is undefined.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is undefined, false otherwise.

Example

type Valid = IsUndefined<undefined>; // true
type Invalid = IsUndefined<string>; // false