Run function in asynchronously in Worker

  • Type Parameters

    • T

    Parameters

    • fn: () => any

      Function to be run asynchronously

    Returns Promise<T>

    Promise of expected result