Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for generic types #38

Closed
whitlockjc opened this issue Aug 7, 2018 · 4 comments
Closed

Support for generic types #38

whitlockjc opened this issue Aug 7, 2018 · 4 comments
Assignees

Comments

@whitlockjc
Copy link

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.<*>?

@tineheller
Copy link
Collaborator

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.

@whitlockjc
Copy link
Author

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.

@wehrstedt
Copy link
Collaborator

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 :)

@wehrstedt wehrstedt self-assigned this Aug 21, 2018
@wehrstedt wehrstedt changed the title Promise<*> should become Promise<any> Support for generic types Aug 21, 2018
@wehrstedt
Copy link
Collaborator

Fixed with #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants