New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
I installed a package. TypeScript can't find its types.
What you'll have at the end
A short .d.ts stub or an installed @types package, with the red squiggle gone
You need
A TypeScript project with strict checking on, and a freshly installed JavaScript package whose import the checker is already flagging for having no shape it can find.
Not covered
Turning off the checker's strictness for missing shapes project-wide, which trades this one honest error for a blind spot that then covers every future untyped import too.
Leans on
Giving a fetch response a real type instead of any
For when the missing shape comes from your own network call instead of an installed package, a different any to close.
Fix an import alias that works in the editor but fails the build
For when the import itself is the problem, one path in the editor and a different one at build time, rather than a genuinely missing shape.
Checked 22 Aug 2026
Part of the TypeScript cookbook