mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-14 12:11:43 +01:00
More changes for #81574
This commit is contained in:
@@ -27,7 +27,7 @@ export interface IOnStopCallback {
|
||||
(): void;
|
||||
}
|
||||
|
||||
export function standardMouseMoveMerger(lastEvent: IStandardMouseMoveEventData, currentEvent: MouseEvent): IStandardMouseMoveEventData {
|
||||
export function standardMouseMoveMerger(lastEvent: IStandardMouseMoveEventData | null, currentEvent: MouseEvent): IStandardMouseMoveEventData {
|
||||
let ev = new StandardMouseEvent(currentEvent);
|
||||
ev.preventDefault();
|
||||
return {
|
||||
|
||||
@@ -307,7 +307,7 @@ export function registerEditorContribution<Services extends BrandedService[]>(id
|
||||
EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor);
|
||||
}
|
||||
|
||||
export function registerDiffEditorContribution(id: string, ctor: IDiffEditorContributionCtor): void {
|
||||
export function registerDiffEditorContribution<Services extends BrandedService[]>(id: string, ctor: { new(editor: IDiffEditor, ...services: Services): IEditorContribution }): void {
|
||||
EditorContributionRegistry.INSTANCE.registerDiffEditorContribution(id, ctor);
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ class EditorContributionRegistry {
|
||||
return this.editorContributions.slice(0);
|
||||
}
|
||||
|
||||
public registerDiffEditorContribution(id: string, ctor: IDiffEditorContributionCtor): void {
|
||||
public registerDiffEditorContribution<Services extends BrandedService[]>(id: string, ctor: { new(editor: IDiffEditor, ...services: Services): IEditorContribution }): void {
|
||||
this.diffEditorContributions.push({ id, ctor });
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ async function connectToRemoteExtensionHostAgent(options: ISimpleConnectionOptio
|
||||
options.host,
|
||||
options.port,
|
||||
`reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`,
|
||||
(err: any, socket: ISocket) => {
|
||||
if (err) {
|
||||
(err: any, socket: ISocket | undefined) => {
|
||||
if (err || !socket) {
|
||||
options.logService.error(`${logPrefix} socketFactory.connect() failed. Error:`);
|
||||
options.logService.error(err);
|
||||
e(err);
|
||||
|
||||
@@ -185,8 +185,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
}
|
||||
|
||||
return activeTextEditor.edit((edit: vscode.TextEditorEdit) => {
|
||||
args.unshift(activeTextEditor, edit);
|
||||
callback.apply(thisArg, args);
|
||||
callback.apply(thisArg, [activeTextEditor, edit, ...args]);
|
||||
|
||||
}).then((result) => {
|
||||
if (!result) {
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ export interface ISuggestEnabledInputStyleOverrides extends IStyleOverrides {
|
||||
}
|
||||
|
||||
type ISuggestEnabledInputStyles = {
|
||||
[P in keyof ISuggestEnabledInputStyleOverrides]: Color;
|
||||
[P in keyof ISuggestEnabledInputStyleOverrides]: Color | undefined;
|
||||
};
|
||||
|
||||
export function attachSuggestEnabledInputBoxStyler(widget: IThemable, themeService: IThemeService, style?: ISuggestEnabledInputStyleOverrides): IDisposable {
|
||||
|
||||
@@ -406,7 +406,10 @@ export class MeasureExtHostLatencyAction extends Action {
|
||||
this._editorService.openEditor({ contents: measurements.map(MeasureExtHostLatencyAction._print).join('\n\n'), options: { pinned: true } } as IUntitledTextResourceInput);
|
||||
}
|
||||
|
||||
private static _print(m: ExtHostLatencyResult): string {
|
||||
private static _print(m: ExtHostLatencyResult | null): string {
|
||||
if (!m) {
|
||||
return '';
|
||||
}
|
||||
return `${m.remoteAuthority ? `Authority: ${m.remoteAuthority}\n` : ``}Roundtrip latency: ${m.latency.toFixed(3)}ms\nUp: ${MeasureExtHostLatencyAction._printSpeed(m.up)}\nDown: ${MeasureExtHostLatencyAction._printSpeed(m.down)}\n`;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ export class WorkbenchModeServiceImpl extends ModeServiceImpl {
|
||||
this._configurationService = configurationService;
|
||||
this._extensionService = extensionService;
|
||||
|
||||
languagesExtPoint.setHandler((extensions: IExtensionPointUser<IRawLanguageExtensionPoint[]>[]) => {
|
||||
languagesExtPoint.setHandler((extensions: readonly IExtensionPointUser<IRawLanguageExtensionPoint[]>[]) => {
|
||||
let allValidLanguages: ILanguageExtensionPoint[] = [];
|
||||
|
||||
for (let i = 0, len = extensions.length; i < len; i++) {
|
||||
|
||||
Reference in New Issue
Block a user