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

feat(Class): add support for class @emits and @listens #524

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CITguy
Copy link

@CITguy CITguy commented Aug 12, 2018

Add support for class-level @emits and @listens.

Breaking Changes

@emits syntax changed

It's possible to emit two different events of the same class type but with different names. As such, the @emits syntax was changed to provide a <name> for an emitted event. The <name> param is required because Web APIs prevent creating events without names.

  • old: @emits <identifier> [description]
  • new: @emits <type> <name> [-] [description]

@listens syntax changed

Event listeners are defined by event name, not by event class. As such, the @listens syntax was changed to provide a <name> for a listened event.

  • old: @listens <identifier> [description]
  • new: @listens <type> <name> [-] [description]

BREAKING CHANGE: `@emits` syntax changed
* old: `@emits <identifier> [description]`
* new: `@emits <type> <name> [-] [description]`

BREAKING CHANGE: `@listens` syntax changed
* old: `@listens <identifier> [description]`
* new: `@listens <type> <name> [-] [description]`
Copy link

@ajmeese7 ajmeese7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I am merging this into my fork of esdoc2 in the near future, I will be sure to mention your name to give credit where credit is due. Thanks for this!

Sorry that these guys really fell off, I'm trying to get some life back into esdoc2 as well since that was also seemingly abandoned.

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

Successfully merging this pull request may close these issues.

None yet

2 participants