mrkeyoor.comAsk

DefinitelyTyped/DefinitelyTypedtested 21 Nov 2026commit 9b0ad8d

DefinitelyTyped review

Our repository install failed after 89 seconds because npm hit an explicit pnpm requirement.

  • README install 1.6 s
  • README snippet failed
Failedinstall
  • 3.0 MB on disk
  • 1 dependency
Dev Toolsevaluationupdated 21 Nov 2026
+2stars / 7d

DefinitelyTyped supplies community-written TypeScript declarations for JavaScript libraries that do not include their own types. You usually consume its work as an @types package from npm, so your editor and compiler can understand a dependency without changing its JavaScript.

Verdict

Our repository install failed after 89 seconds because npm hit an explicit pnpm requirement. The separate consumer run installed @types/node. Use it if your dependency lacks declarations and you can keep library, compiler and declaration versions compatible. Skip it if you own the library and can maintain accurate bundled declarations, as the README recommends for TypeScript library authors.

DefinitelyTyped infographic: supplies missing types for JavaScript libraries, plus our test result and who it suits
Tested 21 November 2026: the README snippet failed with "ReferenceError: f is not defined". Before that: source install failed; npm install took 1.6 s.

We ran it

Lab card: what happened when we ran DefinitelyTyped
Lab card from our sandbox run
Screenshot of DefinitelyTyped (github.com/DefinitelyTyped/DefinitelyTyped)
github.com/DefinitelyTyped/DefinitelyTyped
Install✗ · 89s
Build—
Repo62193 files~5,472,591 lines of source · 288.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 9b0ad8d into a clean Debian container with 3 CPUs and no project-specific setup.

Who should not use DefinitelyTyped?

TypeScript library authors who can ship generated declarations with their own package: the README recommends bundling them.

What are the alternatives to DefinitelyTyped?

TypeScript declaration generation and bundling, dts-generate. Our repository install failed after 89 seconds because npm hit an explicit pnpm requirement.

Setup3/5In our 2026-11-21 run it installed as the README says in 1.6 s, but the README’s “my-package-tests.ts” example failed as written with “ReferenceError: f is not defined”.Editor’s note: Not assessed: the repository installation used npm and stopped at the pnpm guard; a supported workspace installation was not reproduced.
Docs3/5The README has an install section (“Running tests”) and usage examples in code, but its “my-package-tests.ts” example failed as written in our 2026-11-21 run (“ReferenceError: f is not defined”).Editor’s note: Not assessed numerically: the README documents consumers, pnpm contributors and declaration tests; the run executed an example intended for type checking.
Community5/5Last push on 2026-11-20, 51,483 stars and maintainers answered or closed 10 of the 10 most-discussed issues we sampled.Editor’s note: Not assessed numerically: named contribution stories and issue discussions show specific outcomes, without a representative measure of support responsiveness.
Maturity2/5Latest release 0.1.450 on 2019-09-04 (7 years old, pre-1.0) and repository created 2012-10-05.Editor’s note: Not assessed numerically: a recent push and documented publishing process do not measure accuracy across packages or reliability in production.

How we score

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 application developers using JavaScript dependencies without bundled declarations.
Contributors fixing a specific missing or inaccurate API they use, with contextual declaration examples.

Who it’s NOT for

TypeScript library authors who can ship generated declarations with their own package: the README recommends bundling them.
Teams that require declaration updates to obey ordinary patch-release compatibility: the README says breaking type changes can ship in patch revisions.
Applications seeking runtime input checks: declaration files describe APIs without checking live values.

Setup reality

Our repository install at 9b0ad8d failed, exit 1, after 89 seconds in the November 21 sandbox configured with 3 CPUs and 8 GB RAM. The checkout was 288.9 MB across 62,193 files. The log ran npx only-allow pnpm and explicitly requested pnpm install. This establishes a package-manager refusal, not a library failure.

Consumers use npm @types packages; contributors follow the README's pnpm workspace instructions, including filtered installation for selected packages. This is declaration tooling used with a JavaScript library and TypeScript, rather than a hosted application requiring service credentials. The separate consumer recipe installed @types/node but its selected README example failed under Node with ReferenceError: f is not defined.

