type checking

The compiler’s job of proving that every value in the code is used in a way its type allows.

In more detail

tRPC relies entirely on the TypeScript type checker: the client imports the server’s router type and the checker flags any call with wrong inputs. Type checking cannot see the actual data a program receives at run time.

Related terms

Taught in

References