From ff6717904e269a1fa0585150349e5a11fd2b07fa Mon Sep 17 00:00:00 2001 From: Florent Catiau-Tristant Date: Wed, 2 Sep 2020 11:58:19 +0200 Subject: [PATCH] types: expose `Inject` type (#7985) Co-authored-by: florent.catiau --- packages/types/app/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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