• Call the unload function on all targets handling any returned IPromise / Promise before calling the next targets unload

    Type Parameters

    • T

    Parameters

    • targets: {
          unload?: ((isAsync?: boolean) => T | IPromise<T>);
      }[]

      An array of the targets to unload

    • OptionalisAsync: boolean

      The caller identifies whether it is expecting the operations to complete synchronously or asynchronously. Even if the caller is not waiting the operation may still be performed asynchronously depending on the component and the reverse is also true.

    • Optionaldone: (() => void)

      Optional callback function to call once all of the unload functions have been called.

        • (): void
        • Returns void

    Returns void | IPromise<void>