typescript object types code example
Example 1: typescript object type
//is not strict mode
let endedCoord: {x: number, y: number} = {
x: -1,
y: -1,
}
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;