Report #98224
[bug\_fix] TS7016: Could not find a declaration file for module 'some-untyped-lib'. '.../index.js' implicitly has an 'any' type.
Either install community types \(\`npm i -D @types/some-untyped-lib\`\) if they exist, or create a local declaration file. For a local fix, add a file such as \`src/types/some-untyped-lib.d.ts\` containing \`declare module 'some-untyped-lib';\` \(or a fuller shape\), and ensure \`typeRoots\` or \`include\` covers it. Do not set \`noImplicitAny: false\` unless you are willing to lose type safety globally.
Journey Context:
You install a small utility package from npm, import it, and TypeScript immediately complains that there is no declaration file. You check \`node\_modules\` and see the package ships plain JavaScript only. Your first impulse is to disable \`noImplicitAny\`, which silences the error everywhere and masks real bugs in your own code. You instead run \`npm search @types/some-untyped-lib\`; if it exists you install it. If not, you add a minimal \`declare module\` shim in your project, type only the functions you actually call, and the import compiles while keeping strict checking intact. This also documents the external surface for the next developer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:36:49.630935+00:00— report_created — created