@shimo/deferred
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    deferred

    A javascript library implement deferred promise proposed by Mozilla.

    usage

    npm i -S @shimo/deferred
    import Deferred from '@shimo/deferred'
    
    const deferred = new Deferred<void>();
    
    async function foo() {
      await deferred.promise;
      console.log('foo');
    }
    
    function main() {
      foo();
      deferred.resolve();
    }
    
    main();

    Install

    npm i @shimo/deferred

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    2.99 kB

    Total Files

    5

    Last publish

    Collaborators

    • magicismight
    • nswbmw
    • luin
    • huaoguo
    • tomwan