-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Request: Compiler option to specify an alternate lib.d.ts #494
Comments
👍 I believe there is a larger issue here than simply including an alternate This would also solve the problem Split official "lib.t.ts" into different files / Special references clauses We have a requirement to reduce the number of global variables (properties on window) such as |
@NoelAbrahams I've been bitten by |
@basarat, that's an interesting one. It's quite a significant problem. In the old codeplex site it was common for people new to TypeScript to file bugs because they couldn't understand why code like the snippet below would compile; var fullName: string;
name = 'John Smith'; |
@NoelAbrahams the idea of splitting lib.d.ts is that node.d.ts would take dependency on lib.core.d.ts and not the normal lib, then when you reference node.d.ts you do not get any dom types as you would expect. For this issue, we need two things:
|
this should be covered by the proposal in #6974 |
The compiler has an option noLib which disables the default inclusion of lib.d.ts during compilation. Unfortunately there is no compiler option to specify a .d.ts file or files to automatically include before compiling each .ts file. Such an option would make it much easier to use an alternate lib.d.ts.
The work around now is to use the noLib option and then to add a line to each source file to manually pull in your alternate lib.d.ts.
The text was updated successfully, but these errors were encountered: