Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 593 Bytes

File metadata and controls

43 lines (31 loc) · 593 Bytes

typelab / assertions / IsPropertyKey

type IsPropertyKey<T> = _IsTrue<IfPropertyKey<T, true, false>>;

Checks if a given type T is a `PropertyKey` type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is a `PropertyKey` type, false otherwise.

Example

type Valid = IsPropertyKey<string>; // true
type Invalid = IsPropertyKey<bigint>; // false