Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import types from DT #2431

Closed
hueniverse opened this issue Aug 5, 2020 · 1 comment
Closed

Import types from DT #2431

hueniverse opened this issue Aug 5, 2020 · 1 comment
Assignees
Labels
types TypeScript type definitions
Milestone

Comments

@hueniverse
Copy link
Contributor

Until we have full and official types support, and to make migration back to the joi module name (without the @hapi/ namespace), I'm importing the types from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hapi__joi here.

They are going to be for v17.1 and will be lacking some features until v18 is released.

@hueniverse hueniverse added the types TypeScript type definitions label Aug 5, 2020
@hueniverse hueniverse added this to the 17.2.0 milestone Aug 5, 2020
@hueniverse hueniverse self-assigned this Aug 5, 2020
@tobiaswaelde
Copy link

I am using TypeScript. How can I define the type of the ValidationResult now?
I used to use

typescriptfunction validateData(data: DataType): ValidationResult<DataType>{
  // ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types TypeScript type definitions
Projects
None yet
Development

No branches or pull requests

2 participants