mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-14 09:34:03 +08:00
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>
7 lines
282 B
TypeScript
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"));
|