Skip to content

Releases: Byloth/core

v1.1.6

09 Nov 11:54
332cb6a
Compare
Choose a tag to compare

Patch release

  • Improved compatibility for DeferredPromise class with native Promise class.
  • You can now use method watch on DeferredPromise objects, so they can be resolved / rejected by other Promise objects.
    This works like Promise.any: the first Promise that resolves / rejects is considered; all others are discarded.

v1.1.5

04 Oct 10:18
a92495f
Compare
Choose a tag to compare

Patch release

  • Fixed type definition for Promise's resolve and reject methods.

v1.1.4

04 Oct 03:08
1b93476
Compare
Choose a tag to compare

Patch release

  • Fixed bug with this context.

v1.1.3

04 Oct 02:23
49975a9
Compare
Choose a tag to compare

Patch release

  • Fixed typing for DeferredPromise class.

v1.1.2

04 Oct 01:47
c303c4f
Compare
Choose a tag to compare

Patch release

Inverted the logic for the DeferredPromise class:

Think about it... 🤔
A standard Promise is something that -whoever initialize it- knows exactly when it will resolve (or reject) and other people are waiting for that to happen...

The 'Deferred Promise', on the other hand, allows the other to resolve it (or reject it) whenever he wants; whoever initializes it will never know exactly when it will happen.
BUT... This class is designed to allow the initializer to define exactly what will happen when it resolves (or rejects).

Because of this, this class now allows you to define onFulfilled and onRejected callbacks directly in its constructor.
You will no longer be able to define the usual executor like the other Promise; to do this, you can simply write the code outside or wherever you want (unless you have the DeferredPromise instance handy).

v1.1.1

04 Oct 00:48
79191c5
Compare
Choose a tag to compare

Patch release

  • Implemented a new consistent logic for DeferredPromise.
  • Added random and some Date-related utility functions.
  • Improved range utility function.

v1.1.0

03 Oct 13:37
26aebba
Compare
Choose a tag to compare

Minor release

  • Fixed tsconfig.json settings to be as compatible as possible.
  • The previous release should have been a minor release already.

v1.0.4

03 Oct 10:21
556d597
Compare
Choose a tag to compare

Patch release

  • Extracted Exception class from @byloth/exceptions package and included in @byloth/core.
  • Implemented a new Subscribers class with which to implement the publish/subscribe pattern.
  • Enhanced DeferredPromise with the corrected return type for then, catch and finally methods.

v1.0.3

28 Sep 15:48
c938f62
Compare
Choose a tag to compare

Patch release

  • Removed use of aliases that prevented TypeScript from compiling properly.

v1.0.2

28 Sep 15:17
fd630a7
Compare
Choose a tag to compare

Patch release

  • Renamed Awaitable class to MaybePromise.
    It makes much more sense. 🤔