TypeScript/tests/baselines/reference/ES5For-of8.errors.txt

12 lines
442 B
Plaintext

tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts(4,6): error TS2322: Type 'string' is not assignable to type 'number'.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts (1 errors) ====
function foo() {
return { x: 0 };
}
for (foo().x of ['a', 'b', 'c']) {
~~~~~~~
!!! error TS2322: Type 'string' is not assignable to type 'number'.
var p = foo().x;
}