near / borsh-js

TypeScript/JavaScript implementation of Binary Object Representation Serializer for Hashing
Apache License 2.0
112 stars 38 forks source link

Add basic types #32

Closed tbezman closed 2 years ago

tbezman commented 3 years ago

As a first time consumer of this library, I had trouble figuring out what I could / couldn't do. Adding these types should help people understand the library a little bit better.

I'm not an expert on this library yet, so I'm hoping one of the maintainers can check these types and confirm they make sense based on the implementation.

My next steps in an upcoming PR is to remove more instances of any to get some extra type safety internally. But for now this should help out consumers of the lib.

volovyks commented 3 years ago

@tbezman good suggestion, but I will need to check it closely. Meanwhile, let's merge master with your changes to this branch.

tbezman commented 3 years ago

I'm going to put this PR back in draft until I fix some eslint stuff.

AlaaZorkane commented 2 years ago

Any updates on this?

sudhir-b commented 2 years ago

Would be great to have a mapping for the float types at the very least! I'm happy to attempt to contribute if I could find out what needs to be done?