mirror of
https://github.com/mathuo/dockview
synced 2025-09-14 05:07:59 +00:00
feat: improve types
This commit is contained in:
parent
5c2a0cf93d
commit
017e6856f9
@ -66,7 +66,7 @@ export type GridviewComponentUpdateOptions = Pick<
|
||||
|
||||
export interface IGridviewComponent extends IBaseGrid<GridviewPanel> {
|
||||
readonly orientation: Orientation;
|
||||
updateOptions(options: GridviewComponentUpdateOptions): void;
|
||||
updateOptions(options: Partial<GridviewComponentUpdateOptions>): 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<GridviewComponentUpdateOptions>): void {
|
||||
const hasOrientationChanged =
|
||||
typeof options.orientation === 'string' &&
|
||||
this.options.orientation !== options.orientation;
|
||||
|
@ -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<SplitviewComponentUpdateOptions>): void;
|
||||
addPanel(options: AddSplitviewComponentOptions): void;
|
||||
layout(width: number, height: number): void;
|
||||
onDidLayoutChange: Event<void>;
|
||||
@ -159,7 +159,7 @@ export class SplitviewComponent
|
||||
this.addDisposables(this._disposable);
|
||||
}
|
||||
|
||||
updateOptions(options: SplitviewComponentUpdateOptions): void {
|
||||
updateOptions(options: Partial<SplitviewComponentUpdateOptions>): void {
|
||||
const hasOrientationChanged =
|
||||
typeof options.orientation === 'string' &&
|
||||
this.options.orientation !== options.orientation;
|
||||
|
Loading…
x
Reference in New Issue
Block a user