Arrow functions with concise body not instrumented correctly
urish opened this issue · comments
For instance, a function that reads x => 5
will be transformed to x => { $_$twiz(/*...*/); 5 }
, which returns undefined and not 5.
Failing integration test case:
it('should correctly transform arrow functions that return arrow functions', () => {
const input = `(x=>y=>x+y)(10)(5)`;
expect(typeWiz(input)).toBe(`((x: number)=>(y: number)=>x+y)(10)(5)`);
});