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 :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 :)