-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Support to define the used .d.ts files in the tsconfig.json #2865
Comments
Why not just use the "files" property in the tsconfig.json file? {
"compilerOptions" : {
"target" : " ES5"
},
"files" : [
"file1.ts",
"typeings\\lib1.d.ts",
"typeings\\lib2.d.ts"
]
} |
Good , but then I have to enumerate all the .ts files. I thought there was globbing support, but I don't see this mentioned anymore in the wiki https://github.com/Microsoft/TypeScript/wiki/tsconfig.json. Is there still globbing support? |
tldr; Wow, we need this to support glob patterns. Here is my use case ... I have a project with a few 100 files in TS and several 3rd party libraries with a concatenated lib.d.ts file. I want intellisense everywhere with the least amount of friction. Option 1) Add /// reference to every file to point to the lib.d.ts and leave the tsconfig's file array undefined so it reads all of my app TS. Downside ... every file has this extra line ... yuk (100's of places) Option 2) Add a gulp task that creates the files array in the tsconfig.json with the 3rd party lib.d.ts and my .ts files (lots of them). Downside, a gulp task to keep up, but at least my code is untouched Option 3) Add glob support to tsconfig's files array so I can do this
I vote for option 3. So much easier and less friction for devs. |
Actually the mankala sample from https://github.com/Microsoft/TypeScriptSamples includes a filesGlob attribute. Is this officially supported?
|
the additional "filesGlob" is supported by some tools like atom-typescript plugin, but not by the compiler. adding glob support to tsconfig is tracked by #1927 |
ok, moving my points over there |
I would be nice to support that I can define which library .d.ts are used for my project in the tsconfig.json file. In this way I do not have to add /// refs in all the files in the project.
The text was updated successfully, but these errors were encountered: