@@ -21,7 +21,7 @@ declare module 'async-validator' {
2121 ) : Promise < void > ;
2222 }
2323
24- type RuleType =
24+ export type RuleType =
2525 | 'string'
2626 | 'number'
2727 | 'boolean'
@@ -38,7 +38,7 @@ declare module 'async-validator' {
3838 | 'email'
3939 | 'any' ;
4040
41- interface RuleItem {
41+ export interface RuleItem {
4242 type ?: RuleType ; // default type is 'string'
4343 required ?: boolean ;
4444 pattern ?: RegExp | string ;
@@ -68,15 +68,15 @@ declare module 'async-validator' {
6868 ) => void ;
6969 }
7070
71- interface Rules {
71+ export interface Rules {
7272 [ field : string ] : RuleItem | RuleItem [ ] ;
7373 }
7474
75- interface ValidateSource {
75+ export interface ValidateSource {
7676 [ field : string ] : any ;
7777 }
7878
79- interface ValidateOption {
79+ export interface ValidateOption {
8080 // whether to suppress internal warning
8181 suppressWarning ?: boolean ;
8282
@@ -87,13 +87,13 @@ declare module 'async-validator' {
8787 firstFields ?: boolean | string [ ] ;
8888 }
8989
90- interface ValidateError {
90+ export interface ValidateError {
9191 message : string ;
9292 field : string ;
9393 }
9494
95- type ErrorList = ValidateError [ ] ;
96- interface FieldErrorList {
95+ export type ErrorList = ValidateError [ ] ;
96+ export interface FieldErrorList {
9797 [ field : string ] : ValidateError [ ] ;
9898 }
9999}
0 commit comments