feat: improve types for react components registry

This commit is contained in:
mathuo 2021-11-14 22:17:32 +00:00
parent bcb16f0fc4
commit 367db9fa40
No known key found for this signature in database
GPG Key ID: C6EEDEFD6CA07281
4 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ export interface IGroupPanelBaseProps<T extends {} = Record<string, any>>
containerApi: DockviewApi;
}
export interface IDockviewPanelProps<T extends {} = Record<string, any>>
export interface IDockviewPanelProps<T extends { [index: string]: any } = any>
extends IGroupPanelBaseProps<T> {
// noop
}

View File

@ -15,7 +15,7 @@ export interface GridviewReadyEvent {
api: GridviewApi;
}
export interface IGridviewPanelProps<T extends {} = Record<string, any>>
export interface IGridviewPanelProps<T extends { [index: string]: any } = any>
extends PanelParameters<T> {
api: GridviewPanelApi;
containerApi: GridviewApi;

View File

@ -15,7 +15,7 @@ export interface PaneviewReadyEvent {
api: PaneviewApi;
}
export interface IPaneviewPanelProps<T extends {} = Record<string, any>>
export interface IPaneviewPanelProps<T extends { [index: string]: any } = any>
extends PanelParameters<T> {
api: PaneviewPanelApi;
containerApi: PaneviewApi;

View File

@ -15,7 +15,7 @@ export interface SplitviewReadyEvent {
api: SplitviewApi;
}
export interface ISplitviewPanelProps<T extends {} = any>
export interface ISplitviewPanelProps<T extends { [index: string]: any } = any>
extends PanelParameters<T> {
api: SplitviewPanelApi;
containerApi: SplitviewApi;