Skip to content

Fix stream write to include error callback #41

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

Merged
merged 2 commits into from
Apr 27, 2022
Merged

Fix stream write to include error callback #41

merged 2 commits into from
Apr 27, 2022

Conversation

JordanMartinez
Copy link
Contributor

Description of the change

Fixes #35 🏓 @thomashoneyman


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@JordanMartinez JordanMartinez added purs-0.15 A reminder to address this issue or merge this PR before we release PureScript v0.15.0 type: breaking change A change that requires a major version bump. labels Apr 27, 2022
@thomashoneyman thomashoneyman merged commit d14acee into purescript-node:master Apr 27, 2022
@wclr
Copy link

wclr commented Apr 28, 2022

@JordanMartinez

I believe, the correct signature would be (Nullable Error) -> Effect Unit.

Aso the problem is if i'm not mistaken the frist arg is (can be?) not null but undefined if write is sucessful. In this case foreing js should be modified to handle this. I would check this in the tests (for example try to write after the stream is closed to check the error case).

I would do this myself, but I don't have/use purs 0.15 to compile the current version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
purs-0.15 A reminder to address this issue or merge this PR before we release PureScript v0.15.0 type: breaking change A change that requires a major version bump.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stream write callback doesn't allow handling errors
3 participants