Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 514 Bytes

File metadata and controls

43 lines (31 loc) · 514 Bytes

typelab / assertions / IsVoid

type IsVoid<T> = _IsTrue<IfVoid<T, true, false>>;

Checks if a given type T is void.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is void, false otherwise.

Example

type Valid = IsVoid<void>; // true
type Invalid = IsVoid<string>; // false