declare const sanitizedHtmlBrand: unique symbol;
declare const trustedHtmlBrand: unique symbol;
/**
* Branded HTML string produced by bQuery's sanitization or escaping template helpers.
*
* Values returned from {@link sanitizeHtml} carry sanitized markup. Values returned from
* {@link safeHtml} preserve the template's static markup while escaping normal interpolations
* and splicing {@link trusted} fragments verbatim. This brand is not intended for arbitrary
* strings or manual concatenation outside those helpers.
*/
export type SanitizedHtml = string & {
readonly [sanitizedHtmlBrand]: true;
};
/**
* Marker object that safeHtml can splice into templates without escaping again.
*/
export type TrustedHtml = {
readonly [trustedHtmlBrand]: true;
toString(): string;
};
/**
* Apply the internal {@link SanitizedHtml} brand to helper output.
*
* @internal
*/
export declare const toSanitizedHtml: (html: string) => SanitizedHtml;
/**
* Mark a sanitized HTML string for verbatim splicing into safeHtml templates.
*
* @param html - HTML previously produced by sanitizeHtml, safeHtml, or another trusted bQuery helper
* @returns Trusted HTML marker object for safeHtml interpolations
*
* @example
* ```ts
* const badge = trusted(sanitizeHtml('New'));
* const markup = safeHtml`${badge}`;
* ```
*/
export declare const trusted: (html: SanitizedHtml) => TrustedHtml;
/**
* Check whether a value is a trusted HTML marker created by trusted().
*
* @internal
*/
export declare const isTrustedHtml: (value: unknown) => value is TrustedHtml;
/**
* Unwrap the raw HTML string stored inside a trusted HTML marker.
*
* @internal
*/
export declare const unwrapTrustedHtml: (value: TrustedHtml) => string;
export {};
//# sourceMappingURL=trusted-html.d.ts.map