Convert types dispatcher to TS

Summary: Convert file to TS

Reviewed By: passy

Differential Revision: D16687880

fbshipit-source-id: d3d8712fa4298f8124717ae98239ed63d3282b12
This commit is contained in:
John Knox
2019-08-09 04:50:48 -07:00
committed by Facebook Github Bot
parent cff023150e
commit 8f7c817d56
3 changed files with 14 additions and 11 deletions

View File

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

View File

@@ -1,10 +0,0 @@
/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
import type {Store} from '../reducers/index.tsx';
import type {Logger} from '../fb-interfaces/Logger';
export type Dispatcher = (store: Store, logger: Logger) => ?() => Promise<void>;

13
src/dispatcher/types.tsx Normal file
View File

@@ -0,0 +1,13 @@
/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
import {Store} from '../reducers/index.js';
import {Logger} from '../fb-interfaces/Logger';
export type Dispatcher = (
store: Store,
logger: Logger,
) => (() => Promise<void>) | null;