Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 601 Bytes

File metadata and controls

43 lines (31 loc) · 601 Bytes

typelab / assertions / IsNumberDecimal

type IsNumberDecimal<T> = _IsTrue<IfNumberDecimal<T, true, false>>;

Checks if a given type T is a decimal number literal type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is a decimal number literal type, false otherwise.

Example

type Valid = IsNumberDecimal<11.1>; // true
type Invalid = IsNumberDecimal<11>; // false