Skip to content

Commit

Permalink
Fix fromHono() type error for apps with overwritten generics (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
G4brym authored Jan 16, 2025
1 parent 1ddce9f commit 523259b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chanfana",
"version": "2.6.0",
"version": "2.6.1",
"description": "OpenAPI 3 and 3.1 schema generator and validator for Hono, itty-router and more!",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/hono.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class HonoOpenAPIHandler extends OpenAPIHandler {
}

export function fromHono<
M extends Hono,
M extends Hono<E, S, BasePath>,
E extends Env = M extends Hono<infer E, any, any> ? E : never,
S extends Schema = M extends Hono<any, infer S, any> ? S : never,
BasePath extends string = M extends Hono<any, any, infer BP> ? BP : never,
Expand Down

0 comments on commit 523259b

Please sign in to comment.