aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/types.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/types.ts b/src/types.ts
index 6eb769630..66881e170 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -3,7 +3,10 @@ import * as Web3 from 'web3';
// Utility function to create a K:V from a list of strings
// Adapted from: https://basarat.gitbooks.io/typescript/content/docs/types/literal-types.html
-function strEnum(values: string[]): {[key: string]: string} {
+export interface StringEnum {
+ [key: string]: string;
+}
+function strEnum(values: string[]): StringEnum {
return _.reduce(values, (result, key) => {
result[key] = key;
return result;