Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please ship javascript and .d.ts files #2

Open
openventures opened this issue May 2, 2023 · 0 comments
Open

Please ship javascript and .d.ts files #2

openventures opened this issue May 2, 2023 · 0 comments

Comments

@openventures
Copy link

Compiling this using a stricter typescript rule set (such as "strict": true) throws errors due to code like

[TypeScript] Rest parameter 'args' implicitly has an 'any[]' type.
node_modules/@alcorexchange/alcor-swap-sdk/src/entities/fractions/currencyAmount.ts:122:18
    120 |   }
    121 |
  > 122 |   public toAsset(...args): string {
        |                  ^^^^^^^
    123 |     return `${this.toFixed(...args)} ${this.currency.symbol}`
    124 |   }
    125 |

This could be improved by shipping compiled javascript-code and .d.ts typings. That would also allow people not using typescript to use the library.

See also microsoft/TypeScript#47387 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant