feat(core-js): support esnext.array.last-item/index modules (#42119)

This commit is contained in:
Sakamoto, Kazunori
2020-02-14 09:42:53 -08:00
committed by GitHub
parent 437443a7f7
commit cf5c6739a8
2 changed files with 20 additions and 1 deletions
+10 -1
View File
@@ -334,7 +334,7 @@ b = Reflect.setPrototypeOf(a, a);
// #############################################################################################
// ECMAScript 7
// Modules: es7.array.includes, es7.string.at, ees7.string.pad-start, es7.string.pad-end,
// Modules: es7.array.includes, es7.string.at, es7.string.pad-start, es7.string.pad-end,
// es7.object.to-array, es7.object.get-own-property-descriptors, es7.regexp.escape,
// es7.map.to-json, and es7.set.to-json
// #############################################################################################
@@ -350,6 +350,15 @@ s = RegExp.escape(s);
a = map.toJSON();
a = set.toJSON();
// #############################################################################################
// ECMAScript Proposal
// Modules: esnext.array.last-item, and esnext.array.last-index
// #############################################################################################
point = arrayOfPoint.lastItem;
arrayOfPoint.lastItem = point;
i = arrayOfPoint.lastIndex;
// #############################################################################################
// Mozilla JavaScript: Array generics
// Modules: js.array.statics
+10
View File
@@ -78,6 +78,16 @@ interface Set<T> {
toJSON(): any;
}
// #############################################################################################
// ECMAScript Proposal
// Modules: esnext.array.last-item, and esnext.array.last-index
// #############################################################################################
interface Array<T> {
lastItem: T;
readonly lastIndex: number;
}
// #############################################################################################
// Mozilla JavaScript: Array generics
// Modules: js.array.statics