The README says those declaration examples are checked without execution. The lab-node:22 image label does not establish the actual runtime or operating-system version. Setup effort for a supported repository installation is unassessed.

Our repository install exited 1 after 89 seconds because the log's package-manager guard required pnpm. Use DefinitelyTyped when your JavaScript dependency lacks declarations and you can maintain compatible versions. Skip it if you own the library and can ship accurate declarations with its code: the project's README directs TypeScript library authors toward bundled types instead. The failed repository install and the bundling guidance describe different decisions.

What people use DefinitelyTyped for

DefinitelyTyped supplies community TypeScript declarations through npm's @types packages for libraries that lack their own types. A declaration file describes an API to your editor and compiler without supplying the JavaScript implementation, as Spencer Miskoviak explains in his contribution walkthrough.

These examples show why you might want that extra description, and when you might contribute one yourself:

Who used it What they did What happened
Iva Kop Added types for gatsby-plugin-breakpoints rather than replace a plugin already used throughout her React project She kept the working dependency and reported her contribution approved, merged and published in a little over a day in her 2021 account.
Spencer Miskoviak Wrote declarations for @loadable/webpack-plugin and checked their use inside a webpack configuration His initial contribution check rejected a minimum-compiler-version mismatch; he documented matching webpack's requirement in his 2019 walkthrough.
The instructor in Learn Typescript For React Added @types/styled-components after the editor reported missing declarations The error disappeared and the instructor opened the library's declarations in the video demonstration.
three.js forum user bplu4t2f Kept direct browser JavaScript deployment while adding @types/three Moving the types under node_modules and importing the bare package name resolved types; an HTML import map handled browser execution in their follow-up.
Software Mansion's swmansion account Announced react-native-web types on DefinitelyTyped The account said the types were live in August 2024 in its announcement.

Kop's decision is the most useful starting point. The plugin already worked. Removing it would have meant reproducing its API and rewriting existing code, so she described the API locally, then shared the declarations. If your application has the same problem, a missing declaration doesn't by itself justify replacing the dependency. Her experience supports that choice, rather than a promise about how quickly your contribution will merge.

What happened when we ran it

Our consumer run installed @types/node, then failed when Node executed a README declaration-test example with ReferenceError: f is not defined. The November 21 run used commit 9b0ad8df8337 in an unprivileged container configured with 2 CPUs, 4 GB RAM and image label lab-node:22, with no published ports or secrets.

Consumer task Recorded result What it tells you
Clone for quickstart-lib 10 seconds Time recorded by this recipe
npm install @types/node@latest Installed @types/node 26.6.6 in 1.6 seconds A consumer package installation completed
node_modules footprint 3.0 MB Disk use after that installation
Additional dependencies 1 package besides @types/node Dependency count for this recipe
Execute README example with Node Exit 1 after 0.1 seconds, ReferenceError: f is not defined The selected example failed as executable JavaScript
Teardown Recorded as ok Cleanup completed

The package arrived. The next task took a five-line JavaScript block from the README's <my-package>-tests.ts discussion and ran it unedited with Node. That is where it stopped: the recorded finding names the undefined f.

The README says declaration examples are type-checked without being executed. That context changes the diagnosis: the failure belongs to this execution of the selected example, rather than demonstrating a defective Node declaration package. The README's explanation of declaration tests is essential to interpreting that red result.

Our harness measured the repository separately at commit 9b0ad8d on November 21, with 3 CPUs, 8 GB RAM and image label lab-node:22. Its measurement setup recorded checkout size and structure before attempting installation with npm.

Repository harness observation Result
Checkout 62,193 files, approximately 5,472,591 source lines, 288.9 MB
Install Failed, exit 1, after 89 seconds
Log command npx only-allow pnpm
Log instruction Use "pnpm install" for installation in this project.
Detected structure Monorepo workspaces, 7 CI workflow files, no Dockerfile and no tests directory

Those are our repository measurements. The log shows an explicit package-manager refusal. It doesn't show a compiler failure or a broken library API. The absence of a directory named tests also says little here, because the README locates declaration examples within individual packages.

Where people get stuck: identify which version relationship broke

Compiler syntax, transitive dependencies and a missing registry tarball require different remedies, as the Jasmine, Express and ESLint threads show. These are historical reports, useful for recognizing a failure class rather than selecting today's package versions.

Symptom What someone reported Recovery and recorded outcome
Syntax errors inside a declaration file In issue #30310, a Jasmine update produced TS1005 errors for older compiler setups A participant reported that reverting @types/jasmine to 2.8.9 worked; another still had trouble with that version. Treat it as a reported workaround, not a universal fix.
Pinning @types/express doesn't stop the failure In issue #53397, express-serve-static-core still arrived through a transitive dependency, meaning a dependency of a dependency Orta suggested Yarn resolutions or a compatible explicit dependency. Pinning only the top-level package had left the failing declaration selected.
Response incorrectly extends ServerResponse A later exchange in #53397 describes this separate inheritance error DetachHead recommended express-serve-static-core >=4.17.21; bradnak said updating @types/express brought in the required dependency. That user reported a fix.
Package metadata exists but download returns E404 Issue #61032 reported an unavailable @types/eslint 8.4.4 tarball willocho suggested pinning 8.4.3; rosskevin suggested resolutions for transitive dependencies. The thread is closed, but its captured discussion doesn't describe the final registry repair.

Don't start by rewriting application code because an error points into node_modules. Read the first failing path, check the compiler version, and inspect the lockfile's resolved declaration dependency. The Express report explains why a top-level pin can appear ineffective: a second package remains free to move.

Version numbers also need care. The README says declaration major and minor versions track the library, while declaration patch numbers move independently. Breaking declaration changes can therefore arrive in a patch release, according to its versioning explanation. Review declaration updates as changes to your compile-time API.

Contributors need pnpm and a focused package checkout

The README documents filtered pnpm installation so you can work on one package and its dependencies instead of installing the entire repository. Its contribution instructions give pnpm install -w --filter "{./types/foo}..." for that purpose, and a filter that also includes dependants when checking downstream effects.

Our 288.9 MB checkout explains why scope matters before you even consider installed dependencies. For a correction to one package, start with that package, its examples and its dependency context. The README directs contributors to run the named package's checks from the repository root, rather than expecting a test script inside each package.

Miskoviak's webpack example shows why context belongs in those examples. A declaration can describe a plugin constructor yet fail when the object enters a webpack configuration. He checked the plugin in that surrounding configuration and encountered a minimum-TypeScript-version requirement inherited from webpack. Copying the isolated constructor signature would have missed the relationship he was trying to support.

Kop also hit Cannot find module 'csstype' and reported success after installing dependencies inside types/react. That belongs to her historical workflow. Follow the current pnpm layout when contributing now, rather than replaying old npm commands from a successful story.

npm, Deno and browser imports take different paths

The README prefers npm @types packages, while the Deno and three.js reports show that other module workflows can need extra resolution work. These accounts describe specific configurations, not a current compatibility guarantee.

Workflow Documented or reported route Decision for your project
npm and TypeScript The README documents @types packages and automatic compiler inclusion Check bundled declarations first, then choose the matching community package.
Deno with deno.json liamfd reported editor imports silently becoming any; issue #27569 closed through #28185 after fallback-to-@types work Check actual inferred types in your editor. A later Deno 2.2.2 reporter was asked for a new reproduction in the same thread.
Direct browser modules bplu4t2f used node_modules for compiler resolution and an HTML import map for execution Keep the browser's module location and the compiler's type location consistent, following the reported three.js setup.

In the browser case, the initial relative import of three.module.js worked as JavaScript but didn't connect to the declarations. The later bare import of three resolved them. An import map then supplied the browser's runtime target. If you want to keep deployment as static JavaScript, this is a relevant account, but you still have two resolution systems to configure.

DefinitelyTyped vs bundled types, local declarations and generated declarations

Prefer accurate declarations shipped with the library when its author maintains them; DefinitelyTyped is useful when that ownership is missing. The TypeScript publishing handbook tells authors to publish source-generated types with their source, and the documentation discussion also argues for bundling maintained handwritten declarations.

Choice Pick it when Cost you accept
DefinitelyTyped Your dependency lacks types and a compatible community package exists Separate release and dependency coordination
Types bundled with the library, including TypeScript-generated declarations You control the library or its maintainer ships accurate declarations The library author owns declaration maintenance alongside implementation
Local declarations or module augmentation You need a narrow missing API immediately You maintain the correction until it is shared or replaced, as in Kop's project
dts-generate You are investigating generation from executable documentation examples Coverage depends on the examples; the research paper's abs example missed an optional argument until an extra example was considered
Replace the JavaScript dependency The dependency itself deserves replacement You may have to reproduce working behavior and refactor callers, the cost Kop chose to avoid

The dts-generate paper by Fernando Cristiani and Peter Thiemann describes collecting runtime information from documentation examples. Its abs example makes the limit concrete: calls with a string don't reveal that the argument is optional. Generation reduces handwritten work only to the extent that the examples describe the API you need.

Local declarations are reasonable for an urgent gap. Keep them narrow enough that someone can compare them with the implementation. Kop first solved her own project, then contributed the result; that order gives you an application use case to include with the shared change.

Declaration checking does not protect runtime inputs

A declaration can disagree with the JavaScript implementation, producing incorrect editor feedback and incorrect API use, as Cristiani and Thiemann explain. Passing a compiler check is evidence about the description and the code using it, not a runtime validation result.

For an application reading outside data, decide separately how to check that data before using it. Adding an @types package doesn't change the underlying JavaScript library. The README's declaration-test explanation is explicit that its sample code is checked without running it.

Keep security claims equally specific. The GitHub security pages for definitelytyped.github.io and the archived docs repository concern those repositories. Neither page is a security assessment of the main declaration repository or every npm package it publishes.

The GitHub repository is the reference point, not an old type manager

DefinitelyTyped's main repository was pushed on November 20, 2026, according to GitHub's repository metadata. Its README describes package owners and review automation; the historical issue discussions above show the actual compatibility questions people bring to it. Push activity and those discussions are more useful health signals than a release tag alone.

In the r/typescript review question, Cp995 discovered that React Bootstrap and Bootstrap declaration packages came from one repository. NiGhTTraX explained its role and linked Microsoft's maintenance account. That exchange records discovery and reassurance, rather than a measured support guarantee.

The main README explains that definition owners are listed in package.json and receive notifications about package changes. Its publishing description connects the master branch to npm's @types scope. Use that repository and the package's own history when investigating a change. The old typescript-directory repository says its content moved and the repository is closed.

What the other reviews get wrong

The older Execute Automation lessons teach type managers that the README now replaces with npm @types installation. Their demonstrations remain historical explanations, not current setup instructions.

Karthik's part 14 introduction tells viewers to install TSD globally; part 15 moves to Typings. The organization listing marks TSD deprecated and archived, while the main README marks Typings deprecated. Neither is the starting point for a new npm project.

The older m2-oss fork's README uses npm contribution setup. The main repository now documents pnpm, and our install hit the explicit pnpm guard. Keep consumer npm installation separate from contributor pnpm installation.

KodAmoz's Definitely Typed lesson suggests untyped libraries no longer mean losing TypeScript safety. Add the missing qualification: declaration accuracy still matters, and a declaration isn't a runtime check. The research paper explains how a mismatch can lead to incorrect library use.

Finally, buggedbrains places "That error means no" after a missing-declaration error. Read the actual error instead: Miskoviak's walkthrough shows it can prompt installing the matching @types package, or writing declarations when none exists. Checking whether the library already ships types is sound advice; treating the missing-declaration error itself as a reason to reject @types is misleading.

Questions people ask

DefinitelyTyped is the community repository behind npm @types packages, providing API declarations for JavaScript libraries without their own types, as Miskoviak's walkthrough explains.

What is DefinitelyTyped, and how does it relate to TypeScript?

It supplies declaration files that TypeScript uses to understand JavaScript package APIs. It does not supply the library's implementation; the contribution walkthrough describes installing declarations alongside the corresponding package.

Where is the DefinitelyTyped GitHub repository?

The main repository is DefinitelyTyped/DefinitelyTyped on GitHub. Its README includes consumer instructions, contribution guidance and publishing status links.

How do I find the type definitions for a specific package?

For DefinitelyTyped search, check the library's package.json for types or typings first, then look for @types/package-name on npm. For D3, inspect the types/d3 directory; for scoped packages, the README's naming rule changes @scope/pkg to @types/scope__pkg. These are lookup routes, not a reason to install a second set of types when the library already supplies them.

