mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 11:49:38 +00:00
Instantiate ExperimentationService in typescript-language-features. (#160877)
Co-authored-by: Matt Bierner <matb@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
fa1fee3b21
commit
00902daee1
@@ -23,7 +23,7 @@ export class ExperimentationService implements vscode.Disposable {
|
||||
public async getTreatmentVariable<K extends keyof ExperimentTypes>(name: K, defaultValue: ExperimentTypes[K]): Promise<ExperimentTypes[K]> {
|
||||
const experimentationService = await this._experimentationServicePromise;
|
||||
try {
|
||||
const treatmentVariable = experimentationService.getTreatmentVariableAsync('vscode', name, /*checkCache*/ true) as ExperimentTypes[K];
|
||||
const treatmentVariable = experimentationService.getTreatmentVariableAsync('vscode', name, /*checkCache*/ true) as Promise<ExperimentTypes[K]>;
|
||||
return treatmentVariable;
|
||||
} catch {
|
||||
return defaultValue;
|
||||
|
||||
@@ -8,6 +8,7 @@ import * as vscode from 'vscode';
|
||||
import { Api, getExtensionApi } from './api';
|
||||
import { CommandManager } from './commands/commandManager';
|
||||
import { registerBaseCommands } from './commands/index';
|
||||
import { ExperimentationService } from './experimentationService';
|
||||
import { createLazyClientHost, lazilyActivateClient } from './lazyClientHost';
|
||||
import { nodeRequestCancellerFactory } from './tsServer/cancellation.electron';
|
||||
import { NodeLogDirectoryProvider } from './tsServer/logDirectoryProvider.electron';
|
||||
@@ -52,6 +53,9 @@ export function activate(
|
||||
|
||||
registerBaseCommands(commandManager, lazyClientHost, pluginManager, activeJsTsEditorTracker);
|
||||
|
||||
// Currently no variables in use.
|
||||
new ExperimentationService(context);
|
||||
|
||||
import('./task/taskProvider').then(module => {
|
||||
context.subscriptions.push(module.register(lazyClientHost.map(x => x.serviceClient)));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user