Skip to content

Commit

Permalink
type definition for eth.isSyncing updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nivida committed Nov 22, 2019
1 parent ae9c90e commit abd0f72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions packages/web3-eth/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class Eth {

isSyncing(
callback?: (error: Error, syncing: Syncing) => void
): Promise<Syncing | boolean>;
): Promise<Syncing>;

getCoinbase(
callback?: (error: Error, coinbaseAddress: string) => void
Expand Down Expand Up @@ -258,10 +258,6 @@ export class Eth {
callback?: (error: Error, transaction: Transaction) => void
): Promise<Transaction>;

getPendingTransactions(
callback?: (error: Error, result: Transaction[]) => void
): Promise<Transaction[]>;

getTransactionFromBlock(
blockHashOrBlockNumber: BlockNumber | string,
indexNumber: number | string | BN,
Expand Down
4 changes: 2 additions & 2 deletions packages/web3-eth/types/tests/eth.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ eth.getProtocolVersion();
// $ExpectType Promise<string>
eth.getProtocolVersion((error: Error, protocolVersion: string) => {});

// $ExpectType Promise<boolean | Syncing>
// $ExpectType Promise<Syncing>
eth.isSyncing();
// $ExpectType Promise<boolean | Syncing>
// $ExpectType Promise<Syncing>
eth.isSyncing((error: Error, syncing: Syncing) => {});

// $ExpectType Promise<string>
Expand Down

0 comments on commit abd0f72

Please sign in to comment.