DEV Community

Discussion on: Imba - a JavaScript alternative for increased developer productivity

Collapse
 
somebee profile image
Sindre Aarsaether

It is not currently possible to annotate the return type of a function without resorting to a jsdoc comment above the function declaration. This is currently a limitation that I hope to resolve before final v2 release. That said, I find the type inference of typescript very powerful, so if you use typed parameters etc it will almost always infer the correct return type.

We're considering support for creating types and interfaces, but for now you'll need to do that in separate .d.ts files :)