From c43beb53d1670ee67025042eea956ab9930a619a Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Fri, 9 Aug 2019 07:47:34 -0700 Subject: [PATCH] Migrate dispatcher index to tsx Summary: As per the title Reviewed By: jknoxville, passy Differential Revision: D16690303 fbshipit-source-id: fa78ea1e3f288249676d5a6423e5d0f0a6e427a4 --- headless/index.js | 2 +- src/dispatcher/{index.js => index.tsx} | 18 +++++++++--------- src/dispatcher/types.tsx | 2 +- src/init.js | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) rename src/dispatcher/{index.js => index.tsx} (65%) diff --git a/headless/index.js b/headless/index.js index 55a61a2dc..224222ff9 100644 --- a/headless/index.js +++ b/headless/index.js @@ -9,7 +9,7 @@ import path from 'path'; import {createStore} from 'redux'; import {applyMiddleware} from 'redux'; import yargs from 'yargs'; -import dispatcher from '../src/dispatcher/index.js'; +import dispatcher from '../src/dispatcher/index.tsx'; import {init as initLogger} from '../src/fb-stubs/Logger.js'; import reducers from '../src/reducers/index.tsx'; import {exportStore, pluginsClassMap} from '../src/utils/exportData.js'; diff --git a/src/dispatcher/index.js b/src/dispatcher/index.tsx similarity index 65% rename from src/dispatcher/index.js rename to src/dispatcher/index.tsx index b3919a8b7..fac1eea97 100644 --- a/src/dispatcher/index.js +++ b/src/dispatcher/index.tsx @@ -5,19 +5,19 @@ * @format */ -import androidDevice from './androidDevice.tsx'; +import androidDevice from './androidDevice'; import iOSDevice from './iOSDevice'; -import desktopDevice from './desktopDevice.tsx'; -import application from './application.tsx'; -import tracking from './tracking.tsx'; -import server from './server.tsx'; +import desktopDevice from './desktopDevice'; +import application from './application'; +import tracking from './tracking'; +import server from './server'; import notifications from './notifications'; import plugins from './plugins'; -import user from './user.tsx'; +import user from './user'; -import type {Logger} from '../fb-interfaces/Logger.js'; -import type {Store} from '../reducers/index.tsx'; -import type {Dispatcher} from './types.tsx'; +import {Logger} from '../fb-interfaces/Logger.js'; +import {Store} from '../reducers/index'; +import {Dispatcher} from './types'; export default function(store: Store, logger: Logger): () => Promise { const dispatchers: Array = [ diff --git a/src/dispatcher/types.tsx b/src/dispatcher/types.tsx index 13ed25b3f..a9e32781e 100644 --- a/src/dispatcher/types.tsx +++ b/src/dispatcher/types.tsx @@ -10,4 +10,4 @@ import {Logger} from '../fb-interfaces/Logger'; export type Dispatcher = ( store: Store, logger: Logger, -) => (() => Promise) | null; +) => (() => Promise) | null | void; diff --git a/src/init.js b/src/init.js index a589f9f79..194258cbe 100644 --- a/src/init.js +++ b/src/init.js @@ -16,7 +16,7 @@ import setupPrefetcher from './fb-stubs/Prefetcher.tsx'; import {createStore} from 'redux'; import {persistStore} from 'redux-persist'; import reducers from './reducers/index.tsx'; -import dispatcher from './dispatcher/index.js'; +import dispatcher from './dispatcher/index.tsx'; import TooltipProvider from './ui/components/TooltipProvider.js'; import config from './utils/processConfig.js'; import {stateSanitizer} from './utils/reduxDevToolsConfig.js';