/** * Interface for configuring the fetch module */ export type FetchModuleConfig = { /** * Custom fetch implementation to use instead of the global fetch * Must conform to the WHATWG Fetch API */ fetchImpl?: typeof fetch; }; /** * Creates a complete fetch module implementation for the sandbox * * This module provides an implementation of the WHATWG Fetch API * (https://fetch.spec.whatwg.org/) including fetch, Request, Response, * Headers, and AbortController. * * @param config - Optional configuration object for customizing the fetch implementation * @returns A CageModule that implements the fetch API in the sandbox * * @example * ```typescript * const cage = await FaradayCage.createFromQJSWasmLocation(wasmUrl); * * // Use default (global) fetch * await cage.runCode(code, [fetch()]); * * // Use custom fetch implementation * await cage.runCode(code, [ * fetch({ * fetchImpl: customFetchFunction * }) * ]); * ``` */ declare const _default: (config?: FetchModuleConfig) => import("./_mod_authoring").CageModule; export default _default;