MCPcopy
hub / github.com/honojs/hono / middleware1

Function middleware1

src/types.test.ts:3406–3415  ·  view source on GitHub ↗
(c: Context)

Source from the content-addressed store, hash-verified

3404
3405 test('infer the correct response type with 2 middleware, only one returning response', () => {
3406 const middleware1 = async (c: Context) => {
3407 if (Math.random() > 0.5) {
3408 return c.json(
3409 {
3410 q: true,
3411 },
3412 200
3413 )
3414 }
3415 }
3416 const middleware2 = async () => {}
3417
3418 const routes = new Hono().get('/', middleware1, middleware2, handler)

Callers

nothing calls this directly

Calls 1

jsonMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…