Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Feb 3, 2025
1 parent b61d81d commit 749e7dc
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions test/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ expectType<IMessenger>(app.messenger);
expectType<IMessenger>(app.messenger.broadcast('test'));
expectType<void>(app.loggers.reload());

class MyLogRotator extends LogRotator {
async getRotateFiles() {
return new Map();
}
}
expectType<LogRotator>(new MyLogRotator({ app }));

const ctx = app.createAnonymousContext();

expectType<Promise<void>>(app.runInAnonymousContextScope(async ctx => {
Expand Down Expand Up @@ -76,6 +69,22 @@ expectType<boolean>(app.config.session.httpOnly);
expectType<(err: any, ctx: any) => void>(app.config.onerror.html!);
expectType<string>(app.config.onerror.errorPageUrl as string);

// logrotator plugin types
class MyLogRotator extends LogRotator {
async getRotateFiles() {
return new Map();
}
}
expectType<LogRotator>(new MyLogRotator({ app }));
expectType<boolean>(app.config.logrotator.disableRotateByDay);
expectType<number>(app.config.logrotator.maxDays);
expectType<number>(app.config.logrotator.maxFileSize);
expectType<number>(app.config.logrotator.maxFiles);
expectType<number>(app.config.logrotator.rotateDuration);
expectType<boolean>(app.config.logrotator.gzip);
expectType<string>(app.config.logrotator.hourDelimiter);
expectType<string[] | null>(app.config.logrotator.filesRotateBySize);

class AppBoot implements ILifecycleBoot {
private readonly app: Application;

Expand Down

0 comments on commit 749e7dc

Please sign in to comment.