Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Extension<T>

Represents an extension.

To get an instance of an Extension use getExtension.

Type parameters

  • T

层级

  • Extension

索引

Properties(7)

Readonly id

id: string

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

Readonly extensionUri

extensionUri: Uri

The uri of the directory containing the extension.

Readonly extensionPath

extensionPath: string

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

Readonly isActive

isActive: boolean

true if the extension has been activated.

Readonly packageJSON

packageJSON: any

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

extensionKind

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.

Readonly exports

exports: T

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

Methods(1)

activate

  • Activates this extension and returns its public API.

    Returns Thenable<T>

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

友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc. Maintained by 洛竹