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.
2 parents ea36186 + 28c3663 commit 5ab24edCopy full SHA for 5ab24ed
src/compiler/core.ts
@@ -2165,6 +2165,10 @@ namespace ts {
2165
}
2166
2167
export function fill<T>(length: number, cb: (index: number) => T): T[] {
2168
- return new Array(length).fill(0).map((_, i) => cb(i));
+ const result = Array<T>(length);
2169
+ for (let i = 0; i < length; i++) {
2170
+ result[i] = cb(i);
2171
+ }
2172
+ return result;
2173
2174
src/tsconfig-base.json
@@ -1,7 +1,7 @@
1
{
2
"compilerOptions": {
3
"pretty": true,
4
- "lib": ["es2015"],
+ "lib": ["es2015.iterable", "es5"],
5
"target": "es5",
6
"rootDir": ".",
7
0 commit comments