mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Add regression tests
This commit is contained in:
@@ -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 || [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user