Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

@Emit #44

Merged
merged 3 commits into from
Sep 2, 2017
Merged

@Emit #44

merged 3 commits into from
Sep 2, 2017

Conversation

eddow
Copy link
Contributor

@eddow eddow commented Aug 24, 2017

#41
I thought it was a pretty good idea, I implemented it here.
@Emit is a method decorator that makes the method emit an event after beeing called.

Examples given in proposal.

Differrence with the proposal: In the implementation, if the function returns false, no event is emitted

Note: I used the decorator in a local project: it is tested and working

@sylvainpolletvillard
Copy link
Contributor

Good suggestion for the false return. I add it to the proposal

@eddow
Copy link
Contributor Author

eddow commented Aug 25, 2017

Last modification:

  @Emit() rowClick(row) {

should indeed be equivalent of

  @Emit('row-click') rowClick(row) {

@kaorun343
Copy link
Owner

kaorun343 commented Aug 25, 2017

I need to update the way of testing by using Karma.
Anyway, the idea is nice, I think.
I'm going to merge this. Is this OK?

@eddow
Copy link
Contributor Author

eddow commented Aug 25, 2017

I have been using it for 2 days now ;-)
Please, tell me also when you npm-publish so that I set back my projects' references.

@kaorun343 kaorun343 merged commit 97817e5 into kaorun343:master Sep 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants