Files
tsgo/testdata/baselines/reference/submodule/compiler/destructionAssignmentError.js

32 lines
412 B
TypeScript

//// [tests/cases/compiler/destructionAssignmentError.ts] ////
//// [destructionAssignmentError.ts]
declare function fn(): { a: 1, b: 2 }
let a: number;
let b: number;
({ a, b } = fn());
{ a, b } = fn();
({ a, b } =
fn());
{ a, b }
= fn();
//// [destructionAssignmentError.js]
"use strict";
let a;
let b;
({ a, b } = fn());
{
a, b;
}
fn();
({ a, b } =
fn());
{
a, b;
}
fn();