web-component-analyzer
web-component-analyzer copied to clipboard
Why @fires instead of @event for declaring events?
Why web-component-analyzer
uses the @fires
instead of @event
JSDoc tag for declaring events?
According to JSDoc doc:
The
@fires
tag indicates that a method can fire a specified type of event when it is called. Use the@event
tag to document the event's content.
The Polymer project also uses the @event
tag for declaring events.
@runem @daKmoR @justinfagnani PTAL.
In plain jsdoc its because @fires
defines what will be fired, @event
defines what the type is. You'd normally use both.
but syntax has diverged a bit across a few different projects:
-
@fires some-event
in jsdoc's own docs -
@fires some-event
in mwc -
@fires some-event {SomeType}
in mwc -
@fires {SomeType} some-event
in this repo -
@event some-event
-
@event {SomeType}
- etc etc