mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 07:40:10 +00:00
Fix gt, gte, lt, lte arg type.
This commit is contained in:
8
types/koa-bouncer/index.d.ts
vendored
8
types/koa-bouncer/index.d.ts
vendored
@@ -30,10 +30,10 @@ declare namespace KoaBouncer {
|
||||
isNotIn(arr: any[], tip?: string): Validator
|
||||
isArray(tip?: string): Validator
|
||||
eq(otherVal: string, tip?: string): Validator
|
||||
gt(otherVal: string, tip?: string): Validator
|
||||
gte(otherVal: string, tip?: string): Validator
|
||||
lt(otherVal: string, tip?: string): Validator
|
||||
lte(otherVal: string, tip?: string): Validator
|
||||
gt(otherVal: number, tip?: string): Validator
|
||||
gte(otherVal: number, tip?: string): Validator
|
||||
lt(otherVal: number, tip?: string): Validator
|
||||
lte(otherVal: number, tip?: string): Validator
|
||||
isLength(min: number, max: number, tip?: string): Validator
|
||||
defaultTo(valueOrFunction: any): Validator
|
||||
isString(tip?: string): Validator
|
||||
|
||||
@@ -29,6 +29,9 @@ router.post('/users', async (ctx) => {
|
||||
.isString()
|
||||
.eq(ctx.vals.password1, 'Passwords must match')
|
||||
|
||||
ctx.validateBody('age')
|
||||
.gte(18, 'Must be 18 or older')
|
||||
|
||||
console.log(ctx.vals)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user