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

joi.types() is missing func alias #2176

Closed
kapooostin opened this issue Oct 13, 2019 · 0 comments
Closed

joi.types() is missing func alias #2176

kapooostin opened this issue Oct 13, 2019 · 0 comments
Assignees
Labels
bug Bug or defect
Milestone

Comments

@kapooostin
Copy link

kapooostin commented Oct 13, 2019

Support plan

  • which support plan is this issue covered by? (e.g. Community, Core, Plus, or Enterprise): Community
  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: 10.15.3
  • module version with issue: 16.1.7
  • last module version without issue: 15.0.2
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): standalone
  • any other relevant information: none

What are you trying to achieve or the steps to reproduce?

I use joi.types() to extract some types for schema creation.

const {func} = joi.types();

What was the result you got?

undefined

What result did you expect?

function type object

When renaming func to function you intended to keep func as an alias #2012.

At the moment joi.types() returns an object with only function prop in it. An alias here would also be helpful as now I have to do some acrobatics like this:

const {'function`: func} = joi.types();
@kapooostin kapooostin added the support Questions, discussions, and general support label Oct 13, 2019
@hueniverse hueniverse self-assigned this Oct 13, 2019
@hueniverse hueniverse added bug Bug or defect and removed support Questions, discussions, and general support labels Oct 13, 2019
@hueniverse hueniverse added this to the 16.1.8 milestone Nov 17, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

No branches or pull requests

2 participants