clean up
This commit is contained in:
26
src/index.ts
26
src/index.ts
@@ -13,13 +13,13 @@ export interface Route<TEnv> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Router Context
|
||||
*
|
||||
* @typedef RouterContext
|
||||
* @property {RouterEnv} env Environment
|
||||
* @property {RouterRequest} req Request Object
|
||||
* @property {ExecutionContext} ctx Context Object
|
||||
*/
|
||||
* Router Context
|
||||
*
|
||||
* @typedef RouterContext
|
||||
* @property {RouterEnv} env Environment
|
||||
* @property {RouterRequest} req Request Object
|
||||
* @property {ExecutionContext} ctx Context Object
|
||||
*/
|
||||
export interface RouterContext<TEnv = any> {
|
||||
env: TEnv
|
||||
req: RouterRequest
|
||||
@@ -68,12 +68,12 @@ export interface RouterRequestQuery {
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler Function
|
||||
*
|
||||
* @callback RouterHandler
|
||||
* @param {RouterContext} ctx
|
||||
* @returns {Promise<Response | void> Response | void}
|
||||
*/
|
||||
* Handler Function
|
||||
*
|
||||
* @callback RouterHandler
|
||||
* @param {RouterContext} ctx
|
||||
* @returns {Promise<Response | void> Response | void}
|
||||
*/
|
||||
export interface RouterHandler<TEnv = any> {
|
||||
(ctx: RouterContext<TEnv>): Promise<Response | void> | Response | void
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user