mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Add support for api:none in IExtensionManifest
This commit is contained in:
@@ -851,7 +851,7 @@ class Extension<T> implements vscode.Extension<T> {
|
||||
|
||||
public id: string;
|
||||
public extensionPath: string;
|
||||
public packageJSON: any;
|
||||
public packageJSON: IExtensionDescription;
|
||||
|
||||
constructor(extensionService: ExtHostExtensionService, description: IExtensionDescription) {
|
||||
this._extensionService = extensionService;
|
||||
@@ -866,6 +866,9 @@ class Extension<T> implements vscode.Extension<T> {
|
||||
}
|
||||
|
||||
get exports(): T {
|
||||
if (this.packageJSON.api === 'none') {
|
||||
return undefined;
|
||||
}
|
||||
return <T>this._extensionService.getExtensionExports(this._identifier);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user