source: trip-planner-front/node_modules/@angular/compiler/src/output/output_jit_trusted_types.d.ts@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/**
9 * While Angular only uses Trusted Types internally for the time being,
10 * references to Trusted Types could leak into our core.d.ts, which would force
11 * anyone compiling against @angular/core to provide the @types/trusted-types
12 * package in their compilation unit.
13 *
14 * Until https://github.com/microsoft/TypeScript/issues/30024 is resolved, we
15 * will keep Angular's public API surface free of references to Trusted Types.
16 * For internal and semi-private APIs that need to reference Trusted Types, the
17 * minimal type definitions for the Trusted Types API provided by this module
18 * should be used instead. They are marked as "declare" to prevent them from
19 * being renamed by compiler optimization.
20 *
21 * Adapted from
22 * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/trusted-types/index.d.ts
23 * but restricted to the API surface used within Angular.
24 */
25export declare interface TrustedScript {
26 __brand__: 'TrustedScript';
27}
28export declare interface TrustedTypePolicyFactory {
29 createPolicy(policyName: string, policyOptions: {
30 createScript?: (input: string) => string;
31 }): TrustedTypePolicy;
32}
33export declare interface TrustedTypePolicy {
34 createScript(input: string): TrustedScript;
35}
36/**
37 * Unsafely call the Function constructor with the given string arguments.
38 * @security This is a security-sensitive function; any use of this function
39 * must go through security review. In particular, it must be assured that it
40 * is only called from the JIT compiler, as use in other code can lead to XSS
41 * vulnerabilities.
42 */
43export declare function newTrustedFunctionForJIT(...args: string[]): Function;
Note: See TracBrowser for help on using the repository browser.