paragonie / sodium-plus

Developer-friendly libsodium interface
Other
170 stars 21 forks source link

Add TypeScript index.d.ts files #23

Closed jviide closed 4 years ago

jviide commented 4 years ago

This pull request adds index.d.ts, implementing TypeScript typings for the sodium-plus's main entry point index.js.

The typings are mostly straightforward conversions based on the docstrings of each function. In some cases where it seemed to make sense I deviated from the docs a bit:

The index.d.ts file is added to package.json's files array. The @types/node package is added as a devDependency.