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

fix(typescript) - add typescript runtime test #22276

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

pcriadoperez
Copy link
Contributor

@pcriadoperez pcriadoperez commented Apr 25, 2024

  • Add tests to import ccxt and compile typescript project using commonjs and esnext
  • Fixes type errors that showed up during compile

@pcriadoperez pcriadoperez self-assigned this Apr 25, 2024
@pcriadoperez pcriadoperez changed the title fix(typescript) fix(typescript) - add typescript runtime test Apr 25, 2024
@carlosmiei
Copy link
Collaborator

also the build is not working

@@ -413,7 +413,7 @@ export default class hyperliquid extends hyperliquidRest {
}
if (!(timeframe in this.ohlcvs[symbol])) {
const limit = this.safeInteger (this.options, 'OHLCVLimit', 1000);
const stored = new ArrayCacheByTimestamp (limit);
const stored = new ArrayCacheByTimestamp<OHLCV> (limit);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcriadoperez Question, don't we need to update every place where we initialize these structures?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not needed as it defaults to unknown, but I'll add it as it's good practice. I also added that you can only add an item of the same type as the array

@carlosmiei
Copy link
Collaborator

@pcriadoperez humm locally I get this error after npm run package-test

added 2 packages, and audited 3 packages in 1s

found 0 vulnerabilities
[ESM] Version 4.3.11
[ESM] number of exchanges: 103
[CJS] Version 4.3.11
[CJS] Number of exchanges: 103
npm ERR! Missing script: "test:ts"
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/cjg/.npm/_logs/2024-05-02T15_30_07_931Z-debug-0.log

@pcriadoperez
Copy link
Contributor Author

Runs npm run package-test without errors ✅

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

Successfully merging this pull request may close these issues.

None yet

2 participants