Kind: Constant
Source: src/router.ts
Constant representing all HTTP methods in lowercase.
METHOD_NAME_ALL_LOWERCASE stores the lowercase method token for routes that match all HTTP methods. Router code can pass or compare this token when registering method-agnostic routes.
Definition
ts'all' as const
Value
ts'all' as const
Diagram
mermaidgraph LR A[Route registration] --> B[METHOD_NAME_ALL_LOWERCASE] B --> C[all] C --> D[Router method matching]
Usage
tsimport { METHOD_NAME_ALL_LOWERCASE } from './router'
router.add(METHOD_NAME_ALL_LOWERCASE, '/health', (context) => {
return context.text('OK')
})
AI Coding Instructions
- Use
METHOD_NAME_ALL_LOWERCASEinstead of hardcoding theallmethod token. - Pass this constant to router registration code when a route should match any HTTP method.
- Keep lowercase and uppercase method tokens distinct when comparing router method values.
- Check router matching behavior before changing how all-method routes are registered.
Used by
1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (1)
HonoOptions—src/hono-base.ts:46
Was this page helpful?