18 lines
889 B
Plaintext
18 lines
889 B
Plaintext
tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,6): error TS2461: Type 'string | number' is not an array type.
|
|
tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,7): error TS2322: Type '1' is not assignable to type 'string'.
|
|
tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts(3,14): error TS2322: Type '""' 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 'string | number' is not an array type.
|
|
~
|
|
!!! error TS2322: Type '1' is not assignable to type 'string'.
|
|
~
|
|
!!! error TS2322: Type '""' is not assignable to type 'number'.
|
|
a;
|
|
b;
|
|
} |