Answers for "convert string literal types to an array typescript"

3

typescript array string to array literal

const furniture = ['chair', 'table', 'lamp'] as const;
type Furniture = typeof furniture[number];
Posted by: Guest on April-06-2021

Code answers related to "convert string literal types to an array typescript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language