From 873a7c7c84b01e77670a821e0712b285f543eba9 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 23 Jan 2020 14:32:10 -0500 Subject: [PATCH] remove some flow annotations --- rpc.js | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/rpc.js b/rpc.js index f690b2bf1..948977bbd 100644 --- a/rpc.js +++ b/rpc.js @@ -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>*/, - respond /*:(?string, ?Array)=>void*/) - { + var rpc = function (ctx, data, respond) { try { return rpc0(ctx, data, respond); } catch (e) {