diff --git a/.changeset/blue-peas-marry.md b/.changeset/blue-peas-marry.md new file mode 100644 index 00000000..7a834a65 --- /dev/null +++ b/.changeset/blue-peas-marry.md @@ -0,0 +1,5 @@ +--- +"vinxi": patch +--- + +fix: add types for createMiddleware diff --git a/packages/vinxi/runtime/server.d.ts b/packages/vinxi/runtime/server.d.ts index 2371d187..7c6a4998 100644 --- a/packages/vinxi/runtime/server.d.ts +++ b/packages/vinxi/runtime/server.d.ts @@ -1 +1,12 @@ +import { EventHandler, H3Event } from "h3"; +import { NitroAppPlugin } from "nitropack"; + export * from "h3"; + +export function createMiddleware( + fn: ({ + forward, + }: { + forward: (event: H3Event) => Promise; + }) => EventHandler, +): NitroAppPlugin;