Skip to content

Commit

Permalink
Add workaround for preferences editor strict function error
Browse files Browse the repository at this point in the history
For #81574
  • Loading branch information
mjbvz committed Feb 14, 2020
1 parent 2f9c79a commit 91fc43d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vs/platform/instantiation/common/instantiation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface IConstructorSignature0<T> {
}

export interface IConstructorSignature1<A1, T> {
new(first: A1, ...services: BrandedService[]): T;
new <Services extends BrandedService[]>(first: A1, ...services: Services): T;
}

export interface IConstructorSignature2<A1, A2, T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { SelectionHighlighter } from 'vs/editor/contrib/multicursor/multicursor'
import * as nls from 'vs/nls';
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IInstantiationService, IConstructorSignature1 } from 'vs/platform/instantiation/common/instantiation';
import { ILogService } from 'vs/platform/log/common/log';
import { IEditorProgressService } from 'vs/platform/progress/common/progress';
import { Registry } from 'vs/platform/registry/common/platform';
Expand Down Expand Up @@ -984,7 +984,7 @@ export class DefaultPreferencesEditor extends BaseTextEditor {
private static _getContributions(): IEditorContributionDescription[] {
const skipContributions = [FoldingController.ID, SelectionHighlighter.ID, FindController.ID];
const contributions = EditorExtensionsRegistry.getEditorContributions().filter(c => skipContributions.indexOf(c.id) === -1);
contributions.push({ id: DefaultSettingsEditorContribution.ID, ctor: DefaultSettingsEditorContribution });
contributions.push({ id: DefaultSettingsEditorContribution.ID, ctor: DefaultSettingsEditorContribution as IConstructorSignature1<ICodeEditor, editorCommon.IEditorContribution> });
return contributions;
}

Expand Down

0 comments on commit 91fc43d

Please sign in to comment.