export interface TableState<T> {
    index: number;
    data: Array<T>;
}
export type Action<T> = {
    type: "add_item";
    payload: T;
} | {
    type: "update_item";
    payload: T;
} | {
    type: "delete_item";
} | {
    type: "select_item";
    index: number;
};
export declare function tableReducer<T>(state: TableState<T>, action: Action<T>): TableState<T>;
