TypeScript/tests/cases/compiler/parameterDestructuringObjectLiteral.ts

10 lines
202 B
TypeScript
Raw Normal View History

2018-03-17 20:23:45 +01:00
// @declaration: true
// Repro from #22644
const fn1 = (options: { headers?: {} }) => { };
fn1({ headers: { foo: 1 } });
const fn2 = ({ headers = {} }) => { };
fn2({ headers: { foo: 1 } });