Add ContractInstance type

This commit is contained in:
Leonid Logvinov
2017-09-04 14:25:23 +02:00
parent a76bce1f32
commit 162f1d94dc

View File

@@ -84,7 +84,13 @@ declare module 'web3' {
type: string;
}
interface Contract<A> {
interface ContractInstance {
address: string;
abi: Web3.ContractAbi;
[name: string]: any;
}
interface Contract<A extends ContractInstance> {
at(address: string): A;
}