Definitely Typed publishes high-quality TypeScript declaration files for JavaScript packages on npm under the @types scope so compilers can type-check imports.
Overview
Definitely Typed is the central registry of TypeScript typings for widely used npm libraries that do not ship their own types. Consumers install definitions with npm, for example @types/foo for package foo, and the compiler picks them up automatically or via explicit types references in tsconfig.
Each package entry supplies index.d.ts declarations, companion test files that type-check sample usage, lint configuration, and package metadata in a large pnpm-managed monorepo. Maintainers and contributors update definitions as libraries evolve; automated tooling and community review process pull requests before publication to npm.
The project tests packages against supported TypeScript versions within a rolling support window and tags published types for older compiler lines when needed. When upstream packages bundle native types, corresponding @types packages are retired to avoid duplication. Tools such as dtslint and package layout checks help keep definitions aligned with real module formats.
Library authors who write TypeScript are encouraged to ship generated declarations in their own packages instead of adding entries here. For plain JavaScript libraries, JSDoc-based typing in the package is also offered as an alternative to community definitions.
Key features
- Thousands of @types npm packages
- Declaration files with usage tests
- Automated lint and type-check CI
- TypeScript version compatibility tags
- Retires types when upstream bundles them
- pnpm monorepo of community packages
- dts-gen scaffolding for new packages
- Module format alignment checks
Use cases
- Typing untyped npm dependencies in TS projects
- Sharing accurate public API shapes
- Keeping JS libraries usable with strict typing
- Finding types when packages lack built-in d.ts