Export all interfaces and export the web3 constructor as the default export
This commit is contained in:
committed by
Leonid Logvinov
parent
0718b0d5b0
commit
15b5fcbaf9
16
packages/web3-typescript-typings/index.d.ts
vendored
16
packages/web3-typescript-typings/index.d.ts
vendored
@@ -37,12 +37,12 @@ declare module 'web3' {
|
|||||||
public isAddress(address: string): boolean;
|
public isAddress(address: string): boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AbiIOParameter {
|
export interface AbiIOParameter {
|
||||||
name: string;
|
name: string;
|
||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AbiDefinition {
|
export interface AbiDefinition {
|
||||||
constants: boolean;
|
constants: boolean;
|
||||||
inputs: AbiIOParameter[];
|
inputs: AbiIOParameter[];
|
||||||
name: string;
|
name: string;
|
||||||
@@ -50,22 +50,22 @@ declare module 'web3' {
|
|||||||
type: string;
|
type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Contract {}
|
export interface Contract {}
|
||||||
|
|
||||||
interface FilterObject {
|
export interface FilterObject {
|
||||||
fromBlock: number|string;
|
fromBlock: number|string;
|
||||||
toBlock: number|string;
|
toBlock: number|string;
|
||||||
address: string;
|
address: string;
|
||||||
topics: string[];
|
topics: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FilterResult {
|
export interface FilterResult {
|
||||||
get(callback: () => void): void;
|
get(callback: () => void): void;
|
||||||
watch(callback: () => void): void;
|
watch(callback: () => void): void;
|
||||||
stopWatching(): void;
|
stopWatching(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Provider {}
|
export interface Provider {}
|
||||||
|
|
||||||
namespace providers {
|
namespace providers {
|
||||||
class HttpProvider implements Provider {
|
class HttpProvider implements Provider {
|
||||||
@@ -74,5 +74,7 @@ declare module 'web3' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace Web3 {} // Empty module so the class is exportable as a module
|
namespace Web3 {} // Empty module so the class is exportable as a module
|
||||||
export = Web3;
|
/* tslint:disable */
|
||||||
|
export default Web3;
|
||||||
|
/* tslint:enable */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user