Answers for "typescript make number array"

5

typescript array

let list: number[] = [1, 2, 3];
Posted by: Guest on March-04-2020
0

typescript type from array

const animals = ['cat', 'dog', 'mouse'] as const
type Animal = typeof animals[number]

// type Animal = 'cat' | 'dog' | 'mouse'
Posted by: Guest on May-01-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language