GithubHelp home page GithubHelp logo

Comments (7)

WikiRik avatar WikiRik commented on June 3, 2024 2

Type declarations are not handled in this project, but in the DefinitelyTyped repository; https://github.com/DefinitelyTyped/DefinitelyTyped

from validator.js.

hilja avatar hilja commented on June 3, 2024 1

Screenshot 2023-11-12 at 18 53 17

Not sure what OP means but I have issues with Remix. Just a regular import:

import isEmail from 'validator/lib/isEmail'
import isEmail from 'validator/es/lib/isEmail'

Results in:

Cannot find module 'validator/lib/isEmail' or its corresponding type declarations.

But the files clearly are there, I can cmd+click it and see the export.

In my tsconfig.json I've got:

{
  "compilerOptions": {
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "target": "ES2022",
  }
}

I can import with the file extension: import isEmail from 'validator/es/lib/isEmail.js', but then when I use it TS whines about it:

This expression is not callable.
  Type 'typeof import("/Users/bob/foo/node_modules/.pnpm/@[email protected]/node_modules/@types/validator/es/lib/isEmail")' has no call signatures.

from validator.js.

bhavik001 avatar bhavik001 commented on June 3, 2024

Hey @arman94 Can you describe this issue?

from validator.js.

hilja avatar hilja commented on June 3, 2024

Screenshot 2023-11-12 at 19 10 12

Seems like you're trying to export toString which doesn't exist. Don’t know if it's related.

from validator.js.

arman94 avatar arman94 commented on June 3, 2024

This is the exact issue I have with validator in Remix

from validator.js.

aszmyd avatar aszmyd commented on June 3, 2024

Having the same issue here. I have @types/validator added but it's not helping.

from validator.js.

WikiRik avatar WikiRik commented on June 3, 2024

I'm closing this issue since this is not something we can fix in this repo. Issues with @types/validator can be reported in the DefinitelyTyped repository; DefinitelyTyped/DefinitelyTyped

from validator.js.

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.