Interface ExtensionModule<ExportedApi>

An extension must export an activate() function from its main module, and it will be invoked only once by the framework when any of the specified activation events is emitted. Also, an extension should export a deactivate() function from its main module to perform cleanup tasks on framework shutdown. Extension must return a Promise from deactivate() if the cleanup process is asynchronous. An extension may return undefined from deactivate() if the cleanup runs synchronously.

interface ExtensionModule<ExportedApi> {
    activate?: ((extensionContext, ...dependencies) => ExportedApi);
    deactivate?: ((extensionContext) => void | Promise<void>);
}

Type Parameters

  • ExportedApi = unknown

    Type of the exported API

Properties

activate?: ((extensionContext, ...dependencies) => ExportedApi)

Type declaration

deactivate?: ((extensionContext) => void | Promise<void>)

Type declaration

    • (extensionContext): void | Promise<void>
    • Parameters

      Returns void | Promise<void>

Generated using TypeDoc