TypeScript does not do anything in this case. TypeScript only checks types at compile time while the types of the response from the backend is known only at run time. There are some tools/libraries that allow you to use TypeScript types at runtime like: github.com/gcanti/io-ts.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.