/** * Parses an absolute preview URL string. Accepts `https:` on any host, and `http:` * only on `localhost` hosts, which is how previews are served in the local dev * environment. Returns `null` on parse errors and for any other scheme/host pair. * * @param uri - Absolute URL string to parse. * @returns A `URL` when the string is a valid preview URL; otherwise `null`. * * @example * ```ts * parsePreviewUrl('https://slug--branch.preview.redocly.app'); * // URL { href: 'https://slug--branch.preview.redocly.app/' } * * parsePreviewUrl('http://slug--branch.preview.localhost'); * // URL { href: 'http://slug--branch.preview.localhost/' } * * parsePreviewUrl('http://slug--branch.preview.redocly.app'); * // null * ``` */ export declare function parsePreviewUrl(uri: string): URL | null; //# sourceMappingURL=parse-preview-url.d.ts.map