{{> header }}

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

{{{ importsAll }}}

export type __AugmentedError<ApiType extends ApiTypes> = AugmentedError<ApiType>;

declare module '@pezkuwi/api-base/types/errors' {
  interface AugmentedErrors<ApiType extends ApiTypes> {
    {{#each modules}}
    {{{name}}}: {
      {{#each items}}
      {{> docs}}
      {{{name}}}: AugmentedError<ApiType>;
      {{/each}}
      {{#unless @root.isStrict}}
      /**
       * Generic error
       **/
      [key: string]: AugmentedError<ApiType>;
      {{/unless}}
    };
    {{/each}}
  } // AugmentedErrors
} // declare module
