/** * Result of a custom loader. Resolves when the script is "ready" * (flips `isLoaded` to `true`); rejects to populate `error`. */ export type ScriptLoader = (url: string) => Promise; /** * Replace the script-loading mechanism used by `useScriptTag` with a custom * implementation. Primarily intended for test environments — jsdom does not * dispatch `load` events for dynamically inserted `