Skip to content
Snippets Groups Projects
Unverified Commit e6fa8f90 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Fix Dispatch type (#41631)

* Fix Dispatch type

* Fix typing

* Fix types
parent 855b3245
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ export interface State {
modal: modalName;
}
export type Dispatch<T = any> = (action: T) => void;
export type Dispatch<T = any> = (action: T) => unknown | Promise<unknown>;
export type GetState = () => State;
......
......@@ -54,7 +54,7 @@ interface DispatchProps {
onUpdateTableVisibility: (
tables: Table[],
visibility: TableVisibilityType,
) => Promise<void>;
) => Promise<unknown>;
}
type MetadataTableListProps = OwnProps & TableLoaderProps & DispatchProps;
......@@ -210,7 +210,7 @@ interface TableHeaderProps {
onUpdateTableVisibility: (
tables: Table[],
visibility: TableVisibilityType,
) => Promise<void>;
) => Promise<unknown>;
}
const TableHeader = ({
......@@ -260,7 +260,7 @@ interface TableRowProps {
onUpdateTableVisibility: (
tables: Table[],
visibility: TableVisibilityType,
) => Promise<void>;
) => Promise<unknown>;
}
const TableRow = ({
......@@ -314,7 +314,7 @@ interface ToggleVisibilityButtonProps {
onUpdateTableVisibility: (
tables: Table[],
visibility: TableVisibilityType,
) => Promise<void>;
) => Promise<unknown>;
}
const ToggleVisibilityButton = ({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment