Add support for api:none in IExtensionManifest

This commit is contained in:
Alex Dima
2019-01-24 12:20:04 +01:00
parent 935561a434
commit b909133b22
2 changed files with 5 additions and 1 deletions

View File

@@ -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);
}