/** * @license * Copyright Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * @fileoverview Utilities for interacting with Trusted Types, create and/or * retrieve the policy for the library. */ import '../environment/dev.js'; import { TrustedTypePolicy, TrustedTypePolicyFactory } from './trusted_types_typings.js'; declare type ExposeTrustedTypes = false; /** * Controls whether to expose Trusted Types to the user through unwrapper * functions. */ export declare type UnwrapType = ExposeTrustedTypes extends true ? T : { toString(): string; }; /** Re-exports the global trustedTypes object for convenience. */ export declare const trustedTypes: TrustedTypePolicyFactory | undefined; /** * Returns the Trusted Types policy used by safevalues, or null if Trusted * Types are not enabled/supported. * * The first call to this function will create the policy, and all subsequent * calls will return the same policy. */ export declare function getPolicy(): TrustedTypePolicy | null; /** Helpers for tests. */ export declare const TEST_ONLY: { setPolicyName(name: string): void; setTrustedTypes(mockTrustedTypes: TrustedTypePolicyFactory | undefined): void; resetDefaults(): void; }; export {};