Closed RPDeshaies closed 5 years ago
There is third-party (DefinitelyTyped) pakage for validator but it is outdated (v6.3) and has many bugs. I've submitted a PR (DefinitelyTyped/DefinitelyTyped#23784) to fix and update the type definitions. Still, it may be better to add native type definitions.
DefinitelyTyped/DefinitelyTyped#23784 has been merged.
You can yarn add -D '@types/validator'
or npm install -D '@types/validator'
to install the updated type definitions.
Good to have types! I think this issue can be closed now :)
Sure, this can be closed but perhaps we need to include a note about this on the README? @builtinnya
ref: https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/
The project doesn't contains the Typescript typings and it seems like there's no project created by DefinitlyTyped under the npm namespace
@types
So I'm suggesting that the typings should be added to the projects.
I did a quick fix in my project to have typing by converting what was inside the
README.md
but it can definitly be enhanced as I don't really know the project and I'm only using 3 functions so far.So anything with the type
any
I just didn't take the time to understand exactly what the function was doing and required as parameters but it's a start.