• Teardown / Unload helper to perform teardown/unloading operations for the provided components synchronously or asynchronously, this will call any _doTeardown() or _doUnload() functions on the provided components to allow them to finish removal.

    Parameters

    • components: any

      The components you want to unload

    • OptionalunloadCtx: IProcessTelemetryUnloadContext

      This is the context that should be used during unloading.

    • OptionalunloadState: ITelemetryUnloadState

      The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.

    • OptionalasyncCallback: (() => void)

      An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.

        • (): void
        • Returns void

    Returns void | boolean

    boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.