joi-extract-type icon indicating copy to clipboard operation
joi-extract-type copied to clipboard

Provides native type extraction from Joi schemas for Typescript

Results 11 joi-extract-type issues
Sort by recently updated
recently updated
newest added

It would be great to see support of `enum` values through to extracted types. I've just tested out the following code with the `@latest` tag of `@hapi/joi` & `joi-extract-type` and...

This seems like an extremely useful utility, but I don't believe I can use it in my project as we've migrated away from the deprecated `@hapi/joi` package to [`sideways/joi`](https://github.com/sideway/joi). Is...

I've been struggling to find a set of dependencies that work smoothly together. Here's what I've tried so far: ### `@hapi/joi@17` & `[email protected]` Suggestion from [this page](https://rubensbits.co/posts/creating-interfaces-from-joi-schemas-in-typescript). Gives me: ```...

Does this library have support (or upcoming support) for Joi 16?

simple example ```ts import Joi from '@hapi/joi'; import 'joi-extract-type'; var schema = Joi.object({ one: Joi.array().items({ a: Joi.string().required() }), two: Joi.array().items({ a: Joi.string().required() }).allow(null), }); type Extracted = Joi.extractType; ``` ![image](https://user-images.githubusercontent.com/4774405/95276048-20f38680-0818-11eb-9b25-4071683e46fd.png)...

I've created this as a separate Issue forking off of [this comment](https://github.com/TCMiranda/joi-extract-type/issues/22#issuecomment-555031146) because I don't want to hijack that conversation with this as a possible solution. What if we moved...

Allow enums to infer true or false from the schema: - [ ] boolean.truthy(value) - [ ] boolean.falsy(value)

**Base use case** - [ ] Implement `invalid` from strings **Enhance and finish the feature for every possible alias** - [ ] any.valid(value) - aliases: only, equal - [ ]...

Bumps [@hapi/hoek](https://github.com/hapijs/hoek) from 6.2.4 to 8.5.1. Commits 5bd73f6 8.5.1 4d0804b Backport #352. Closes #353 4ae5f53 8.5.0 83019b8 Add isPromise(). Closes #346 b9aa286 Add declaration 5dcbb9c 8.4.0 d898b06 Add TS utils....

dependencies