Last updated 5 years ago
Was this helpful?
Variable must be of one of known .
let test = 12
let users: string[] = ['Annie', 'John']
You don't need to declare variable type for basic types like numbers and strings - they are inferred automatically. Type declaration is necessary in complex data structures like Arrays, Sets etc.
Arrays
Sets
let <variable_name>: <type>? = <value>