generator.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. import ConfigGenerator from './generators/config';
  2. import AutoGenerator from './generators/auto';
  3. import ClassGenerator from './generators/class';
  4. import CustomGenerator from './generators/custom';
  5. import EggGenerator from './generators/egg';
  6. import ExtendGenerator from './generators/extend';
  7. import FunctionGenerator from './generators/function';
  8. import ObjectGenerator from './generators/object';
  9. import PluginGenerator from './generators/plugin';
  10. import { BaseGenerator } from './generators/base';
  11. declare type GeneratorKlass = {
  12. new (...args: any[]): BaseGenerator;
  13. };
  14. export declare const generators: {
  15. auto: typeof AutoGenerator;
  16. config: typeof ConfigGenerator;
  17. class: typeof ClassGenerator;
  18. custom: typeof CustomGenerator;
  19. egg: typeof EggGenerator;
  20. extend: typeof ExtendGenerator;
  21. function: typeof FunctionGenerator;
  22. object: typeof ObjectGenerator;
  23. plugin: typeof PluginGenerator;
  24. };
  25. export declare function registerGenerator(name: string, generator: GeneratorKlass): void;
  26. export declare function isPrivateGenerator(name: string): boolean;
  27. export declare function getGenerator(name: string): any;
  28. export declare function loadGenerator(name: any, option: {
  29. cwd: string;
  30. }): any;
  31. export declare function formatGenerator(generator: any): any;
  32. export { BaseGenerator, AutoGenerator, ConfigGenerator, ClassGenerator, CustomGenerator, EggGenerator, ExtendGenerator, FunctionGenerator, ObjectGenerator, PluginGenerator, };
  33. //# sourceMappingURL=generator.d.ts.map