Remove a11y event dep, introduce forwardEvent helper

This commit is contained in:
Daniel Imms
2020-04-25 16:45:46 -07:00
parent e9db1ecd1f
commit 3897950e22
4 changed files with 20 additions and 13 deletions
+4
View File
@@ -63,3 +63,7 @@ export class EventEmitter<T, U = void> implements IEventEmitter<T, U> {
this._disposed = true;
}
}
export function forwardEvent<T>(from: IEvent<T>, to: IEventEmitter<T>): void {
from(e => to.fire(e));
}