typescript type for object code example
Example 1: typescript type object
type Dictionary = {
[key: string]: any
}
Example 2: angular type of string
if(typeof myVariable === 'string'){
//do
}
Example 3: typescript type of object values
const data = {
value: 123,
text: 'text'
};
type Data = typeof data;