hono.ts
This file
The walk stopped after 200 commits: lines older than f0b094d point at it.
Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 1–34why, one step back1import { HonoBase } from './hono-base'2import type { HonoOptions } from './hono-base'3import { RegExpRouter } from './router/reg-exp-router'4import { SmartRouter } from './router/smart-router'5import { TrieRouter } from './router/trie-router'6import type { BlankEnv, BlankSchema, Env, Schema } from './types'78/**9 * The Hono class extends the functionality of the HonoBase class.10 * It sets up routing and allows for custom options to be passed.11 *12 * @template E - The environment type.13 * @template S - The schema type.14 * @template BasePath - The base path type.15 */16export class Hono<17 E extends Env = BlankEnv,18 S extends Schema = BlankSchema,19 BasePath extends string = '/',20> extends HonoBase<E, S, BasePath> {21 /**22 * Creates an instance of the Hono class.23 *24 * @param options - Optional configuration options for the Hono instance.25 */26 constructor(options: HonoOptions<E> = {}) {27 super(options)28 this.router =29 options.router ??30 new SmartRouter({31 routers: [new RegExpRouter(), new TrieRouter()],32 })33 }34}