@angular/compiler-cli 21.0.0-rc.0 → 21.0.0-rc.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "21.0.0-rc.0",
3
+ "version": "21.0.0-rc.2",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -40,7 +40,7 @@
40
40
  "yargs": "^18.0.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@angular/compiler": "21.0.0-rc.0",
43
+ "@angular/compiler": "21.0.0-rc.2",
44
44
  "typescript": ">=5.9 <6.0"
45
45
  },
46
46
  "peerDependenciesMeta": {
@@ -365,6 +365,8 @@ export declare enum ErrorCode {
365
365
  * prefetch timer delay that is not earlier than the main timer, or an identical prefetch
366
366
  */
367
367
  DEFER_TRIGGER_MISCONFIGURATION = 8021,
368
+ /** Raised when the user has an unsupported binding on a `Field` directive. */
369
+ FORM_FIELD_UNSUPPORTED_BINDING = 8022,
368
370
  /**
369
371
  * A two way binding in a template has an incorrect syntax,
370
372
  * parentheses outside brackets. For example:
@@ -29,7 +29,8 @@ export declare enum EntryType {
29
29
  Pipe = "pipe",
30
30
  TypeAlias = "type_alias",
31
31
  UndecoratedClass = "undecorated_class",
32
- InitializerApiFunction = "initializer_api_function"
32
+ InitializerApiFunction = "initializer_api_function",
33
+ Namespace = "namespace"
33
34
  }
34
35
  /** Types of class members */
35
36
  export declare enum MemberType {
@@ -37,7 +38,9 @@ export declare enum MemberType {
37
38
  Method = "method",
38
39
  Getter = "getter",
39
40
  Setter = "setter",
40
- EnumItem = "enum_item"
41
+ EnumItem = "enum_item",
42
+ Interface = "interface",
43
+ TypeAlias = "type_alias"
41
44
  }
42
45
  export declare enum DecoratorType {
43
46
  Class = "class",
@@ -89,6 +92,7 @@ export interface ConstantEntry extends DocEntry {
89
92
  /** Documentation entity for a type alias. */
90
93
  export interface TypeAliasEntry extends ConstantEntry {
91
94
  generics: GenericEntry[];
95
+ members: MemberEntry[];
92
96
  }
93
97
  /** Documentation entity for a TypeScript class. */
94
98
  export interface ClassEntry extends DocEntry {
@@ -159,6 +163,10 @@ export interface PropertyEntry extends MemberEntry {
159
163
  }
160
164
  /** Sub-entry for a class method. */
161
165
  export type MethodEntry = MemberEntry & FunctionEntry;
166
+ /** Sub-entry for an interface (included via namespace). */
167
+ export type InterfaceMemberEntry = MemberEntry & InterfaceEntry;
168
+ /** Sub-entry for a type alias (included via namespace). */
169
+ export type TypeAliasMemberEntry = MemberEntry & TypeAliasEntry;
162
170
  /** Sub-entry for a single function parameter. */
163
171
  export interface ParameterEntry {
164
172
  name: string;
@@ -176,6 +184,10 @@ export interface FunctionDefinitionEntry {
176
184
  signatures: FunctionSignatureMetadata[];
177
185
  implementation: FunctionSignatureMetadata | null;
178
186
  }
187
+ /** Documentation entity for a TypeScript namespace. */
188
+ export interface NamespaceEntry extends DocEntry {
189
+ members: DocEntry[];
190
+ }
179
191
  /**
180
192
  * Docs entry describing an initializer API function.
181
193
  *
@@ -26,6 +26,13 @@ export declare class DocsExtractor {
26
26
  entries: DocEntry[];
27
27
  symbols: Map<string, string>;
28
28
  };
29
+ /**
30
+ * Extracts a documentation entry for a given set of declarations that are all exported under
31
+ * the same name. This is used to combine entries, e.g. for a type and a namespace that are
32
+ * exported under the same name.
33
+ */
34
+ private extractDeclarations;
35
+ private getTypeMembersFromNamespace;
29
36
  /** Extract the doc entry for a single declaration. */
30
37
  private extractDeclaration;
31
38
  /** Gets the list of exported declarations for doc extraction. */
@@ -0,0 +1,15 @@
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.dev/license
7
+ */
8
+ import ts from 'typescript';
9
+ import { NamespaceEntry } from './entities';
10
+ /**
11
+ * Extracts documentation entry for a TypeScript namespace.
12
+ * @param node The TypeScript AST node for the namespace.
13
+ * @param typeChecker The TypeScript type checker.
14
+ */
15
+ export declare function extractNamespace(node: ts.ModuleDeclaration, typeChecker: ts.TypeChecker): NamespaceEntry;
@@ -16,4 +16,5 @@ export declare function extractTypeAlias(declaration: ts.TypeAliasDeclaration):
16
16
  rawComment: string;
17
17
  description: string;
18
18
  jsdocTags: import("./entities").JsDocTagEntry[];
19
+ members: never[];
19
20
  };
@@ -0,0 +1,16 @@
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.dev/license
7
+ */
8
+ import ts from 'typescript';
9
+ import { DocEntry } from './entities';
10
+ /**
11
+ * Extracts documentation entries from a variable statement. A variable statement can have
12
+ * multiple declarations, so this function extracts a doc entry for each declaration.
13
+ * @param statement The TypeScript AST node for the variable statement.
14
+ * @param typeChecker The TypeScript type checker.
15
+ */
16
+ export declare function extractFromVariableStatement(statement: ts.VariableStatement, typeChecker: ts.TypeChecker): DocEntry[];
@@ -35,7 +35,7 @@ export declare class ExpressionTranslatorVisitor<TFile, TStatement, TExpression>
35
35
  visitTemplateLiteralExpr(ast: o.TemplateLiteralExpr, context: Context): TExpression;
36
36
  visitInstantiateExpr(ast: o.InstantiateExpr, context: Context): TExpression;
37
37
  visitLiteralExpr(ast: o.LiteralExpr, _context: Context): TExpression;
38
- visitRegularExpressionLiteral(ast: o.outputAst.RegularExpressionLiteral, context: any): TExpression;
38
+ visitRegularExpressionLiteral(ast: o.RegularExpressionLiteralExpr, context: any): TExpression;
39
39
  visitLocalizedString(ast: o.LocalizedString, context: Context): TExpression;
40
40
  private createTaggedTemplateExpression;
41
41
  /**
@@ -129,6 +129,10 @@ export interface OutOfBandDiagnosticRecorder {
129
129
  * correctly (e.g. more than one root node).
130
130
  */
131
131
  deferImplicitTriggerInvalidPlaceholder(id: TypeCheckId, trigger: TmplAstHoverDeferredTrigger | TmplAstInteractionDeferredTrigger | TmplAstViewportDeferredTrigger): void;
132
+ /**
133
+ * Reports an unsupported binding on a form `Field` node.
134
+ */
135
+ formFieldUnsupportedBinding(id: TypeCheckId, node: TmplAstBoundAttribute | TmplAstTextAttribute): void;
132
136
  }
133
137
  export declare class OutOfBandDiagnosticRecorderImpl implements OutOfBandDiagnosticRecorder {
134
138
  private resolver;
@@ -163,4 +167,5 @@ export declare class OutOfBandDiagnosticRecorderImpl implements OutOfBandDiagnos
163
167
  unclaimedDirectiveBinding(id: TypeCheckId, directive: TmplAstDirective, node: TmplAstBoundAttribute | TmplAstTextAttribute | TmplAstBoundEvent): void;
164
168
  deferImplicitTriggerMissingPlaceholder(id: TypeCheckId, trigger: TmplAstHoverDeferredTrigger | TmplAstInteractionDeferredTrigger | TmplAstViewportDeferredTrigger): void;
165
169
  deferImplicitTriggerInvalidPlaceholder(id: TypeCheckId, trigger: TmplAstHoverDeferredTrigger | TmplAstInteractionDeferredTrigger | TmplAstViewportDeferredTrigger): void;
170
+ formFieldUnsupportedBinding(id: TypeCheckId, node: TmplAstBoundAttribute | TmplAstTextAttribute): void;
166
171
  }