0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00

refactor(core): flatten router parameter context types (#1809)

This commit is contained in:
Xiao Yijun 2022-08-23 18:42:39 +08:00 committed by GitHub
parent 9ead8aeef5
commit 224ba4c608
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,8 +5,9 @@ import { WithI18nContext } from '@/middleware/koa-i18next';
import { WithLogContext } from '@/middleware/koa-log';
import { WithUserInfoContext } from '@/middleware/koa-user-info';
export type AnonymousRouter = Router<unknown, WithLogContext<WithI18nContext>>;
export type AnonymousRouter = Router<unknown, WithLogContext & WithI18nContext>;
export type AuthedRouter = Router<
unknown,
WithUserInfoContext<WithAuthContext<WithLogContext<WithI18nContext>>>
WithUserInfoContext & WithAuthContext & WithLogContext & WithI18nContext
>;