import { ScramjetClient } from "./client/client"; import { ScramjetController } from "./controller"; import { ScramjetFrame } from "./controller/frame"; import { SCRAMJETCLIENT, SCRAMJETFRAME } from "./symbols"; export type ScramjetFlags = { serviceworkers: boolean; syncxhr: boolean; naiiveRewriter: boolean; strictRewrites: boolean; rewriterLogs: boolean; captureErrors: boolean; cleanErrors: boolean; scramitize: boolean; sourcemaps: boolean; }; export interface ScramjetConfig { prefix: string; globals: { wrapfn: string; wrapthisfn: string; trysetfn: string; importfn: string; rewritefn: string; metafn: string; setrealmfn: string; pushsourcemapfn: string; }; files: { wasm: string; all: string; sync: string; }; flags: ScramjetFlags; siteFlags: Record>; codec: { encode: string; decode: string; }; } export interface ScramjetInitConfig extends Omit { flags: Partial; codec: { encode: (url: string) => string; decode: (url: string) => string; }; } declare global { interface Window { COOKIE: string; WASM: string; REAL_WASM: Uint8Array; // the scramjet client belonging to a window [SCRAMJETCLIENT]: ScramjetClient; } interface HTMLDocument { // should be the same as window [SCRAMJETCLIENT]: ScramjetClient; } interface HTMLIFrameElement { // the event target belonging to an