parent
37972bb557
commit
92f2c3626c
2 changed files with 41 additions and 33 deletions
@ -0,0 +1,27 @@ |
||||
type FormValidity<T> = { |
||||
[K in keyof T]?: boolean; |
||||
}; |
||||
|
||||
type InputTestBatchFinishCallbackBuilder<M extends MapToInputTestID> = ( |
||||
key: keyof M, |
||||
) => InputTestBatchFinishCallback; |
||||
|
||||
type InputFirstRenderFunctionArgs = { isValid: boolean }; |
||||
|
||||
type InputFirstRenderFunction = (args: InputFirstRenderFunctionArgs) => void; |
||||
|
||||
type InputFirstRenderFunctionBuilder<M extends MapToInputTestID> = ( |
||||
key: keyof M, |
||||
) => InputFirstRenderFunction; |
||||
|
||||
type FormUtils<M extends MapToInputTestID> = { |
||||
buildFinishInputTestBatchFunction: InputTestBatchFinishCallbackBuilder<M>; |
||||
buildInputFirstRenderFunction: InputFirstRenderFunctionBuilder<M>; |
||||
formValidity: FormValidity<M>; |
||||
isFormInvalid: boolean; |
||||
msgSetters: MapToMessageSetter<M>; |
||||
setFormValidity: import('react').Dispatch< |
||||
import('react').SetStateAction<FormValidity<M>> |
||||
>; |
||||
setValidity: (key: keyof M, value: boolean) => void; |
||||
}; |
Loading…
Reference in new issue