Skip to content

Commit

Permalink
chore(typings): add class EggLoader (#2321)
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong authored and popomore committed Aug 24, 2018
1 parent 80528cc commit db1286d
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions index.d.ts
Expand Up @@ -1069,4 +1069,48 @@ declare module 'egg' {
*/
sendToApp(action: string, data: any): void;
}

export interface EggLoaderOptions {
baseDir: string;
typescript?: boolean;
app: Application;
logger: Logger;
plugins?: any;
}

// egg-core
export class EggLoader {
options: EggLoaderOptions;

constructor(options: EggLoaderOptions);

getHomedir(): EggAppInfo['HOME']

getAppInfo(): EggAppInfo;
}

/**
* App worker process Loader, will load plugins
* @see https://github.com/eggjs/egg-core
*/
export class AppWorkerLoader extends EggLoader {
constructor(options: EggLoaderOptions);

loadConfig(): void;

load(): void;
}

/**
* Agent worker process loader
* @see https://github.com/eggjs/egg-loader
*/
export class AgentWorkerLoader extends EggLoader {
constructor(options: EggLoaderOptions);

loadConfig(): void;

load(): void;
}

}

0 comments on commit db1286d

Please sign in to comment.