Context
- node version: 14.17.X
- module version with issue: 17.5.0
- last module version without issue: 17.5.0
- environment (e.g. node, browser, native): node
- used with (e.g. hapi application, another framework, standalone, ...): standalone
- any other relevant information:
What are you trying to achieve or the steps to reproduce?
const schema = Joi.string();
const result = schema.validate(getUnknownValue());
if (!result.error) {
result.value; // typed as `any` but should be `string`
}
What was the result you got?
The result of Joi.string().validate(...) has the field value typed as any.
What result did you expect?
The result of Joi.string().validate(...) has the field value typed as string.
Context
What are you trying to achieve or the steps to reproduce?
What was the result you got?
The result of
Joi.string().validate(...)has the fieldvaluetyped asany.What result did you expect?
The result of
Joi.string().validate(...)has the fieldvaluetyped asstring.