deno.land / x / hono@v4.2.5 / hono.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { HonoBase } from './hono-base.ts'import type { HonoOptions } from './hono-base.ts'import { RegExpRouter } from './router/reg-exp-router/index.ts'import { SmartRouter } from './router/smart-router/index.ts'import { TrieRouter } from './router/trie-router/index.ts'import type { BlankSchema, Env, Schema } from './types.ts'
export class Hono< E extends Env = Env, S extends Schema = BlankSchema, BasePath extends string = '/'> extends HonoBase<E, S, BasePath> { constructor(options: HonoOptions<E> = {}) { super(options) this.router = options.router ?? new SmartRouter({ routers: [new RegExpRouter(), new TrieRouter()], }) }}
hono

Version Info

Tagged at
a week ago