More changes for #81574

This commit is contained in:
Alexandru Dima
2019-11-15 18:02:15 +01:00
parent 44e755ba4b
commit ca81ca47db
7 changed files with 12 additions and 10 deletions

View File

@@ -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 });
}