Unless I'm missing something here, seems like inlining the creation of a function and calling it in this manner seems to be broken:
Here's a minimal example:
letnormalFunc=(): (x:i32)=>i32=>{letmyFunc=(x: i32): i32=>{return24+x;}returnmyFunc;}assert(normalFunc()(1)==25);Compiler Error:
ERROR TS2349: Cannotinvokeanexpressionwhosetypelacksacallsignature.Type'closure-common-js-patterns/normalFunc'hasnocompatiblecallsignatures.assert(normalFunc()(1)==25);
Unless I'm missing something here, seems like inlining the creation of a function and calling it in this manner seems to be broken:
Here's a minimal example:
Compiler Error: