Skip to content

Commit

Permalink
fix: add overrideIgnore define (#4490)
Browse files Browse the repository at this point in the history
Co-authored-by: zhangcheng.zc <zhangcheng.zc@alibaba-inc.com>
  • Loading branch information
kotot and zhangcheng.zc committed Oct 30, 2020
1 parent d652658 commit 34048c2
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions index.d.ts
Expand Up @@ -38,14 +38,14 @@ declare module 'egg' {
// Remove specific property from the specific class
type RemoveSpecProp<T, P> = Pick<T, Exclude<keyof T, P>>;

export interface EggHttpClient extends HttpClient<RequestOptions> {}
export interface EggHttpClient extends HttpClient<RequestOptions> { }
interface EggHttpConstructor {
new (app: Application): EggHttpClient;
new(app: Application): EggHttpClient;
}

export interface EggContextHttpClient extends HttpClient<RequestOptions> {}
export interface EggContextHttpClient extends HttpClient<RequestOptions> { }
interface EggContextHttpClientConstructor {
new (ctx: Context): EggContextHttpClient;
new(ctx: Context): EggContextHttpClient;
}

/**
Expand Down Expand Up @@ -361,6 +361,10 @@ declare module 'egg' {
* whether override default watchDirs, default is false.
*/
overrideDefault: boolean;
/**
* whether override default ignoreDirs, default is false.
*/
overrideIgnore: boolean;
/**
* whether to reload, use https://github.com/sindresorhus/multimatch
*/
Expand Down Expand Up @@ -1070,16 +1074,16 @@ declare module 'egg' {

export function startCluster(options: ClusterOptions, callback: (...args: any[]) => any): void;

export interface StartOptions{
export interface StartOptions {
/** specify framework that can be absolute path or npm package */
framework?: string;
/** directory of application, default to `process.cwd()` */
baseDir?: string;
/** ignore single process mode warning */
ignoreWarning? :boolean;
ignoreWarning?: boolean;
}

export function start(options?:StartOptions):Promise<Application>
export function start(options?: StartOptions): Promise<Application>

/**
* Powerful Partial, Support adding ? modifier to a mapped property in deep level
Expand All @@ -1091,8 +1095,8 @@ declare module 'egg' {
*/
export type PowerPartial<T> = {
[U in keyof T]?: T[U] extends object
? PowerPartial<T[U]>
: T[U]
? PowerPartial<T[U]>
: T[U]
};

// send data can be number|string|boolean|object but not Set|Map
Expand Down Expand Up @@ -1127,8 +1131,8 @@ declare module 'egg' {
}

// compatible
export interface EggLoaderOptions extends CoreLoaderOptions {}
export interface EggLoader extends CoreLoader {}
export interface EggLoaderOptions extends CoreLoaderOptions { }
export interface EggLoader extends CoreLoader { }

/**
* App worker process Loader, will load plugins
Expand Down

0 comments on commit 34048c2

Please sign in to comment.