Merge pull request #768 from galkin/development
Improve 'web3-provider-engine' typings
This commit is contained in:
		@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "version": "0.4.2",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Improve 'web3-provider-engine' typings",
 | 
			
		||||
                "pr": 768
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "timestamp": 1529397769,
 | 
			
		||||
        "version": "0.4.1",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,18 @@
 | 
			
		||||
declare module 'web3-provider-engine' {
 | 
			
		||||
    interface Web3ProviderEngineOptions {
 | 
			
		||||
        pollingInterval?: number;
 | 
			
		||||
        blockTracker?: any;
 | 
			
		||||
        blockTrackerProvider?: any;
 | 
			
		||||
    }
 | 
			
		||||
    class Web3ProviderEngine {
 | 
			
		||||
        constructor(options?: Web3ProviderEngineOptions);
 | 
			
		||||
        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;
 | 
			
		||||
        // start block polling
 | 
			
		||||
        public start(callback?: () => void): void;
 | 
			
		||||
        // stop block polling
 | 
			
		||||
        public stop(): void;
 | 
			
		||||
    }
 | 
			
		||||
    export = Web3ProviderEngine;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user