-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
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
Better debug in javascript #325
Comments
I'm sorry, but runtime type checks do add a lot of checks (if you do this consistently for all operators and all input cases) which negatively impacts both performance and library size. JavaScript users accept the |
One good thing we could do, though, is to ignore |
agree with you about performance. Filter out null probably will make things harder to debug. Maybe the possibility to run xstream in two flavors? with lite typecheck and without, something like sanctuary? |
That's possible, but it's a lot of work (I don't have time to build this, so PRs welcome) and requires the default to be |
When working in Js without Typescript help the lib don't warn you when passing bad values to stream constructor
A classic example is merging or composing null values:
const stream1 = xs.never()
const stream2 = xs.never()
const stream3 = null
xs.merge(stream1, stream2, stream3)
The code don't give error on network setup but only at network run time without telling where the the problem came for.
Would not be bad to add a lite type check on merge and combine, something like
The text was updated successfully, but these errors were encountered: