Skip to content

Commit

Permalink
test: fixed type errors (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored May 10, 2024
1 parent 662dd76 commit f9471c1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mocks/api/routes/about/[name].ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import { Hono } from 'hono'
const app = new Hono()

app.get('/', (c) => {
// @ts-expect-error It throws a type error with hono@4.0.3
const name = c.req.param('name')
const name = c.req.param<'/:name'>('name')
return c.json({
path: `/about/${name}`,
})
})

app.get('/address', (c) => {
// @ts-expect-error It throws a type error with hono@4.0.3
const name = c.req.param('name')
const name = c.req.param<'/:name'>('name')
return c.json({
path: `/about/${name}/address`,
})
Expand Down

0 comments on commit f9471c1

Please sign in to comment.