quick.ts
This file
Path
src/preset/quick.ts
24 lines · 695 bytes · TypeScript
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than f0b094d point at it.
Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 1–24why, one step back1/**2 * @module3 * The preset that uses `LinearRouter`.4 */56import { HonoBase } from '../hono-base'7import type { HonoOptions } from '../hono-base'8import { LinearRouter } from '../router/linear-router'9import { SmartRouter } from '../router/smart-router'10import { TrieRouter } from '../router/trie-router'11import type { BlankEnv, BlankSchema, Env, Schema } from '../types'1213export class Hono<14 E extends Env = BlankEnv,15 S extends Schema = BlankSchema,16 BasePath extends string = '/',17> extends HonoBase<E, S, BasePath> {18 constructor(options: HonoOptions<E> = {}) {19 super(options)20 this.router = new SmartRouter({21 routers: [new LinearRouter(), new TrieRouter()],22 })23 }24}