Files
bun.sh/types/globals.d.ts
luke miles 7f33846005 copy: replace Bun with bun (#99)
Most CLI tools have the style convention of referring to themselves in
lowercase. It is, after all, the name that users type in when using
the tool. This PR maintains that convention in bun.

"Drop the uppercase B, it's cleaner"
2022-01-02 03:09:51 -08: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 {};