@sanjo-addons/resolvable

1.1.0 • Public • Published

Resolvable

A library for working with resolvables. Resolvables are similar to promises or futures. This library can save add-on developers some work.

Things included

  • Resolvable.Resolvable: a class for a resolvable.
    • Resolvable.Resolvable:new: a constructor for creating a resolvable.
    • Resolvable.Resolvable:afterResolve / Resolvable.Resolvable.after: a method for registering a callback which is called after the resolvable is resolved.
    • await / Resolvable.await: a function for awaiting on a promise. Can only be used in a coroutine.
    • Resolvable.all: a function for creating a new resolvable which resolves when all resolvables, that have been passed, have been resolved.

"Resolvable.Resolvable:new" returns a second return value, which is a table with internal methods which can be used by the creator of the resolvable. Those include:

  • resolve: a method to resolve the resolvable.

Readme

Keywords

none

Package Sidebar

Install

npm i @sanjo-addons/resolvable

Weekly Downloads

0

Version

1.1.0

License

none

Unpacked Size

5.23 kB

Total Files

7

Last publish

Collaborators

  • sanjo-addons