-
Notifications
You must be signed in to change notification settings - Fork 202
Support lib property in tsconfig.json #918
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
Note : this is flag that I believe the user is speaking of : microsoft/TypeScript#6974 🌹 |
Working on PR |
How would I add a array of strings property? I see string, boolean, and number. Should I extend the validator to deal with arrays or just write code specific to the lib property? |
Nothing stays simple Add an |
@basarat http://json-schema.org/ looks like a decent JSON validator. I believe there is an atom plugin with autocomplete. |
I got the lib property to pass validation but it does not work. |
Guess you need to change the |
Is there a way to access the compiler host from atom-typescript?
|
Someone already wrote a json-schema definition for tsconfig.json. http://json.schemastore.org/tsconfig |
https://github.com/bali182/autocomplete-json is another atom plugin |
I did a quick readthrough of the vscode codebase. It seems to have its So for alm I'll be extending |
FWIW this is missing a lot of options including That said I wrote a bunch of start from scratch In the end is just a matter of loading the right lib.d.ts into the compilation context (in the language service host I pointed to in atom-typescript code base) so that is still worth a try if someone wants to do a lazy PR. More details : microsoft/TypeScript#6974 (comment) |
Also apparently it is still a string. Nevertheless I've asked for a clarification : microsoft/TypeScript#6974 (comment) 🌹 |
@basarat I have some code a think should work but for some reason it does not. console.log and debugger statements don't work for some odd reason so I can't figure out why it is failing. |
@basarat If it is a string when why is it an array in the ts code. |
@2426021684 it is an array after parsing for sure. But I am questioning the before parsing state: From microsoft/TypeScript#6974 If you can find something / code that says otherwise it would be awesome. I don't like its not an array microsoft/TypeScript#6974 (comment) 🌹 |
|
@2426021684 awesome. Thanks! I'll clean up alm 🌹 |
My plan for making lib work won’t work. I tried to port typescript's implementation but even though the methods I need are accessible they don’t work. It errors about __filename being undefined when typescript’s internal code tries to get the lib to load. Maybe I can get the lib path from the path to typescript services.js.
|
That's what I do in atom-ts |
typescript includes APIs to parse the JSON (they handle comments) and create the CompilerOptions from it. Isn't the answer to delete all the configuration code and just use the API from the TS language service? |
Not quite. That api just returns the I've mentioned the need for such a public function here as well : microsoft/TypeScript#6974 (comment) 🌹 |
This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days |
When I use the new lib property in tsconfig.json I get an error (works fine with tsc).
The text was updated successfully, but these errors were encountered: