hotwired / stimulus

A modest JavaScript framework for the HTML you already have
https://stimulus.hotwired.dev/
MIT License
12.62k stars 418 forks source link

Add JSDoc to methods #259

Closed fleck closed 5 years ago

fleck commented 5 years ago

Would you consider adding JSDoc comments to methods? For example in @stimulus/core/dist/src/controller.d.ts:

    /**
     * Invoked by Stimulus anytime the controller is connected to the DOM
     * https://stimulusjs.org/reference/lifecycle-callbacks#methods
     */
    connect(): void;

would yield: image

Having inline documentation in addition to the signature is really nice!

fleck commented 5 years ago

This actually applies to any part of the code, not just methods:

image

Also nice having links to docs right there in the editor and being able to skip the step of googling...

sstephenson commented 5 years ago

Yes! We hope to get to this in a future release.