-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Intersection of features in modular lib files #11093
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
The defaults are:
Some notes,
|
Update the documentation in https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Compiler%20Options.md to add this conent |
Thanks @mhegazy. There's one instance in our source where Also, just a nit, the default values you added should go in the Default column on the markdown page :) |
Also, you said for es6 targets, |
It isn't a mistake. |
yes. the import script is more of an anomaly. it should not have been ever added to the library. but it is kept there for back compat purposes. so it was intentionally omitted. |
importScripts is a part of web worker functionality -- how else is it possible to include scripts (eg, lodash)?? |
if you are using web workers use |
TypeScript Version: 2.0.3
It is very unclear how to effectively use the --lib compiler option. It appears there is a default set of libs that are included (i.e. when no --lib is specified). If any libs are specified with --lib, then it seems this default set gets replaced with the set you provide. I haven't been able to find any documentation on exactly what is in the default set.
Here's the issue I'm running into. I want to use the [default set] + es2015.collection. I've tried a number of things.
--lib es2015.collection OR --lib es6
- Lots of errors because DOM isn't declared--lib es6,dom,scripthost,webworker
- Several errors about duplicate signatures and declarations, e.g.lib.dom.d.ts(2145,5): error TS2375: Build: Duplicate number index signature.
lib.dom.d.ts(3772,14): error TS2403: Build: Subsequent variable declarations must have the same type. Variable 'srcElement' must be of type 'any', but here has type 'Element'.
[no --lib option]
- Can't use ES6 sets/maps.Expected behavior:
Either the set of libs you can import needs to be disjoint, or the compiler should be able to handle duplicate declarations in these files.
The text was updated successfully, but these errors were encountered: