andywer / andywer/threads.js

error TS7016: Could not find a declaration file for module 'threads'

Offen
#462 1 Kommentar 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
3.5k
Forks
173
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I am not sure how to configure my node app to support TypeScript when using this package. The compiler complain:
> error TS7016: Could not find a declaration file for module 'threads'. 'node_modules/threads/index.mjs' implicitly has an 'any' type.
Try `npm i --save-dev @types/threads` if it exists or add a new declaration (.d.ts) file containing `declare module 'threads';`,

I have tried both of those things, neither work. I am using `npx nodemon src/index.ts` to run my app and the `threads.d.ts` file is in the same folder as its usage.

What can I do?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.