declare module '@ram-stack/composition-root/macro' {
<% rules.map(({name, roots, decorate}) => { %>
  export function register<%= name %>(deps: {
    <%= [].concat(
      roots.map(root => `${root}: CompositionRoot,`),
      decorate.map(decorator => `${decorator}: DecoratorFn,`),
    ).join('\n    ') %>
  }, searchPath: string, configPath: string = 'composition-config.json'): void;
<% }) %>
  type DecoratorFn = (v: any) => any;
  type CompositionRoot = {
    load(registrations: Registration[]): void,
    reload(registrations: Registration[]): void,
  };
  type Registration = [RegistrationId, Module, FilePath, SourceId, ApplyModifiersFn];
  type RegistrationId = string;
  type Module = any;
  type FilePath = string;
  type SourceId = string;
  type ApplyModifiersFn = (v: any) => any;

}
