From cf034506b09c1a62ec59a81096430a7e17e713cb Mon Sep 17 00:00:00 2001 From: Yiin Date: Wed, 3 Apr 2019 02:57:55 +0300 Subject: [PATCH] Add default export it's just somewhat annoyign to write `import * as rpc from 'rage-rpc';` every time you want to import whole package. You could import only the methods you use, but they by themselves does not exactly describe what they do (e.g. `register()` can mean a lot of things, while rpc.register is much easier to understand) --- src/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/index.ts b/src/index.ts index 6b5536e..cfe3e2d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -333,3 +333,13 @@ export function callBrowser(browser: Browser, name: string, args?: any): Promise const id = util.uid(); return _callBrowser(id, browser, name, args, {}); } + +export default { + register, + unregister, + call, + callServer, + callClient, + callBrowsers, + callBrowser +};