Skip to content

Commit

Permalink
chore(typings): add index signature of EggAppConfig (eggjs#2359)
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong authored and atian25 committed Apr 13, 2018
1 parent 5f2358b commit 2998bf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ declare module 'egg' {
watcher: PlainObject;

onClientError(err: Error, socket: Socket, app: EggApplication): ClientErrorResponse | Promise<ClientErrorResponse>;

[prop: string]: any;
}

export interface ClientErrorResponse {
Expand Down
2 changes: 1 addition & 1 deletion test/ts/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const rimraf = require('mz-modules/rimraf');

describe('test/ts/index.test.js', () => {
before(async () => {
await runscript('tsc', { cwd: baseDir });
await runscript(`tsc -p ${baseDir}/tsconfig.json`, { cwd: baseDir });
const dest = path.join(baseDir, 'node_modules/egg');
await rimraf(dest);
await mkdirp(path.dirname(dest));
Expand Down

0 comments on commit 2998bf7

Please sign in to comment.