Theia API Documentation v1.65.0
    Preparing search index...

    Represents an extension.

    To get an instance of an Extension use getExtension.

    interface Extension<T> {
        exports: T;
        extensionKind: ExtensionKind;
        extensionPath: string;
        extensionUri: Uri;
        id: string;
        isActive: boolean;
        isFromDifferentExtensionHost: boolean;
        packageJSON: any;
        activate(): Thenable<T>;
    }

    Type Parameters

    • T
    Index

    Properties

    exports: T

    The public API exported by this extension (return value of activate). It is an invalid action to access this field before this extension has been activated.

    extensionKind: ExtensionKind

    The extension kind describes if an extension runs where the UI runs or if an extension runs where the remote extension host runs. The extension kind is defined in the package.json-file of extensions but can also be refined via the remote.extensionKind-setting. When no remote extension host exists, the value is ExtensionKind.UI.

    extensionPath: string

    The absolute file path of the directory containing this extension. Shorthand notation for Extension.extensionUri.fsPath (independent of the uri scheme).

    extensionUri: Uri

    The uri of the directory containing the extension.

    id: string

    The canonical extension identifier in the form of: publisher.name.

    isActive: boolean

    true if the extension has been activated.

    isFromDifferentExtensionHost: boolean

    true when the extension is associated to another extension host.

    Note that an extension from another extension host cannot export API, e.g its exports are always undefined.

    packageJSON: any

    The parsed contents of the extension's package.json.

    Methods