Refactor export data functions and exportpersistedstate function to just expect state

Summary: This diff refactors the `exportpersistedstate` and few of the functions in exportData.tsx to just expect the Redux State instead the store object.

Reviewed By: mweststrate

Differential Revision: D18733011

fbshipit-source-id: 56739917b49142ba4b6e79e7c16378fe60d6ac3b
This commit is contained in:
Pritesh Nandgaonkar
2019-11-28 03:47:32 -08:00
committed by Facebook Github Bot
parent bf85da17ab
commit ca53f35875
9 changed files with 32 additions and 30 deletions

View File

@@ -18,6 +18,7 @@ import BaseDevice from './devices/BaseDevice';
import {serialize, deserialize} from './utils/serialization';
import {Idler} from './utils/Idler';
import {StaticView} from './reducers/connections';
import {State as ReduxState} from './reducers';
type Parameters = any;
// This function is intended to be called from outside of the plugin.
@@ -103,7 +104,7 @@ export abstract class FlipperBasePlugin<
| ((
callClient: (method: string, params?: any) => Promise<any>,
persistedState: StaticPersistedState | undefined,
store: MiddlewareAPI | undefined,
store: ReduxState | undefined,
idler?: Idler,
statusUpdate?: (msg: string) => void,
) => Promise<StaticPersistedState | undefined>)