Commit 3daa759d by Vladislav Lagunov

Добавлены объявления для модели и действий на форме

parent cbaa6040
...@@ -18,6 +18,19 @@ export interface FieldProps<T = any> { ...@@ -18,6 +18,19 @@ export interface FieldProps<T = any> {
} }
// Поддерживаемые действия с формой
export type Model<T> ={
initial: T;
modified: T|null;
};
// Поддерживаемые действия с формой
export type FormAction =
| { tag: 'Reset' }
| { tag: 'Change', value, at }
// Флаги активности // Флаги активности
export type Disabled = boolean|object; export type Disabled = boolean|object;
...@@ -36,7 +49,7 @@ export type CardProps<T> = { ...@@ -36,7 +49,7 @@ export type CardProps<T> = {
initial: T; initial: T;
modified: T|null; modified: T|null;
}; };
dispatch(action: { tag: 'Change', value, at }): void; dispatch(action: FormAction): void;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment