Replies: 1 comment 1 reply
-
Pretty much all of the rest parameter signatures in RxJS will accept zero arguments. This is by design, as it allows array spreading to be used: const numbers: number[] = getSomeNumbers();
source.pipe(endWith(...numbers)) Requiring at least one argument would interfere with this and adds little value, IMO, as the behaviour that's effected by calling |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was calling
endWith()
without any argument expecting it to be equivalent toendWith(undefined)
.As calling the operator has no effect, wouldn't it make sense to prevent the call with no arguments with the typescript signature?
Beta Was this translation helpful? Give feedback.
All reactions