TypeScript/tests/cases/compiler/fallbackToBindingPatternForTypeInference.ts
2016-05-17 09:33:55 -07:00

7 lines
186 B
TypeScript

declare function trans<T>(f: (x: T) => string): number;
trans(({a}) => a);
trans(([b,c]) => 'foo');
trans(({d: [e,f]}) => 'foo');
trans(([{g},{h}]) => 'foo');
trans(({a, b = 10}) => a);