Skip to content

Add support for Promises #104

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

Closed
albertorestifo opened this issue Jun 18, 2015 · 5 comments
Closed

Add support for Promises #104

albertorestifo opened this issue Jun 18, 2015 · 5 comments

Comments

@albertorestifo
Copy link

There should be a special tag to easily document promises.

As a reference, see the discussion at the JSDoc repo: jsdoc/jsdoc#509

@tmcw
Copy link
Member

tmcw commented Jun 19, 2015

I'm open to the idea, but ideally this first lands upstream in JSDoc - our strategy so far is to always follow existing JSDoc standards.

@albertorestifo
Copy link
Author

What about making it an internal plugin that you can activate via configuration flag?

That way it would not be official but still be there as an option. I don't think JSDoc will add them anytime soon, and Promises are used quite a bit today.

@tmcw
Copy link
Member

tmcw commented Jun 25, 2015

Okay, agreed - I think upstream we can implement a rule-adding interface to doctrine, the JSDoc syntax parser.

@tmcw
Copy link
Member

tmcw commented Apr 15, 2017

On further consideration, Promise<resultType> is a perfectly good way to document promises, and the thread on the jsdoc side never found resolution. I'm happy to accept a PR from someone with the vision who wants to implement this, but for my scope I'm going to accept Promise<resultType> as a good-enough solution.

@tmcw tmcw closed this as completed Apr 15, 2017
@arv
Copy link
Contributor

arv commented Apr 17, 2017

Agreed. Promise<T> is the way to do this and is widely used in lots of projects...

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

No branches or pull requests

3 participants