source: trip-planner-front/node_modules/@angular/compiler/src/constant_pool.d.ts@ fa375fe

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

initial commit

  • Property mode set to 100644
File size: 1.9 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 */
8import * as o from './output/output_ast';
9export declare const enum DefinitionKind {
10 Injector = 0,
11 Directive = 1,
12 Component = 2,
13 Pipe = 3
14}
15/**
16 * A constant pool allows a code emitter to share constant in an output context.
17 *
18 * The constant pool also supports sharing access to ivy definitions references.
19 */
20export declare class ConstantPool {
21 private readonly isClosureCompilerEnabled;
22 statements: o.Statement[];
23 private literals;
24 private literalFactories;
25 private injectorDefinitions;
26 private directiveDefinitions;
27 private componentDefinitions;
28 private pipeDefinitions;
29 private nextNameIndex;
30 constructor(isClosureCompilerEnabled?: boolean);
31 getConstLiteral(literal: o.Expression, forceShared?: boolean): o.Expression;
32 getDefinition(type: any, kind: DefinitionKind, ctx: OutputContext, forceShared?: boolean): o.Expression;
33 getLiteralFactory(literal: o.LiteralArrayExpr | o.LiteralMapExpr): {
34 literalFactory: o.Expression;
35 literalFactoryArguments: o.Expression[];
36 };
37 private _getLiteralFactory;
38 /**
39 * Produce a unique name.
40 *
41 * The name might be unique among different prefixes if any of the prefixes end in
42 * a digit so the prefix should be a constant string (not based on user input) and
43 * must not end in a digit.
44 */
45 uniqueName(prefix: string): string;
46 private definitionsOf;
47 propertyNameOf(kind: DefinitionKind): string;
48 private freshName;
49 private keyOf;
50}
51export interface OutputContext {
52 genFilePath: string;
53 statements: o.Statement[];
54 constantPool: ConstantPool;
55 importExpr(reference: any, typeParams?: o.Type[] | null, useSummaries?: boolean): o.Expression;
56}
Note: See TracBrowser for help on using the repository browser.