@@ -11,31 +11,61 @@ export interface AssertString {
11
11
*/
12
12
< T extends string > ( value : T | undefined , fieldName ?: string , defaultValue ?: T ) : T ;
13
13
14
+ /**
15
+ * Asserts that a value is a string value (including empty strings).
16
+ */
17
+ ( value : unknown , fieldName ?: string , defaultValue ?: unknown ) : string ;
18
+
14
19
/**
15
20
* Asserts that a value is a string with at least one character (including whitespace).
16
21
*/
17
22
nonEmpty < T extends string > ( value : T | undefined , fieldName ?: string , defaultValue ?: T ) : T ;
18
23
24
+ /**
25
+ * Asserts that a value is a string with at least one character (including whitespace).
26
+ */
27
+ nonEmpty ( value : unknown , fieldName ?: string , defaultValue ?: unknown ) : string ;
28
+
19
29
/**
20
30
* Asserts that a value is a string with at least one non-whitespace character.
21
31
*/
22
32
nonWhitespace < T extends string > ( value : T | undefined , fieldName ?: string , defaultValue ?: T ) : T ;
23
33
34
+ /**
35
+ * Asserts that a value is a string with at least one non-whitespace character.
36
+ */
37
+ nonWhitespace ( value : unknown , fieldName ?: string , defaultValue ?: unknown ) : string ;
38
+
24
39
/**
25
40
* Asserts that a value is a string with at least the specified number of characters.
26
41
*/
27
42
minLength < T extends string > ( value : T | undefined , minLength : number , fieldName ?: string , defaultValue ?: T ) : T ;
28
43
44
+ /**
45
+ * Asserts that a value is a string with at least the specified number of characters.
46
+ */
47
+ minLength ( value : unknown , minLength : number , fieldName ?: string , defaultValue ?: unknown ) : string ;
48
+
29
49
/**
30
50
* Asserts that a value is a string with no more than the specified number of characters.
31
51
*/
32
52
maxLength < T extends string > ( value : T | undefined , maxLength : number , fieldName ?: string , defaultValue ?: T ) : T ;
33
53
54
+ /**
55
+ * Asserts that a value is a string with no more than the specified number of characters.
56
+ */
57
+ maxLength ( value : unknown , maxLength : number , fieldName ?: string , defaultValue ?: unknown ) : string ;
58
+
34
59
/**
35
60
* Asserts that a value is a string with the specified number of characters.
36
61
*/
37
62
length < T extends string > (
38
63
value : T | undefined , minLength : number , maxLength : number , fieldName ?: string , defaultValue ?: T ) : T ;
64
+
65
+ /**
66
+ * Asserts that a value is a string with the specified number of characters.
67
+ */
68
+ length ( value : unknown , minLength : number , maxLength : number , fieldName ?: string , defaultValue ?: unknown ) : string ;
39
69
}
40
70
41
71
0 commit comments