dsbridge-async
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    DSBridge-Async

    On top of dsbridge, added callAsync() to promisify call().

    All native dsbridge functions are exported without any changes:

    • call()
    • register()
    • registerAsyn()
    • hasNativeMethod()
    • disableJavascriptDialogBlock()

    Install

    npm i dsbridge-async

    Usage

    import dsbridge from "dsbridge-async";
     
    // instead of passing callback, callAsync will return a promise
    const task = async () => {
      const res = await dsbridge.callAsync("method-name", someArgs);
      console.log(res);
    };

    Install

    npm i dsbridge-async

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    none

    Unpacked Size

    2.92 kB

    Total Files

    4

    Last publish

    Collaborators

    • 87hz