Move ObjectMap to shared types

This commit is contained in:
fragosti 2018-09-19 16:48:57 +02:00
parent 14345ab24e
commit a03b1d4d6c
5 changed files with 17 additions and 7 deletions

View File

@ -1,4 +1,13 @@
[
{
"version": "1.1.0",
"changes": [
{
"note": "Add ObjectMap type",
"pr": 1037
}
]
},
{
"version": "1.0.1",
"changes": [

View File

@ -239,3 +239,7 @@ export enum StatusCodes {
MethodNotAllowed = 405,
GatewayTimeout = 504,
}
export interface ObjectMap<T> {
[key: string]: T;
}

View File

@ -1,4 +1,4 @@
import { SignedOrder } from '@0xproject/types';
import { ObjectMap, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Provider } from 'ethereum-types';
import * as React from 'react';
@ -519,10 +519,6 @@ export interface OutdatedWrappedEtherByNetworkId {
export type ItemByAddress<T> = ObjectMap<T>;
export interface ObjectMap<T> {
[key: string]: T;
}
export type TokenStateByAddress = ItemByAddress<TokenState>;
export interface TokenState {

View File

@ -1,6 +1,7 @@
import { assetDataUtils } from '@0xproject/order-utils';
import { ObjectMap } from '@0xproject/types';
import * as _ from 'lodash';
import { ObjectMap, PortalOrder } from 'ts/types';
import { PortalOrder } from 'ts/types';
import { utils } from 'ts/utils/utils';
export interface HeapAnalytics {

View File

@ -1,4 +1,4 @@
import { ObjectMap } from 'ts/types';
import { ObjectMap } from '@0xproject/types';
import { constants } from 'ts/utils/constants';
// Map of networkId -> tokenSymbol -> tokenAddress