Skip to content

Commit

Permalink
enableProposedApiFor is string[]
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Sep 5, 2019
1 parent 5a16d6e commit c27d4e0
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,23 +443,16 @@ 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>;

constructor(
@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') ||
Expand Down

0 comments on commit c27d4e0

Please sign in to comment.