mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Type functions
This commit is contained in:
parent
4d4e5cd4dc
commit
69818c9394
96 changed files with 990 additions and 544 deletions
|
@ -1,8 +1,8 @@
|
|||
function exists (value) {
|
||||
function exists (value: any) {
|
||||
return value !== undefined && value !== null
|
||||
}
|
||||
|
||||
function isArray (value) {
|
||||
function isArray (value: any) {
|
||||
return Array.isArray(value)
|
||||
}
|
||||
|
||||
|
@ -12,3 +12,12 @@ export {
|
|||
exists,
|
||||
isArray
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace ExpressValidator {
|
||||
export interface Validator {
|
||||
exists,
|
||||
isArray
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue