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)
This commit is contained in:
parent
465c6cc732
commit
cf034506b0
10
src/index.ts
10
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
|
||||
};
|
||||
|
Reference in New Issue
Block a user