migrate redux store

Summary: Migrating redux stores to TypeScript

Reviewed By: passy

Differential Revision: D16579796

fbshipit-source-id: e3e507f17f1bdd57eb45e30cb0b28aaee6c4521c
This commit is contained in:
Daniel Büchele
2019-08-08 08:01:55 -07:00
committed by Facebook Github Bot
parent 2c95ef6b25
commit 64cefd0f84
62 changed files with 241 additions and 245 deletions

View File

@@ -14,7 +14,7 @@ import dispatcher, {
import path from 'path';
import {remote} from 'electron';
import {FlipperPlugin} from '../../plugin';
import reducers from '../../reducers/index.js';
import reducers from '../../reducers/index.tsx';
import {init as initLogger} from '../../fb-stubs/Logger.js';
import configureStore from 'redux-mock-store';
import {TEST_PASSING_GK, TEST_FAILING_GK} from '../../fb-stubs/GK';

View File

@@ -7,14 +7,14 @@
import AndroidDevice from '../devices/AndroidDevice';
import child_process from 'child_process';
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type BaseDevice from '../devices/BaseDevice';
import type {Logger} from '../fb-interfaces/Logger.js';
import {registerDeviceCallbackOnPlugins} from '../utils/onRegisterDevice.js';
import {getAdbClient} from '../utils/adbClient';
import {default as which} from 'which';
import {promisify} from 'util';
import type {ServerPorts} from '../reducers/application';
import type {ServerPorts} from '../reducers/application.tsx';
function createDevice(
adbClient: any,

View File

@@ -6,9 +6,9 @@
*/
import {remote, ipcRenderer} from 'electron';
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger.js';
import {toggleAction} from '../reducers/application';
import {toggleAction} from '../reducers/application.tsx';
import {parseFlipperPorts} from '../utils/environmentVariables';
import {
importDataToStore,
@@ -17,7 +17,7 @@ import {
} from '../utils/exportData';
import {tryCatchReportPlatformFailures} from '../utils/metrics';
import {selectPlugin} from '../reducers/connections';
import {selectPlugin} from '../reducers/connections.tsx';
import qs from 'query-string';
export const uriComponents = (url: string) => {

View File

@@ -5,7 +5,7 @@
* @format
*/
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger.js';
import MacDevice from '../devices/MacDevice';

View File

@@ -6,7 +6,7 @@
*/
import type {ChildProcess} from 'child_process';
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger.js';
import type {DeviceType} from '../devices/BaseDevice';
import {promisify} from 'util';

View File

@@ -16,7 +16,7 @@ import plugins from './plugins';
import user from './user';
import type {Logger} from '../fb-interfaces/Logger.js';
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Dispatcher} from './types';
export default function(store: Store, logger: Logger): () => Promise<void> {

View File

@@ -5,18 +5,18 @@
* @format
*/
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger.js';
import type {PluginNotification} from '../reducers/notifications';
import type {PluginNotification} from '../reducers/notifications.tsx';
import type {FlipperPlugin, FlipperDevicePlugin} from '../plugin.js';
import isHeadless from '../utils/isHeadless.js';
import {ipcRenderer} from 'electron';
import {selectPlugin} from '../reducers/connections';
import {selectPlugin} from '../reducers/connections.tsx';
import {
setActiveNotifications,
updatePluginBlacklist,
updateCategoryBlacklist,
} from '../reducers/notifications';
} from '../reducers/notifications.tsx';
import {textContent} from '../utils/index';
import GK from '../fb-stubs/GK';

View File

@@ -5,10 +5,10 @@
* @format
*/
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger.js';
import type {FlipperPlugin, FlipperDevicePlugin} from '../plugin.js';
import type {State} from '../reducers/plugins';
import type {State} from '../reducers/plugins.tsx';
import React from 'react';
import ReactDOM from 'react-dom';
@@ -18,7 +18,7 @@ import {
addGatekeepedPlugins,
addDisabledPlugins,
addFailedPlugins,
} from '../reducers/plugins';
} from '../reducers/plugins.tsx';
import {remote} from 'electron';
import GK from '../fb-stubs/GK';
import {FlipperBasePlugin} from '../plugin.js';

View File

@@ -7,7 +7,7 @@
import Server from '../server.js';
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger.js';
import type Client from '../Client.js';
import type {UninitializedClient} from '../UninitializedClient';

View File

@@ -9,7 +9,7 @@ import {ipcRenderer} from 'electron';
// $FlowFixMe perf_hooks is a new API in node
import {performance} from 'perf_hooks';
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger.js';
import type Client from '../Client';

View File

@@ -4,7 +4,7 @@
* LICENSE file in the root directory of this source tree.
* @format
*/
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger';
export type Dispatcher = (store: Store, logger: Logger) => ?() => Promise<void>;

View File

@@ -5,9 +5,9 @@
* @format
*/
import type {Store} from '../reducers/index.js';
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger.js';
import {login} from '../reducers/user';
import {login} from '../reducers/user.tsx';
import {getUser, logoutUser} from '../fb-stubs/user';
export default (store: Store, logger: Logger) => {