diff --git a/packages/core/src/common/unit.ts b/packages/core/src/common/unit.ts index 4949259b4fe..c817d6baa91 100644 --- a/packages/core/src/common/unit.ts +++ b/packages/core/src/common/unit.ts @@ -29,23 +29,3 @@ export abstract class UnitModel<_D = object, T extends UnitType = UnitType> exte abstract name$: Observable; abstract setName(name: string): void; } - -interface IMixinProperty { - // eslint-disable-next-line ts/no-explicit-any - [fnName: string]: (this: T, ...args: any[]) => any; -} - -/** - * Mixin some methods to targetObject as prototype, the static methods will not be mixed in - * @param {T} targetClass The target class to mixin - * @param {IMixinProperty} mixin The mixin object which contains the methods to mixin. - */ -export function mixinClass(targetClass: T, mixin: IMixinProperty): void { - for (const key in mixin) { - // eslint-disable-next-line no-prototype-builtins - if (mixin.hasOwnProperty(key)) { - // @ts-ignore - targetClass.prototype[key] = mixin[key]; - } - } -} diff --git a/packages/facade/src/apis/sheets/f-workbook.ts b/packages/facade/src/apis/sheets/f-workbook.ts index 99e9adf8259..a7956638a84 100644 --- a/packages/facade/src/apis/sheets/f-workbook.ts +++ b/packages/facade/src/apis/sheets/f-workbook.ts @@ -41,7 +41,7 @@ export class FWorkbook { constructor( private readonly _workbook: Workbook, - @Inject(Injector) protected readonly _injector: Injector, + @Inject(Injector) private readonly _injector: Injector, @Inject(IResourceLoaderService) private readonly _resourceLoaderService: IResourceLoaderService, @Inject(SheetsSelectionsService) private readonly _selectionManagerService: SheetsSelectionsService, @IUniverInstanceService private readonly _univerInstanceService: IUniverInstanceService,