15 lines
658 B
Plaintext
15 lines
658 B
Plaintext
tests/cases/conformance/es6/for-ofStatements/for-of46.ts(3,7): error TS2322: Type 'boolean' is not assignable to type 'string'.
|
|
tests/cases/conformance/es6/for-ofStatements/for-of46.ts(3,18): error TS2322: Type 'string' is not assignable to type 'boolean'.
|
|
|
|
|
|
==== tests/cases/conformance/es6/for-ofStatements/for-of46.ts (2 errors) ====
|
|
var k: string, v: boolean;
|
|
var map = new Map([["", true]]);
|
|
for ([k = false, v = ""] of map) {
|
|
~
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
|
|
~
|
|
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
|
|
k;
|
|
v;
|
|
} |