horprogs / Just-validate

Modern, simple, lightweight (~5kb gzip) form validation library written in Typescript, with no dependencies (no JQuery!). Support a wide range of predefined rules, async, files, dates validation, custom error messages and styles, localization. Support writing custom rules and plugins.

Home Page:https://just-validate.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot use this library in core typescript project

sangtrandev00 opened this issue · comments

Is this library support for typescript project. I am currently use this typescript project for my validation
It will throw the error like this:

Could not find a declaration file for module 'just-validate'. 'd:/FPT POLYTECHNIC/WEB DESIGN CURRICULUM/SEMESTER 5/SEMESTER 5 - Front End/WEB502 - Lap trinh TypeScript - SP21/ASM_SETUP/typescript-webpack-asm/node_modules/just-validate/dist/just-validate.production.min.js' implicitly has an 'any' type. Trynpm i --save-dev @types/just-validateif it exists or add a new declaration (.d.ts) file containingdeclare module 'just-validate';ts(7016)

Expected behavior

Any body confront this issue, Give me some more solution

Hey, how are you using the library? Are you importing it in your project?

What Typescript version do you use? Try using Typescript 4, not 5

Thanks. I am using typescript v5. To fix my issue, just ignore it, I used // @ts-ignore in the library, so I can use the lib