We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4463194 commit b969b58Copy full SHA for b969b58
src/compiler/core.ts
@@ -1304,14 +1304,14 @@ namespace ts {
1304
return values;
1305
}
1306
1307
- const _entries = Object.entries ? Object.entries : <T>(obj: MapLike<T>) => {
+ const _entries = Object.entries || (<T>(obj: MapLike<T>) => {
1308
const keys = getOwnKeys(obj);
1309
const result: [string, T][] = Array(keys.length);
1310
- for (const key of keys) {
1311
- result.push([key, obj[key]]);
+ for (let i = 0; i < keys.length; i++) {
+ result[i] = [keys[i], obj[keys[i]]];
1312
1313
return result;
1314
- };
+ });
1315
1316
export function getEntries<T>(obj: MapLike<T>): [string, T][] {
1317
return obj ? _entries(obj) : [];
0 commit comments