Valid JavaScript primitives.
This type is a union of all the valid JavaScript primitives, including null, undefined, boolean, number, bigint, string, and symbol.
null
undefined
boolean
number
bigint
string
symbol
const aBigInt: Primitive = 13n;const aBoolean: Primitive = true;const aNull: Primitive = null;const aNumber: Primitive = 13;const anUndefined: Primitive = undefined;const aString: Primitive = "🟢";const aSymbol: Primitive = Symbol("🟢"); Copy
const aBigInt: Primitive = 13n;const aBoolean: Primitive = true;const aNull: Primitive = null;const aNumber: Primitive = 13;const anUndefined: Primitive = undefined;const aString: Primitive = "🟢";const aSymbol: Primitive = Symbol("🟢");
Valid JavaScript primitives.
Remarks
This type is a union of all the valid JavaScript primitives, including
null
,undefined
,boolean
,number
,bigint
,string
, andsymbol
.Example
See