Track tasks and feature requests
Join 36 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprisesRequest: Compiler option to specify an alternate lib.d.ts #494
Comments
mhegazy
added
the
Bug
label
Aug 20, 2014
mhegazy
self-assigned this
Aug 20, 2014
mhegazy
added this to the
TypeScript 1.2 milestone
Aug 20, 2014
This comment has been minimized.
This comment has been minimized.
NoelAbrahams
commented
Aug 21, 2014
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 |
This comment has been minimized.
This comment has been minimized.
|
@NoelAbrahams I've been bitten by |
This comment has been minimized.
This comment has been minimized.
NoelAbrahams
commented
Aug 21, 2014
|
@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'; |
This comment has been minimized.
This comment has been minimized.
mhegazy
commented
Aug 21, 2014
|
@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:
|
RyanCavanaugh
referenced this issue
Aug 26, 2014
Closed
Compiler option to force explicit access for global properties #524
mhegazy
referenced this issue
Sep 2, 2014
Closed
lib.d.ts defines "postMessage" for window, but web worker scripts have a different signature #582
jonathandturner
modified the milestones:
Suggestions,
TypeScript 1.3
Sep 8, 2014
NoelAbrahams
referenced this issue
Dec 3, 2014
Closed
Variable usage issues caused by global Window object #1351
NoelAbrahams
referenced this issue
Mar 4, 2015
Closed
Misleading intellisense when assigning in-line functions in Visual Studio #2196
danquirk
added
Suggestion
and removed
Bug
labels
Apr 21, 2015
mhegazy
modified the milestone:
Suggestions
Apr 22, 2015
myitcv
referenced this issue
Oct 17, 2015
Merged
Rule to prevent certain keywords being used as variable names #735
mhegazy
added
the
In Discussion
label
Dec 9, 2015
mhegazy
removed their assignment
Dec 9, 2015
adidahiya
referenced this issue
Jan 21, 2016
Closed
New rule to forbid access to commonly-confused ambient globals #922
This comment has been minimized.
This comment has been minimized.
mhegazy
commented
Feb 20, 2016
|
this should be covered by the proposal in #6974 |


sedwards2009 commentedAug 20, 2014
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.