Files
scriptc/tests/fixtures/npm-static/twinstale-cli.ts
T
Malte UblandClaude Opus 5.5 0d9a6da8c9 Select untyped dependencies and @types twins by identity
An untyped package another package's JavaScript imports is selected
whether resolution answers no declarations or its JavaScript. A
DefinitelyTyped twin qualifies by identity (@types/<mangled name>):
the declarations only check the program, and the JavaScript compiles
with its inferred surface, so a twin that disagrees with the shipped
JavaScript fails the build at the use rather than compiling against it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:19:07 -07:00

7 lines
282 B
TypeScript

// twinstale's @types twin describes an older release than the installed
// package: the program typechecks against the twin, but not against the
// JavaScript's inferred surface (under Node the import is undefined).
import { stale } from "twinstale";
console.log(stale("ready"));