@angular/compiler 14.0.0-next.2 → 14.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.2
2
+ * @license Angular v14.0.0-next.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler",
3
- "version": "14.0.0-next.2",
3
+ "version": "14.0.0-next.3",
4
4
  "description": "Angular - the compiler library",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -130,11 +130,8 @@ export declare class TemplateDefinitionBuilder implements t.Visitor<void>, Local
130
130
  private instructionFn;
131
131
  private processStylingUpdateInstruction;
132
132
  private creationInstruction;
133
- private creationInstructionChain;
134
133
  private updateInstructionWithAdvance;
135
134
  private updateInstruction;
136
- private updateInstructionChain;
137
- private updateInstructionChainWithAdvance;
138
135
  private addAdvanceInstructionIfNecessary;
139
136
  private allocatePureFunctionSlots;
140
137
  private allocateBindingSlots;
@@ -25,6 +25,20 @@ export declare const IMPLICIT_REFERENCE = "$implicit";
25
25
  export declare const NON_BINDABLE_ATTR = "ngNonBindable";
26
26
  /** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */
27
27
  export declare const RESTORED_VIEW_CONTEXT_NAME = "restoredCtx";
28
+ /**
29
+ * Possible types that can be used to generate the parameters of an instruction call.
30
+ * If the parameters are a function, the function will be invoked at the time the instruction
31
+ * is generated.
32
+ */
33
+ export declare type InstructionParams = (o.Expression | o.Expression[]) | (() => (o.Expression | o.Expression[]));
34
+ /** Necessary information to generate a call to an instruction function. */
35
+ export interface Instruction {
36
+ span: ParseSourceSpan | null;
37
+ reference: o.ExternalReference;
38
+ paramsOrFn?: InstructionParams;
39
+ }
40
+ /** Generates a call to a single instruction. */
41
+ export declare function invokeInstruction(span: ParseSourceSpan | null, reference: o.ExternalReference, params: o.Expression[]): o.Expression;
28
42
  /**
29
43
  * Creates an allocator for a temporary variable.
30
44
  *
@@ -67,11 +81,14 @@ export declare class DefinitionMap<T = any> {
67
81
  export declare function getAttrsForDirectiveMatching(elOrTpl: t.Element | t.Template): {
68
82
  [name: string]: string;
69
83
  };
70
- /** Returns a call expression to a chained instruction, e.g. `property(params[0])(params[1])`. */
71
- export declare function chainedInstruction(reference: o.ExternalReference, calls: o.Expression[][], span?: ParseSourceSpan | null): o.Expression;
72
84
  /**
73
85
  * Gets the number of arguments expected to be passed to a generated instruction in the case of
74
86
  * interpolation instructions.
75
87
  * @param interpolation An interpolation ast
76
88
  */
77
89
  export declare function getInterpolationArgsLength(interpolation: Interpolation): number;
90
+ /**
91
+ * Generates the final instruction call statements based on the passed in configuration.
92
+ * Will try to chain instructions as much as possible, if chaining is supported.
93
+ */
94
+ export declare function getInstructionStatements(instructions: Instruction[]): o.Statement[];