mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00: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:
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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user