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
Unfortunately it gives me the following error (at this f({delay: 1, attempt: 1}) line):
Argument of type '{ delay: number; attempt: number; }' is not assignable to parameter of type 'Events[E]'.
Type '{ delay: number; attempt: number; }' is not assignable to type 'void & Error & { delay: number; attempt: number; }'.
Type '{ delay: number; attempt: number; }' is not assignable to type 'void'.(2345)
It seems like it uses intersection instead of union. How can I fix this?
I've found a related Typescript issue, but I couldn't manage to apply the suggested workaround in this example. Can you help me with this please?
The text was updated successfully, but these errors were encountered:
In chapter 8 (Async Streams >> Event Emitters, on pages 185-186) you have defined the following two types:
I would like to have a naive implementation like this:
Unfortunately it gives me the following error (at this
f({delay: 1, attempt: 1})
line):It seems like it uses intersection instead of union. How can I fix this?
I've found a related Typescript issue, but I couldn't manage to apply the suggested workaround in this example. Can you help me with this please?
The text was updated successfully, but these errors were encountered: