-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
95 lines (80 loc) · 2.13 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
export = jojoi;
declare namespace jojoi {
interface Options {
clear?: boolean;
error?: Error;
pattern?: RegExp;
mode?: 'strict' | 'loose';
version?: 'ipv4' | 'ipv6';
generation?: 'first' | 'second';
}
type OpTypes =
| 'gt'
| 'gte'
| 'lt'
| 'lte'
| 'left-close-right-close'
| 'left-close-right-open'
| 'left-open-right-open'
| 'left-open-right-close'
| 'l-c-r-c'
| 'l-c-r-o'
| 'l-o-r-o'
| 'l-o-r-c';
/**
* @description 字符串必填 & 非空
*/
function requiredNotEmpty(value: string, options?: Options): boolean;
/**
* @description 字符串必填 & 可以为空
*/
function requiredCouldEmpty(value: string, options?: Options): boolean;
/**
* @description 必填 & 合法电话号码
*/
function requiredPhone(value: string, options?: Options): boolean;
/**
* @description 必填 & 数字
*/
function requiredNumber(value: number, options?: Options): boolean;
/**
* @description 必填 & 邮箱
*/
function requiredEmail(value: string, options?: Options): boolean;
/**
* @description 必填 & 身份证
*/
function requiredID(value: string, options?: Options): boolean;
/**
* @description 必填 & IP
*/
function requiredIP(value: string, options?: Options): boolean;
/**
* @description 必填 & Url
*/
function requiredUrl(value: string, options?: Options): boolean;
/**
* @description 必填 & 字符串最大长度
*/
function max(value: string, options?: Options): boolean;
/**
* @description 必填 & 字符串最小长度
*/
function min(value: string, options?: Options): boolean;
/**
* @description 必填 & 非空 & 对象
*/
function requiredNotEmptyObj(value: object, options?: Options): boolean;
/**
* @description 必填 & 可以空 & 对象
*/
function requiredCouldEmptyObj(value: object, options?: Options): boolean;
/**
* @description 必填 & 整数
*/
function requiredInt(value: number, options?: Options): boolean;
/**
* @description 必填 & 布尔
*/
function requiredBool(value: boolean, options?: Options): boolean;
}