Concept: Declaration Files
Question
What is the purpose of a .d.ts declaration file?
Hint
Think about how TypeScript knows the types of npm packages written in JavaScript.
Explanation
Declaration files (.d.ts) provide type information for JavaScript libraries that don't include TypeScript types. They describe the shapes of functions, classes, and variables without containing implementation code. When you install @types/foo packages, you are getting .d.ts files that tell TypeScript how to use the foo library. They enable type checking for the entire JS ecosystem.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.