/// /// import type { Context } from './types'; import type { RedirectStatus, Status } from './types/basic'; /** * Type for everything that can be passed into `Response` constructor */ export type Readable = ConstructorParameters[0]; /** * Send a response */ export declare const text: (d: Readable) => Response; /** * Send JSON response */ export declare const json: (d: object) => Response; /** * Send HTML response */ export declare const html: (d: Readable) => Response; /** * Send a path as response */ export declare const file: (path: string) => Response; /** * Send response options only */ export declare const head: (init: Bun.ResponseInit) => Response; /** * Redirect to a specific location */ export declare const redirect: (Location: string, status: RedirectStatus) => Response; /** * Create a redirect function */ export declare const createLink: (Location: string, status: RedirectStatus) => () => Response; /** * Send status with a response */ export declare const status: (d: Readable, status: Status) => Response; /** * Send the context response */ export declare const ctx: (c: Context) => Response; /** * Plugin to automatically send response based on context data */ export declare const plug: import(".").Plugin;