Represents an extension.

To get an instance of an Extension use {@link extensions.getExtension getExtension}.

Fields

read onlypackageJSON:Any

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

read onlyisActive:Bool

true if the extension has been activated.

read onlyid:String

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

read onlyextensionUri:String

The uri of the directory containing the extension.

read onlyextensionPath:String

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

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 {@linkcode ExtensionKind.UI}.

exports:T

The public API exported by this extension. It is an invalid action to access this field before this extension has been activated.

activate():Thenable<T>

Activates this extension and returns its public API.

Returns:

A promise that will resolve when this extension has been activated.