mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
Fixed an error in the ObjectValidator typings (#13789)
The correct method-name has always been `withCustom()` instead of `custom()`. Also, the method-signature is (sadly) inconsistent with the other `withX()`-methods, since it expects the `ValidateFn` directly instead of wrapped in a `Validatable` (but it does wraps it into a `Validatable` internally).
This commit is contained in:
committed by
Andy
parent
48fb075ada
commit
8682b76ecc
2
node-validator/index.d.ts
vendored
2
node-validator/index.d.ts
vendored
@@ -32,7 +32,7 @@ declare namespace Validator {
|
||||
interface IsObjectValidator extends Validatable {
|
||||
withRequired: (name: String, validator: Validatable) => IsObjectValidator,
|
||||
withOptional: (name: String, validator: Validatable) => IsObjectValidator,
|
||||
custom: (customValidator: Validatable) => IsObjectValidator,
|
||||
withCustom: (customValidator: ValidateFn) => IsObjectValidator,
|
||||
validate: ValidateFn
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user