Skip to content

v0.5.0

Compare
Choose a tag to compare
@DenisCarriere DenisCarriere released this 08 Dec 02:54
· 27 commits to main since this release
4046585

Changes

  • Replace createPromiseClient with createCallbackClient
  • Replace emitter.stop() function with CancelFn from Callback Client

Example

const cancel = emitter.start();

// Cancel after 3 seconds
setTimeout(cancel, 3000);

New event emitters

  • close
  • fatalError
type LocalEventTypes = {
  close: [error?: ConnectError];
  fatalError: [error: FatalError];
};

Examples

// End of Stream
emitter.on("close", (error) => {
  if (error) {
    console.error(error);
  }
});

// Fatal error
emitter.on("fatalError", (error) => {
  console.error(error);
});

What's Changed

Full Changelog: v0.4.4...v0.5.0