18 lines
907 B
Plaintext
18 lines
907 B
Plaintext
tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,6): error TS2461: Type 'number | string' is not an array type.
|
|
tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,7): error TS2322: Type 'number' is not assignable to type 'string'.
|
|
tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,14): error TS2322: Type 'string' is not assignable to type 'number'.
|
|
|
|
|
|
==== tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts (3 errors) ====
|
|
var a: string, b: number;
|
|
var tuple: [number, string] = [2, "3"];
|
|
for ([a = 1, b = ""] of tuple) {
|
|
~~~~~~~~~~~~~~~
|
|
!!! error TS2461: Type 'number | string' is not an array type.
|
|
~
|
|
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
|
~
|
|
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
|
a;
|
|
b;
|
|
} |