Add regression tests

This commit is contained in:
Anders Hejlsberg 2019-05-31 16:53:46 -07:00
parent 5c7823c8b8
commit d0795afb48

View File

@ -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 || [];
}