diff --git a/packages/types/app/index.d.ts b/packages/types/app/index.d.ts index b27021ef19..c0e69b0bff 100644 --- a/packages/types/app/index.d.ts +++ b/packages/types/app/index.d.ts @@ -50,7 +50,8 @@ export interface Context { } export type Middleware = string | ((ctx: Context, cb: Function) => Promise | void) -export type Plugin = (ctx: Context, inject: (key: string, value: any) => void) => Promise | void +export type Inject = (key: string, value: any) => void +export type Plugin = (ctx: Context, inject: Inject) => Promise | void export interface Transition { name?: string