{{> header }}

// import type lookup before we augment - in some environments
// this is required to allow for ambient/previous definitions
import '@pezkuwi/rpc-core/types/jsonrpc';

{{{ importsAll }}}

export type __AugmentedRpc = AugmentedRpc<() => unknown>;

declare module '@pezkuwi/rpc-core/types/jsonrpc' {
  interface RpcInterface {
    {{#each modules}}
    {{{name}}}: {
      {{#each items}}
      {{> docs}}
      {{{name}}}: AugmentedRpc<{{#if generic}}<{{{generic}}}>{{/if}}({{{args}}}) => Observable<{{{type}}}>>;
      {{/each}}
    };
    {{/each}}
  } // RpcInterface
} // declare module
