提交 c27d4e08 编写于 作者: M Martin Aeschlimann

enableProposedApiFor is string[]

上级 5a16d6e6
......@@ -443,7 +443,7 @@ export abstract class AbstractExtensionService extends Disposable implements IEx
class ProposedApiController {
private readonly enableProposedApiFor: string | string[];
private readonly enableProposedApiFor: string[];
private readonly enableProposedApiForAll: boolean;
private readonly productAllowProposedApi: Set<string>;
......@@ -451,15 +451,8 @@ class ProposedApiController {
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
@IProductService productService: IProductService
) {
this.enableProposedApiFor = environmentService.args['enable-proposed-api'] || [];
if (this.enableProposedApiFor.length) {
// Make enabled proposed API be lowercase for case insensitive comparison
if (Array.isArray(this.enableProposedApiFor)) {
this.enableProposedApiFor = this.enableProposedApiFor.map(id => id.toLowerCase());
} else {
this.enableProposedApiFor = this.enableProposedApiFor.toLowerCase();
}
}
// Make enabled proposed API be lowercase for case insensitive comparison
this.enableProposedApiFor = (environmentService.args['enable-proposed-api'] || []).map(id => id.toLowerCase());
this.enableProposedApiForAll = !environmentService.isBuilt ||
(!!environmentService.extensionDevelopmentLocationURI && productService.nameLong !== 'Visual Studio Code') ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册