@oazmi/superbuild - v0.1.0
    Preparing search index...

    Function cancelableDelayedPromiseResolver

    • this function wraps on top of a promise-resolver function, and returns two functions. the first function, when called, will resolve the original promise_resolver after the specified delay amount of milliseconds have passed. during this delay time, you may use the second function that is returned to cancel the task of running the promise_resolver before it times out. you also have the option to specify the delay for the next time the returned resolve function is called. if it is not specified, then the original_delay will be used in its place.

      Type Parameters

      • T

      Parameters

      • promise_resolver: (value: T) => void
      • original_delay: number
      • logger: LoggerFunction = noopLogger

      Returns [resolve: (value: T) => void, cancel: (delay?: number) => void]