The following lines of code will create an interface in TypeScript:-
interface laptop { brand : string; user : string; year : number; }
As you can see, the interface will declare the type of each element within it!
The following lines of code will create an object based on the above interface.
let laptop1 : laptop = { brand : "Dell", user : "localhost", year : 2022 }
Once the interface has been declared you can use it just like the primitive types but you do need to declare every element within that interface through an object of that interface type with a true value.