Closed urish closed 5 years ago
For instance, a function that reads x => 5 will be transformed to x => { $_$twiz(/*...*/); 5 }, which returns undefined and not 5.
x => 5
x => { $_$twiz(/*...*/); 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)`); });
For instance, a function that reads
x => 5
will be transformed tox => { $_$twiz(/*...*/); 5 }
, which returns undefined and not 5.Failing integration test case: