Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 526 Bytes

File metadata and controls

43 lines (31 loc) · 526 Bytes

typelab / assertions / IsNull

type IsNull<T> = _IsTrue<IfNull<T, true, false>>;

Checks if a given type T is a null type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is a null type, false otherwise.

Example

type Valid = IsNull<{}>; // true
type Invalid = IsNull<string>; // false