Skip to content

chore: improve expression types #3066

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GerkinDev
Copy link

Joi.expression did not accept functions record, and returned any.

@GerkinDev GerkinDev force-pushed the chore/expressions-types branch from e695b8e to 35d2411 Compare February 17, 2025 12:42
@Marsup
Copy link
Collaborator

Marsup commented Apr 2, 2025

Thanks for the PR. I'm not exactly sure what it's fixing, maybe it would be worth adding a quick test (in test/index.ts) to ensure there's no regression in the future?

@Marsup Marsup added the types TypeScript type definitions label Apr 2, 2025
@Marsup Marsup self-assigned this Apr 2, 2025
@davidjamesstone
Copy link

@Marsup this PR fixes this issue with the types around LanguageMessages and Expressions.

image

The 2nd arg of Joi.expression should allow for a functions map to be passed.

Also, LanguageMessages should allow Joi.expressions as the Record value.

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

Successfully merging this pull request may close these issues.

3 participants