mrkeyoor.com_
Tue 01 Sept 17:43 UTC
Dev Toolsevaluationupdated 27 Aug 2026

DefinitelyTyped review

DefinitelyTyped is the community repository behind npm's `@types` packages, which add TypeScript declarations to JavaScript libraries that do not ship their own. Most developers use one published package such as `@types/node`; the huge monorepo is mainly for people reviewing or correcting those declarations.

+20stars / 7d
Verdict

Our DefinitelyTyped checkout reached 62,951 files and npm stopped after 70 seconds because the monorepo requires pnpm. Consumers should still use a focused @types package when a JavaScript dependency lacks declarations. Contributors need pnpm, filtered workspace setup, and proof against the real runtime API; library authors should ship declarations with their own package.

We ran it

Lab card: what happened when we ran DefinitelyTypedScreenshot of DefinitelyTyped (github.com/DefinitelyTyped/DefinitelyTyped)
Install✗ · 70s
Build
Repo62951 files~5,450,686 lines of source · 287.9 MB · 7 CI workflows

Answers from our run

Does DefinitelyTyped build from source?

The dependency install failed, and the project has no separate build step. We cloned commit 188a479 into a clean Debian container with 3 CPUs and no project-specific setup.

Who should not use DefinitelyTyped?

TypeScript library authors deciding where to publish new types: the README tells authors to bundle declarations with their own package.

What are the alternatives to DefinitelyTyped?

Bundled declarations, TypeScript DOM lib generator, tsd. Our DefinitelyTyped checkout reached 62,951 files and npm stopped after 70 seconds because the monorepo requires pnpm.

Setup2/5Consumer install is tiny; contributor checkout is huge and pnpm-only
Docs5/5Detailed consumption, package layout, testing, and review guidance
Community5/5Continuous package work with owners, bots, and maintainer review
Maturity5/5Long-running npm publishing system central to TypeScript compatibility

Discussed on

  1. hnTypeScript types should be moved to DefinitelyTyped9 points
  2. hnTypeScript Definitions for Most Popular JS Libraries4 points

Who it’s for

TypeScript users whose JavaScript dependency does not include declaration files.
Library users correcting a type mismatch they have reproduced in real code.
Definition owners willing to review changes for packages they actively use.
Maintainers moving older JavaScript APIs into typed TypeScript projects.

Who it’s NOT for

TypeScript library authors deciding where to publish new types: the README tells authors to bundle declarations with their own package.
Contributors who do not personally use the package they want to add: make-work definitions are rejected, and coding agents need explicit confirmation of real consumption.
Agents planning several generated pull requests: the repository expressly prohibits multiple agent-authored PRs and requires [auto-generated] in the title.
Projects pinned to old TypeScript versions without checking tags: current packages are tested only against TypeScript versions less than two years old.
Developers expecting declarations to prove runtime behavior: package tests type-check example code but do not execute the underlying JavaScript.
Anyone using npm to install the contributor workspace: the preinstall check refuses it and requires pnpm.

Setup reality

At commit 188a479, npm install failed with exit 1 after 70 seconds. The checkout had 62,951 files, about 5,450,686 lines of source, and occupied 287.9 MB. The log says, Use "pnpm install" for installation in this project, then shows npx only-allow pnpm returning npm error code 1. Because installation failed, our run did not build or test the repository.

Consumers normally skip this setup and install the single @types package they need from npm. Contributors need Node 20.17 or newer, the pinned pnpm line from package.json, a fork, and enough disk and time for the chosen workspace scope. The README recommends a blobless clone and filtered pnpm installation for one definition family.

The monorepo recently changed to pnpm, so old npm-based contributor habits now stop at preinstall by design. Package-level checks run through the root scripts, and full-repository testing is a much larger job. Contributors also need to identify the upstream library version, update tests with declarations, and wait for definition owners or maintainers to review the change.

The repository most users should never clone

DefinitelyTyped solves an old JavaScript problem at ecosystem scale. A library may work perfectly at runtime but expose no declarations for TypeScript. Its users can add the matching package from npm's @types scope and get compiler checks, editor completion, and API documentation without changing the original library. Scoped packages flatten the scope and name, so types for @babel/preset-env appear as @types/babel__preset-env.

For ordinary use, that is the whole transaction. Install the implementation, add its @types package as a development dependency, and let TypeScript resolve it. The GitHub repository is the source and review queue behind those packages. It is not a dependency consumers should clone into each application.

The project also has a deliberate exit path. When an upstream library begins bundling its own declarations, its DefinitelyTyped package should be removed and replaced with a stub that points users upstream. Type ownership belongs beside implementation when the author can maintain both.

What happened when we ran it

