diff --git a/tests/baselines/reference/destructuringInFunctionType.errors.txt b/tests/baselines/reference/destructuringInFunctionType.errors.txt index da7a2fc32bb..06b1eeffee4 100644 --- a/tests/baselines/reference/destructuringInFunctionType.errors.txt +++ b/tests/baselines/reference/destructuringInFunctionType.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts(12,18): error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. -tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts(12,28): error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts(12,18): error TS2842: Variable 'b' is not used. Did you mean to write a type annotation for whole object? +tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts(12,28): error TS2842: Variable 'a' is not used. Did you mean to write a type annotation for whole object? ==== tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts (2 errors) ==== @@ -16,9 +16,9 @@ tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts(12,28): type T3 = ([{ a: b }, { b: a }]); type F3 = ([{ a: b }, { b: a }]) => void; ~ -!!! error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +!!! error TS2842: Variable 'b' is not used. Did you mean to write a type annotation for whole object? ~ -!!! error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +!!! error TS2842: Variable 'a' is not used. Did you mean to write a type annotation for whole object? type T4 = ([{ a: [b, c] }]); type F4 = ([{ a: [b, c] }]) => void; diff --git a/tests/baselines/reference/destructuringInFunctionType.types b/tests/baselines/reference/destructuringInFunctionType.types index 2b7f0de66cc..553fdaa9cf3 100644 --- a/tests/baselines/reference/destructuringInFunctionType.types +++ b/tests/baselines/reference/destructuringInFunctionType.types @@ -31,7 +31,7 @@ type T3 = ([{ a: b }, { b: a }]); >b : a type F3 = ([{ a: b }, { b: a }]) => void; ->F3 : ([{ a: b }, { b: a }]: [{ a: any; }, { b: any; }]) => void +>F3 : ([{ a }, { b }]: [{ a: any; }, { b: any; }]) => void >a : any >b : any >b : any diff --git a/tests/baselines/reference/excessPropertyCheckWithSpread.errors.txt b/tests/baselines/reference/excessPropertyCheckWithSpread.errors.txt index 9ae33a27580..85975abec2d 100644 --- a/tests/baselines/reference/excessPropertyCheckWithSpread.errors.txt +++ b/tests/baselines/reference/excessPropertyCheckWithSpread.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/excessPropertyCheckWithSpread.ts(1,25): error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +tests/cases/compiler/excessPropertyCheckWithSpread.ts(1,25): error TS2842: Variable 'number' is not used. Did you mean to write a type annotation for whole object? ==== tests/cases/compiler/excessPropertyCheckWithSpread.ts (1 errors) ==== declare function f({ a: number }): void ~~~~~~ -!!! error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +!!! error TS2842: Variable 'number' is not used. Did you mean to write a type annotation for whole object? interface I { readonly n: number; } diff --git a/tests/baselines/reference/paramterDestrcuturingDeclaration.errors.txt b/tests/baselines/reference/paramterDestrcuturingDeclaration.errors.txt index 69e5d888a1b..4225815bb0d 100644 --- a/tests/baselines/reference/paramterDestrcuturingDeclaration.errors.txt +++ b/tests/baselines/reference/paramterDestrcuturingDeclaration.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/paramterDestrcuturingDeclaration.ts(2,10): error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. -tests/cases/compiler/paramterDestrcuturingDeclaration.ts(3,14): error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +tests/cases/compiler/paramterDestrcuturingDeclaration.ts(2,10): error TS2842: Variable 'name' is not used. Did you mean to write a type annotation for whole object? +tests/cases/compiler/paramterDestrcuturingDeclaration.ts(3,14): error TS2842: Variable 'boolean' is not used. Did you mean to write a type annotation for whole object? ==== tests/cases/compiler/paramterDestrcuturingDeclaration.ts (2 errors) ==== interface C { ({p: name}): any; ~~~~ -!!! error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +!!! error TS2842: Variable 'name' is not used. Did you mean to write a type annotation for whole object? new ({p: boolean}): any; ~~~~~~~ -!!! error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +!!! error TS2842: Variable 'boolean' is not used. Did you mean to write a type annotation for whole object? } \ No newline at end of file diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.errors.txt index 69c6d7d79e3..189333949ae 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(17,39): error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +tests/cases/conformance/jsx/file.tsx(17,39): error TS2842: Variable 'string' is not used. Did you mean to write a type annotation for whole object? ==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== @@ -20,7 +20,7 @@ tests/cases/conformance/jsx/file.tsx(17,39): error TS2797: Renaming a property i declare function TestingOneThing({y1: string}): JSX.Element; ~~~~~~ -!!! error TS2797: Renaming a property in destructuring assignment is only allowed in a function or constructor implementation. +!!! error TS2842: Variable 'string' is not used. Did you mean to write a type annotation for whole object? declare function TestingOneThing(j: {"extra-data": string, yy?: string}): JSX.Element; declare function TestingOneThing(n: {yy: number, direction?: number}): JSX.Element; declare function TestingOneThing(n: {yy: string, name: string}): JSX.Element;