validator.js icon indicating copy to clipboard operation
validator.js copied to clipboard

feat(types): add types file

Open rubiin opened this issue 1 year ago • 7 comments

This PR adds types file within the repo itself . The types file is derived from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/validator with some modifications

Checklist

  • [x] PR contains only changes related; no stray files, etc.
  • [ ] README updated (where applicable)
  • [ ] Tests written (where applicable)
  • [x] References provided in PR (where applicable)

rubiin avatar May 09 '24 07:05 rubiin

Having types file here will make sure the types and codebase are in sync.

rubiin avatar May 09 '24 07:05 rubiin

LGTM. Could you please also add some guidelines on how to use, on the README? Perhaps adding a section for Types?

profnandaa avatar Jun 01 '24 14:06 profnandaa

Sure thing. I will update the readme for this

rubiin avatar Jun 01 '24 14:06 rubiin

Since the types get installed along with the library, there is no need to install @types/validator package anymore for typescript support. I have added a small section on readme for that but we should also point this on the realease notes @profnandaa

rubiin avatar Jun 01 '24 14:06 rubiin

Having types file here will make sure the types and codebase are in sync.

+1 for this one, I've been checking the latest @types/validator version doesn't include the type for isAbaRouting. It seems this PR is outdated because this type is missing here too.

jorgevrgs avatar Jun 08 '24 00:06 jorgevrgs

Yeah . Since we have types file here , we dont have to depend on the @types/ packages . They can be slow and outdated so self managing is a better option

rubiin avatar Jun 08 '24 04:06 rubiin

For now we can ship this and on later date , break it down on smaller files.

rubiin avatar Aug 25 '24 01:08 rubiin