mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
change type of _serviceBrand from any
to undefined
, #79918
This commit is contained in:
parent
1930ce78f8
commit
dedf0de944
|
@ -46,7 +46,6 @@ import { LanguagePackCachedDataCleaner } from 'vs/code/electron-browser/sharedPr
|
|||
import { StorageDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/storageDataCleaner';
|
||||
import { LogsDataCleaner } from 'vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner';
|
||||
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { SpdLogService } from 'vs/platform/log/node/spdlogService';
|
||||
import { DiagnosticsService, IDiagnosticsService } from 'vs/platform/diagnostics/node/diagnosticsService';
|
||||
import { DiagnosticsChannel } from 'vs/platform/diagnostics/node/diagnosticsIpc';
|
||||
|
@ -75,7 +74,7 @@ const eventPrefix = 'monacoworkbench';
|
|||
class MainProcessService implements IMainProcessService {
|
||||
constructor(private server: Server, private mainRouter: StaticRouter) { }
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
getChannel(channelName: string): IChannel {
|
||||
return this.server.getChannel(channelName, this.mainRouter);
|
||||
|
|
|
@ -24,7 +24,7 @@ type Credentials = {
|
|||
|
||||
export class ProxyAuthHandler {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private retryCount = 0;
|
||||
private disposables: IDisposable[] = [];
|
||||
|
|
|
@ -157,7 +157,7 @@ interface IWorkspacePathToOpen {
|
|||
|
||||
export class WindowsManager extends Disposable implements IWindowsMainService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private static readonly windowsStateStorageKey = 'windowsState';
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
|||
const IEditorCancellationTokens = createDecorator<IEditorCancellationTokens>('IEditorCancelService');
|
||||
|
||||
interface IEditorCancellationTokens {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
add(editor: ICodeEditor, cts: CancellationTokenSource): () => void;
|
||||
cancel(editor: ICodeEditor): void;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ const ctxCancellableOperation = new RawContextKey('cancellableOperation', false)
|
|||
|
||||
registerSingleton(IEditorCancellationTokens, class implements IEditorCancellationTokens {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _tokens = new WeakMap<ICodeEditor, { key: IContextKey<boolean>, tokens: LinkedList<CancellationTokenSource> }>();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import { IResourceInput } from 'vs/platform/editor/common/editor';
|
|||
|
||||
export abstract class AbstractCodeEditorService extends Disposable implements ICodeEditorService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _onCodeEditorAdd: Emitter<ICodeEditor> = this._register(new Emitter<ICodeEditor>());
|
||||
public readonly onCodeEditorAdd: Event<ICodeEditor> = this._onCodeEditorAdd.event;
|
||||
|
|
|
@ -21,7 +21,7 @@ export interface IBulkEditResult {
|
|||
}
|
||||
|
||||
export interface IBulkEditService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
apply(edit: WorkspaceEdit, options?: IBulkEditOptions): Promise<IBulkEditResult>;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
|
|||
export const ICodeEditorService = createDecorator<ICodeEditorService>('codeEditorService');
|
||||
|
||||
export interface ICodeEditorService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
readonly onCodeEditorAdd: Event<ICodeEditor>;
|
||||
readonly onCodeEditorRemove: Event<ICodeEditor>;
|
||||
|
|
|
@ -13,12 +13,11 @@ import { equalsIgnoreCase } from 'vs/base/common/strings';
|
|||
import { URI } from 'vs/base/common/uri';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IOpener, IOpenerService, IValidator } from 'vs/platform/opener/common/opener';
|
||||
|
||||
export class OpenerService extends Disposable implements IOpenerService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _openers = new LinkedList<IOpener>();
|
||||
private readonly _validators = new LinkedList<IValidator>();
|
||||
|
|
|
@ -18,7 +18,7 @@ export interface IDiffComputationResult {
|
|||
}
|
||||
|
||||
export interface IEditorWorkerService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
canComputeDiff(original: URI, modified: URI): boolean;
|
||||
computeDiff(original: URI, modified: URI, ignoreTrimWhitespace: boolean): Promise<IDiffComputationResult | null>;
|
||||
|
|
|
@ -46,7 +46,7 @@ function canSyncModel(modelService: IModelService, resource: URI): boolean {
|
|||
}
|
||||
|
||||
export class EditorWorkerServiceImpl extends Disposable implements IEditorWorkerService {
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private readonly _modelService: IModelService;
|
||||
private readonly _workerManager: WorkerManager;
|
||||
|
|
|
@ -61,7 +61,7 @@ class MarkerDecorations extends Disposable {
|
|||
|
||||
export class MarkerDecorationsService extends Disposable implements IMarkerDecorationsService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _onDidChangeMarker = this._register(new Emitter<ITextModel>());
|
||||
readonly onDidChangeMarker: Event<ITextModel> = this._onDidChangeMarker.event;
|
||||
|
|
|
@ -12,7 +12,7 @@ import { Range } from 'vs/editor/common/core/range';
|
|||
export const IMarkerDecorationsService = createDecorator<IMarkerDecorationsService>('markerDecorationsService');
|
||||
|
||||
export interface IMarkerDecorationsService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onDidChangeMarker: Event<ITextModel>;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ export interface ILanguageSelection extends IDisposable {
|
|||
}
|
||||
|
||||
export interface IModeService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onDidCreateMode: Event<IMode>;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class LanguageSelection extends Disposable implements ILanguageSelection {
|
|||
}
|
||||
|
||||
export class ModeServiceImpl implements IModeService {
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private readonly _instantiatedModes: { [modeId: string]: IMode; };
|
||||
private readonly _registry: LanguagesRegistry;
|
||||
|
|
|
@ -12,7 +12,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
|
|||
export const IModelService = createDecorator<IModelService>('modelService');
|
||||
|
||||
export interface IModelService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
createModel(value: string | ITextBufferFactory, languageSelection: ILanguageSelection | null, resource?: URI, isForSimpleWidget?: boolean): ITextModel;
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ interface IRawConfig {
|
|||
const DEFAULT_EOL = (platform.isLinux || platform.isMacintosh) ? DefaultEndOfLine.LF : DefaultEndOfLine.CRLF;
|
||||
|
||||
export class ModelServiceImpl extends Disposable implements IModelService {
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private readonly _configurationService: IConfigurationService;
|
||||
private readonly _configurationServiceSubscription: IDisposable;
|
||||
|
|
|
@ -12,7 +12,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
|
|||
export const ITextModelService = createDecorator<ITextModelService>('textModelService');
|
||||
|
||||
export interface ITextModelService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Provided a resource URI, it will return a model reference
|
||||
|
|
|
@ -13,7 +13,7 @@ export const ITextResourceConfigurationService = createDecorator<ITextResourceCo
|
|||
|
||||
export interface ITextResourceConfigurationService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Event that fires when the configuration changes.
|
||||
|
@ -38,7 +38,7 @@ export const ITextResourcePropertiesService = createDecorator<ITextResourcePrope
|
|||
|
||||
export interface ITextResourcePropertiesService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Returns the End of Line characters for the given resource
|
||||
|
|
|
@ -14,7 +14,7 @@ import { IConfigurationChangeEvent, IConfigurationService } from 'vs/platform/co
|
|||
|
||||
export class TextResourceConfigurationService extends Disposable implements ITextResourceConfigurationService {
|
||||
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private readonly _onDidChangeConfiguration: Emitter<IConfigurationChangeEvent> = this._register(new Emitter<IConfigurationChangeEvent>());
|
||||
public readonly onDidChangeConfiguration: Event<IConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
|
||||
|
|
|
@ -17,7 +17,7 @@ import { once } from 'vs/base/common/functional';
|
|||
export const ICodeLensCache = createDecorator<ICodeLensCache>('ICodeLensCache');
|
||||
|
||||
export interface ICodeLensCache {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
put(model: ITextModel, data: CodeLensModel): void;
|
||||
get(model: ITextModel): CodeLensModel | undefined;
|
||||
delete(model: ITextModel): void;
|
||||
|
@ -38,7 +38,7 @@ class CacheItem {
|
|||
|
||||
export class CodeLensCache implements ICodeLensCache {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _fakeProvider = new class implements CodeLensProvider {
|
||||
provideCodeLenses(): CodeLensList {
|
||||
|
|
|
@ -24,7 +24,7 @@ export const ctxHasSymbols = new RawContextKey('hasSymbols', false);
|
|||
export const ISymbolNavigationService = createDecorator<ISymbolNavigationService>('ISymbolNavigationService');
|
||||
|
||||
export interface ISymbolNavigationService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
reset(): void;
|
||||
put(anchor: OneReference): void;
|
||||
revealNext(source: ICodeEditor): Promise<any>;
|
||||
|
@ -32,7 +32,7 @@ export interface ISymbolNavigationService {
|
|||
|
||||
class SymbolNavigationService implements ISymbolNavigationService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _ctxHasSymbols: IContextKey<boolean>;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ suite('Multicursor selection', () => {
|
|||
let queryState: { [key: string]: any; } = {};
|
||||
let serviceCollection = new ServiceCollection();
|
||||
serviceCollection.set(IStorageService, {
|
||||
_serviceBrand: undefined as any,
|
||||
_serviceBrand: undefined,
|
||||
onDidChangeStorage: Event.None,
|
||||
onWillSaveState: Event.None,
|
||||
get: (key: string) => queryState[key],
|
||||
|
|
|
@ -25,12 +25,12 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
|||
|
||||
export const IPeekViewService = createDecorator<IPeekViewService>('IPeekViewService');
|
||||
export interface IPeekViewService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
addExclusiveWidget(editor: ICodeEditor, widget: PeekViewWidget): void;
|
||||
}
|
||||
|
||||
registerSingleton(IPeekViewService, class implements IPeekViewService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private _widgets = new Map<ICodeEditor, { widget: PeekViewWidget, listener: IDisposable }>();
|
||||
|
||||
|
@ -80,7 +80,7 @@ const defaultOptions: IPeekViewOptions = {
|
|||
|
||||
export abstract class PeekViewWidget extends ZoneWidget {
|
||||
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private _onDidClose = new Emitter<PeekViewWidget>();
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import { WordSelectionRangeProvider } from 'vs/editor/contrib/smartSelect/wordSe
|
|||
|
||||
class TestTextResourcePropertiesService implements ITextResourcePropertiesService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
|
|
|
@ -299,7 +299,7 @@ suite('Snippet Variables Resolver', function () {
|
|||
let workspace: IWorkspace;
|
||||
let resolver: VariableResolver;
|
||||
const workspaceService = new class implements IWorkspaceContextService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
_throw = () => { throw new Error(); };
|
||||
onDidChangeWorkbenchState = this._throw;
|
||||
onDidChangeWorkspaceName = this._throw;
|
||||
|
|
|
@ -208,7 +208,7 @@ export type MemMode = 'first' | 'recentlyUsed' | 'recentlyUsedByPrefix';
|
|||
|
||||
export class SuggestMemoryService extends Disposable implements ISuggestMemoryService {
|
||||
|
||||
readonly _serviceBrand: any;
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
private readonly _storagePrefix = 'suggest/memories';
|
||||
|
||||
|
@ -292,7 +292,7 @@ export class SuggestMemoryService extends Disposable implements ISuggestMemorySe
|
|||
export const ISuggestMemoryService = createDecorator<ISuggestMemoryService>('ISuggestMemories');
|
||||
|
||||
export interface ISuggestMemoryService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
memorize(model: ITextModel, pos: IPosition, item: CompletionItem): void;
|
||||
select(model: ITextModel, pos: IPosition, items: CompletionItem[]): number;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ function createMockEditor(model: TextModel): TestCodeEditor {
|
|||
[ITelemetryService, NullTelemetryService],
|
||||
[IStorageService, new InMemoryStorageService()],
|
||||
[ISuggestMemoryService, new class implements ISuggestMemoryService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
memorize(): void {
|
||||
}
|
||||
select(): number {
|
||||
|
|
|
@ -97,7 +97,7 @@ function withTypedEditor<T>(widget: editorCommon.IEditor, codeEditorCallback: (e
|
|||
}
|
||||
|
||||
export class SimpleEditorModelResolverService implements ITextModelService {
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private editor?: editorCommon.IEditor;
|
||||
|
||||
|
@ -142,7 +142,7 @@ export class SimpleEditorModelResolverService implements ITextModelService {
|
|||
}
|
||||
|
||||
export class SimpleEditorProgressService implements IEditorProgressService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private static NULL_PROGRESS_RUNNER: IProgressRunner = {
|
||||
done: () => { },
|
||||
|
@ -163,7 +163,7 @@ export class SimpleEditorProgressService implements IEditorProgressService {
|
|||
|
||||
export class SimpleDialogService implements IDialogService {
|
||||
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
public confirm(confirmation: IConfirmation): Promise<IConfirmationResult> {
|
||||
return this.doConfirm(confirmation).then(confirmed => {
|
||||
|
@ -190,7 +190,7 @@ export class SimpleDialogService implements IDialogService {
|
|||
|
||||
export class SimpleNotificationService implements INotificationService {
|
||||
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private static readonly NO_OP: INotificationHandle = new NoOpNotification();
|
||||
|
||||
|
@ -232,7 +232,7 @@ export class SimpleNotificationService implements INotificationService {
|
|||
}
|
||||
|
||||
export class StandaloneCommandService implements ICommandService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _instantiationService: IInstantiationService;
|
||||
private readonly _dynamicCommands: { [id: string]: ICommand; };
|
||||
|
@ -414,7 +414,7 @@ function isConfigurationOverrides(thing: any): thing is IConfigurationOverrides
|
|||
|
||||
export class SimpleConfigurationService implements IConfigurationService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private _onDidChangeConfiguration = new Emitter<IConfigurationChangeEvent>();
|
||||
public readonly onDidChangeConfiguration: Event<IConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
|
||||
|
@ -479,7 +479,7 @@ export class SimpleConfigurationService implements IConfigurationService {
|
|||
|
||||
export class SimpleResourceConfigurationService implements ITextResourceConfigurationService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _onDidChangeConfiguration = new Emitter<IConfigurationChangeEvent>();
|
||||
public readonly onDidChangeConfiguration = this._onDidChangeConfiguration.event;
|
||||
|
@ -504,7 +504,7 @@ export class SimpleResourceConfigurationService implements ITextResourceConfigur
|
|||
|
||||
export class SimpleResourcePropertiesService implements ITextResourcePropertiesService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
|
@ -523,7 +523,7 @@ export class SimpleResourcePropertiesService implements ITextResourcePropertiesS
|
|||
}
|
||||
|
||||
export class StandaloneTelemetryService implements ITelemetryService {
|
||||
_serviceBrand: void = undefined;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
public isOptedIn = false;
|
||||
|
||||
|
@ -545,7 +545,7 @@ export class StandaloneTelemetryService implements ITelemetryService {
|
|||
|
||||
export class SimpleWorkspaceContextService implements IWorkspaceContextService {
|
||||
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private static SCHEME = 'inmemory';
|
||||
|
||||
|
@ -614,7 +614,7 @@ export function applyConfigurationValues(configurationService: IConfigurationSer
|
|||
}
|
||||
|
||||
export class SimpleBulkEditService implements IBulkEditService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private readonly _modelService: IModelService) {
|
||||
//
|
||||
|
@ -658,7 +658,7 @@ export class SimpleBulkEditService implements IBulkEditService {
|
|||
|
||||
export class SimpleUriLabelService implements ILabelService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _onDidRegisterFormatter = new Emitter<void>();
|
||||
public readonly onDidChangeFormatters: Event<void> = this._onDidRegisterFormatter.event;
|
||||
|
@ -692,7 +692,7 @@ export class SimpleUriLabelService implements ILabelService {
|
|||
}
|
||||
|
||||
export class SimpleLayoutService implements ILayoutService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
public onLayout = Event.None;
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ function newBuiltInTheme(builtinTheme: BuiltinTheme): StandaloneTheme {
|
|||
|
||||
export class StandaloneThemeServiceImpl implements IStandaloneThemeService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _knownThemes: Map<string, StandaloneTheme>;
|
||||
private readonly _styleElement: HTMLStyleElement;
|
||||
|
|
|
@ -26,7 +26,7 @@ export interface IStandaloneTheme extends ITheme {
|
|||
}
|
||||
|
||||
export interface IStandaloneThemeService extends IThemeService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
setTheme(themeName: string): string;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ suite('TokenizationSupport2Adapter', () => {
|
|||
}
|
||||
|
||||
class MockThemeService implements IStandaloneThemeService {
|
||||
_serviceBrand = <any>null;
|
||||
_serviceBrand: undefined;
|
||||
public setTheme(themeName: string): string {
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
|
@ -184,4 +184,4 @@ suite('TokenizationSupport2Adapter', () => {
|
|||
);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -25,7 +25,7 @@ export class TestCodeEditorService extends AbstractCodeEditorService {
|
|||
}
|
||||
|
||||
export class TestCommandService implements ICommandService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _instantiationService: IInstantiationService;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ suite('OpenerService', function () {
|
|||
let lastCommand: { id: string; args: any[] } | undefined;
|
||||
|
||||
const commandService = new (class implements ICommandService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
onWillExecuteCommand = () => ({ dispose: () => { } });
|
||||
onDidExecuteCommand = () => ({ dispose: () => { } });
|
||||
executeCommand(id: string, ...args: any[]): Promise<any> {
|
||||
|
|
|
@ -367,7 +367,7 @@ assertComputeEdits(file1, file2);
|
|||
|
||||
class TestTextResourcePropertiesService implements ITextResourcePropertiesService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
|
|
|
@ -10,7 +10,7 @@ import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/c
|
|||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
export abstract class AbstractAccessibilityService extends Disposable implements IAccessibilityService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private _accessibilityModeEnabledContext: IContextKey<boolean>;
|
||||
protected readonly _onDidChangeAccessibilitySupport = new Emitter<void>();
|
||||
|
|
|
@ -10,7 +10,7 @@ import { RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
|||
export const IAccessibilityService = createDecorator<IAccessibilityService>('accessibilityService');
|
||||
|
||||
export interface IAccessibilityService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
readonly onDidChangeAccessibilitySupport: Event<void>;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { AbstractAccessibilityService } from 'vs/platform/accessibility/common/a
|
|||
|
||||
export class BrowserAccessibilityService extends AbstractAccessibilityService implements IAccessibilityService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private _accessibilitySupport = AccessibilitySupport.Unknown;
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ export const IMenuService = createDecorator<IMenuService>('menuService');
|
|||
|
||||
export interface IMenuService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
createMenu(id: MenuId, scopedKeybindingService: IContextKeyService): IMenu;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import { ContextKeyExpr, IContextKeyService, IContextKeyChangeEvent } from 'vs/p
|
|||
|
||||
export class MenuService implements IMenuService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@ICommandService private readonly _commandService: ICommandService
|
||||
|
|
|
@ -33,7 +33,7 @@ export interface IWorkspaceBackupInfo {
|
|||
}
|
||||
|
||||
export interface IBackupMainService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
isHotExitEnabled(): boolean;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import { Schemas } from 'vs/base/common/network';
|
|||
|
||||
export class BackupMainService implements IBackupMainService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
protected backupHome: string;
|
||||
protected workspacesJsonPath: string;
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export class BrowserClipboardService implements IClipboardService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<IClipboardService>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private _internalResourcesClipboard: URI[] | undefined;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ export const IClipboardService = createDecorator<IClipboardService>('clipboardSe
|
|||
|
||||
export interface IClipboardService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Writes text to the system clipboard.
|
||||
|
|
|
@ -12,7 +12,7 @@ export class ClipboardService implements IClipboardService {
|
|||
|
||||
private static FILE_FORMAT = 'code/file-list'; // Clipboard format for files
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
async writeText(text: string, type?: 'selection' | 'clipboard'): Promise<void> {
|
||||
clipboard.writeText(text, type);
|
||||
|
|
|
@ -19,7 +19,7 @@ export interface ICommandEvent {
|
|||
}
|
||||
|
||||
export interface ICommandService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
onWillExecuteCommand: Event<ICommandEvent>;
|
||||
onDidExecuteCommand: Event<ICommandEvent>;
|
||||
executeCommand<T = any>(commandId: string, ...args: any[]): Promise<T | undefined>;
|
||||
|
|
|
@ -63,7 +63,7 @@ export interface IConfigurationChangeEvent {
|
|||
}
|
||||
|
||||
export interface IConfigurationService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import { Schemas } from 'vs/base/common/network';
|
|||
|
||||
export class ConfigurationService extends Disposable implements IConfigurationService, IDisposable {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private configuration: Configuration;
|
||||
private userConfigModelWatcher: ConfigWatcher<ConfigurationModelParser> | undefined;
|
||||
|
|
|
@ -8,7 +8,7 @@ import { URI } from 'vs/base/common/uri';
|
|||
import { getConfigurationKeys, IConfigurationOverrides, IConfigurationService, getConfigurationValue, isConfigurationOverrides } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
export class TestConfigurationService implements IConfigurationService {
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private configuration = Object.create(null);
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ class CompositeContextKeyChangeEvent implements IContextKeyChangeEvent {
|
|||
}
|
||||
|
||||
export abstract class AbstractContextKeyService implements IContextKeyService {
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
protected _isDisposed: boolean;
|
||||
protected _onDidChangeContext = new PauseableEmitter<IContextKeyChangeEvent>({ merge: input => new CompositeContextKeyChangeEvent(input) });
|
||||
|
|
|
@ -827,7 +827,7 @@ export interface IContextKeyChangeEvent {
|
|||
}
|
||||
|
||||
export interface IContextKeyService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
dispose(): void;
|
||||
|
||||
onDidChangeContext: Event<IContextKeyChangeEvent>;
|
||||
|
|
|
@ -14,7 +14,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
|||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
export class ContextMenuService extends Disposable implements IContextMenuService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private _onDidContextMenu = this._register(new Emitter<void>());
|
||||
readonly onDidContextMenu: Event<void> = this._onDidContextMenu.event;
|
||||
|
|
|
@ -13,7 +13,7 @@ export const IContextViewService = createDecorator<IContextViewService>('context
|
|||
|
||||
export interface IContextViewService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
showContextView(delegate: IContextViewDelegate): void;
|
||||
hideContextView(data?: any): void;
|
||||
|
@ -37,7 +37,7 @@ export const IContextMenuService = createDecorator<IContextMenuService>('context
|
|||
|
||||
export interface IContextMenuService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
showContextMenu(delegate: IContextMenuDelegate): void;
|
||||
onDidContextMenu: Event<void>; // TODO@isidor these event should be removed once we get async context menus
|
||||
|
|
|
@ -9,7 +9,7 @@ import { Disposable } from 'vs/base/common/lifecycle';
|
|||
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||
|
||||
export class ContextViewService extends Disposable implements IContextViewService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private contextView: ContextView;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ export interface ICloseSessionEvent {
|
|||
}
|
||||
|
||||
export interface IExtensionHostDebugService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
reload(sessionId: string): void;
|
||||
onReload: Event<IReloadSessionEvent>;
|
||||
|
|
|
@ -54,7 +54,7 @@ export class ExtensionHostDebugBroadcastChannel<TContext> implements IServerChan
|
|||
|
||||
export class ExtensionHostDebugChannelClient extends Disposable implements IExtensionHostDebugService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private channel: IChannel) {
|
||||
super();
|
||||
|
|
|
@ -7,7 +7,6 @@ import { IServerChannel, IChannel } from 'vs/base/parts/ipc/common/ipc';
|
|||
import { IRemoteDiagnosticInfo, IRemoteDiagnosticError, SystemInfo, PerformanceInfo } from 'vs/platform/diagnostics/common/diagnostics';
|
||||
import { IDiagnosticsService } from './diagnosticsService';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IMainProcessInfo } from 'vs/platform/launch/common/launchService';
|
||||
import { IWorkspace } from 'vs/platform/workspace/common/workspace';
|
||||
|
||||
|
@ -37,7 +36,7 @@ export class DiagnosticsChannel implements IServerChannel {
|
|||
|
||||
export class DiagnosticsService implements IDiagnosticsService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private channel: IChannel) { }
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ export const ID = 'diagnosticsService';
|
|||
export const IDiagnosticsService = createDecorator<IDiagnosticsService>(ID);
|
||||
|
||||
export interface IDiagnosticsService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
getPerformanceInfo(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise<PerformanceInfo>;
|
||||
getSystemInfo(mainProcessInfo: IMainProcessInfo, remoteInfo: (IRemoteDiagnosticInfo | IRemoteDiagnosticError)[]): Promise<SystemInfo>;
|
||||
|
@ -248,7 +248,7 @@ export function collectLaunchConfigs(folder: string): Promise<WorkspaceStatItem[
|
|||
|
||||
export class DiagnosticsService implements IDiagnosticsService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(@ITelemetryService private readonly telemetryService: ITelemetryService) { }
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import { EventHelper } from 'vs/base/browser/dom';
|
|||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
|
||||
export class DialogService implements IDialogService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private allowableCommands = ['copy', 'cut'];
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ export interface IDialogOptions {
|
|||
*/
|
||||
export interface IDialogService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Ask the user for confirmation with a modal dialog.
|
||||
|
@ -163,7 +163,7 @@ export const IFileDialogService = createDecorator<IFileDialogService>('fileDialo
|
|||
*/
|
||||
export interface IFileDialogService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* The default path for a new file based on previously used files.
|
||||
|
|
|
@ -27,7 +27,7 @@ export class DialogChannel implements IServerChannel {
|
|||
|
||||
export class DialogChannelClient implements IDialogService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private channel: IChannel) { }
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ export const IDownloadService = createDecorator<IDownloadService>('downloadServi
|
|||
|
||||
export interface IDownloadService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
download(uri: URI, to: URI, cancellationToken?: CancellationToken): Promise<void>;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ export class DownloadServiceChannel implements IServerChannel {
|
|||
|
||||
export class DownloadServiceChannelClient implements IDownloadService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private channel: IChannel, private getUriTransformer: () => IURITransformer | null) { }
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { Schemas } from 'vs/base/common/network';
|
|||
|
||||
export class DownloadService implements IDownloadService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@IRequestService private readonly requestService: IRequestService,
|
||||
|
|
|
@ -19,7 +19,7 @@ export interface IElement {
|
|||
}
|
||||
|
||||
export interface IDriver {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
getWindowIds(): Promise<number[]>;
|
||||
capturePage(windowId: number): Promise<string>;
|
||||
|
|
|
@ -25,7 +25,7 @@ function isSilentKeyCode(keyCode: KeyCode) {
|
|||
|
||||
export class Driver implements IDriver, IWindowDriverRegistry {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private registeredWindowIds = new Set<number>();
|
||||
private reloadingWindowIds = new Set<number>();
|
||||
|
|
|
@ -42,7 +42,7 @@ export class DriverChannel implements IServerChannel {
|
|||
|
||||
export class DriverChannelClient implements IDriver {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private channel: IChannel) { }
|
||||
|
||||
|
@ -136,7 +136,7 @@ export class WindowDriverRegistryChannel implements IServerChannel {
|
|||
|
||||
export class WindowDriverRegistryChannelClient implements IWindowDriverRegistry {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private channel: IChannel) { }
|
||||
|
||||
|
@ -177,7 +177,7 @@ export class WindowDriverChannel implements IServerChannel {
|
|||
|
||||
export class WindowDriverChannelClient implements IWindowDriver {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private channel: IChannel) { }
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
export interface ParsedArgs {
|
||||
|
@ -99,7 +99,7 @@ export const BACKUPS = 'Backups';
|
|||
|
||||
export interface IEnvironmentService {
|
||||
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
args: ParsedArgs;
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ import { toLocalISOString } from 'vs/base/common/date';
|
|||
import { isWindows, isLinux } from 'vs/base/common/platform';
|
||||
import { getPathFromAmdModule } from 'vs/base/common/amd';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
// Read this before there's any chance it is overwritten
|
||||
// Related to https://github.com/Microsoft/vscode/issues/30624
|
||||
|
@ -77,7 +76,7 @@ function getCLIPath(execPath: string, appRoot: string, isBuilt: boolean): string
|
|||
|
||||
export class EnvironmentService implements IEnvironmentService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
get args(): ParsedArgs { return this._args; }
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ interface IRawExtensionsReport {
|
|||
|
||||
export class ExtensionGalleryService implements IExtensionGalleryService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private extensionsGalleryUrl: string | undefined;
|
||||
private extensionsControlUrl: string | undefined;
|
||||
|
|
|
@ -146,7 +146,7 @@ export interface ITranslation {
|
|||
}
|
||||
|
||||
export interface IExtensionGalleryService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
isEnabled(): boolean;
|
||||
query(token: CancellationToken): Promise<IPager<IGalleryExtension>>;
|
||||
query(options: IQueryOptions, token: CancellationToken): Promise<IPager<IGalleryExtension>>;
|
||||
|
@ -186,7 +186,7 @@ export const INSTALL_ERROR_MALICIOUS = 'malicious';
|
|||
export const INSTALL_ERROR_INCOMPATIBLE = 'incompatible';
|
||||
|
||||
export interface IExtensionManagementService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onInstallExtension: Event<InstallExtensionEvent>;
|
||||
onDidInstallExtension: Event<DidInstallExtensionEvent>;
|
||||
|
|
|
@ -77,7 +77,7 @@ export class ExtensionManagementChannel implements IServerChannel {
|
|||
|
||||
export class ExtensionManagementChannelClient implements IExtensionManagementService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
private readonly channel: IChannel,
|
||||
|
|
|
@ -101,7 +101,7 @@ interface InstallableExtension {
|
|||
|
||||
export class ExtensionManagementService extends Disposable implements IExtensionManagementService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private systemExtensionsPath: string;
|
||||
private extensionsPath: string;
|
||||
|
|
|
@ -7,7 +7,6 @@ import { Disposable, IDisposable, toDisposable, dispose, DisposableStore } from
|
|||
import { IFileService, IResolveFileOptions, FileChangesEvent, FileOperationEvent, IFileSystemProviderRegistrationEvent, IFileSystemProvider, IFileStat, IResolveFileResult, ICreateFileOptions, IFileSystemProviderActivationEvent, FileOperationError, FileOperationResult, FileOperation, FileSystemProviderCapabilities, FileType, toFileSystemProviderErrorCode, FileSystemProviderErrorCode, IStat, IFileStatWithMetadata, IResolveMetadataFileOptions, etag, hasReadWriteCapability, hasFileFolderCopyCapability, hasOpenReadWriteCloseCapability, toFileOperationResult, IFileSystemProviderWithOpenReadWriteCloseCapability, IFileSystemProviderWithFileReadWriteCapability, IResolveFileResultWithMetadata, IWatchOptions, IWriteFileOptions, IReadFileOptions, IFileStreamContent, IFileContent, ETAG_DISABLED } from 'vs/platform/files/common/files';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { isAbsolutePath, dirname, basename, joinPath, isEqual, isEqualOrParent } from 'vs/base/common/resources';
|
||||
import { localize } from 'vs/nls';
|
||||
import { TernarySearchTree } from 'vs/base/common/map';
|
||||
|
@ -21,7 +20,7 @@ import { Schemas } from 'vs/base/common/network';
|
|||
|
||||
export class FileService extends Disposable implements IFileService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly BUFFER_SIZE = 64 * 1024;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { sep } from 'vs/base/common/path';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import * as glob from 'vs/base/common/glob';
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { startsWithIgnoreCase } from 'vs/base/common/strings';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
@ -18,7 +18,7 @@ export const IFileService = createDecorator<IFileService>('fileService');
|
|||
|
||||
export interface IFileService {
|
||||
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* An event that is fired when a file system provider is added or removed
|
||||
|
|
|
@ -47,7 +47,7 @@ export function isRecentFile(curr: IRecent): curr is IRecentFile {
|
|||
|
||||
|
||||
export interface IHistoryMainService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onRecentlyOpenedChange: CommonEvent<void>;
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
|
|||
import { getSimpleWorkspaceLabel } from 'vs/platform/label/common/label';
|
||||
import { toStoreData, restoreRecentlyOpened, RecentlyOpenedStorageData } from 'vs/platform/history/common/historyStorage';
|
||||
import { exists } from 'vs/base/node/pfs';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ILifecycleService, LifecycleMainPhase } from 'vs/platform/lifecycle/electron-main/lifecycleMain';
|
||||
|
||||
export class HistoryMainService implements IHistoryMainService {
|
||||
|
@ -40,7 +39,7 @@ export class HistoryMainService implements IHistoryMainService {
|
|||
|
||||
private static readonly recentlyOpenedStorageKey = 'openedPathsList';
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<IHistoryMainService>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private _onRecentlyOpenedChange = new Emitter<void>();
|
||||
readonly onRecentlyOpenedChange: CommonEvent<void> = this._onRecentlyOpenedChange.event;
|
||||
|
|
|
@ -23,39 +23,39 @@ export namespace _util {
|
|||
// --- interfaces ------
|
||||
|
||||
export interface IConstructorSignature0<T> {
|
||||
new(...services: { _serviceBrand: any; }[]): T;
|
||||
new(...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature1<A1, T> {
|
||||
new(first: A1, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature2<A1, A2, T> {
|
||||
new(first: A1, second: A2, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature3<A1, A2, A3, T> {
|
||||
new(first: A1, second: A2, third: A3, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature4<A1, A2, A3, A4, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature5<A1, A2, A3, A4, A5, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature6<A1, A2, A3, A4, A5, A6, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T> {
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8, ...services: { _serviceBrand: any; }[]): T;
|
||||
new(first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8, ...services: { _serviceBrand: undefined; }[]): T;
|
||||
}
|
||||
|
||||
export interface ServicesAccessor {
|
||||
|
@ -67,7 +67,7 @@ export const IInstantiationService = createDecorator<IInstantiationService>('ins
|
|||
|
||||
export interface IInstantiationService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Synchronously creates an instance that is denoted by
|
||||
|
|
|
@ -28,7 +28,7 @@ class CyclicDependencyError extends Error {
|
|||
|
||||
export class InstantiationService implements IInstantiationService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly _services: ServiceCollection;
|
||||
private readonly _strict: boolean;
|
||||
|
|
|
@ -12,48 +12,48 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
|||
let IService1 = createDecorator<IService1>('service1');
|
||||
|
||||
interface IService1 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
c: number;
|
||||
}
|
||||
|
||||
class Service1 implements IService1 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
c = 1;
|
||||
}
|
||||
|
||||
let IService2 = createDecorator<IService2>('service2');
|
||||
|
||||
interface IService2 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
d: boolean;
|
||||
}
|
||||
|
||||
class Service2 implements IService2 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
d = true;
|
||||
}
|
||||
|
||||
let IService3 = createDecorator<IService3>('service3');
|
||||
|
||||
interface IService3 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
s: string;
|
||||
}
|
||||
|
||||
class Service3 implements IService3 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
s = 'farboo';
|
||||
}
|
||||
|
||||
let IDependentService = createDecorator<IDependentService>('dependentService');
|
||||
|
||||
interface IDependentService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
name: string;
|
||||
}
|
||||
|
||||
class DependentService implements IDependentService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
constructor(@IService1 service: IService1) {
|
||||
assert.equal(service.c, 1);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ class DependentServiceTarget2 {
|
|||
|
||||
|
||||
class ServiceLoop1 implements IService1 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
c = 1;
|
||||
|
||||
constructor(@IService2 s: IService2) {
|
||||
|
@ -125,7 +125,7 @@ class ServiceLoop1 implements IService1 {
|
|||
}
|
||||
|
||||
class ServiceLoop2 implements IService2 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
d = true;
|
||||
|
||||
constructor(@IService1 s: IService1) {
|
||||
|
@ -364,7 +364,7 @@ suite('Instantiation Service', () => {
|
|||
let serviceInstanceCount = 0;
|
||||
|
||||
const CtorCounter = class implements Service1 {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
c = 1;
|
||||
constructor() {
|
||||
serviceInstanceCount += 1;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IChannel, IServerChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { Client } from 'vs/base/parts/ipc/electron-browser/ipc.electron-browser';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
|
@ -12,7 +12,7 @@ export const IMainProcessService = createDecorator<IMainProcessService>('mainPro
|
|||
|
||||
export interface IMainProcessService {
|
||||
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
getChannel(channelName: string): IChannel;
|
||||
|
||||
|
@ -21,7 +21,7 @@ export interface IMainProcessService {
|
|||
|
||||
export class MainProcessService extends Disposable implements IMainProcessService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private mainProcessConnection: Client;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { Client } from 'vs/base/parts/ipc/common/ipc.net';
|
||||
import { connect } from 'vs/base/parts/ipc/node/ipc.net';
|
||||
import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows';
|
||||
|
@ -14,7 +14,7 @@ export const ISharedProcessService = createDecorator<ISharedProcessService>('sha
|
|||
|
||||
export interface ISharedProcessService {
|
||||
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
getChannel(channelName: string): IChannel;
|
||||
|
||||
|
@ -23,7 +23,7 @@ export interface ISharedProcessService {
|
|||
|
||||
export class SharedProcessService implements ISharedProcessService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private withSharedProcessConnection: Promise<Client<string>>;
|
||||
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
import { IChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { IIssueService, IssueReporterData, ProcessExplorerData } from 'vs/platform/issue/node/issue';
|
||||
import { IMainProcessService } from 'vs/platform/ipc/electron-browser/mainProcessService';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export class IssueService implements IIssueService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private channel: IChannel;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ import { listProcesses } from 'vs/base/node/ps';
|
|||
const DEFAULT_BACKGROUND_COLOR = '#1E1E1E';
|
||||
|
||||
export class IssueService implements IIssueService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
_issueWindow: BrowserWindow | null = null;
|
||||
_issueParentWindow: BrowserWindow | null = null;
|
||||
_processExplorerWindow: BrowserWindow | null = null;
|
||||
|
|
|
@ -87,7 +87,7 @@ export interface ProcessExplorerData extends WindowData {
|
|||
}
|
||||
|
||||
export interface IIssueService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
openReporter(data: IssueReporterData): Promise<void>;
|
||||
openProcessExplorer(data: ProcessExplorerData): Promise<void>;
|
||||
getSystemStatus(): Promise<string>;
|
||||
|
|
|
@ -24,7 +24,7 @@ interface CurrentChord {
|
|||
}
|
||||
|
||||
export abstract class AbstractKeybindingService extends Disposable implements IKeybindingService {
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
protected readonly _onDidUpdateKeybindings: Emitter<IKeybindingEvent> = this._register(new Emitter<IKeybindingEvent>());
|
||||
get onDidUpdateKeybindings(): Event<IKeybindingEvent> {
|
||||
|
|
|
@ -41,7 +41,7 @@ export interface IKeyboardEvent {
|
|||
export const IKeybindingService = createDecorator<IKeybindingService>('keybindingService');
|
||||
|
||||
export interface IKeybindingService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onDidUpdateKeybindings: Event<IKeybindingEvent>;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKe
|
|||
import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding';
|
||||
import { INotification, INotificationService, IPromptChoice, IPromptOptions, NoOpNotification, IStatusMessageOptions } from 'vs/platform/notification/common/notification';
|
||||
import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
function createContext(ctx: any) {
|
||||
return {
|
||||
|
@ -132,7 +131,7 @@ suite('AbstractKeybindingService', () => {
|
|||
};
|
||||
|
||||
let notificationService: INotificationService = {
|
||||
_serviceBrand: {} as ServiceIdentifier<INotificationService>,
|
||||
_serviceBrand: undefined,
|
||||
notify: (notification: INotification) => {
|
||||
showMessageCalls.push({ sev: notification.severity, message: notification.message });
|
||||
return new NoOpNotification();
|
||||
|
|
|
@ -36,7 +36,7 @@ class MockKeybindingContextKey<T> implements IContextKey<T> {
|
|||
|
||||
export class MockContextKeyService implements IContextKeyService {
|
||||
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
private _keys = new Map<string, IContextKey<any>>();
|
||||
|
||||
public dispose(): void {
|
||||
|
@ -69,7 +69,7 @@ export class MockContextKeyService implements IContextKeyService {
|
|||
}
|
||||
|
||||
export class MockKeybindingService implements IKeybindingService {
|
||||
public _serviceBrand: any;
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
public get onDidUpdateKeybindings(): Event<IKeybindingEvent> {
|
||||
return Event.None;
|
||||
|
|
|
@ -14,7 +14,7 @@ import { isEqualOrParent, basename } from 'vs/base/common/resources';
|
|||
import { endsWith } from 'vs/base/common/strings';
|
||||
|
||||
export interface ILabelService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
/**
|
||||
* Gets the human readable label for a uri.
|
||||
* If relative is passed returns a label relative to the workspace root that the uri belongs to.
|
||||
|
|
|
@ -8,7 +8,7 @@ import { ILogService } from 'vs/platform/log/common/log';
|
|||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
import { IProcessEnvironment, isMacintosh } from 'vs/base/common/platform';
|
||||
import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { OpenContext, IWindowSettings } from 'vs/platform/windows/common/windows';
|
||||
import { IWindowsMainService, ICodeWindow } from 'vs/platform/windows/electron-main/windows';
|
||||
import { whenDeleted } from 'vs/base/node/pfs';
|
||||
|
@ -53,7 +53,7 @@ function parseOpenUrl(args: ParsedArgs): URI[] {
|
|||
}
|
||||
|
||||
export interface ILaunchService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
start(args: ParsedArgs, userEnv: IProcessEnvironment): Promise<void>;
|
||||
getMainProcessId(): Promise<number>;
|
||||
getMainProcessInfo(): Promise<IMainProcessInfo>;
|
||||
|
@ -94,7 +94,7 @@ export class LaunchChannel implements IServerChannel {
|
|||
|
||||
export class LaunchChannelClient implements ILaunchService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<ILaunchService>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(private channel: IChannel) { }
|
||||
|
||||
|
@ -121,7 +121,7 @@ export class LaunchChannelClient implements ILaunchService {
|
|||
|
||||
export class LaunchService implements ILaunchService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<ILaunchService>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@ILogService private readonly logService: ILogService,
|
||||
|
|
|
@ -15,7 +15,7 @@ export interface IDimension {
|
|||
|
||||
export interface ILayoutService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* The dimensions of the container.
|
||||
|
|
|
@ -3,15 +3,14 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ShutdownReason, ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { AbstractLifecycleService } from 'vs/platform/lifecycle/common/lifecycleService';
|
||||
import { localize } from 'vs/nls';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export class BrowserLifecycleService extends AbstractLifecycleService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<ILifecycleService>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@ILogService readonly logService: ILogService
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { isThenable } from 'vs/base/common/async';
|
||||
|
||||
export const ILifecycleService = createDecorator<ILifecycleService>('lifecycleService');
|
||||
|
@ -123,7 +123,7 @@ export function LifecyclePhaseToString(phase: LifecyclePhase) {
|
|||
*/
|
||||
export interface ILifecycleService {
|
||||
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Value indicates how this window got loaded.
|
||||
|
@ -167,7 +167,7 @@ export interface ILifecycleService {
|
|||
|
||||
export const NullLifecycleService: ILifecycleService = {
|
||||
|
||||
_serviceBrand: null as any,
|
||||
_serviceBrand: undefined,
|
||||
|
||||
onBeforeShutdown: Event.None,
|
||||
onWillShutdown: Event.None,
|
||||
|
|
|
@ -9,11 +9,10 @@ import { Disposable } from 'vs/base/common/lifecycle';
|
|||
import { ILifecycleService, BeforeShutdownEvent, WillShutdownEvent, StartupKind, LifecyclePhase, LifecyclePhaseToString } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { mark } from 'vs/base/common/performance';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export abstract class AbstractLifecycleService extends Disposable implements ILifecycleService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<ILifecycleService>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
protected readonly _onBeforeShutdown = this._register(new Emitter<BeforeShutdownEvent>());
|
||||
readonly onBeforeShutdown: Event<BeforeShutdownEvent> = this._onBeforeShutdown.event;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { toErrorMessage } from 'vs/base/common/errorMessage';
|
||||
import { ShutdownReason, StartupKind, handleVetos, ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { ShutdownReason, StartupKind, handleVetos } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { IStorageService, StorageScope, WillSaveStateReason } from 'vs/platform/storage/common/storage';
|
||||
import { ipcRenderer as ipc } from 'electron';
|
||||
import { IWindowService } from 'vs/platform/windows/common/windows';
|
||||
|
@ -12,13 +12,12 @@ import { ILogService } from 'vs/platform/log/common/log';
|
|||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { AbstractLifecycleService } from 'vs/platform/lifecycle/common/lifecycleService';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export class LifecycleService extends AbstractLifecycleService {
|
||||
|
||||
private static readonly LAST_SHUTDOWN_REASON_KEY = 'lifecyle.lastShutdownReason';
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<ILifecycleService>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private shutdownReason: ShutdownReason;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import { ipcMain as ipc, app } from 'electron';
|
|||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IStateService } from 'vs/platform/state/common/state';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ICodeWindow } from 'vs/platform/windows/electron-main/windows';
|
||||
import { handleVetos } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { isMacintosh, isWindows } from 'vs/base/common/platform';
|
||||
|
@ -40,7 +40,7 @@ export interface ShutdownEvent {
|
|||
|
||||
export interface ILifecycleService {
|
||||
|
||||
_serviceBrand: ServiceIdentifier<ILifecycleService>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Will be true if the program was restarted (e.g. due to explicit request or update).
|
||||
|
@ -131,7 +131,7 @@ export const enum LifecycleMainPhase {
|
|||
|
||||
export class LifecycleService extends Disposable implements ILifecycleService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<ILifecycleService>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private static readonly QUIT_FROM_RESTART_MARKER = 'quit.from.restart'; // use a marker to find out if the session was restarted
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ export const IListService = createDecorator<IListService>('listService');
|
|||
|
||||
export interface IListService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
/**
|
||||
* Returns the currently focused list widget if any.
|
||||
|
@ -53,7 +53,7 @@ interface IRegisteredList {
|
|||
|
||||
export class ListService implements IListService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private lists: IRegisteredList[] = [];
|
||||
private _lastFocusedWidget: ListWidget | undefined = undefined;
|
||||
|
|
|
@ -26,7 +26,7 @@ export const enum LanguageType {
|
|||
|
||||
export const ILocalizationsService = createDecorator<ILocalizationsService>('localizationsService');
|
||||
export interface ILocalizationsService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
readonly onDidLanguagesChange: Event<void>;
|
||||
getLanguageIds(type?: LanguageType): Promise<string[]>;
|
||||
|
|
|
@ -7,11 +7,10 @@ import { IChannel } from 'vs/base/parts/ipc/common/ipc';
|
|||
import { Event } from 'vs/base/common/event';
|
||||
import { ILocalizationsService, LanguageType } from 'vs/platform/localizations/common/localizations';
|
||||
import { ISharedProcessService } from 'vs/platform/ipc/electron-browser/sharedProcessService';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
export class LocalizationsService implements ILocalizationsService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<any>;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private channel: IChannel;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ if (product.quality !== 'stable') {
|
|||
|
||||
export class LocalizationsService extends Disposable implements ILocalizationsService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: undefined;
|
||||
|
||||
private readonly cache: LanguagePacksCache;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue