mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 13:03:42 +01:00
Always require passing in explicit instantiation for editor contribution (#167458)
Always require passing in explicit instantiation for editor contributions
This commit is contained in:
@@ -515,7 +515,7 @@ export function registerInstantiatedEditorAction(editorAction: EditorAction): vo
|
||||
EditorContributionRegistry.INSTANCE.registerEditorAction(editorAction);
|
||||
}
|
||||
|
||||
export function registerEditorContribution<Services extends BrandedService[]>(id: string, ctor: { new(editor: ICodeEditor, ...services: Services): IEditorContribution }, instantiation = EditorContributionInstantiation.Eager): void {
|
||||
export function registerEditorContribution<Services extends BrandedService[]>(id: string, ctor: { new(editor: ICodeEditor, ...services: Services): IEditorContribution }, instantiation: EditorContributionInstantiation): void {
|
||||
EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor, instantiation);
|
||||
}
|
||||
|
||||
@@ -567,7 +567,7 @@ class EditorContributionRegistry {
|
||||
this.editorCommands = Object.create(null);
|
||||
}
|
||||
|
||||
public registerEditorContribution<Services extends BrandedService[]>(id: string, ctor: { new(editor: ICodeEditor, ...services: Services): IEditorContribution }, instantiation = EditorContributionInstantiation.Eager): void {
|
||||
public registerEditorContribution<Services extends BrandedService[]>(id: string, ctor: { new(editor: ICodeEditor, ...services: Services): IEditorContribution }, instantiation: EditorContributionInstantiation): void {
|
||||
this.editorContributions.push({ id, ctor: ctor as IEditorContributionCtor, instantiation });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user