-
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
ES6 emit missing some typings with lib.d.ts (ES5 typings) #5504
Comments
so you are ok with generators, for..of, lambdas, default and rest args, etc...? if so what is it that you do not want to include? why not |
we're at Google so of course it's the Closure Compiler. Our internal TS support works like So we are constrained to support only the Closure ES6 supported syntax, and disallow any of the runtime APIs. We'll have to use tslint if we find there are unsupported syntax bits that we need to disallow, but right now I'm just focusing on type-checking. Adding a custom typings file does solve this problem, and it's not long, just a copy of the declarations for those 5 things in the error above. I suppose it would be nice to have
|
Thanks for the details. #4168 looks like the one you want. we need to find a correct granularity level for the library, and ideally allow for a la cart model of enabling specific parts; we will also need to figure out what it means when that interfere with syntactic features, e.g. what happens if you use To unblock you meantime, the building pieces of the lib file are all in https://github.com/Microsoft/TypeScript/tree/master/src/lib, and you can find how they are combined to generate lib.d.ts, and lib.es6.d.ts in https://github.com/Microsoft/TypeScript/blob/master/Jakefile.js#L163-L171. you should be able to combine the src\lib sources to get the core lib that you need. |
This should be fixed by #7715. |
I need to emit non-downlevel ES6 code to feed into another tool in the toolchain.
However, I want to ensure that the project includes only ES5 library code, because there are no runtime polyfills nor does the 6-to-5 tool do any API conversions.
So, I want simply
tsc --target es6 --noLib node_modules/typescript/lib/lib.d.ts app.ts
but this doesn't work:
I've followed #4692 but I wonder if there is another answer for this.
Repro
tsconfig.json
app.ts
The text was updated successfully, but these errors were encountered: