remove some flow annotations

This commit is contained in:
ansuz 2020-01-23 14:32:10 -05:00
parent 88dcadcb1b
commit 873a7c7c84
1 changed files with 3 additions and 24 deletions

27
rpc.js
View File

@ -1411,24 +1411,7 @@ var upload_status = function (Env, safeKey, filesize, _cb) { // FIXME FILES
});
};
/*::
const flow_Config = require('./config.example.js');
type Config_t = typeof(flow_Config);
import type { ChainPadServer_Storage_t } from './storage/file.js'
type NetfluxWebsocketSrvContext_t = {
store: ChainPadServer_Storage_t,
getHistoryOffset: (
ctx: NetfluxWebsocketSrvContext_t,
channelName: string,
lastKnownHash: ?string,
cb: (err: ?Error, offset: ?number)=>void
)=>void
};
*/
RPC.create = function (
config /*:Config_t*/,
cb /*:(?Error, ?Function)=>void*/
) {
RPC.create = function (config, cb) {
Log = config.log;
// load pin-store...
@ -1445,7 +1428,7 @@ RPC.create = function (
Sessions: {},
paths: {},
msgStore: config.store,
pinStore: (undefined /*:any*/),
pinStore: undefined,
pinnedPads: {},
evPinnedPadsReady: mkEvent(true),
limits: {},
@ -1782,11 +1765,7 @@ RPC.create = function (
handleMessage(true);
};
var rpc = function (
ctx /*:NetfluxWebsocketSrvContext_t*/,
data /*:Array<Array<any>>*/,
respond /*:(?string, ?Array<any>)=>void*/)
{
var rpc = function (ctx, data, respond) {
try {
return rpc0(ctx, data, respond);
} catch (e) {