diff --git a/examples/tool/package.json b/examples/tool/package.json index 20521fa..491ce53 100644 --- a/examples/tool/package.json +++ b/examples/tool/package.json @@ -307,4 +307,4 @@ "@universal-middleware/elysia": "^0" }, "sideEffects": false -} +} \ No newline at end of file diff --git a/packages/universal-middleware/src/plugin.ts b/packages/universal-middleware/src/plugin.ts index 34da13b..ad7521e 100644 --- a/packages/universal-middleware/src/plugin.ts +++ b/packages/universal-middleware/src/plugin.ts @@ -247,8 +247,8 @@ type ExtractT = T extends (...args: infer X) => any ? X : never; type ExtractInContext = T extends (...args: any[]) => UniversalMiddleware ? unknown extends X ? Universal.Context : X : {}; export type InContext = ExtractInContext; export type OutContext = ${info.outContext?.(type) ?? "unknown"}; -export type Args = ExtractT; -export type Middleware = ReturnType>>; +export type Args = ExtractT; +export type Middleware = ReturnType>>; export default ${fn}(${type}) as (...args: Args) => Middleware; `;