diff options
Diffstat (limited to 'server/helpers/custom-validators/misc.ts')
-rw-r--r-- | server/helpers/custom-validators/misc.ts | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/misc.ts b/server/helpers/custom-validators/misc.ts index 83f50a7fe..b1291ba7a 100644 --- a/server/helpers/custom-validators/misc.ts +++ b/server/helpers/custom-validators/misc.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | function exists (value) { | 1 | function exists (value: any) { |
2 | return value !== undefined && value !== null | 2 | return value !== undefined && value !== null |
3 | } | 3 | } |
4 | 4 | ||
5 | function isArray (value) { | 5 | function isArray (value: any) { |
6 | return Array.isArray(value) | 6 | return Array.isArray(value) |
7 | } | 7 | } |
8 | 8 | ||
@@ -12,3 +12,12 @@ export { | |||
12 | exists, | 12 | exists, |
13 | isArray | 13 | isArray |
14 | } | 14 | } |
15 | |||
16 | declare global { | ||
17 | namespace ExpressValidator { | ||
18 | export interface Validator { | ||
19 | exists, | ||
20 | isArray | ||
21 | } | ||
22 | } | ||
23 | } | ||