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)
Цей коміт міститься в:
Yiin authored and GitHub committed 2019-04-03 02:57:55 +03:00
1 джерело 465c6cc732
коміт cf034506b0
1 file changed
+10
+10
Переглянути файл
@@ -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
};