runem / web-component-analyzer

CLI that analyzes web components and emits documentation
https://runem.github.io/web-component-analyzer
MIT License
501 stars 61 forks source link

Why @fires instead of @event for declaring events? #200

Open FluorescentHallucinogen opened 3 years ago

FluorescentHallucinogen commented 3 years ago

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.

43081j commented 3 years ago

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: