You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reversion below suggests a few changes to present pubic interface free of any internal functions or state. There is no significant change in public API or behavior intended.
In addition, the implementation ensures that a given function is only registered once for a given event. When a function is removed, if the listener count for the event goes to zero, the event is removed. That simplifies the code in the rest of the implementation.
The exception on emit when the event is not present is replaced by returning false which seems consistent with the other functions.
When compiled by the Moddable SDK, the private fields in TypeScript do not map to JavaScript fields directly. That adds overhead. It seems like it must be possible to have TypeScript generate standard JavaScript private fields. Suggestions?
The reversion below suggests a few changes to present pubic interface free of any internal functions or state. There is no significant change in public API or behavior intended.
In addition, the implementation ensures that a given function is only registered once for a given event. When a function is removed, if the listener count for the event goes to zero, the event is removed. That simplifies the code in the rest of the implementation.
The exception on
emit
when the event is not present is replaced by returningfalse
which seems consistent with the other functions.When compiled by the Moddable SDK, the private fields in TypeScript do not map to JavaScript fields directly. That adds overhead. It seems like it must be possible to have TypeScript generate standard JavaScript private fields. Suggestions?
The text was updated successfully, but these errors were encountered: