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

Convert EventEmitter to TypeScript and add tests #432

Merged
merged 5 commits into from
Dec 31, 2016

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Dec 29, 2016

Part of #335

@Tyriar Tyriar added this to the 2.3.0 milestone Dec 29, 2016
@Tyriar Tyriar self-assigned this Dec 29, 2016
@Tyriar Tyriar requested a review from parisk December 29, 2016 13:10
Copy link
Contributor

@akalipetis akalipetis left a comment

Choose a reason for hiding this comment

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

LGTM 🐻

parisk
parisk previously requested changes Dec 30, 2016
Copy link
Contributor

@parisk parisk left a comment

Choose a reason for hiding this comment

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

👍 Just a few comments.

private _events: {[type: string]: ListenerType[]};

constructor() {
this._events = this._events || {};
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any chances that this._events has already a value here?

Copy link
Member Author

Choose a reason for hiding this comment

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

this._events = this._events || {};
}

// TODO: Merge addListener and on, no reason for an alias in a private component
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we merge addListener and on before merging?

Copy link
Member Author

Choose a reason for hiding this comment

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

}

// TODO: Merge removeListener and off, no reason for an alias in a private component
public removeListener(type, listener): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we merge removeListener and off before merging?

Copy link
Member Author

Choose a reason for hiding this comment

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

@Tyriar Tyriar dismissed parisk’s stale review December 31, 2016 15:12

Fixes all issues

@Tyriar Tyriar merged commit 1fbd3c8 into xtermjs:master Dec 31, 2016
@Tyriar Tyriar deleted the 335_TS_EventEmitter branch December 31, 2016 15:14
@Tyriar Tyriar modified the milestone: 2.3.0 Feb 2, 2017
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.

3 participants