fromEvent
in v7
#6450
Answered
by
backbone87
pratikgaikwadhive
asked this question in
Q&A
`fromEvent` in v7
#6450
-
Beta Was this translation helpful? Give feedback.
Answered by
backbone87
Jun 5, 2021
Replies: 1 comment 4 replies
-
you should not set generic type parameters explicitly:
you should remove them: const event$ = rxjs.merge(
rxjs.fromEvent(feed, "data"),
// convert error events to errors.
rxjs.fromEvent(feed, "error").pipe(rxOperator.tap(err => { throw err; }))
); ofc this only works, if const event$ = rxjs.merge(
rxjs.fromEvent(feed, "data"),
// convert error events to errors.
rxjs.fromEvent(feed, "error").pipe(rxOperator.tap(err => { throw err; }))
) as Observable<Changes<IGuests>>; |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
pratikgaikwadhive
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you should not set generic type parameters explicitly:
you should remove them:
ofc this only works, if
feed
event listeners are properly typed with overloads for different events. if not, then you probably need to resort to a type cast: