• Disposes all resources in a resource-tracking environment object.

    Parameters

    • env: {
          error: unknown;
          hasError: boolean;
          stack: {
              async: boolean;
              dispose?: Function;
              value?: unknown;
          }[];
      }

      A resource-tracking environment object.

      • error: unknown
      • hasError: boolean
      • stack: {
            async: boolean;
            dispose?: Function;
            value?: unknown;
        }[]

    Returns any

    A Promise if any resources in the environment were marked as async when added; otherwise, void.

    Throws

    if an error thrown during disposal would have suppressed a prior error from disposal or the error recorded in the resource-tracking environment object.

    Seealso

    __addDisposableResource

Generated using TypeDoc