otris/jsdoc-tsd

Support for generic types

Closed this issue · 4 comments

Let's say I have a function that returns Promise<*>. When that is converted to TSD, shouldn't that be Promise.<any> and not Promise.<*>?

Actually I think it should be Promise<any> instead of Promise.<*> or Promise.<any>. I'm not sure for now why there is a dot... but we'll have a look at this.

I see that jsdoc2md/jsdoc-to-markdown does it too: https://github.com/whitlockjc/json-refs/blob/master/docs/API.md If you look at any of the parameterized types, you'll see a dot. Not sure if it's intentional or not but I think TypeScript doesn't need/want it.

You are both right. It has to become Promise<any>.
Like in #39 it's a problem with the function mapVariableType.

It should not be that hard to fix, so if you like you can create a PR (or anybody else here) if you are faster than me :)

Fixed with #46