Skip to content

Commit 3ff0a24

Browse files
committed
Update based on PR feedback
1 parent 5710f7d commit 3ff0a24

17 files changed

+23
-23
lines changed

src/compiler/factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3645,7 +3645,7 @@ namespace ts {
36453645
return { value: o && o[i++], done: !o };
36463646
}
36473647
};
3648-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
3648+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
36493649
};`
36503650
};
36513651

src/testRunner/unittests/evaluation/forOf.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ describe("unittests:: evaluation:: forOfEvaluation", () => {
6666
}
6767
`, { downlevelIteration: true, target: ts.ScriptTarget.ES5 });
6868

69-
assert.throws(() => result.main(), "undefined is not iterable (cannot read property Symbol(Symbol.iterator))");
69+
assert.throws(() => result.main(), /cannot read property.*Symbol\(Symbol\.iterator\).*/i);
7070
});
7171

7272
it("es5 over object with no Symbol.iterator with no Symbol", () => {
@@ -93,7 +93,7 @@ describe("unittests:: evaluation:: forOfEvaluation", () => {
9393
}
9494
`, { downlevelIteration: true, target: ts.ScriptTarget.ES5 });
9595

96-
assert.throws(() => result.main(), "Object not iterable");
96+
assert.throws(() => result.main(), "Object is not iterable");
9797
});
9898

9999
it("es5 over object with Symbol.iterator", () => {
@@ -110,7 +110,7 @@ describe("unittests:: evaluation:: forOfEvaluation", () => {
110110
{
111111
output.push(value)
112112
}
113-
113+
114114
}`, { downlevelIteration: true, target: ts.ScriptTarget.ES5 });
115115

116116
result.main();

tests/baselines/reference/ES5For-of33.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/baselines/reference/ES5For-of33.sourcemap.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sourceFile:ES5For-of33.ts
1717
>>> return { value: o && o[i++], done: !o };
1818
>>> }
1919
>>> };
20-
>>> throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
20+
>>> throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2121
>>>};
2222
>>>var e_1, _a;
2323
>>>try {

tests/baselines/reference/ES5For-of34.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/baselines/reference/ES5For-of34.sourcemap.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sourceFile:ES5For-of34.ts
1717
>>> return { value: o && o[i++], done: !o };
1818
>>> }
1919
>>> };
20-
>>> throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
20+
>>> throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2121
>>>};
2222
>>>var e_1, _a;
2323
>>>function foo() {

tests/baselines/reference/ES5For-of35.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/baselines/reference/ES5For-of35.sourcemap.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sourceFile:ES5For-of35.ts
1717
>>> return { value: o && o[i++], done: !o };
1818
>>> }
1919
>>> };
20-
>>> throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
20+
>>> throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2121
>>>};
2222
>>>var e_1, _a;
2323
>>>try {

tests/baselines/reference/ES5For-of36.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/baselines/reference/ES5For-of36.sourcemap.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sourceFile:ES5For-of36.ts
1717
>>> return { value: o && o[i++], done: !o };
1818
>>> }
1919
>>> };
20-
>>> throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
20+
>>> throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2121
>>>};
2222
>>>var __read = (this && this.__read) || function (o, n) {
2323
>>> var m = typeof Symbol === "function" && o[Symbol.iterator];

tests/baselines/reference/ES5For-of37.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var __values = (this && this.__values) || function(o) {
2626
return { value: o && o[i++], done: !o };
2727
}
2828
};
29-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
29+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
3030
};
3131
var e_1, _a, e_2, _b;
3232
try {

tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var __values = (this && this.__values) || function(o) {
4343
return { value: o && o[i++], done: !o };
4444
}
4545
};
46-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
46+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
4747
};
4848
function a() {
4949
var _loop_1, _a, _b, i, e_1_1;

tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ var __values = (this && this.__values) || function(o) {
291291
return { value: o && o[i++], done: !o };
292292
}
293293
};
294-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
294+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
295295
};
296296
var C4 = /** @class */ (function () {
297297
function C4() {
@@ -373,7 +373,7 @@ var __values = (this && this.__values) || function(o) {
373373
return { value: o && o[i++], done: !o };
374374
}
375375
};
376-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
376+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
377377
};
378378
var C5 = /** @class */ (function () {
379379
function C5() {

tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ var __values = (this && this.__values) || function(o) {
245245
return { value: o && o[i++], done: !o };
246246
}
247247
};
248-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
248+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
249249
};
250250
function f4() {
251251
return __asyncGenerator(this, arguments, function f4_1() {
@@ -322,7 +322,7 @@ var __values = (this && this.__values) || function(o) {
322322
return { value: o && o[i++], done: !o };
323323
}
324324
};
325-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
325+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
326326
};
327327
function f5() {
328328
return __asyncGenerator(this, arguments, function f5_1() {

tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ var __values = (this && this.__values) || function(o) {
245245
return { value: o && o[i++], done: !o };
246246
}
247247
};
248-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
248+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
249249
};
250250
var f4 = function () {
251251
return __asyncGenerator(this, arguments, function () {
@@ -322,7 +322,7 @@ var __values = (this && this.__values) || function(o) {
322322
return { value: o && o[i++], done: !o };
323323
}
324324
};
325-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
325+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
326326
};
327327
var f5 = function () {
328328
return __asyncGenerator(this, arguments, function () {

tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ var __values = (this && this.__values) || function(o) {
265265
return { value: o && o[i++], done: !o };
266266
}
267267
};
268-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
268+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
269269
};
270270
var o4 = {
271271
f: function () {
@@ -344,7 +344,7 @@ var __values = (this && this.__values) || function(o) {
344344
return { value: o && o[i++], done: !o };
345345
}
346346
};
347-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
347+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
348348
};
349349
var o5 = {
350350
f: function () {

tests/baselines/reference/emptyVariableDeclarationBindingPatterns01_ES5iterable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ var __values = (this && this.__values) || function(o) {
7474
return { value: o && o[i++], done: !o };
7575
}
7676
};
77-
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
77+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
7878
};
7979
(function () {
8080
var a;

0 commit comments

Comments
 (0)