Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): Added E env type argument to showRoutes & inspectRoutes hono parameter #1778

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

NuroDev
Copy link
Contributor

@NuroDev NuroDev commented Dec 4, 2023

What's been changed?

  • Updated showRoutes deprecated doc comments to provide the correct import path (/dev instead of /helper)
  • Added TEnv type argument to both showRoutes & inspectRoutes helpers & passed to the first (hono: Hono) parameter.
    • This fixes a type error where if you pass in a Hono instance with a custom environment type these 2 functions will complain as it does not match the default / base Hono type(s).

Author should do the followings, if applicable

  • Add tests
  • Run tests
  • yarn denoify to generate files for Deno

@NuroDev NuroDev changed the title fix(types): Added Env generic to showRoutes & inspectRoutes hono parameter fix(types): Added TEnv type argument to showRoutes & inspectRoutes hono parameter Dec 4, 2023
@yusukebe
Copy link
Member

yusukebe commented Dec 5, 2023

Hi @NuroDev !

Good fix! I've left one comment. Check it!

@NuroDev NuroDev requested a review from yusukebe December 5, 2023 09:31
@NuroDev NuroDev changed the title fix(types): Added TEnv type argument to showRoutes & inspectRoutes hono parameter fix(types): Added E env type argument to showRoutes & inspectRoutes hono parameter Dec 5, 2023
Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

yusukebe commented Dec 5, 2023

@NuroDev

I'll merge this and will release the latest patch version soon. I appreciate your contribution!

@yusukebe yusukebe merged commit 41075d5 into honojs:main Dec 5, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants