Giter Site home page Giter Site logo

Comments (5)

arb avatar arb commented on August 19, 2024

Eh... I'm not big into relying on 3rd party type definitions. I know we're using the express ones, but they are trivial compared to what the Joi type defs are. The lead maintainer of Joi has made it pretty clear his stance and making type defs a first party effort.

Plus it just ends up being another dependency to try to keep in sync.

from celebrate.

arb avatar arb commented on August 19, 2024

I've had a change of heart! I'll take a PR for this, just be sure the joi types line up with the version that is actually being used by celebrate.

from celebrate.

arb avatar arb commented on August 19, 2024

So I was unable to find type defs for joi 12. They are available for joi 13 but this project will continue to use joi 12 for the foreseeable future. This is because express works on super old versions of node and will continue to do so. Joi 12 will be the last major release that targets node < 8.0.0. I spoke with @Marsup and while 12 and 13 have the same API right now, this will likely change in the future.

from celebrate.

josalmi avatar josalmi commented on August 19, 2024

Thank you for looking into this.

If using Joi type defs is out of questions then maybe the type should at least be changed to any from object.

See StackOverflow discussion on the differences. But simply said calling anything on now exposed Joi is impossible without casting it first to other type like any due to object type.

from celebrate.

arb avatar arb commented on August 19, 2024

I'd take a PR with the joi types pinned at 13.0.0. Let's try that first and see if it creates issues for anyone.

from celebrate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.