Skip to content

Commit ca81ca4

Browse files
committed
More changes for microsoft#81574
1 parent 44e755b commit ca81ca4

7 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/vs/base/browser/globalMouseMoveMonitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface IOnStopCallback {
2727
(): void;
2828
}
2929

30-
export function standardMouseMoveMerger(lastEvent: IStandardMouseMoveEventData, currentEvent: MouseEvent): IStandardMouseMoveEventData {
30+
export function standardMouseMoveMerger(lastEvent: IStandardMouseMoveEventData | null, currentEvent: MouseEvent): IStandardMouseMoveEventData {
3131
let ev = new StandardMouseEvent(currentEvent);
3232
ev.preventDefault();
3333
return {

src/vs/editor/browser/editorExtensions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ export function registerEditorContribution<Services extends BrandedService[]>(id
307307
EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor);
308308
}
309309

310-
export function registerDiffEditorContribution(id: string, ctor: IDiffEditorContributionCtor): void {
310+
export function registerDiffEditorContribution<Services extends BrandedService[]>(id: string, ctor: { new(editor: IDiffEditor, ...services: Services): IEditorContribution }): void {
311311
EditorContributionRegistry.INSTANCE.registerDiffEditorContribution(id, ctor);
312312
}
313313

@@ -363,7 +363,7 @@ class EditorContributionRegistry {
363363
return this.editorContributions.slice(0);
364364
}
365365

366-
public registerDiffEditorContribution(id: string, ctor: IDiffEditorContributionCtor): void {
366+
public registerDiffEditorContribution<Services extends BrandedService[]>(id: string, ctor: { new(editor: IDiffEditor, ...services: Services): IEditorContribution }): void {
367367
this.diffEditorContributions.push({ id, ctor });
368368
}
369369

src/vs/platform/remote/common/remoteAgentConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ async function connectToRemoteExtensionHostAgent(options: ISimpleConnectionOptio
8989
options.host,
9090
options.port,
9191
`reconnectionToken=${options.reconnectionToken}&reconnection=${options.reconnectionProtocol ? 'true' : 'false'}`,
92-
(err: any, socket: ISocket) => {
93-
if (err) {
92+
(err: any, socket: ISocket | undefined) => {
93+
if (err || !socket) {
9494
options.logService.error(`${logPrefix} socketFactory.connect() failed. Error:`);
9595
options.logService.error(err);
9696
e(err);

src/vs/workbench/api/common/extHost.api.impl.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
185185
}
186186

187187
return activeTextEditor.edit((edit: vscode.TextEditorEdit) => {
188-
args.unshift(activeTextEditor, edit);
189-
callback.apply(thisArg, args);
188+
callback.apply(thisArg, [activeTextEditor, edit, ...args]);
190189

191190
}).then((result) => {
192191
if (!result) {

src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export interface ISuggestEnabledInputStyleOverrides extends IStyleOverrides {
8282
}
8383

8484
type ISuggestEnabledInputStyles = {
85-
[P in keyof ISuggestEnabledInputStyleOverrides]: Color;
85+
[P in keyof ISuggestEnabledInputStyleOverrides]: Color | undefined;
8686
};
8787

8888
export function attachSuggestEnabledInputBoxStyler(widget: IThemable, themeService: IThemeService, style?: ISuggestEnabledInputStyleOverrides): IDisposable {

src/vs/workbench/services/extensions/common/extensionHostProcessManager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,10 @@ export class MeasureExtHostLatencyAction extends Action {
406406
this._editorService.openEditor({ contents: measurements.map(MeasureExtHostLatencyAction._print).join('\n\n'), options: { pinned: true } } as IUntitledTextResourceInput);
407407
}
408408

409-
private static _print(m: ExtHostLatencyResult): string {
409+
private static _print(m: ExtHostLatencyResult | null): string {
410+
if (!m) {
411+
return '';
412+
}
410413
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`;
411414
}
412415

src/vs/workbench/services/mode/common/workbenchModeService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class WorkbenchModeServiceImpl extends ModeServiceImpl {
105105
this._configurationService = configurationService;
106106
this._extensionService = extensionService;
107107

108-
languagesExtPoint.setHandler((extensions: IExtensionPointUser<IRawLanguageExtensionPoint[]>[]) => {
108+
languagesExtPoint.setHandler((extensions: readonly IExtensionPointUser<IRawLanguageExtensionPoint[]>[]) => {
109109
let allValidLanguages: ILanguageExtensionPoint[] = [];
110110

111111
for (let i = 0, len = extensions.length; i < len; i++) {

0 commit comments

Comments
 (0)