We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems combine has a wrong type signature, at least when used statically from the Stream object.
Using it with just two streams, the project function expects 3 arguments?
import xs from 'xstream' const stream = Stream.create<string>({ start: listener => {}, stop: () => {} }) const stream2 = Stream.create<string>({ start: listener => {}, stop: () => {} }) const combined = Stream.combine( (a, b) => a.slice(2) + b.slice(2), stream, stream2 )
This doesn't compile, because the a passed to the project function is inferred to be an object.
a
The text was updated successfully, but these errors were encountered:
For the static combine, use xs.combine, not Stream.combine.
xs.combine
Stream.combine
xs.combine(fn, a, b) then fn expects 2 args
xs.combine(fn, a, b)
streamInstance.combine(fn, a, b) then fn expects 3 args.
streamInstance.combine(fn, a, b)
Does this solve your case?
Sorry, something went wrong.
Isn't xs and Stream exactly the same?
xs
Stream
In my own code, I use
import xs from 'xstream' xs.combine...
Only had to use Stream on the typescript playground.
Ok, sorry, I think it's actually incorrect in code. I'll fix this.
fix(combine): fix CombineFactorySignature
c65bd0b
Was lacking some important pieces. For issue #28.
Released v2.1.2 with a fix
No branches or pull requests
It seems combine has a wrong type signature, at least when used statically from the Stream object.
Using it with just two streams, the project function expects 3 arguments?
This doesn't compile, because the
a
passed to the project function is inferred to be an object.The text was updated successfully, but these errors were encountered: