You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is this issue currently blocking your project? (yes/no): no
is this issue affecting a production system? (yes/no): no
Context
node version: 14.16.0
module version with issue: 17.4.0
last module version without issue:
environment (e.g. node, browser, native): node
used with (e.g. hapi application, another framework, standalone, ...): typescript
any other relevant information:
What are you trying to achieve or the steps to reproduce?
// using an external method in a TypeScript projectconstisValidUser=async(value: any,helpers: any): Promise<any>{ ... }constuserSchema=Joi.string().external(isValidUser)
What was the result you got?
Argument of type '(value: any, helpers: any) => Promise<any>' is not assignable to parameter of type 'ExternalValidationFunction'.
What result did you expect?
The ExternalValidationFunction type supports the helpers parameter as indicated in the documentation, even when used with TypeScript. At the least, the typing should probably be:
type ExternalValidationFunction = (value: any, helpers: any) => Promise<any>;
The text was updated successfully, but these errors were encountered:
Support plan
Context
What are you trying to achieve or the steps to reproduce?
What was the result you got?
What result did you expect?
The
ExternalValidationFunction
type supports thehelpers
parameter as indicated in the documentation, even when used with TypeScript. At the least, the typing should probably be:The text was updated successfully, but these errors were encountered: