0
type ClientData = {
id: number,
name: string 
}

And if you know the answer, can you please also tell me what this is? Is it really called a type? I can't find anything about it on the internet, is it an interface?

Naird
  • 1
  • 1
    Hi @Naird, welcome! A type allow you to "shape" you object. You can **not** access to it directly. For example you can do something like that: `const foo: ClientData = { id: 123, name: "bar" }; console.log(foo.id)`. – Dario Fiore Jan 24 '21 at 00:25
  • Does this answer your question? [TypeScript: Interfaces vs Types](https://stackoverflow.com/questions/37233735/typescript-interfaces-vs-types) – Nishant Jan 24 '21 at 03:19

0 Answers0