pdupavillon / express-recaptcha

Implementation of google recaptcha v2 & V3 solutions for express.js
MIT License
128 stars 21 forks source link

make express-recaptcha - Typescript compliant #14

Closed pdupavillon closed 6 years ago

pdupavillon commented 6 years ago

As described in issue #13 the actual express-recaptcha, returns an instance instead of a class, which is hard to define in TS

pdupavillon commented 6 years ago

@SimonSchick, Thanks a lot for your feedbacks !

SimonSchick commented 6 years ago

I think you misunderstood my comment about export, I didn't mean you should use module.exports but write export class Recaptcha

Eg. the commonjs equivalent: exports.Recaptcha = Recaptcha

pdupavillon commented 6 years ago

I think I misunderstood the concept behind this : Why should I use exports.Recaptcha = Rechaptcha instead of exports Recaptcha ? and why exports instead of module.exports ? (aren't they almost equivalent ?) Thanks for your explanations