typescript set type code example
Example 1: typescript array
let list: number[] = [1, 2, 3];
Example 2: typescript function type
interface Date {
toString(): string;
setTime(time: number): number;
// ...
}
Example 3: angular type of string
if(typeof myVariable === 'string'){
//do
}