In Javascript, you know typeof:
typeof [] // object typeof "" // string
In Typescript it is more smart:
const person = { name: "wan", age: 28 } type Person = typeof person // {name: string, age: number}, in javascript it will show "object" const anotherPerson: Person = { name: 'whatever'. age: 31 }