diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-13 02:00:36 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-13 02:00:36 +0800 |
commit | f3391e1250767eb9ef7a74f78eded38fa3c94586 (patch) | |
tree | e25eeb3652227ea68f5b77db82755765298cb22a /packages/instant/src/types.ts | |
parent | 09c5ae4e65f8fddd4504be041f27f9107d12df7d (diff) | |
download | dexon-0x-contracts-f3391e1250767eb9ef7a74f78eded38fa3c94586.tar dexon-0x-contracts-f3391e1250767eb9ef7a74f78eded38fa3c94586.tar.gz dexon-0x-contracts-f3391e1250767eb9ef7a74f78eded38fa3c94586.tar.bz2 dexon-0x-contracts-f3391e1250767eb9ef7a74f78eded38fa3c94586.tar.lz dexon-0x-contracts-f3391e1250767eb9ef7a74f78eded38fa3c94586.tar.xz dexon-0x-contracts-f3391e1250767eb9ef7a74f78eded38fa3c94586.tar.zst dexon-0x-contracts-f3391e1250767eb9ef7a74f78eded38fa3c94586.zip |
feat: make redux actions type-sage
Diffstat (limited to 'packages/instant/src/types.ts')
-rw-r--r-- | packages/instant/src/types.ts | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index bbf31cbf4..ffa5d679e 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -1,3 +1,5 @@ +import { ObjectMap } from '@0xproject/types'; + // Reusable export enum AsyncProcessState { NONE, @@ -6,14 +8,6 @@ export enum AsyncProcessState { FAILURE, } -export enum ActionTypes { - UPDATE_ETH_USD_PRICE, - UPDATE_SELECTED_ASSET_AMOUNT, - UPDATE_SELECTED_ASSET_BUY_STATE, - UPDATE_LATEST_BUY_QUOTE, -} - -export interface Action { - type: ActionTypes; - data?: any; -} +export type FunctionType = (...args: any[]) => any; +export type ActionCreatorsMapObject = ObjectMap<FunctionType>; +export type ActionsUnion<A extends ActionCreatorsMapObject> = ReturnType<A[keyof A]>; |