safebash / opencrypto

OpenCrypto is a lightweight JavaScript library built on top of WebCryptography API
MIT License
74 stars 23 forks source link

feat: add types for typescript projects #13

Closed distante closed 3 years ago

distante commented 3 years ago

Currently we can not import opencrypto into an typescript project with strict checks because the exported module does not have any definitions.

This PR incorpore type definitions and an script createTypes that will update them when called.

Pd: If you want, I could update this PR to use husky with a pre commit hook, so each time somebody does a commit, the types are recreated.

Pd2: Sadly the JDDocs does not have info about several params so they are marked as any;

PeterBielak commented 3 years ago

Hi Saninn,

thank you for your contribution to OpenCrypto! It is very appreciated. We actually had TypeScript on our roadmap.

Best Regards, Peter Bielak