Files
bun.sh/types/globals.d.ts
Jarred Sumner 2335780618 rename to bun
Former-commit-id: f982fc85fac3f0120e1851ad4027dd8413216439
2021-08-15 22:17:20 -07:00

24 lines
485 B
TypeScript

// Bun.js v
declare global {
function addEventListener(
name: "fetch",
callback: (event: FetchEvent) => void
): void;
}
declare global {
export interface FetchEvent {
/** HTTP client metadata. This is not implemented yet, do not use. */
readonly client: undefined;
/** HTTP request */
readonly request: InstanceType<Request>;
/** Render the response in the active HTTP request */
respondWith(response: Response): void;
}
}
export {};