Andrew Branch
Andrew Branch
Andrew joined the TypeScript team at Microsoft in 2019. As a former frontend developer, one day he looked too closely at the differences between Node and bundlers and has been falling down the rabbit hole of JavaScript modules ever since. He's currently on a quixotic mission to fix every npm package with—or at least fix a few while leaving behind some good documentation.
TypeScript Congress 2023TypeScript Congress 2023
30 min
Are the (module) types wrong?
Have you ever installed a dependency, imported it just like the README instructs, and immediately been met with strange TypeScript errors about default imports, the output module format, or ESM/CommonJS interoperability? When everything works at runtime but TypeScript complains, you might wonder, is this a TypeScript bug? Or… are the types wrong?
The JavaScript module and package publishing landscape is complicated. Nearly one third of the most popular types-included npm packages have some sort of module-related typings issue that can cause confusion for users. But things are starting to improve. In this talk, we’ll:

- explore how we got here—why are things complicated?
- develop a simple and accurate mental model for how TypeScript sees packages
- see how the `arethetypeswrong` tool can help catch issues before publishing
- look at trends in the `arethetypeswrong` data for popular packages over time
- discuss next steps for making the typed package ecosystem better