1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-30 16:40:57 -05:00
denoland-deno/cli/bench/testdata/npm/hono/dist/request.d.ts
2022-08-19 15:54:54 +05:30

32 lines
901 B
TypeScript

import type { Body } from './utils/body';
import type { Cookie } from './utils/cookie';
declare global {
interface Request<ParamKeyType extends string = string> {
param: {
(key: ParamKeyType): string;
(): Record<ParamKeyType, string>;
};
paramData?: Record<ParamKeyType, string>;
query: {
(key: string): string;
(): Record<string, string>;
};
queries: {
(key: string): string[];
(): Record<string, string[]>;
};
header: {
(name: string): string;
(): Record<string, string>;
};
cookie: {
(name: string): string;
(): Cookie;
};
parsedBody?: Promise<Body>;
parseBody: {
(): Promise<Body>;
};
}
}
export declare function extendRequestPrototype(): void;