-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
supportQuestions, discussions, and general supportQuestions, discussions, and general supporttypesTypeScript type definitionsTypeScript type definitions
Milestone
Description
Support plan
- is this issue currently blocking your project? (yes/no): no
- is this issue affecting a production system? (yes/no): no
Context
- node version: 14.19.3
- module version with issue: 17.6.1 / 17.6.2
- last module version without issue: 17.6.0
- environment (e.g. node, browser, native): node
- used with (e.g. hapi application, another framework, standalone, ...): ?
- any other relevant information: n/a
What are you trying to achieve or the steps to reproduce?
let apiKey: string | undefined = "someString";
apiKey = Joi.attempt(apiKey, Joi.string().optional().label("apiKey"));What was the result you got?
TS2322: Type 'unknown' is not assignable to type 'string | undefined'.
What result did you expect?
No TS errors.
I suspect the changes from #2797 to be the root cause.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
supportQuestions, discussions, and general supportQuestions, discussions, and general supporttypesTypeScript type definitionsTypeScript type definitions