@dineug/erd-editor
Version:
Entity-Relationship Diagram Editor
32 lines (31 loc) • 956 B
TypeScript
import { Reducer } from '@dineug/r-html';
import { EngineContext } from '../../context';
import { RootState } from '../../state';
import { ValuesType } from '../../../internal-types';
export declare const ActionType: {
readonly addIndex: "index.add";
readonly removeIndex: "index.remove";
readonly changeIndexName: "index.changeName";
readonly changeIndexUnique: "index.changeUnique";
};
export type ActionType = ValuesType<typeof ActionType>;
export type ActionMap = {
[ActionType.addIndex]: {
id: string;
tableId: string;
};
[ActionType.removeIndex]: {
id: string;
};
[ActionType.changeIndexName]: {
id: string;
tableId: string;
value: string;
};
[ActionType.changeIndexUnique]: {
id: string;
tableId: string;
value: boolean;
};
};
export type ReducerType<T extends keyof ActionMap> = Reducer<RootState, T, ActionMap, EngineContext>;