Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

TypeScript getProductTrades with options fails #306

Closed
wilwade opened this issue Apr 13, 2018 · 1 comment
Closed

TypeScript getProductTrades with options fails #306

wilwade opened this issue Apr 13, 2018 · 1 comment

Comments

@wilwade
Copy link
Contributor

wilwade commented Apr 13, 2018

TypeScript 2.8.1

const opts = { before: 1599086, after: 1599088, limit: 10 };
const trades = await publicClient.getProductTrades('BTC-USD', opts);

Results in a ts error:

TS2345: Argument of type '{ before: number; after: number; limit: number; }' is not assignable to parameter of type 'callback<any>'.
  Type '{ before: number; after: number; limit: number; }' provides no match for the signature '(err: any, response: Response, data: any): void'.

It appears that ts is matching the first def instead of the second here: https://github.com/coinbase/gdax-node/blob/master/index.d.ts#L165

Perhaps it is the newer version of TypeScript, but I'll throw up a small pr with one fix for it.

wilwade added a commit to wilwade/gdax-node that referenced this issue Apr 13, 2018
wilwade added a commit to wilwade/gdax-node that referenced this issue Apr 13, 2018
wilwade added a commit to wilwade/gdax-node that referenced this issue Apr 13, 2018
fb55 pushed a commit that referenced this issue Apr 14, 2018
@fb55
Copy link
Contributor

fb55 commented Apr 14, 2018

Fixed in #307

@fb55 fb55 closed this as completed Apr 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants