From 8682b76ecc79f9fefb79b410ab1fa7328c772ea9 Mon Sep 17 00:00:00 2001 From: LukasKnuthImagineOn Date: Fri, 6 Jan 2017 15:40:16 +0100 Subject: [PATCH] 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). --- node-validator/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-validator/index.d.ts b/node-validator/index.d.ts index 552430dc52..4f70e50d5a 100644 --- a/node-validator/index.d.ts +++ b/node-validator/index.d.ts @@ -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 }