mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
1.6 KiB
Plaintext
27 lines
1.6 KiB
Plaintext
destructionAssignmentError.ts(6,3): error TS2695: Left side of comma operator is unused and has no side effects.
|
|
destructionAssignmentError.ts(6,10): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.
|
|
destructionAssignmentError.ts(11,3): error TS2695: Left side of comma operator is unused and has no side effects.
|
|
destructionAssignmentError.ts(12,1): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.
|
|
|
|
|
|
==== destructionAssignmentError.ts (4 errors) ====
|
|
declare function fn(): { a: 1, b: 2 }
|
|
let a: number;
|
|
let b: number;
|
|
|
|
({ a, b } = fn());
|
|
{ a, b } = fn();
|
|
~
|
|
!!! error TS2695: Left side of comma operator is unused and has no side effects.
|
|
~
|
|
!!! error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.
|
|
|
|
({ a, b } =
|
|
fn());
|
|
|
|
{ a, b }
|
|
~
|
|
!!! error TS2695: Left side of comma operator is unused and has no side effects.
|
|
= fn();
|
|
~
|
|
!!! error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses. |