From 0c8cf12650e55d0808a8132e9401a19d75cba175 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 5 Sep 2017 15:33:18 +0200 Subject: Add AbiType --- packages/web3-typescript-typings/index.d.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/web3-typescript-typings/index.d.ts b/packages/web3-typescript-typings/index.d.ts index d50bd6b93..7e13b4793 100644 --- a/packages/web3-typescript-typings/index.d.ts +++ b/packages/web3-typescript-typings/index.d.ts @@ -46,8 +46,15 @@ declare module 'web3' { type FunctionAbi = MethodAbi|ConstructorAbi|FallbackAbi; + enum AbiType { + Function = 'function', + Constructor = 'constructor', + Event = 'event', + Fallback = 'fallback', + } + interface MethodAbi { - type: 'function'; + type: AbiType.Function; name: string; inputs: FunctionParameter[]; outputs: FunctionParameter[]; @@ -56,13 +63,13 @@ declare module 'web3' { } interface ConstructorAbi { - type: 'constructor'; + type: AbiType.Constructor; inputs: FunctionParameter[]; payable: boolean; } interface FallbackAbi { - type: 'fallback'; + type: AbiType.Fallback; payable: boolean; } @@ -73,7 +80,7 @@ declare module 'web3' { } interface EventAbi { - type: 'event'; + type: AbiType.Event; name: string; inputs: EventParameter[]; anonymous: boolean; -- cgit