mirror of
https://github.com/honojs/hono.git
synced 2024-12-01 11:51:01 +01:00
8b6bd46e66
* feat(app): `basePath` option for the constructor, deprecate `app.basePath()` * denoify * refactor: `HonoOptions` * denoify
16 lines
463 B
TypeScript
16 lines
463 B
TypeScript
import { HonoBase } from '../hono-base.ts'
|
|
import type { HonoOptions } from '../hono-base.ts'
|
|
import { PatternRouter } from '../router/pattern-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(options: HonoOptions<E, BasePath> = {}) {
|
|
super(options)
|
|
this.router = new PatternRouter()
|
|
}
|
|
}
|