Skip to content

Commit

Permalink
remove the workaround for RxJS fromEvent workaround (wechaty/redux#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
huan committed Nov 7, 2021
1 parent edec9d1 commit 9c0cd23
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/state-switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,22 +282,4 @@ export class StateSwitch extends EventEmitter implements StateSwitchInterface {
return this.stable()
}

/**
* Huan(202105): To make RxJS fromEvent happy: type inferencing
* https://github.com/ReactiveX/rxjs/blob/92fbdda7c06561bc73dae3c14de3fc7aff92bbd4/src/internal/observable/fromEvent.ts#L39-L50
*/
addEventListener (
event: StateType,
listener: ((payload: true | 'pending') => void),
): void {
super.addListener(event, listener)
}

removeEventListener (
event: string,
listener: ((payload: true | 'pending') => void),
): void {
super.removeListener(event, listener)
}

}

0 comments on commit 9c0cd23

Please sign in to comment.