-
Notifications
You must be signed in to change notification settings - Fork 111
tide does not pick up .d.ts file in tsconfig.json #37
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
Tide just calls into the TypeScript tooling, so it should have the same I think you should try to make a minimal example of the problem and submit On Fri, Jun 24, 2016 at 8:59 AM, Nhan Ho [email protected] wrote:
|
File
File
File
Emacs with tide will complain "Cannot find game 'Game'". On the other hand, running |
The extra "/" was something I accidentally added after copy and paste, it's not relevant to the issue. And I'm sorry for the bad example, it's indeed working (I did something slightly different when trying to reproduce the issue) After looking at the log file, I think I found the reason. It happens when I open a new file in the project but have yet to add it to the files list in tsconfig.json. I'm using a gulp plugin that allows me to use Is there any way we could support a wildcard/ filesGlob syntax in tide, or would it be better to just wait for official typescript support? |
I think glob support is already available in TypeScript nightly build microsoft/TypeScript#8841. I haven't tested it, but it might work in typescript-2.0 branch. see #38. |
I am having a similar issue. Tide gives me errors about missing modules that {
"compilerOptions": {
"target": "es6",
"jsx": "react",
"noImplicitAny": true,
"experimentalDecorators": true,
"preserveConstEnums": true,
"outDir": "built",
"rootDir": "src",
"sourceMap": true,
"strictNullChecks": true
},
"filesGlob": [
"typings/**/*.d.ts",
"src/**/*.ts",
"src/**/*.tsx",
"!./node_modules/**/*.ts"
],
"exclude": [
"typings/browser.d.ts",
"typings/browser",
"node_modules"
]
} I am using import * as Foo from "foo"; Tide gives me flycheck errors that I do not get when I manually run |
@paldepind Just updated the tsserver to the latest version. Can you update tide and see if it solves the problem? |
I just updated from MELPA. I'm not seeing a difference. |
It seems like when I specify a .d.ts file in tsconfig.json (with "files" setting), tide doesn't pick it up and will complain (Cannot find name ...), even though tsc will work fine with such setting.
Right now, I have to manually add
/// <reference path="" />
in every individual files to make it work, but it's very inconvenient, and it seems to me it will be an issue with larger project with multiple .d.ts files in the source. Is it a bug or expected behaviour by tide?Taking a look over to other editors, I think all of them are supposedly picking up definitions in .d.ts given that is specified in "files" of tsconfig.json
The text was updated successfully, but these errors were encountered: