h2non / jshashes

Fast and dependency-free cryptographic hashing library for node.js and browsers (supports MD5, SHA1, SHA256, SHA512, RIPEMD, HMAC)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript type declaration file

geopic opened this issue · comments

If you want I can write a TypeScript type declaration file for this package so that TS developers can utilise the type-checking feature of the language as they use this package. Let me know if you are interested.

commented

I'm happy to onboard a TS interface definitions file. Feel free to create a PR.

@geopic Can you share how you're importing this library into TS right now? I've never found the SO answers about this very helpful and I would like to use this library in a TS project today. TIA

@h2non Good stuff, I'll start on it soon.

@toby5box Can you clarify how familiar you are with TS? What is your development environment like? Using this library as an npm package is the same as every other npm package. At the moment it has no types definition file so using the library in a .ts file would not provide type hinting.

commented

This was fixed in May but it's not yet released on npm.

Still isn't released. What the heck. It's been 2 years.