提交 8044f898 编写于 作者: B Benjamin Pasero

debt - reduce explicit any

上级 80be997d
...@@ -470,7 +470,7 @@ export class BreadcrumbsControl { ...@@ -470,7 +470,7 @@ export class BreadcrumbsControl {
this._ckBreadcrumbsActive.set(value); this._ckBreadcrumbsActive.set(value);
} }
private _revealInEditor(event: IBreadcrumbsItemEvent, element: any, group: SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE | undefined, pinned: boolean = false): void { private _revealInEditor(event: IBreadcrumbsItemEvent, element: BreadcrumbElement, group: SIDE_GROUP_TYPE | ACTIVE_GROUP_TYPE | undefined, pinned: boolean = false): void {
if (element instanceof FileElement) { if (element instanceof FileElement) {
if (element.kind === FileKind.FILE) { if (element.kind === FileKind.FILE) {
// open file in any editor // open file in any editor
......
...@@ -118,7 +118,7 @@ class WorkbenchContributionsRegistry implements IWorkbenchContributionsRegistry ...@@ -118,7 +118,7 @@ class WorkbenchContributionsRegistry implements IWorkbenchContributionsRegistry
try { try {
instantiationService.createInstance(ctor); instantiationService.createInstance(ctor);
} catch (error) { } catch (error) {
console.error(`Unable to instantiate workbench contribution ${(ctor as any).name}.`, error); console.error(`Unable to instantiate workbench contribution ${ctor.name}.`, error);
} }
} }
} }
......
...@@ -165,7 +165,7 @@ export interface IFileInputFactory { ...@@ -165,7 +165,7 @@ export interface IFileInputFactory {
createFileInput(resource: URI, encoding: string | undefined, mode: string | undefined, instantiationService: IInstantiationService): IFileEditorInput; createFileInput(resource: URI, encoding: string | undefined, mode: string | undefined, instantiationService: IInstantiationService): IFileEditorInput;
isFileInput(obj: any): obj is IFileEditorInput; isFileInput(obj: unknown): obj is IFileEditorInput;
} }
export interface IEditorInputFactoryRegistry { export interface IEditorInputFactoryRegistry {
......
...@@ -45,8 +45,8 @@ export interface ISerializedEditorGroup { ...@@ -45,8 +45,8 @@ export interface ISerializedEditorGroup {
preview?: number; preview?: number;
} }
export function isSerializedEditorGroup(obj?: any): obj is ISerializedEditorGroup { export function isSerializedEditorGroup(obj?: unknown): obj is ISerializedEditorGroup {
const group: ISerializedEditorGroup = obj; const group = obj as ISerializedEditorGroup;
return obj && typeof obj === 'object' && Array.isArray(group.editors) && Array.isArray(group.mru); return obj && typeof obj === 'object' && Array.isArray(group.editors) && Array.isArray(group.mru);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册