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