Add env and ctx to router.handle()
This commit is contained in:
24
index.d.ts
vendored
24
index.d.ts
vendored
@@ -265,16 +265,32 @@ type RouterRequest = {
|
||||
* HTTP request method
|
||||
*/
|
||||
method: string
|
||||
/**
|
||||
* Object containing request headers
|
||||
*/
|
||||
headers: Headers
|
||||
/**
|
||||
* URL String
|
||||
*/
|
||||
url: string
|
||||
/**
|
||||
* Environment object
|
||||
*/
|
||||
env: any
|
||||
/**
|
||||
* Context object
|
||||
*/
|
||||
ctx: any
|
||||
/**
|
||||
* Cloudflare object
|
||||
*/
|
||||
cf: any
|
||||
/**
|
||||
* Object containing all parameters defined in the url string
|
||||
*/
|
||||
params: {
|
||||
[key: string]: string
|
||||
}
|
||||
/**
|
||||
* Object containing request headers
|
||||
*/
|
||||
headers: Headers
|
||||
/**
|
||||
* Only available if method is `POST`, `PUT` or `PATCH`. Contains either the received body string or a parsed object if valid JSON was sent.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user