Where can I find DefinitelyTyped changelogs or package change history?

For a DefinitelyTyped changelog, start with commit history for the package's directory under types in the main repository. The README explains that affected declarations publish as individual npm packages, with patch versions independent of the library's patch version. Track the declaration package you actually resolved, rather than assuming one repository release describes every package.

How do I use DefinitelyTyped's React declarations?

The React declaration package is @types/react. The React course demonstration identifies React's declarations in DefinitelyTyped; the README explains compiler support tags using that package. Choose declarations for your React and compiler versions rather than copying the README's historical example versions.

How do I use DefinitelyTyped's Node.js declarations?

The README's consumer command is npm install --save-dev @types/node. It also documents a node types reference for projects without modules in its npm instructions. Select declarations for the Node APIs your application actually runs against.

Which Express declaration versions work with my TypeScript version?

Check @types/express and its resolved express-serve-static-core dependency against your compiler. In issue #53397, retaining an older top-level Express declaration didn't prevent a transitive package incompatible with TypeScript 2.9 from arriving. That historical report explains the dependency problem, rather than providing a current compatibility matrix.

Is DefinitelyTyped trustworthy, and what experiences have other developers had with it?

It has shared contribution and review processes, but your package's accuracy still matters. Kop reports a completed contribution, while the Express thread records real breakage. Use those concrete experiences rather than treating repository reputation as proof about every declaration.

Who maintains DefinitelyTyped and reviews contributions?

The main README describes definition owners, the review bot and TypeScript or DefinitelyTyped team review. A package's owners are listed in its package.json; that is the useful starting point for a package-specific correction.

Should library authors bundle handwritten declarations or publish them to DefinitelyTyped?

Prefer keeping accurate declarations with the library when you can maintain them. In the TypeScript documentation discussion, Cameron Tacklind argues for bundling handwritten types too, and Andrew Branch argues against presenting separate publication as an arbitrary preference for library owners.

How can I contribute missing or incorrect type definitions?

Start from an API you use, add a declaration change and an example demonstrating it, then follow the current README's pnpm contribution workflow. Miskoviak's account shows why the example should include the package's surrounding use context.

How do I fix a missing-declaration error when no @types package exists?

Write a local declaration for the API you need, then contribute it if appropriate, as Kop did before sharing her Gatsby plugin declarations. A declaration that accurately describes the functions you call is more useful than replacing the missing information with an unchecked assumption.

What we have not tested yet

Our run establishes one consumer package installation and one rejected repository installation, not package-wide declaration accuracy. We have not tested a supported pnpm repository installation, filtered installation time, a completed contribution, current review or publishing latency, or a compiler check of a real application using the installed Node declarations.

The consumer recipe and repository harness used different CPU and memory configurations. Neither image label establishes the actual runtime or operating-system version; those require raw toolchain logs. The excerpted results contain no successful repository build or test result, and the undefined-f example wasn't a test of Node API accuracy.

We have not tested current React, D3 or Express combinations, Deno resolution, direct browser deployment, generated declarations or runtime input validation. The historical issue workarounds are attributed reports, not reproduced fixes for today's releases. The Software Mansion announcement supplies no adoption or quality measurement, and neither repository stars nor a recent push measures support responsiveness.

We did not audit the main repository, its publishing infrastructure or dependency vulnerabilities. The website and archived documentation security pages cannot fill that gap. Before accepting a declaration update, the useful next check is your own application's compiler run and runtime tests against the resolved library and declaration versions.

Alternatives

ProjectWhat it isPick it when
TypeScript declaration generation and bundling gh↗Generate declarations from source and publish them with the library.Pick this when you own the package and can maintain its types with the implementation.
dts-generateA research tool that derives declarations from runtime information collected through documentation examples.Consider this when investigating declaration generation for JavaScript packages with useful executable examples; the paper shows coverage depends on those examples.

Sources

  1. DefinitelyTyped main repository and README
  2. TypeScript declaration publishing handbook
  3. Iva Kop: contribution account
  4. Spencer Miskoviak: contextual declaration contribution
  5. Express transitive dependency failures
  6. Declaration generation research
  7. Our repository harness

More dev tools reviews