mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-22 20:01:59 +00:00
Change type name
This commit is contained in:
@@ -28,13 +28,13 @@ const getPropValues = (stateSchema: TStateSchema, prop?: TPropValues) => {
|
|||||||
}, {} as TKeyValue);
|
}, {} as TKeyValue);
|
||||||
};
|
};
|
||||||
|
|
||||||
type test = {
|
type TValidator = {
|
||||||
validatorFunc: (value: string) => boolean;
|
validatorFunc: (value: string) => boolean;
|
||||||
prop: string;
|
prop: string;
|
||||||
required?: boolean;
|
required?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const addValidator = ({ validatorFunc, prop, required = true }: test) => {
|
const addValidator = ({ validatorFunc, prop, required = true }: TValidator) => {
|
||||||
return {
|
return {
|
||||||
required: required,
|
required: required,
|
||||||
validator: {
|
validator: {
|
||||||
|
|||||||
Reference in New Issue
Block a user