Type alias Primitive

Primitive: Nullish | Numeric | boolean | string | symbol

Valid JavaScript primitives.

Remarks

This type is a union of all the valid JavaScript primitives, including null, undefined, boolean, number, bigint, string, and symbol.

Example

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("🟢");

See