👩💻 Join our community of thousands of amazing developers!
In this blog post, we’ll examine how we can test static types in TypeScript (inferred types, etc.). For example, given the following function: function createPoint(x: number, y: number) { return {x, y}; } We’d like to check in a unit test that TypeScript infers this return type: {x: number, y: number} In order to do that, we need a few tools that we are going to look at first. [Read rest of post]...