We cloned commit 188a479 into an unprivileged Debian container with 3 CPUs, 8 GB of RAM, no secrets, and a Node 22 lab image. The checkout contained 62,951 files, about 5,450,686 lines of source, and occupied 287.9 MB. This was by far the largest repository in this review set.

The harness selected npm and ran installation. After 70 seconds it failed with exit code 1. The final message is unusually helpful: Use "pnpm install" for installation in this project. It suggests installing pnpm globally if needed, and the npm error identifies npx only-allow pnpm as the failed command.

Installation never completed, so our sandbox did not proceed to a build or tests. The log does not show a missing system package or broken dependency. It shows the repository rejecting the wrong package manager. That is still an important setup result because older contributor instructions and muscle memory may point people toward npm.

A contribution starts with real use

The README asks contributors to test a declaration against code they actually run. New definitions need a concrete consumer, not a search for popular untyped packages. The policy is much stricter for coding agents: they must confirm personal use, submit no more than one pull request, and add [auto-generated] to its title. Those rules are aimed directly at low-value automated volume.

A package directory contains declarations, metadata, compiler configuration, and sample TypeScript that exercises the API. The samples are type-checked; they are not runtime tests. The README therefore tells authors of a new definition to build and run real code before submitting it. That distinction catches a common failure: a declaration can satisfy the compiler while describing behavior the JavaScript does not have.

Existing packages have named definition owners. A change alerts those owners, and their approval carries weight with the merge bot. Popular packages receive extra scrutiny because a small type change can break many downstream builds. This makes contribution slower than editing declarations locally, but the review cost is justified when one patch reaches a widely installed @types package.

Version matching is the hard part

Declaration packages follow the upstream library's major and minor version, while their patch number advances independently as types are corrected. That scheme lets DefinitelyTyped publish fixes without pretending the JavaScript library released again. It also means a developer should match the library and type-package lines rather than comparing patch numbers literally.

Only TypeScript versions less than two years old remain inside the active test window. Older compiler users may find tagged packages that still support them, but current declarations can adopt newer syntax after the window moves. Long-lived enterprise branches should pin both TypeScript and their @types dependencies, then inspect the relevant npm tags before an upgrade.

Real packages still drift. Issue #68050 reports functions present in node-postgres but missing from the base pg declarations. Issue #71859 reports @types/react-slick pulling React 19 types into projects using older React, producing JSX errors. These are specific examples of the maintenance burden: declarations follow external code, packaging conventions, compiler behavior, and transitive type dependencies at once.

Tooling matches the size of the job

The repository now declares pnpm 10.30.1 and Node 20.17 or newer. The README recommends a blobless clone because the history and working tree are large. A filtered install can select one package and its dependencies instead of installing the entire workspace. Tests run from the root with pnpm test <package>, while test-all checks the wider collection.

Checks use dtslint and compiler runs, with extra package-shape analysis where a compatible implementation exists on npm. Some known shape failures are listed separately so the project can improve them gradually without blocking every package. Pull requests with matching test changes move faster, and popular declarations need both maintainer review and support from their listed owners.

The current repository health cannot be judged by its last GitHub release, version 0.1.450 from September 2019. Individual @types packages are published automatically from the master branch, so GitHub releases are not the delivery channel. The repository was pushed on August 26, 2026, and its status section links current CI and npm publishing checks. GitHub search showed 556 open issues, while the repository's combined count also included pull requests. Recent issue updates and constant branch activity show a live maintenance system with a large backlog.

When to depend on it

DefinitelyTyped remains the practical answer for consuming a JavaScript library whose maintainer does not ship types. Check whether the implementation already declares a types entry before installing anything, and remove obsolete @types packages when upstream takes ownership. A duplicate declaration source can create confusing conflicts.

Contributors should keep patches narrow and prove them against the matching runtime version. Use module augmentation or a local declaration to validate the fix first, then bring a tested change upstream. For DOM standards, use TypeScript's DOM library generator; for a package you maintain, bundle declarations and test them in that repository.

Alternatives

ProjectWhat it isPick it when
Bundled declarationsType definitions published inside the JavaScript library itself under its own version.pick this instead when you maintain the upstream package and can release declarations with the implementation.
TypeScript DOM lib generatorThe generator for web-platform declarations that ship in TypeScript's standard library.pick this instead when the missing API is part of a web standard rather than a third-party npm package.
tsdA tool for testing the type declarations published by your own package.pick this instead when you own a package's declarations and want focused type tests outside the DefinitelyTyped process.

What people are saying

  1. [github-trending] DefinitelyTyped/DefinitelyTyped

Sources

  1. DefinitelyTyped README
  2. DefinitelyTyped license
  3. Missing pg utility declarations report
  4. React Slick type-version conflict report
  5. DefinitelyTyped 0.1.450 release

More dev tools reviews

workmux · v2rayNG · SecLists · hashcat · eslint · fastfetch · the whole board →