Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

feat: subscription management in effect sys #163

Merged
merged 4 commits into from
Jul 21, 2022
Merged

Conversation

harrysolovay
Copy link
Contributor

@harrysolovay harrysolovay commented Jul 21, 2022

For instance...

let i = 0;
const subscription = rpcSubscription(config, "chain_subscribeNewHead", [], (close) => {
  return (m) => {
    i++;
    if (i > 5) {
      close();
    }
    console.log(m);
  };
});
U.throwIfError(await run(subscription));

@harrysolovay harrysolovay marked this pull request as ready for review July 21, 2022 14:57
@harrysolovay harrysolovay merged commit 75af543 into main Jul 21, 2022
@harrysolovay harrysolovay deleted the fluent-api-cleanup branch July 21, 2022 15:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant