Skip to content

Commit 46f56e3

Browse files
tkrotoffgreglo
authored andcommitted
Fix TypeScript error with version 2.1.4
See Wrong type with Promise chaining and 2.1.4 microsoft/TypeScript#12409
1 parent 4218e2e commit 46f56e3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

whatwg-fetch/whatwg-fetch-tests.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ function test_Body_json() {
100100
fetch('http://test.com')
101101
.then(response => response.json())
102102
.then(fooBar => {
103-
// fooBar is any, not FooBar
104-
console.log(fooBar.foo);
105-
console.log(fooBar.bar);
103+
// fooBar is of type any, not of type FooBar
104+
105+
// FIXME Was behaving properly with TypeScript 2.0.10, not anymore with 2.1.4
106+
// See Wrong type with Promise chaining and 2.1.4 https://github.com/Microsoft/TypeScript/issues/12409
107+
//console.log(fooBar.foo);
108+
//console.log(fooBar.bar);
106109
});
107110
}

0 commit comments

Comments
 (0)