Skip to main content

Interface: Extension<T>

Defined in: packages/extension-api/src/extension-api.d.ts:214

Represents an extension.

To get an instance of an Extension use getExtension.

Type Parameters​

T​

T

Properties​

exports​

readonly exports: T

Defined in: packages/extension-api/src/extension-api.d.ts:241

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.


extensionPath​

readonly extensionPath: string

Defined in: packages/extension-api/src/extension-api.d.ts:229

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


extensionUri​

readonly extensionUri: Uri

Defined in: packages/extension-api/src/extension-api.d.ts:223

The uri of the directory containing the extension.


id​

readonly id: string

Defined in: packages/extension-api/src/extension-api.d.ts:218

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


packageJSON​

readonly packageJSON: any

Defined in: packages/extension-api/src/extension-api.d.ts:235

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