1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS7031: Binding element 'a' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,10): error TS1182: A destructuring declaration must have an initializer.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS7031: Binding element 'b' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,5): error TS1182: A destructuring declaration must have an initializer.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS7031: Binding element 'a1' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,23): error TS1182: A destructuring declaration must have an initializer.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS7031: Binding element 'b1' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(5,5): error TS1182: A destructuring declaration must have an initializer.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(5,18): error TS1182: A destructuring declaration must have an initializer.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(7,5): error TS1182: A destructuring declaration must have an initializer.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(7,13): error TS7008: Member 'b3' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(7,25): error TS7008: Member 'b3' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(9,6): error TS7031: Binding element 'a4' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(9,26): error TS7031: Binding element 'b4' implicitly has an 'any' type.
tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts(11,6): error TS7031: Binding element 'a5' implicitly has an 'any' type.
==== tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts (16 errors) ====
var [a], {b}, c, d; // error
~~~
!!! error TS1182: A destructuring declaration must have an initializer.
~
!!! error TS7031: Binding element 'a' implicitly has an 'any' type.
~~~
!!! error TS1182: A destructuring declaration must have an initializer.
~
!!! error TS7031: Binding element 'b' implicitly has an 'any' type.
var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error
~~~~~~~~~~~~~~~~
!!! error TS1182: A destructuring declaration must have an initializer.
~~
!!! error TS7031: Binding element 'a1' implicitly has an 'any' type.
~~~~~~~~~~~
!!! error TS1182: A destructuring declaration must have an initializer.
~~
!!! error TS7031: Binding element 'b1' implicitly has an 'any' type.
var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any;
~~~~
!!! error TS1182: A destructuring declaration must have an initializer.
~~~~
!!! error TS1182: A destructuring declaration must have an initializer.
var {b3}: { b3 }, c3: { b3 }; // error in type instead
~~~~
!!! error TS1182: A destructuring declaration must have an initializer.
~~
!!! error TS7008: Member 'b3' implicitly has an 'any' type.
~~
!!! error TS7008: Member 'b3' implicitly has an 'any' type.
var [a4] = [undefined], {b4} = { b4: null }, c4 = undefined, d4 = null; // error
~~
!!! error TS7031: Binding element 'a4' implicitly has an 'any' type.
~~
!!! error TS7031: Binding element 'b4' implicitly has an 'any' type.
var [a5 = undefined] = []; // error
~~
!!! error TS7031: Binding element 'a5' implicitly has an 'any' type.
|