This repository was archived by the owner on Oct 5, 2021. It is now read-only.
This repository was archived by the owner on Oct 5, 2021. It is now read-only.
Arrow functions with concise body not instrumented correctly #82
Closed
Description
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)`);
});