mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-23 10:29:01 -06:00
Add regression tests
This commit is contained in:
parent
5c7823c8b8
commit
d0795afb48
@ -2,3 +2,15 @@
|
||||
const a: { x?: number } = { };
|
||||
let x = 0;
|
||||
({x = 1} = a);
|
||||
|
||||
// Repro from #26235
|
||||
|
||||
function f1(options?: { color?: string, width?: number }) {
|
||||
let { color, width } = options || {};
|
||||
({ color, width } = options || {});
|
||||
}
|
||||
|
||||
function f2(options?: [string?, number?]) {
|
||||
let [str, num] = options || [];
|
||||
[str, num] = options || [];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user