Although the title contains "TypeScript" what I'm about to show is not TypeScript specific and can and should also be done with JavaScript. The reason I am writing in the context of TypeScript is because we rely on TypeScript for type checking in most cases. An exception is when we get data from an API response such as HTTP GET and expect the data to be a certain type.
The advantage of TypeScript is that it can check variable, property, argument and function/method return types during compilation, catching errors that would possibly be thrown during run time. TypeScript cannot anticipate the shape of an API response, hence we cannot rely on TypeScripts type checking and need to do this manually.
interface Car {