mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Update based on PR feedback
This commit is contained in:
parent
5710f7d5ff
commit
3ff0a249d2
@ -3645,7 +3645,7 @@ namespace ts {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};`
|
||||
};
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ describe("unittests:: evaluation:: forOfEvaluation", () => {
|
||||
}
|
||||
`, { downlevelIteration: true, target: ts.ScriptTarget.ES5 });
|
||||
|
||||
assert.throws(() => result.main(), "undefined is not iterable (cannot read property Symbol(Symbol.iterator))");
|
||||
assert.throws(() => result.main(), /cannot read property.*Symbol\(Symbol\.iterator\).*/i);
|
||||
});
|
||||
|
||||
it("es5 over object with no Symbol.iterator with no Symbol", () => {
|
||||
@ -93,7 +93,7 @@ describe("unittests:: evaluation:: forOfEvaluation", () => {
|
||||
}
|
||||
`, { downlevelIteration: true, target: ts.ScriptTarget.ES5 });
|
||||
|
||||
assert.throws(() => result.main(), "Object not iterable");
|
||||
assert.throws(() => result.main(), "Object is not iterable");
|
||||
});
|
||||
|
||||
it("es5 over object with Symbol.iterator", () => {
|
||||
@ -110,7 +110,7 @@ describe("unittests:: evaluation:: forOfEvaluation", () => {
|
||||
{
|
||||
output.push(value)
|
||||
}
|
||||
|
||||
|
||||
}`, { downlevelIteration: true, target: ts.ScriptTarget.ES5 });
|
||||
|
||||
result.main();
|
||||
|
||||
@ -13,7 +13,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var e_1, _a;
|
||||
try {
|
||||
|
||||
@ -17,7 +17,7 @@ sourceFile:ES5For-of33.ts
|
||||
>>> return { value: o && o[i++], done: !o };
|
||||
>>> }
|
||||
>>> };
|
||||
>>> throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
>>> throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
>>>};
|
||||
>>>var e_1, _a;
|
||||
>>>try {
|
||||
|
||||
@ -16,7 +16,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var e_1, _a;
|
||||
function foo() {
|
||||
|
||||
@ -17,7 +17,7 @@ sourceFile:ES5For-of34.ts
|
||||
>>> return { value: o && o[i++], done: !o };
|
||||
>>> }
|
||||
>>> };
|
||||
>>> throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
>>> throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
>>>};
|
||||
>>>var e_1, _a;
|
||||
>>>function foo() {
|
||||
|
||||
@ -14,7 +14,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var e_1, _a;
|
||||
try {
|
||||
|
||||
@ -17,7 +17,7 @@ sourceFile:ES5For-of35.ts
|
||||
>>> return { value: o && o[i++], done: !o };
|
||||
>>> }
|
||||
>>> };
|
||||
>>> throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
>>> throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
>>>};
|
||||
>>>var e_1, _a;
|
||||
>>>try {
|
||||
|
||||
@ -14,7 +14,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
|
||||
@ -17,7 +17,7 @@ sourceFile:ES5For-of36.ts
|
||||
>>> return { value: o && o[i++], done: !o };
|
||||
>>> }
|
||||
>>> };
|
||||
>>> throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
>>> throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
>>>};
|
||||
>>>var __read = (this && this.__read) || function (o, n) {
|
||||
>>> var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
|
||||
@ -26,7 +26,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var e_1, _a, e_2, _b;
|
||||
try {
|
||||
|
||||
@ -43,7 +43,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
function a() {
|
||||
var _loop_1, _a, _b, i, e_1_1;
|
||||
|
||||
@ -291,7 +291,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var C4 = /** @class */ (function () {
|
||||
function C4() {
|
||||
@ -373,7 +373,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var C5 = /** @class */ (function () {
|
||||
function C5() {
|
||||
|
||||
@ -245,7 +245,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
function f4() {
|
||||
return __asyncGenerator(this, arguments, function f4_1() {
|
||||
@ -322,7 +322,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
function f5() {
|
||||
return __asyncGenerator(this, arguments, function f5_1() {
|
||||
|
||||
@ -245,7 +245,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var f4 = function () {
|
||||
return __asyncGenerator(this, arguments, function () {
|
||||
@ -322,7 +322,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var f5 = function () {
|
||||
return __asyncGenerator(this, arguments, function () {
|
||||
|
||||
@ -265,7 +265,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var o4 = {
|
||||
f: function () {
|
||||
@ -344,7 +344,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
var o5 = {
|
||||
f: function () {
|
||||
|
||||
@ -74,7 +74,7 @@ var __values = (this && this.__values) || function(o) {
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object not iterable." : "Symbol.iterator is not defined.");
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
(function () {
|
||||
var a;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user