Home > @skunkteam/types > printKey
Print a property-key in a JavaScript compatible way.
Signature:
declare function printKey(key: string): string;
Parameter | Type | Description |
---|---|---|
key | string |
Returns:
string
This means that if the the key
is a valid identifier it will be returned as is, otherwise it will be quoted.