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

Typescript not working for replayNormalized #22

Closed
cyri113 opened this issue Aug 22, 2020 · 2 comments
Closed

Typescript not working for replayNormalized #22

cyri113 opened this issue Aug 22, 2020 · 2 comments

Comments

@cyri113
Copy link

cyri113 commented Aug 22, 2020

Hi - I am using typescript with tsdx, a zero-config CLI for TypeScript package development.

I have re-created the basic replayNormalized example from the documentation.

For some reason, the function is continuously returning undefined instead of the message. Any best guesses as to why?

// single.ts
import { replayNormalized, normalizeTrades, ReplayNormalizedOptions } from 'tardis-dev'

const messages = replayNormalized(
  {
    exchange: 'bitmex',
    symbols: ['XBTUSD'],
    from: '2019-05-01',
    to: '2019-05-02'
  } as ReplayNormalizedOptions<'bitmex'>,
  normalizeTrades
)

async function run () {
  for await (const message of messages) {
    console.log(message);
  }
}

run()
@thaaddeus
Copy link
Member

Hi, I've just tried it in TypeScript, works perfectly fine, whole lib is actually developed in TS, I don't have much experience with tsdx unfortunately, which version of TS does it use under the hood?

@cyri113
Copy link
Author

cyri113 commented Aug 25, 2020

Thanks @thaaddeus for looking into it. It seems this is a tsdx issue jaredpalmer/tsdx#795.

@cyri113 cyri113 closed this as completed Aug 25, 2020
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

2 participants