/** * @license * Copyright Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** @fileoverview Internal implementations of TrustedResourceUrl. */ import { UnwrapType } from './trusted_types.js'; import { TrustedScriptURL } from './trusted_types_typings.js'; import '../environment/dev.js'; /** * String that is safe to use in all URL contexts in DOM APIs and HTML * documents; even as a reference to resources that may load in the current * origin (e.g. scripts and stylesheets). * * @final */ export declare class TrustedResourceUrl { private readonly privateDoNotAccessOrElseWrappedResourceUrl; private constructor(); toString(): string; } /** * Builds a new `TrustedResourceUrl` from the given string, without enforcing * safety guarantees. It may cause side effects by creating a Trusted Types * policy. This shouldn't be exposed to application developers, and must only be * used as a step towards safe builders or safe constants. */ export declare function createResourceUrlInternal(value: string): TrustedResourceUrl; /** Checks if the given value is a `TrustedResourceUrl` instance */ export declare function isResourceUrl(value: unknown): value is TrustedResourceUrl; /** * Returns the value of the passed `TrustedResourceUrl` object while ensuring it * has the correct type. * Using this function directly is not common. Safe types are not meant to be * unwrapped, but rather passed to other APIs that consume them, like the DOM * wrappers in safevalues/dom. * * Returns a native `TrustedScriptURL` instance typed as {toString(): string} or a string if Trusted Types are disabled. */ export declare function unwrapResourceUrl(value: TrustedResourceUrl): UnwrapType | string;