Values that can be stringified.
Type to represent all values that can be stringified, all primitives excluding symbol: string, number, bigint, boolean, undefined, and null.
symbol
string
number
bigint
boolean
undefined
null
let value: Strigifiable = "hello";value = 1;value = true;value = Symbol("hello"); // Error!value = { toString: () => "hello" }; // Error! Copy
let value: Strigifiable = "hello";value = 1;value = true;value = Symbol("hello"); // Error!value = { toString: () => "hello" }; // Error!
Primitive
Values that can be stringified.
Remarks
Type to represent all values that can be stringified, all primitives excluding
symbol
:string
,number
,bigint
,boolean
,undefined
, andnull
.Example
See
Primitive