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

fix: LanguageMessages type now supports languages in TypeScript #3009

Merged
merged 1 commit into from Jan 15, 2024

Conversation

jacobkapitein
Copy link
Contributor

@jacobkapitein jacobkapitein commented Jan 5, 2024

Closes:

This feature has always really been supported, but the type was correct all the time, resulting in build errors.
Only fixable with ugly ts-expect-error patterns or ts-patch files.
It was really annoying to see this feature actually documented, but the type not being correct.

Multiple tests are already present, but this is one example:
https://github.com/hapijs/joi/blob/master/test/errors.js#L176-L196

Code that backs this up as being an existing and supported feature:
https://github.com/hapijs/joi/blob/master/lib/errors.js#L133-L143

Would love to hear back!

@Marsup Marsup self-assigned this Jan 15, 2024
@Marsup Marsup added bug Bug or defect types TypeScript type definitions labels Jan 15, 2024
@Marsup Marsup changed the base branch from master to v17 January 15, 2024 08:47
@Marsup Marsup changed the base branch from v17 to master January 15, 2024 08:47
@Marsup Marsup added this to the 17.11.1 milestone Jan 15, 2024
@Marsup
Copy link
Collaborator

Marsup commented Jan 15, 2024

Thanks for the PR. The CI has nothing to do with you, I'll merge as is.

@Marsup Marsup merged commit e63d6a6 into hapijs:master Jan 15, 2024
0 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or defect types TypeScript type definitions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants