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

Commit

Permalink
TypeScript: Add options for clients (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenfehling authored and fb55 committed Jun 13, 2018
1 parent bf347b1 commit a836283
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,13 @@ declare module 'gdax' {
response: HttpResponse;
data?: any;
}

export interface ClientOptions {
timeout?: number;
}

export class PublicClient {
constructor(apiURI?: string);
constructor(apiURI?: string, options?: ClientOptions);

getProducts(callback: callback<ProductInfo[]>): void;
getProducts(): Promise<ProductInfo[]>;
Expand Down Expand Up @@ -185,7 +189,7 @@ declare module 'gdax' {
}

export class AuthenticatedClient extends PublicClient {
constructor(key: string, secret: string, passphrase: string, apiURI?: string);
constructor(key: string, secret: string, passphrase: string, apiURI?: string, options?: ClientOptions);

getCoinbaseAccounts(callback: callback<CoinbaseAccount[]>): void
getCoinbaseAccounts(): Promise<CoinbaseAccount[]>;
Expand Down

0 comments on commit a836283

Please sign in to comment.