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

Mark async functions appropriately #81

Open
vsenko opened this issue Jun 29, 2020 · 1 comment
Open

Mark async functions appropriately #81

vsenko opened this issue Jun 29, 2020 · 1 comment

Comments

@vsenko
Copy link

vsenko commented Jun 29, 2020

Currently async functions are not emphasized in any way. On the other hand JSDoc by default specifically emphasizes them, discussion on the design is in jsdoc/jsdoc#1188.

It would be really useful to mark async functions somehow.

I use this modified sig-name.hbs:

{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}
{{#if async}}*(async)* {{/if}}{{#if name}}{{#sig~}}
{{{@depOpen}~}}
{{{@codeOpen}~}}
{{#if @prefix}}{{@prefix}} {{/if~}}
{{@parent~}}
{{@accessSymbol}}{{#if (isEvent)}}"{{{name}}}"{{else}}{{{escape name}}}{{/if~}}
{{#if @methodSign}}{{#if (isEvent)}} {{@methodSign}}{{else}}{{@methodSign}}{{/if}}{{/if~}}
{{{@codeClose}~}}
{{#if @returnSymbol}} {{@returnSymbol}}{{/if~}}
{{#if @returnTypes}} {{>linked-type-list types=@returnTypes delimiter=" \| " }}{{/if~}}
{{#if @suffix}} {{@suffix}}{{/if~}}
{{{@depClose}~}}
{{~/sig}}{{/if~}}
{{#if virtual}}*{{/if}}{{#with (parentObject)}}{{#if virtual}}*{{/if~}}{{/with~}}
@75lb
Copy link
Member

75lb commented Aug 29, 2024

Hi, currently most users document async functions like this which also gives you the opportunity to specify @fulfil and @reject..

However, i tested your partial and it looks good too.. However, implementing it will change everyone's documentation output overnight - including those that use the method mentioned above and don't need it..

So, behind a flag, maybe.. Will have a play..

Btw, feel free to post any more ideas you have - now's a good time.

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

No branches or pull requests

2 participants