UNPKG

776 BJavaScriptView Raw
1/** Copyright (c) 2018 Uber Technologies, Inc.
2 *
3 * This source code is licensed under the MIT license found in the
4 * LICENSE file in the root directory of this source tree.
5 *
6 * @flow
7 */
8
9import {createToken} from 'fusion-core';
10import type {Token} from 'fusion-core';
11import type {Options} from 'koa-bodyparser';
12import type {RPCConfigType} from './types';
13
14export const RPCToken: Token<any> = createToken('RPCToken');
15
16export type HandlerType = {[string]: (...args: any) => any};
17export const RPCHandlersToken: Token<HandlerType> = createToken(
18 'RPCHandlersToken'
19);
20export const BodyParserOptionsToken: Token<Options> = createToken(
21 'BodyParserOptionsToken'
22);
23export const RPCHandlersConfigToken: Token<RPCConfigType> = createToken(
24 'RPCHandlersConfigToken'
25);