{{> header }}

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

{{{ importsAll }}}

export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;

declare module '@pezkuwi/api-base/types/events' {
  interface AugmentedEvents<ApiType extends ApiTypes> {
    {{#each modules}}
    {{{name}}}: {
      {{#each items}}
      {{> docs}}
      {{{name}}}: AugmentedEvent<ApiType, {{{type}}}>;
      {{/each}}
      {{#unless @root.isStrict}}
      /**
       * Generic event
       **/
      [key: string]: AugmentedEvent<ApiType>;
      {{/unless}}
    };
    {{/each}}
  } // AugmentedEvents
} // declare module
