14 lines
No EOL
879 B
Text
14 lines
No EOL
879 B
Text
tests/cases/conformance/es6/for-ofStatements/for-of29.ts(5,15): error TS2322: Type '{ [Symbol.iterator]?(): Iterator<string>; }' is not assignable to type 'Iterable<string>'.
|
|
Property '[Symbol.iterator]' is optional in type '{ [Symbol.iterator]?(): Iterator<string>; }' but required in type 'Iterable<string>'.
|
|
|
|
|
|
==== tests/cases/conformance/es6/for-ofStatements/for-of29.ts (1 errors) ====
|
|
var iterableWithOptionalIterator: {
|
|
[Symbol.iterator]?(): Iterator<string>
|
|
};
|
|
|
|
for (var v of iterableWithOptionalIterator) { }
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2322: Type '{ [Symbol.iterator]?(): Iterator<string>; }' is not assignable to type 'Iterable<string>'.
|
|
!!! error TS2322: Property '[Symbol.iterator]' is optional in type '{ [Symbol.iterator]?(): Iterator<string>; }' but required in type 'Iterable<string>'.
|
|
|