Skip to content
Myr

feat(context): Introduce ContextVariableMap. (#429)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* feat(context): Introduce ContextVariableMap. * Add a type definition using ContextVariableMap to ctx.set as well.

authored by Taku Amano · committed by GitHub · parent 04a8818 · Browse files · 2 files+11 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+11 added−3 removed

  • other:+11 added−3 removed

2 files+11 added−3 removed

modified:src/context.ts+9 added-3 removed
modified:src/hono.ts+2 added
5 unmodified lines
6import { METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE } from './router'7import { TrieRouter } from './router/trie-router' // Default Router8import { getPathFromURL, mergePath } from './utils/url'910export interface ContextVariableMap {}1112type Env = Record<string, any>13export type Handler<RequestParamKeyType extends string = string, E = Env> = (14 c: Context<RequestParamKeyType, E>,15 next: Next
197 unmodified lines