Zilliqa / zilliqa-js

JavaScript SDK for Zilliqa blockchain
https://www.npmjs.com/package/@zilliqa-js/zilliqa
GNU General Public License v3.0
131 stars 74 forks source link

Fix type def for Elliptic Signature #409

Closed ghost closed 2 years ago

ghost commented 2 years ago

Thee is a TS type definition issue and It's affecting 3.2.0 and 3.3.0 only.

The issue is from https://github.com/Zilliqa/Zilliqa-JavaScript-Library/commit/bf55caf0d89df2813d1d702288f24fd8df70294f

When tsc, this error can be thrown when skipLibCheck is false:

Could not find a declaration file for module 'elliptic/lib/elliptic/ec/signature'. '/Users/noel/go/src/tyron.js/node_modules/elliptic/lib/elliptic/ec/signature.js' implicitly has an 'any' type.

For a workaround, you might consider using the 3.1.0 or tsconfig "skipLibCheck": true

This can save time during compilation at the expense of type-system accuracy. For example, two libraries could define two copies of the same type in an inconsistent way. Rather than doing a full check of all d.ts files, TypeScript will type check the code you specifically refer to in your app’s source code.