Joi.object<Type, Strict, Type>(....), the purpose of last Type and its presence prevents property autocomplete
- Dominant language
- JavaScript
- Stars
- 21.2k
- Forks
- 1.5k
- Avg merge
- 4h 57m
- Merged PRs (30d)
- 14
Description
### Runtime
node.js
### Runtime version
18.0.1
### Module version
?
### Used with
standalone
### Any other relevant information
Hi, when using Joi.object with a generic TSchema, I only get autocomplete for my Types fields if I include it as follows: -
Joi.object.
I checked the source...
// tslint:disable-next-line:no-unnecessary-generics
object(
schema?: SchemaMap
): ObjectSchema;
It appears as if T should revert to the passed TSchema and be used, but it doesn't seem to.
I hacked (sorry) the package (in situ) to and removed / replaced references to T and all is well.
Am I missing something?
Kind regards,
Neil
### How can we help?
```js
const some = 'properly formatted code example';
```
Contributor guide
Assessment
This issue has not been assessed yet.