From 017e6856f9801e1f69d79df981b71c682b27729b Mon Sep 17 00:00:00 2001 From: mathuo <6710312+mathuo@users.noreply.github.com> Date: Wed, 16 Feb 2022 20:21:04 +0000 Subject: [PATCH] feat: improve types --- packages/dockview/src/gridview/gridviewComponent.ts | 4 ++-- packages/dockview/src/splitview/splitviewComponent.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/dockview/src/gridview/gridviewComponent.ts b/packages/dockview/src/gridview/gridviewComponent.ts index fbe96cb33..3ad50ec50 100644 --- a/packages/dockview/src/gridview/gridviewComponent.ts +++ b/packages/dockview/src/gridview/gridviewComponent.ts @@ -66,7 +66,7 @@ export type GridviewComponentUpdateOptions = Pick< export interface IGridviewComponent extends IBaseGrid { readonly orientation: Orientation; - updateOptions(options: GridviewComponentUpdateOptions): void; + updateOptions(options: Partial): void; addPanel(options: AddComponentOptions): void; removePanel(panel: IGridviewPanel, sizing?: Sizing): void; toggleVisibility(panel: IGridviewPanel): void; @@ -128,7 +128,7 @@ export class GridviewComponent } } - updateOptions(options: GridviewComponentUpdateOptions): void { + updateOptions(options: Partial): void { const hasOrientationChanged = typeof options.orientation === 'string' && this.options.orientation !== options.orientation; diff --git a/packages/dockview/src/splitview/splitviewComponent.ts b/packages/dockview/src/splitview/splitviewComponent.ts index c1133167a..87355641c 100644 --- a/packages/dockview/src/splitview/splitviewComponent.ts +++ b/packages/dockview/src/splitview/splitviewComponent.ts @@ -58,7 +58,7 @@ export interface ISplitviewComponent extends IDisposable { readonly width: number; readonly length: number; readonly orientation: Orientation; - updateOptions(options: SplitviewComponentUpdateOptions): void; + updateOptions(options: Partial): void; addPanel(options: AddSplitviewComponentOptions): void; layout(width: number, height: number): void; onDidLayoutChange: Event; @@ -159,7 +159,7 @@ export class SplitviewComponent this.addDisposables(this._disposable); } - updateOptions(options: SplitviewComponentUpdateOptions): void { + updateOptions(options: Partial): void { const hasOrientationChanged = typeof options.orientation === 'string' && this.options.orientation !== options.orientation;