update outdated flowtype npm declarations

tmp/erc20-autoload
Szymon Lesisz 4 years ago
parent 2288840678
commit e586c9d8ea

@ -1,4 +1,5 @@
[include]
.*/node_modules/hd-wallet/lib
[ignore]
.*/node_modules/fbjs/.*
@ -7,6 +8,9 @@
.*/node_modules/redux/.*
.*/node_modules/react-router/.*
.*/node_modules/oboe/test/.*
.*/node_modules/trezor-link/lib/lowlevel/webusb.js.flow
.*/node_modules/hd-wallet/lib/utils/stream.js.flow
.*/node_modules/protobufjs-old-fixed-webpack/src/bower.json
.*/_old/.*
.*/scripts/solidity/.*
.*/build/.*
@ -19,7 +23,6 @@
./src/flowtype/npm/react-router-dom_v4.x.x.js
; ./src/flowtype/npm/react-intl_v2.x.x.js // TODO: uncomment to get proper flow support for intl (needs some flow fixing)
./src/flowtype/npm/connected-react-router.js
./src/flowtype/npm/bignumber.js
./src/flowtype/npm/ethereum-types.js
./src/flowtype/npm/web3.js
./src/flowtype/css.js

@ -1,58 +0,0 @@
/* @flow */
declare module 'bignumber.js' {
declare type $npm$big$number$object = number | string | T_BigNumber
declare type $npm$cmp$result = -1 | 0 | 1
declare type DIGIT = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
declare type ROUND_DOWN = 0
declare type ROUND_HALF_UP = 1
declare type ROUND_HALF_EVEN = 2
declare type ROUND_UP = 3
declare type RM = ROUND_DOWN | ROUND_HALF_UP | ROUND_HALF_EVEN | ROUND_UP
declare class T_BigNumber {
// Properties
static DP: number;
static RM: RM;
static E_NEG: number;
static E_POS: number;
c: Array<DIGIT>;
e: number;
s: -1 | 1;
// Constructors
static (value: $npm$big$number$object): T_BigNumber;
constructor(value: $npm$big$number$object): T_BigNumber;
// Methods
abs(): T_BigNumber;
div(n: $npm$big$number$object): T_BigNumber;
dividedBy(n: $npm$big$number$object): T_BigNumber;
eq(n: $npm$big$number$object): boolean;
gt(n: $npm$big$number$object): boolean;
isGreaterThan(n: $npm$big$number$object): boolean;
gte(n: $npm$big$number$object): boolean;
lt(n: $npm$big$number$object): boolean;
isLessThan(n: $npm$big$number$object): boolean;
lte(n: $npm$big$number$object): boolean;
isLessThanOrEqualTo(n: $npm$big$number$object): boolean;
isNaN(): boolean;
minus(n: $npm$big$number$object): T_BigNumber;
mod(n: $npm$big$number$object): T_BigNumber;
plus(n: $npm$big$number$object): T_BigNumber;
pow(exp: number): BigNumber;
sqrt(): T_BigNumber;
times(n: $npm$big$number$object): T_BigNumber;
toExponential(dp: ?number): string;
toFixed(dp: ?number): string;
toPrecision(sd: ?number): string;
toString(format?: number): string;
toNumber(): number;
valueOf(): string;
toJSON(): string;
}
//declare module.exports: typeof T_BigNumber
declare export default typeof T_BigNumber;
}

@ -1,5 +1,3 @@
/* @flow */
declare module 'redux' {
/*
S = State
@ -10,7 +8,7 @@ declare module 'redux' {
declare export type DispatchAPI<A> = (action: A) => A;
// old Dispatch needs to stay as it is, because also "react-redux" is using this type
declare export type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>;
declare export type Dispatch<A: { type: * }> = DispatchAPI<A>;
declare export type ThunkAction<S, A> = (dispatch: ReduxDispatch<S, A>, getState: () => S) => void;
declare export type AsyncAction<S, A> = (dispatch: ReduxDispatch<S, A>, getState: () => S) => Promise<void>;
@ -21,7 +19,7 @@ declare module 'redux' {
declare export type AsyncDispatch<S, A> = (action: AsyncAction<S, A>) => Promise<void>;
declare export type PromiseDispatch<S, A> = <R>(action: PromiseAction<S, A, R>) => Promise<R>;
declare export type PayloadDispatch<S, A> = <R>(action: PayloadAction<S, A, R>) => R;
declare export type PlainDispatch<A: {type: $Subtype<string>}> = DispatchAPI<A>;
declare export type PlainDispatch<A: { type: * }> = DispatchAPI<A>;
/* NEW: Dispatch is now a combination of these different dispatch types */
declare export type ReduxDispatch<S, A> = PlainDispatch<A> & ThunkDispatch<S, A> & AsyncDispatch<S, A> & PromiseDispatch<S, A> & PayloadDispatch<S, A>;

Loading…
Cancel
Save