Uh oh!
There was an error while loading. Please reload this page.
fix(es2018): add a target and an initial lib - #20385
Conversation
| "es7": "lib.es2016.d.ts", | ||
| "es2016": "lib.es2016.d.ts", | ||
| "es2017": "lib.es2017.d.ts", | ||
| "es2018": "lib.es2018.d.ts", |
There was a problem hiding this comment.
you need to build the new library as well. this is defined in our Jake/gulp files (sorry we have two build systems for now untill we are done with the migration).
JakeFile: https://github.com/Microsoft/TypeScript/blob/8f1cdc9b0c649f1e4fe9d96718be93277baa2ecd/Jakefile.js#L229
GulpFle: https://github.com/Microsoft/TypeScript/blob/8f1cdc9b0c649f1e4fe9d96718be93277baa2ecd/Gulpfile.ts#L168
See 6a737c8 that added esNext target.
There was a problem hiding this comment.
Mohamed Hegazy (@mhegazy) thank you for the review. I am updating my PR accordingly.
FYI, I see that jake LKG generates diagnosticMessages.generated.json file per locale. I think this is related to PR #19308
Therefore, in my PR you will have 2 commits:
- 'run jake LKG before es2018 addition'
- 'fix(es2018): add a target and an initial lib' (contains the es2018 lib + jake LKG run a second time)
Please let me know if I need to squash both commits
a0fa077 to
ab4a292CompareMohamed Hegazy (mhegazy)
commented
Dec 2, 2017
Thanks! For future references please do not include LKG updates in PRs, they happen as part of publishing or manually directly on master. |
benbraou (@benbraou) do you want to pick up adding definitions for the new array methods: https://github.com/tc39/proposal-flatMap (a new |
benbraou (benbraou)
commented
Dec 2, 2017
Mohamed Hegazy (@mhegazy) Thanks you! I got the point to not include LKG updates in future PRs. |
Mohamed Hegazy (mhegazy)
commented
Dec 2, 2017
that would be appreciated. thanks! |
| values(): IterableIterator<string | File>; | ||
| [Symbol.iterator](): IterableIterator<string | File>; | ||
| } |
There was a problem hiding this comment.
(out of scope for this PR but) this pattern repeats often enough that maybe there should be a virtual interface in lib.es2015.iterable.d.ts for this 🤔
interfaceIterableCollection<K,V=K,I=V>{entries(): IterableIterator<[K,V]>;keys(): IterableIterator<K>;values(): IterableIterator<V>;[Symbol.iterator](): IterableIterator<I>}Only useful in lib.*.d.ts if interface augmentations are allowed to add extends, though. Alternatively, end the separation between iterable and non-iterable declarations; but that might be undesirable for the folks still supporting IE without polyfills (please stop 🙏😉).
| * @param thisArg Value of 'this' used to invoke the mapfn. | ||
| */ | ||
| from<T, U = T>(arrayLike: ArrayLike<T>, mapfn?: (v: T, k: number) => U, thisArg?: any): U[]; | ||
| from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; |
There was a problem hiding this comment.
from<T, U, This>(arrayLike: ArrayLike<T>, mapfn: (this: This, v: T, k: number) => U, thisArg?: This): U[]?
FixesSchemaStore#403 TypeScript 2.7 now supports `"target": "es2018"`: microsoft/TypeScript#20385
Fixes#403 TypeScript 2.7 now supports `"target": "es2018"`: microsoft/TypeScript#20385
With this PR:
Fixes#20342