From 84bd54ba4025a33f4e311ec66d81d58b45e54d6b Mon Sep 17 00:00:00 2001 From: Nikita Galkin Date: Sat, 23 Jun 2018 16:32:07 +0300 Subject: Improve 'web3-provider-engine' typings --- packages/typescript-typings/CHANGELOG.json | 9 +++++++++ .../typescript-typings/types/web3-provider-engine/index.d.ts | 10 +++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json index 5b5d5c31d..c76e0d4c0 100644 --- a/packages/typescript-typings/CHANGELOG.json +++ b/packages/typescript-typings/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "0.4.2", + "changes": [ + { + "note": "Improve 'web3-provider-engine' typings", + "pr": 768 + } + ] + }, { "timestamp": 1529397769, "version": "0.4.1", diff --git a/packages/typescript-typings/types/web3-provider-engine/index.d.ts b/packages/typescript-typings/types/web3-provider-engine/index.d.ts index 1733f2731..72ef434a7 100644 --- a/packages/typescript-typings/types/web3-provider-engine/index.d.ts +++ b/packages/typescript-typings/types/web3-provider-engine/index.d.ts @@ -1,6 +1,12 @@ declare module 'web3-provider-engine' { import { Provider, JSONRPCRequestPayload, JSONRPCResponsePayload } from 'ethereum-types'; + interface Web3ProviderEngineOptions { + pollingInterval?: number; + blockTracker?: any; + blockTrackerProvider?: any; + } class Web3ProviderEngine implements Provider { + constructor(options?: Web3ProviderEngineOptions); public on(event: string, handler: () => void): void; public send(payload: JSONRPCRequestPayload): void; public sendAsync( @@ -8,7 +14,9 @@ declare module 'web3-provider-engine' { callback: (error: null | Error, response: JSONRPCResponsePayload) => void, ): void; public addProvider(provider: any): void; - public start(): void; + // start block polling + public start(callback?: () => void): void; + // stop block polling public stop(): void; } export = Web3ProviderEngine; -- cgit