mirror of
https://github.com/honojs/hono.git
synced 2024-12-01 10:51:01 +00:00
319f49d493
This reverts commit 8b6bd46e66
.
19 lines
614 B
TypeScript
19 lines
614 B
TypeScript
import { HonoBase } from '../hono-base.ts'
|
|
import { LinearRouter } from '../router/linear-router/index.ts'
|
|
import { SmartRouter } from '../router/smart-router/index.ts'
|
|
import { TrieRouter } from '../router/trie-router/index.ts'
|
|
import type { Env, Schema } from '../types.ts'
|
|
|
|
export class Hono<
|
|
E extends Env = Env,
|
|
S extends Schema = {},
|
|
BasePath extends string = '/'
|
|
> extends HonoBase<E, S, BasePath> {
|
|
constructor(init: Partial<Pick<Hono, 'getPath'> & { strict: boolean }> = {}) {
|
|
super(init)
|
|
this.router = new SmartRouter({
|
|
routers: [new LinearRouter(), new TrieRouter()],
|
|
})
|
|
}
|
|
}
|