From 2a2ef28fc6aeca3f0957fd900eb426cd7050ca8f Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Wed, 22 Apr 2015 13:38:30 -0700 Subject: [PATCH] Undo the change to return --- src/lib/es6.d.ts | 2 +- tests/baselines/reference/for-of30.errors.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index 888ded962ef..71778ecf907 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -443,7 +443,7 @@ interface IteratorResult { interface Iterator { next(value?: any): IteratorResult; - return?(value?: T): IteratorResult; + return?(value?: any): IteratorResult; throw?(e?: any): IteratorResult; } diff --git a/tests/baselines/reference/for-of30.errors.txt b/tests/baselines/reference/for-of30.errors.txt index bc93a031bf5..6434b5294d5 100644 --- a/tests/baselines/reference/for-of30.errors.txt +++ b/tests/baselines/reference/for-of30.errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/es6/for-ofStatements/for-of30.ts(1,15): error TS2322: Ty Type '() => StringIterator' is not assignable to type '() => Iterator'. Type 'StringIterator' is not assignable to type 'Iterator'. Types of property 'return' are incompatible. - Type 'number' is not assignable to type '(value?: string) => IteratorResult'. + Type 'number' is not assignable to type '(value?: any) => IteratorResult'. ==== tests/cases/conformance/es6/for-ofStatements/for-of30.ts (1 errors) ==== @@ -14,7 +14,7 @@ tests/cases/conformance/es6/for-ofStatements/for-of30.ts(1,15): error TS2322: Ty !!! error TS2322: Type '() => StringIterator' is not assignable to type '() => Iterator'. !!! error TS2322: Type 'StringIterator' is not assignable to type 'Iterator'. !!! error TS2322: Types of property 'return' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type '(value?: string) => IteratorResult'. +!!! error TS2322: Type 'number' is not assignable to type '(value?: any) => IteratorResult'. class StringIterator { next() {