toString
La fonction toString() convertit un littéral (number, string, bigint, boolean, null, undefined) en template string typée.
Exemple interactif
Syntaxe
typescript
function toString<
GenericInput extends number | string | bigint | boolean | null | undefined
>(
input: GenericInput
): `${GenericInput}`;Paramètres
input: Littéral à convertir en chaîne typée.
Valeur de retour
Une chaîne littérale typée correspondant exactement à la valeur fournie.
Voir aussi
toJSON- Prépare pour JSONstringToMillisecond- Parse des durées
