We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e79351b commit 5613d20Copy full SHA for 5613d20
packages/db/src/events/Middleware.ts
@@ -15,7 +15,7 @@ export function middleware<
15
>(
16
hooks: Hook<T, P, A>[],
17
context: Omit<HookContext<T, P, A>, "next">,
18
- impl: () => ReturnType<HookMethods<T, P>[A]>
+ impl: () => ReturnType<HookMethods<T, P>[A]> | Awaited<ReturnType<HookMethods<T, P>[A]>>
19
): HookReturn<T, P, A> | Promise<HookReturn<T, P, A>>;
20
21
/**
@@ -43,7 +43,7 @@ export function middleware<
43
44
hooksOrTable: Hook<T, P, A>[] | Table<T, P>,
45
context: Omit<HookContext<T, P, A>, "next" | "table"> & { table?: string },
46
47
): HookReturn<T, P, A> | Promise<HookReturn<T, P, A>> {
48
let contextTable = context.table;
49
let hooks: Hook<T, P, A>[];
0 commit comments