From 35aff198ba46add26e648d5c10522ddab548d925 Mon Sep 17 00:00:00 2001 From: Zaytsev Kirill Date: Thu, 15 Oct 2020 10:46:38 +0300 Subject: [PATCH] refactor: ValidatableData interface moved to validation/types --- src/validation/rules.ts | 5 +---- src/validation/types.ts | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/validation/rules.ts b/src/validation/rules.ts index fb13af4..ee0d552 100644 --- a/src/validation/rules.ts +++ b/src/validation/rules.ts @@ -3,10 +3,7 @@ import isUrl from 'is-url' import FileUpload from '../FileUpload' import { shallowEqualObjects, regexForFormat, has } from '@/libs/utils' import { ObjectType } from '@/common.types' - -interface ValidatableData { - value: any, -} +import { ValidatableData } from '@/validation/types' interface ConfirmValidatableData extends ValidatableData { getFormValues: () => ObjectType, diff --git a/src/validation/types.ts b/src/validation/types.ts index 94606a7..23dd711 100644 --- a/src/validation/types.ts +++ b/src/validation/types.ts @@ -1,3 +1,7 @@ +interface ValidatableData { + value: any, +} + interface ValidationContext { args: any[] name: string @@ -10,5 +14,6 @@ interface ValidationError { message: string } +export { ValidatableData } export { ValidationContext } export { ValidationError }