Skip to main content
Go to Latest
File
export type DarkflareContext = { env: darkflare.Environment req: { body: unknown query: unknown headers: unknown cookies: unknown parameters: unknown geo: { ip: string city?: string region?: string country?: string continent?: string regionCode?: string latitude?: string longitude?: string postalCode?: string timezone?: string datacenter?: string } raw: Request }
res: { code: (code: number) => void cookie: ( name: string, value: string, options?: { expiresAt?: Date maxAge?: number domain?: string path?: string secure?: boolean httpOnly?: boolean sameSite?: 'strict' | 'lax' | 'none' } ) => void header: (name: string, value: string) => void html: (payload: string, code?: number) => void json: (payload: Record<string, unknown>, code?: number) => void text: (payload: string, code?: number) => void redirect: (destination: string, code?: number) => void }
waitUntil: (promise: Promise<unknown>) => void}