TypeScript/tests/baselines/reference/for-of33.errors.txt
2017-02-24 17:48:06 -08:00

16 lines
1.1 KiB
Plaintext

tests/cases/conformance/es6/for-ofStatements/for-of33.ts(2,5): error TS7023: '[Symbol.iterator]' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
tests/cases/conformance/es6/for-ofStatements/for-of33.ts(7,10): error TS7022: 'v' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
==== tests/cases/conformance/es6/for-ofStatements/for-of33.ts (2 errors) ====
class StringIterator {
[Symbol.iterator]() {
~~~~~~~~~~~~~~~~~
!!! error TS7023: '[Symbol.iterator]' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
return v;
}
}
for (var v of new StringIterator) { }
~
!!! error TS7022: 'v' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.