Giter VIP home page Giter VIP logo

Comments (4)

KeithGillette avatar KeithGillette commented on May 2, 2024 2

While installing @types/validator as a project development dependency will fix the transpilation error messages, @SchroederSteffen, since this is a published package that is consumed by other applications, I'm more in agreement with this StackOverflow answer supporting the previous practice of keeping @types/validator in dependencies so that it's available during development without that extra step.

from class-validator.

KeithGillette avatar KeithGillette commented on May 2, 2024 1

Updating to @nestjs/class-validator causes tsc to generate error TS7016: Could not find a declaration file for module 'validator'. I believe this shares the same root cause (removing @types/validator from package.json dependencies) as issue #1412 & issue #1535 in the original typestack/class-validator library from which this repository was forked.

from class-validator.

SchroederSteffen avatar SchroederSteffen commented on May 2, 2024

Thanks for the hint @KeithGillette! So, it's an upstream issue. (typestack@70278ab / typestack#1409).
Though, having a @types/ production dependency wouldn't be right anyways, as it's just required for the build. So, I would assume that it's more correct now. Agreed?
Then it's rather a documentation issue: "You need to npm i -D @types/validator yourself."

from class-validator.

kamilmysliwiec avatar kamilmysliwiec commented on May 2, 2024

If someone wants to create a PR to this fork adding the validator declaration files, go for it! Contributions are more than welcome

from class-validator.

Related Issues (9)

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.