Summary
TypeScript typings for most does not support sending only one stream as an argument to sample(). (But most supports this.)
I also suggest we move to using mapped types instead, supporting arbitrary number of arguments for functions where supported by TypeScript.
I have made a PR implementing a simple change without mapped types to support this use case, #536.
Expected result
Not getting a type error
Actual Result
Getting a type error

Versions
- Typescript 3.8.3
- most.js: 1.8.0
Steps to reproduce
- Paste the code to reproduce into editor.
- See the error appear, expecting a second stream.
Code to reproduce
import { just } from "most";
just().sample((x) => x, just())
Summary
TypeScript typings for
mostdoes not support sending only one stream as an argument tosample(). (Butmostsupports this.)I also suggest we move to using mapped types instead, supporting arbitrary number of arguments for functions where supported by TypeScript.
I have made a PR implementing a simple change without mapped types to support this use case, #536.
Expected result
Not getting a type error
Actual Result
Getting a type error
Versions
Steps to reproduce
Code to reproduce