01 / 05
An object has a shape too
An object is a container that holds several named values together. It is the { name: "Yui" } you have been writing since the JavaScript course.
In TypeScript you write down which named values go inside as part of the type. You just line up name: type inside {}.
const person: { name: string } = { name: "Yui",};console.log(person);Result
{ name: "Yui" }