-
Notifications
You must be signed in to change notification settings - Fork 12.8k
bug: TS7016 Could not find a declaration file for module #14379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The behavior matches the documentation. the The request to look up |
Edit your tsconfig.json
|
It was not about how to hide the error message but for what strategy does TS use to find declaration files. I used to think that the "root" means "main" field ( The fact is that the "root" means where |
Ah! Alrighty. 👍 |
I know this question is old. But i got same issue and found way to resolve: "typeRoots": [
"lib"
], with "lib" is folder "outDir" value. Assume you put .d.ts files same place with .js file. and it will be good! |
I agree that the documentation is quite misleading. It should say "next to |
TypeScript Version: 2.2.1 / nightly (2.3.0-dev.20170301)
Command
Code
try.ts
module
test
package.json
lib/index.js
lib/index.d.ts
Expected behavior:
non-error
Actual behavior:
It works fine with [email protected], or specified
types
field inpackage.json
:But I think this is a bug, since the documentation said:
The text was updated successfully, but these errors were encountered: