diff options
Diffstat (limited to 'packages/website/ts/globals.d.ts')
-rw-r--r-- | packages/website/ts/globals.d.ts | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/packages/website/ts/globals.d.ts b/packages/website/ts/globals.d.ts index 7bbbb3a98..b4611f583 100644 --- a/packages/website/ts/globals.d.ts +++ b/packages/website/ts/globals.d.ts @@ -3,7 +3,6 @@ declare module 'react-router-hash-link'; declare module 'truffle-contract'; declare module 'ethereumjs-util'; declare module 'keccak'; -declare module 'web3-provider-engine'; declare module 'whatwg-fetch'; declare module 'react-html5video'; declare module 'web3-provider-engine/subproviders/filters'; @@ -21,6 +20,8 @@ declare module '*.json' { /* tslint:enable */ } +// tslint:disable:max-classes-per-file + // find-version declarations declare function findVersions(version: string): string[]; declare module 'find-versions' { @@ -131,21 +132,26 @@ declare class Subprovider {} declare module 'web3-provider-engine/subproviders/subprovider' { export = Subprovider; } - -// tslint:disable-next-line:max-classes-per-file -declare class RpcSubprovider { - constructor(options: {rpcUrl: string}); - public handleRequest(payload: any, next: any, end: (err?: Error, data?: any) => void): void; -} declare module 'web3-provider-engine/subproviders/rpc' { + import * as Web3 from 'web3'; + class RpcSubprovider { + constructor(options: {rpcUrl: string}); + public handleRequest( + payload: Web3.JSONRPCRequestPayload, next: () => void, end: (err: Error|null, data?: any) => void, + ): void; + } export = RpcSubprovider; } -// tslint:disable-next-line:max-classes-per-file -declare class HookedWalletSubprovider { - constructor(wallet: any); -} -declare module 'web3-provider-engine/subproviders/hooked-wallet' { - export = HookedWalletSubprovider; +declare module 'web3-provider-engine' { + class Web3ProviderEngine { + public on(event: string, handler: () => void): void; + public send(payload: any): void; + public sendAsync(payload: any, callback: (error: any, response: any) => void): void; + public addProvider(provider: any): void; + public start(): void; + public stop(): void; + } + export = Web3ProviderEngine; } declare interface Artifact { |