Update TS definitions (#376)
This commit is contained in:
parent
056fba9e4f
commit
20b2fe7f67
14
docs/index.d.ts
vendored
14
docs/index.d.ts
vendored
@ -191,8 +191,10 @@ export interface HttpRequest {
|
|||||||
getUrl() : string;
|
getUrl() : string;
|
||||||
/** Returns the HTTP method, useful for "any" routes. */
|
/** Returns the HTTP method, useful for "any" routes. */
|
||||||
getMethod() : string;
|
getMethod() : string;
|
||||||
/** Returns the part of URL after ? sign or empty string. */
|
/** Returns the raw querystring (the part of URL after ? sign) or empty string. */
|
||||||
getQuery() : string;
|
getQuery() : string;
|
||||||
|
/** Returns a decoded query parameter value or empty string. */
|
||||||
|
getQuery(key: string) : string;
|
||||||
/** Loops over all headers. */
|
/** Loops over all headers. */
|
||||||
forEach(cb: (key: string, value: string) => void) : void;
|
forEach(cb: (key: string, value: string) => void) : void;
|
||||||
/** Setting yield to true is to say that this route handler did not handle the route, causing the router to continue looking for a matching route handler, or fail. */
|
/** Setting yield to true is to say that this route handler did not handle the route, causing the router to continue looking for a matching route handler, or fail. */
|
||||||
@ -291,6 +293,16 @@ export function SSLApp(options: AppOptions): TemplatedApp;
|
|||||||
/** Closes a uSockets listen socket. */
|
/** Closes a uSockets listen socket. */
|
||||||
export function us_listen_socket_close(listenSocket: us_listen_socket): void;
|
export function us_listen_socket_close(listenSocket: us_listen_socket): void;
|
||||||
|
|
||||||
|
export interface MultipartField {
|
||||||
|
data: ArrayBuffer;
|
||||||
|
name: string;
|
||||||
|
type?: string;
|
||||||
|
filename?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Takes a POSTed body and contentType, and returns an array of parts if the request is a multipart request */
|
||||||
|
export function getParts(body: RecognizedString, contentType: RecognizedString): MultipartField[] | undefined;
|
||||||
|
|
||||||
/** WebSocket compression options */
|
/** WebSocket compression options */
|
||||||
export type CompressOptions = number;
|
export type CompressOptions = number;
|
||||||
/** No compression (always a good idea if you operate using an efficient binary protocol) */
|
/** No compression (always a good idea if you operate using an efficient binary protocol) */
|
||||||
|
Loading…
Reference in New Issue
Block a user