@angular/compiler-cli 21.0.0-next.0 → 21.0.0-next.10
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/bundles/{chunk-5Y5LZ46S.js → chunk-3CWKYDQ7.js} +16979 -16238
- package/bundles/{chunk-BPDNYZBC.js → chunk-DT6FD4OE.js} +3 -17
- package/bundles/{chunk-L4DVGWMZ.js → chunk-HSIRUBJU.js} +1 -1
- package/bundles/{chunk-I2BHWRAU.js → chunk-LS5RJ5CS.js} +3 -0
- package/bundles/chunk-ZOLVJRLX.js +644 -0
- package/bundles/{chunk-UGSARQ4S.js → chunk-ZOZ6XVF3.js} +436 -839
- package/bundles/index.js +19 -19
- package/bundles/linker/babel/index.js +5 -2
- package/bundles/linker/index.js +2 -2
- package/bundles/private/migrations.js +50 -6
- package/bundles/private/testing.js +526 -0
- package/bundles/private/tooling.js +2 -3
- package/bundles/src/bin/ng_xi18n.js +5 -5
- package/bundles/src/bin/ngc.js +5 -5
- package/index.d.ts +1 -1
- package/linker/babel/src/ast/babel_ast_factory.d.ts +1 -0
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +7 -15
- package/private/migrations.d.ts +11 -5
- package/private/testing.d.ts +11 -0
- package/src/ngtsc/annotations/common/src/metadata.d.ts +5 -3
- package/src/ngtsc/annotations/component/src/handler.d.ts +1 -0
- package/src/ngtsc/annotations/component/src/metadata.d.ts +5 -4
- package/src/ngtsc/annotations/component/src/resources.d.ts +1 -2
- package/src/ngtsc/annotations/directive/src/handler.d.ts +1 -0
- package/src/ngtsc/annotations/directive/src/shared.d.ts +6 -1
- package/src/ngtsc/annotations/index.d.ts +3 -2
- package/src/ngtsc/core/index.d.ts +1 -0
- package/src/ngtsc/diagnostics/src/error_code.d.ts +26 -0
- package/src/ngtsc/diagnostics/src/error_details_base_url.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +2 -1
- package/src/ngtsc/docs/src/class_extractor.d.ts +4 -5
- package/src/ngtsc/docs/src/entities.d.ts +7 -2
- package/src/ngtsc/docs/src/interface_extractor.d.ts +11 -0
- package/src/ngtsc/docs/src/properties_extractor.d.ts +96 -0
- package/src/ngtsc/file_system/testing/index.d.ts +12 -0
- package/src/ngtsc/file_system/testing/src/mock_file_system.d.ts +71 -0
- package/src/ngtsc/file_system/testing/src/mock_file_system_native.d.ts +15 -0
- package/src/ngtsc/file_system/testing/src/mock_file_system_posix.d.ts +12 -0
- package/src/ngtsc/file_system/testing/src/mock_file_system_windows.d.ts +12 -0
- package/src/ngtsc/file_system/testing/src/test_helper.d.ts +16 -0
- package/src/ngtsc/translator/src/api/ast_factory.d.ts +7 -0
- package/src/ngtsc/translator/src/translator.d.ts +1 -0
- package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +1 -0
- package/src/ngtsc/typecheck/api/checker.d.ts +4 -0
- package/src/ngtsc/typecheck/extended/api/api.d.ts +0 -10
- package/src/ngtsc/typecheck/extended/checks/defer_trigger_misconfiguration/index.d.ts +10 -0
- package/src/ngtsc/typecheck/src/checker.d.ts +1 -0
- package/src/ngtsc/validation/src/rules/forbidden_required_initializer_invocation_rule.d.ts +22 -0
- package/src/ngtsc/xi18n/src/context.d.ts +1 -2
- package/bundles/chunk-N3VWF7MH.js +0 -548
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import { R3ClassMetadata } from '@angular/compiler';
|
|
8
|
+
import { LiteralArrayExpr, R3ClassMetadata } from '@angular/compiler';
|
|
9
9
|
import ts from 'typescript';
|
|
10
|
-
import { DeclarationNode, Decorator, ReflectionHost } from '../../../reflection';
|
|
10
|
+
import { ClassMember, DeclarationNode, Decorator, ReflectionHost } from '../../../reflection';
|
|
11
|
+
/** Function that extracts metadata from an undercorated class member. */
|
|
12
|
+
export type UndecoratedMetadataExtractor = (member: ClassMember) => LiteralArrayExpr | null;
|
|
11
13
|
/**
|
|
12
14
|
* Given a class declaration, generate a call to `setClassMetadata` with the Angular metadata
|
|
13
15
|
* present on the class or its member fields. An ngDevMode guard is used to allow the call to be
|
|
@@ -16,7 +18,7 @@ import { DeclarationNode, Decorator, ReflectionHost } from '../../../reflection'
|
|
|
16
18
|
* If no such metadata is present, this function returns `null`. Otherwise, the call is returned
|
|
17
19
|
* as a `Statement` for inclusion along with the class.
|
|
18
20
|
*/
|
|
19
|
-
export declare function extractClassMetadata(clazz: DeclarationNode, reflection: ReflectionHost, isCore: boolean, annotateForClosureCompiler?: boolean, angularDecoratorTransform?: (dec: Decorator) => Decorator): R3ClassMetadata | null;
|
|
21
|
+
export declare function extractClassMetadata(clazz: DeclarationNode, reflection: ReflectionHost, isCore: boolean, annotateForClosureCompiler?: boolean, angularDecoratorTransform?: (dec: Decorator) => Decorator, undecoratedMetadataExtractor?: UndecoratedMetadataExtractor): R3ClassMetadata | null;
|
|
20
22
|
/**
|
|
21
23
|
* Recursively recreates all of the `Identifier` descendant nodes with a particular name inside
|
|
22
24
|
* of an AST node, thus removing any references to them. Useful if a particular node has to be
|
|
@@ -79,6 +79,7 @@ export declare class ComponentDecoratorHandler implements DecoratorHandler<Decor
|
|
|
79
79
|
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, metaReader: MetadataReader, scopeReader: ComponentScopeReader, compilerHost: Pick<ts.CompilerHost, 'getCanonicalFileName'>, scopeRegistry: LocalModuleScopeRegistry, typeCheckScopeRegistry: TypeCheckScopeRegistry, resourceRegistry: ResourceRegistry, isCore: boolean, strictCtorDeps: boolean, resourceLoader: ResourceLoader, rootDirs: ReadonlyArray<string>, defaultPreserveWhitespaces: boolean, i18nUseExternalIds: boolean, enableI18nLegacyMessageIdFormat: boolean, usePoisonedData: boolean, i18nNormalizeLineEndingsInICUs: boolean, moduleResolver: ModuleResolver, cycleAnalyzer: CycleAnalyzer, cycleHandlingStrategy: CycleHandlingStrategy, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, depTracker: DependencyTracker | null, injectableRegistry: InjectableClassRegistry, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder, hostDirectivesResolver: HostDirectivesResolver, importTracker: ImportedSymbolsTracker, includeClassMetadata: boolean, compilationMode: CompilationMode, deferredSymbolTracker: DeferredSymbolTracker, forbidOrphanRendering: boolean, enableBlockSyntax: boolean, enableLetSyntax: boolean, externalRuntimeStyles: boolean, localCompilationExtraImportsTracker: LocalCompilationExtraImportsTracker | null, jitDeclarationRegistry: JitDeclarationRegistry, i18nPreserveSignificantWhitespace: boolean, strictStandalone: boolean, enableHmr: boolean, implicitStandaloneValue: boolean, typeCheckHostBindings: boolean, enableSelectorless: boolean, emitDeclarationOnly: boolean);
|
|
80
80
|
private literalCache;
|
|
81
81
|
private elementSchemaRegistry;
|
|
82
|
+
private readonly undecoratedMetadataExtractor;
|
|
82
83
|
/**
|
|
83
84
|
* During the asynchronous preanalyze phase, it's necessary to parse the template to extract
|
|
84
85
|
* any potential <link> tags which might need to be loaded. This cache ensures that work is not
|
|
@@ -9,7 +9,7 @@ import { LegacyAnimationTriggerNames, DeclarationListEmitMode, DeferBlockDepsEmi
|
|
|
9
9
|
import ts from 'typescript';
|
|
10
10
|
import { Reference } from '../../../imports';
|
|
11
11
|
import { ClassPropertyMapping, DirectiveResources, DirectiveTypeCheckMeta, HostDirectiveMeta, InputMapping } from '../../../metadata';
|
|
12
|
-
import { ClassDeclaration } from '../../../reflection';
|
|
12
|
+
import { ClassDeclaration, Import } from '../../../reflection';
|
|
13
13
|
import { SubsetOfKeys } from '../../../util/src/typescript';
|
|
14
14
|
import { ParsedTemplateWithSource, StyleUrlMeta } from './resources';
|
|
15
15
|
import { HostBindingNodes } from '../../directive';
|
|
@@ -84,10 +84,11 @@ export interface ComponentResolutionData {
|
|
|
84
84
|
declarationListEmitMode: DeclarationListEmitMode;
|
|
85
85
|
/**
|
|
86
86
|
* Map of all types that can be defer loaded (ts.ClassDeclaration) ->
|
|
87
|
-
* corresponding import
|
|
88
|
-
* the current source file.
|
|
87
|
+
* corresponding import information (reflection `Import`) within
|
|
88
|
+
* the current source file. The `Import` preserves the exported name
|
|
89
|
+
* as seen by the importing module so aliasing is handled correctly.
|
|
89
90
|
*/
|
|
90
|
-
deferrableDeclToImportDecl: Map<ClassDeclaration,
|
|
91
|
+
deferrableDeclToImportDecl: Map<ClassDeclaration, Import>;
|
|
91
92
|
/**
|
|
92
93
|
* Map of `@defer` blocks -> their corresponding dependencies.
|
|
93
94
|
* Required to compile the defer resolver function in `PerBlock` mode.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { ParsedTemplate, ParseSourceFile, TmplAstNode } from '@angular/compiler';
|
|
9
9
|
import ts from 'typescript';
|
|
10
10
|
import { FatalDiagnosticError } from '../../../diagnostics';
|
|
11
11
|
import { DependencyTracker } from '../../../incremental/api';
|
|
@@ -66,7 +66,6 @@ export interface ParsedTemplateWithSource extends ParsedComponentTemplate {
|
|
|
66
66
|
*/
|
|
67
67
|
interface CommonTemplateDeclaration {
|
|
68
68
|
preserveWhitespaces: boolean;
|
|
69
|
-
interpolationConfig: InterpolationConfig;
|
|
70
69
|
templateUrl: string;
|
|
71
70
|
resolvedTemplateUrl: string;
|
|
72
71
|
}
|
|
@@ -65,6 +65,7 @@ export declare class DirectiveDecoratorHandler implements DecoratorHandler<Decor
|
|
|
65
65
|
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, metaReader: MetadataReader, injectableRegistry: InjectableClassRegistry, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, isCore: boolean, strictCtorDeps: boolean, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder, importTracker: ImportedSymbolsTracker, includeClassMetadata: boolean, typeCheckScopeRegistry: TypeCheckScopeRegistry, compilationMode: CompilationMode, jitDeclarationRegistry: JitDeclarationRegistry, resourceRegistry: ResourceRegistry, strictStandalone: boolean, implicitStandaloneValue: boolean, usePoisonedData: boolean, typeCheckHostBindings: boolean, emitDeclarationOnly: boolean);
|
|
66
66
|
readonly precedence = HandlerPrecedence.PRIMARY;
|
|
67
67
|
readonly name = "DirectiveDecoratorHandler";
|
|
68
|
+
private readonly undecoratedMetadataExtractor;
|
|
68
69
|
detect(node: ClassDeclaration, decorators: Decorator[] | null): DetectResult<Decorator | null> | undefined;
|
|
69
70
|
analyze(node: ClassDeclaration, decorator: Readonly<Decorator | null>): AnalysisOutput<DirectiveHandlerData>;
|
|
70
71
|
symbol(node: ClassDeclaration, analysis: Readonly<DirectiveHandlerData>): DirectiveSymbol;
|
|
@@ -12,7 +12,7 @@ import { ClassPropertyMapping, DecoratorInputTransform, HostDirectiveMeta, Input
|
|
|
12
12
|
import { DynamicValue, PartialEvaluator } from '../../../partial_evaluator';
|
|
13
13
|
import { ClassDeclaration, Decorator, ReflectionHost } from '../../../reflection';
|
|
14
14
|
import { CompilationMode } from '../../../transform';
|
|
15
|
-
import { ReferencesRegistry } from '../../common';
|
|
15
|
+
import { ReferencesRegistry, UndecoratedMetadataExtractor } from '../../common';
|
|
16
16
|
type QueryDecoratorName = 'ViewChild' | 'ViewChildren' | 'ContentChild' | 'ContentChildren';
|
|
17
17
|
export declare const queryDecoratorNames: QueryDecoratorName[];
|
|
18
18
|
export interface HostBindingNodes {
|
|
@@ -43,6 +43,11 @@ export declare function extractDirectiveMetadata(clazz: ClassDeclaration, decora
|
|
|
43
43
|
export declare function extractDecoratorQueryMetadata(exprNode: ts.Node, name: string, args: ReadonlyArray<ts.Expression>, propertyName: string, reflector: ReflectionHost, evaluator: PartialEvaluator): R3QueryMetadata;
|
|
44
44
|
export declare function parseDirectiveStyles(directive: Map<string, ts.Expression>, evaluator: PartialEvaluator, compilationMode: CompilationMode): null | string[];
|
|
45
45
|
export declare function parseFieldStringArrayValue(directive: Map<string, ts.Expression>, field: string, evaluator: PartialEvaluator): null | string[];
|
|
46
|
+
/**
|
|
47
|
+
* Returns a function that can be used to extract data for the `setClassMetadata`
|
|
48
|
+
* calls from undecorated directive class members.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getDirectiveUndecoratedMetadataExtractor(reflector: ReflectionHost, importTracker: ImportedSymbolsTracker): UndecoratedMetadataExtractor;
|
|
46
51
|
/**
|
|
47
52
|
* Parses the `transform` function and its type for a decorator `@Input`.
|
|
48
53
|
*
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
export { createForwardRefResolver, findAngularDecorator, getAngularDecorators, isAngularDecorator, NoopReferencesRegistry, ReferencesRegistry, ResourceLoader, ResourceLoaderContext, JitDeclarationRegistry, } from './common';
|
|
8
|
+
export { createForwardRefResolver, findAngularDecorator, getAngularDecorators, isAngularDecorator, NoopReferencesRegistry, ReferencesRegistry, ResourceLoader, ResourceLoaderContext, JitDeclarationRegistry, unwrapExpression, } from './common';
|
|
9
9
|
export { ComponentDecoratorHandler } from './component';
|
|
10
|
-
export {
|
|
10
|
+
export { extractTemplate, ExternalTemplateDeclaration, InlineTemplateDeclaration, } from './component/src/resources';
|
|
11
|
+
export { DirectiveDecoratorHandler, InitializerApiFunction, INPUT_INITIALIZER_FN, MODEL_INITIALIZER_FN, OUTPUT_INITIALIZER_FNS, QUERY_INITIALIZER_FNS, queryDecoratorNames, QueryFunctionName, tryParseInitializerApi, tryParseInitializerBasedOutput, tryParseSignalInputMapping, tryParseSignalModelMapping, tryParseSignalQueryFromInitializer, extractDecoratorQueryMetadata, parseDecoratorInputTransformFunction, } from './directive';
|
|
11
12
|
export { NgModuleDecoratorHandler } from './ng_module';
|
|
12
13
|
export { InjectableDecoratorHandler } from './src/injectable';
|
|
13
14
|
export { PipeDecoratorHandler } from './src/pipe';
|
|
@@ -145,6 +145,11 @@ export declare enum ErrorCode {
|
|
|
145
145
|
* Raised for `@Component` fields that aren't supported in a selectorless context.
|
|
146
146
|
*/
|
|
147
147
|
UNSUPPORTED_SELECTORLESS_COMPONENT_FIELD = 2026,
|
|
148
|
+
/**
|
|
149
|
+
* A component is using both the `animations` property and `animate.enter` or `animate.leave`
|
|
150
|
+
* in the template.
|
|
151
|
+
*/
|
|
152
|
+
COMPONENT_ANIMATIONS_CONFLICT = 2027,
|
|
148
153
|
SYMBOL_NOT_EXPORTED = 3001,
|
|
149
154
|
/**
|
|
150
155
|
* Raised when a relationship between directives and/or pipes would cause a cyclic import to be
|
|
@@ -354,6 +359,12 @@ export declare enum ErrorCode {
|
|
|
354
359
|
* ```
|
|
355
360
|
*/
|
|
356
361
|
DEFER_IMPLICIT_TRIGGER_INVALID_PLACEHOLDER = 8020,
|
|
362
|
+
/**
|
|
363
|
+
* Raised when an `@defer` block defines unreachable or redundant triggers.
|
|
364
|
+
* Examples: multiple main triggers, 'on immediate' together with other mains or any prefetch,
|
|
365
|
+
* prefetch timer delay that is not earlier than the main timer, or an identical prefetch
|
|
366
|
+
*/
|
|
367
|
+
DEFER_TRIGGER_MISCONFIGURATION = 8021,
|
|
357
368
|
/**
|
|
358
369
|
* A two way binding in a template has an incorrect syntax,
|
|
359
370
|
* parentheses outside brackets. For example:
|
|
@@ -526,6 +537,21 @@ export declare enum ErrorCode {
|
|
|
526
537
|
* ```
|
|
527
538
|
*/
|
|
528
539
|
UNINVOKED_FUNCTION_IN_TEXT_INTERPOLATION = 8117,
|
|
540
|
+
/**
|
|
541
|
+
* A required initializer is being invoked in a forbidden context such as a property initializer
|
|
542
|
+
* or a constructor.
|
|
543
|
+
*
|
|
544
|
+
* For example:
|
|
545
|
+
* ```ts
|
|
546
|
+
* class MyComponent {
|
|
547
|
+
* myInput = input.required();
|
|
548
|
+
* somValue = this.myInput(); // Error
|
|
549
|
+
*
|
|
550
|
+
* constructor() {
|
|
551
|
+
* this.myInput(); // Error
|
|
552
|
+
* }
|
|
553
|
+
*/
|
|
554
|
+
FORBIDDEN_REQUIRED_INITIALIZER_INVOCATION = 8118,
|
|
529
555
|
/**
|
|
530
556
|
* The template type-checking engine would need to generate an inline type check block for a
|
|
531
557
|
* component, but the current type-checking environment doesn't support it.
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts
|
|
13
13
|
* - packages/core/src/error_details_base_url.ts
|
|
14
14
|
*/
|
|
15
|
-
export declare const ERROR_DETAILS_PAGE_BASE_URL
|
|
15
|
+
export declare const ERROR_DETAILS_PAGE_BASE_URL: string;
|
|
@@ -31,5 +31,6 @@ export declare enum ExtendedTemplateDiagnosticName {
|
|
|
31
31
|
UNINVOKED_TRACK_FUNCTION = "uninvokedTrackFunction",
|
|
32
32
|
UNUSED_STANDALONE_IMPORTS = "unusedStandaloneImports",
|
|
33
33
|
UNPARENTHESIZED_NULLISH_COALESCING = "unparenthesizedNullishCoalescing",
|
|
34
|
-
UNINVOKED_FUNCTION_IN_TEXT_INTERPOLATION = "uninvokedFunctionInTextInterpolation"
|
|
34
|
+
UNINVOKED_FUNCTION_IN_TEXT_INTERPOLATION = "uninvokedFunctionInTextInterpolation",
|
|
35
|
+
DEFER_TRIGGER_MISCONFIGURATION = "deferTriggerMisconfiguration"
|
|
35
36
|
}
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import ts from 'typescript';
|
|
9
9
|
import { MetadataReader } from '../../metadata';
|
|
10
|
-
import {
|
|
11
|
-
import { ClassEntry, InterfaceEntry } from './entities';
|
|
10
|
+
import { ClassEntry } from './entities';
|
|
12
11
|
/** Extracts documentation info for a class, potentially including Angular-specific info. */
|
|
13
|
-
export declare function extractClass(classDeclaration:
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
export declare function extractClass(classDeclaration: {
|
|
13
|
+
name: ts.Identifier;
|
|
14
|
+
} & ts.ClassDeclaration, metadataReader: MetadataReader, typeChecker: ts.TypeChecker): ClassEntry;
|
|
@@ -94,12 +94,17 @@ export interface TypeAliasEntry extends ConstantEntry {
|
|
|
94
94
|
export interface ClassEntry extends DocEntry {
|
|
95
95
|
isAbstract: boolean;
|
|
96
96
|
members: MemberEntry[];
|
|
97
|
-
extends?: string;
|
|
98
97
|
generics: GenericEntry[];
|
|
98
|
+
extends?: string;
|
|
99
99
|
implements: string[];
|
|
100
100
|
}
|
|
101
101
|
/** Documentation entity for a TypeScript interface. */
|
|
102
|
-
export
|
|
102
|
+
export interface InterfaceEntry extends DocEntry {
|
|
103
|
+
members: MemberEntry[];
|
|
104
|
+
generics: GenericEntry[];
|
|
105
|
+
extends: string[];
|
|
106
|
+
implements: string[];
|
|
107
|
+
}
|
|
103
108
|
/** Documentation entity for a TypeScript enum. */
|
|
104
109
|
export interface EnumEntry extends DocEntry {
|
|
105
110
|
members: EnumMemberEntry[];
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { InterfaceEntry } from './entities';
|
|
10
|
+
/** Extracts documentation info for an interface. */
|
|
11
|
+
export declare function extractInterface(declaration: ts.InterfaceDeclaration, typeChecker: ts.TypeChecker): InterfaceEntry;
|
|
@@ -0,0 +1,96 @@
|
|
|
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 { ClassDeclaration } from '../../reflection';
|
|
10
|
+
import { MemberEntry, MemberTags, MethodEntry, PropertyEntry } from './entities';
|
|
11
|
+
/** A class member declaration that is *like* a property (including accessors) */
|
|
12
|
+
type PropertyDeclarationLike = ts.PropertyDeclaration | ts.AccessorDeclaration;
|
|
13
|
+
/** Type representing either a class declaration ro an interface declaration. */
|
|
14
|
+
export type ClassDeclarationLike = ts.ClassDeclaration | ts.InterfaceDeclaration;
|
|
15
|
+
/** Type representing either a class or interface member. */
|
|
16
|
+
type MemberElement = ts.ClassElement | ts.TypeElement;
|
|
17
|
+
/** Type representing a signature element of an interface. */
|
|
18
|
+
type SignatureElement = ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration;
|
|
19
|
+
/**
|
|
20
|
+
* Type representing either:
|
|
21
|
+
*/
|
|
22
|
+
type MethodLike = ts.MethodDeclaration | ts.MethodSignature;
|
|
23
|
+
/**
|
|
24
|
+
* Type representing either a class property declaration or an interface property signature.
|
|
25
|
+
*/
|
|
26
|
+
type PropertyLike = PropertyDeclarationLike | ts.PropertySignature;
|
|
27
|
+
/** Extractor to pull info for API reference documentation for a TypeScript class or interface. */
|
|
28
|
+
export declare abstract class PropertiesExtractor {
|
|
29
|
+
protected declaration: {
|
|
30
|
+
name: ts.Identifier;
|
|
31
|
+
} & ClassDeclarationLike;
|
|
32
|
+
protected typeChecker: ts.TypeChecker;
|
|
33
|
+
constructor(declaration: {
|
|
34
|
+
name: ts.Identifier;
|
|
35
|
+
} & ClassDeclarationLike, typeChecker: ts.TypeChecker);
|
|
36
|
+
/** Extract docs info specific to classes. */
|
|
37
|
+
extract(): {
|
|
38
|
+
members: MemberEntry[];
|
|
39
|
+
generics: import("./entities").GenericEntry[];
|
|
40
|
+
};
|
|
41
|
+
/** Extracts doc info for a class's members. */
|
|
42
|
+
protected extractAllClassMembers(): MemberEntry[];
|
|
43
|
+
/** Extract docs for a class's members (methods and properties). */
|
|
44
|
+
protected extractClassMember(memberDeclaration: MemberElement): MemberEntry | undefined;
|
|
45
|
+
/** Extract docs for all call signatures in the current class/interface. */
|
|
46
|
+
protected extractSignatures(): MemberEntry[];
|
|
47
|
+
/** Extracts docs for a class method. */
|
|
48
|
+
protected extractMethod(methodDeclaration: MethodLike): MethodEntry;
|
|
49
|
+
/** Extracts docs for a signature element (usually inside an interface). */
|
|
50
|
+
protected extractSignature(signature: SignatureElement): MethodEntry;
|
|
51
|
+
/** Extracts doc info for a property declaration. */
|
|
52
|
+
protected extractClassProperty(propertyDeclaration: PropertyLike): PropertyEntry;
|
|
53
|
+
/** Extracts doc info for an accessor member (getter/setter). */
|
|
54
|
+
protected extractGetterSetter(accessor: ts.AccessorDeclaration): PropertyEntry;
|
|
55
|
+
protected extractConstructor(constructorDeclaration: ts.ConstructorDeclaration): MethodEntry;
|
|
56
|
+
protected extractInterfaceConformance(declaration: ClassDeclaration & ClassDeclarationLike): string[];
|
|
57
|
+
/** Gets the tags for a member (protected, readonly, static, etc.) */
|
|
58
|
+
protected getMemberTags(member: MethodLike | PropertyLike | ts.ConstructorDeclaration): MemberTags[];
|
|
59
|
+
/** Computes all signature declarations of the class/interface. */
|
|
60
|
+
private computeAllSignatureDeclarations;
|
|
61
|
+
/** Gets all member declarations, including inherited members. */
|
|
62
|
+
private getMemberDeclarations;
|
|
63
|
+
/** The result only contains properties, method implementations and abstracts */
|
|
64
|
+
private filterMethodOverloads;
|
|
65
|
+
/** Get the tags for a member that come from the declaration modifiers. */
|
|
66
|
+
private getMemberTagsFromModifiers;
|
|
67
|
+
/** Gets the doc tag corresponding to a class member modifier (readonly, protected, etc.). */
|
|
68
|
+
private getTagForMemberModifier;
|
|
69
|
+
/**
|
|
70
|
+
* Gets whether a given class member should be excluded from public API docs.
|
|
71
|
+
* This is the case if:
|
|
72
|
+
* - The member does not have a name
|
|
73
|
+
* - The member is neither a method nor property
|
|
74
|
+
* - The member is private
|
|
75
|
+
* - The member has a name that marks it as Angular-internal.
|
|
76
|
+
* - The member is marked as internal via JSDoc.
|
|
77
|
+
*/
|
|
78
|
+
private isMemberExcluded;
|
|
79
|
+
/** Gets whether a class member is a method, property, or accessor. */
|
|
80
|
+
private isDocumentableMember;
|
|
81
|
+
/** Check if the parameter is a constructor parameter with a public modifier */
|
|
82
|
+
private isPublicConstructorParameterProperty;
|
|
83
|
+
/** Gets whether a member is a property. */
|
|
84
|
+
private isProperty;
|
|
85
|
+
/** Gets whether a member is a method. */
|
|
86
|
+
private isMethod;
|
|
87
|
+
/** Gets whether the given signature declaration is documentable. */
|
|
88
|
+
private isDocumentableSignature;
|
|
89
|
+
/**
|
|
90
|
+
* Check wether a member has a private computed property name like [ɵWRITABLE_SIGNAL]
|
|
91
|
+
*
|
|
92
|
+
* This will prevent exposing private computed properties in the docs.
|
|
93
|
+
*/
|
|
94
|
+
private hasPrivateComputedProperty;
|
|
95
|
+
}
|
|
96
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
export { Folder, MockFileSystem } from './src/mock_file_system';
|
|
9
|
+
export { MockFileSystemNative } from './src/mock_file_system_native';
|
|
10
|
+
export { MockFileSystemPosix } from './src/mock_file_system_posix';
|
|
11
|
+
export { MockFileSystemWindows } from './src/mock_file_system_windows';
|
|
12
|
+
export { initMockFileSystem, runInEachFileSystem, TestFile } from './src/test_helper';
|
|
@@ -0,0 +1,71 @@
|
|
|
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 { AbsoluteFsPath, FileStats, FileSystem, PathSegment, PathString } from '../../src/types';
|
|
9
|
+
/**
|
|
10
|
+
* An in-memory file system that can be used in unit tests.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class MockFileSystem implements FileSystem {
|
|
13
|
+
private _isCaseSensitive;
|
|
14
|
+
private _fileTree;
|
|
15
|
+
private _cwd;
|
|
16
|
+
constructor(_isCaseSensitive?: boolean, cwd?: AbsoluteFsPath);
|
|
17
|
+
isCaseSensitive(): boolean;
|
|
18
|
+
exists(path: AbsoluteFsPath): boolean;
|
|
19
|
+
readFile(path: AbsoluteFsPath): string;
|
|
20
|
+
readFileBuffer(path: AbsoluteFsPath): Uint8Array;
|
|
21
|
+
writeFile(path: AbsoluteFsPath, data: string | Uint8Array, exclusive?: boolean): void;
|
|
22
|
+
removeFile(path: AbsoluteFsPath): void;
|
|
23
|
+
symlink(target: AbsoluteFsPath, path: AbsoluteFsPath): void;
|
|
24
|
+
readdir(path: AbsoluteFsPath): PathSegment[];
|
|
25
|
+
lstat(path: AbsoluteFsPath): FileStats;
|
|
26
|
+
stat(path: AbsoluteFsPath): FileStats;
|
|
27
|
+
copyFile(from: AbsoluteFsPath, to: AbsoluteFsPath): void;
|
|
28
|
+
moveFile(from: AbsoluteFsPath, to: AbsoluteFsPath): void;
|
|
29
|
+
ensureDir(path: AbsoluteFsPath): Folder;
|
|
30
|
+
removeDeep(path: AbsoluteFsPath): void;
|
|
31
|
+
isRoot(path: AbsoluteFsPath): boolean;
|
|
32
|
+
extname(path: AbsoluteFsPath | PathSegment): string;
|
|
33
|
+
realpath(filePath: AbsoluteFsPath): AbsoluteFsPath;
|
|
34
|
+
pwd(): AbsoluteFsPath;
|
|
35
|
+
chdir(path: AbsoluteFsPath): void;
|
|
36
|
+
getDefaultLibLocation(): AbsoluteFsPath;
|
|
37
|
+
abstract resolve(...paths: string[]): AbsoluteFsPath;
|
|
38
|
+
abstract dirname<T extends string>(file: T): T;
|
|
39
|
+
abstract join<T extends string>(basePath: T, ...paths: string[]): T;
|
|
40
|
+
abstract relative<T extends PathString>(from: T, to: T): PathSegment | AbsoluteFsPath;
|
|
41
|
+
abstract basename(filePath: string, extension?: string): PathSegment;
|
|
42
|
+
abstract isRooted(path: string): boolean;
|
|
43
|
+
abstract normalize<T extends PathString>(path: T): T;
|
|
44
|
+
protected abstract splitPath<T extends PathString>(path: T): string[];
|
|
45
|
+
dump(): Folder;
|
|
46
|
+
init(folder: Folder): void;
|
|
47
|
+
mount(path: AbsoluteFsPath, folder: Folder): void;
|
|
48
|
+
private cloneFolder;
|
|
49
|
+
private copyInto;
|
|
50
|
+
protected findFromPath(path: AbsoluteFsPath, options?: {
|
|
51
|
+
followSymLinks: boolean;
|
|
52
|
+
}): FindResult;
|
|
53
|
+
protected splitIntoFolderAndFile(path: AbsoluteFsPath): [AbsoluteFsPath, string];
|
|
54
|
+
protected getCanonicalPath<T extends string>(p: T): T;
|
|
55
|
+
}
|
|
56
|
+
export interface FindResult {
|
|
57
|
+
path: AbsoluteFsPath;
|
|
58
|
+
entity: Entity | null;
|
|
59
|
+
}
|
|
60
|
+
export type Entity = Folder | File | SymLink;
|
|
61
|
+
export interface Folder {
|
|
62
|
+
[pathSegments: string]: Entity;
|
|
63
|
+
}
|
|
64
|
+
export type File = string | Uint8Array;
|
|
65
|
+
export declare class SymLink {
|
|
66
|
+
path: AbsoluteFsPath;
|
|
67
|
+
constructor(path: AbsoluteFsPath);
|
|
68
|
+
}
|
|
69
|
+
export declare function isFile(item: Entity | null): item is File;
|
|
70
|
+
export declare function isSymLink(item: Entity | null): item is SymLink;
|
|
71
|
+
export declare function isFolder(item: Entity | null): item is Folder;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbsoluteFsPath, PathSegment, PathString } from '../../src/types';
|
|
2
|
+
import { MockFileSystem } from './mock_file_system';
|
|
3
|
+
export declare class MockFileSystemNative extends MockFileSystem {
|
|
4
|
+
constructor(cwd?: AbsoluteFsPath);
|
|
5
|
+
resolve(...paths: string[]): AbsoluteFsPath;
|
|
6
|
+
dirname<T extends string>(file: T): T;
|
|
7
|
+
join<T extends string>(basePath: T, ...paths: string[]): T;
|
|
8
|
+
relative<T extends PathString>(from: T, to: T): PathSegment | AbsoluteFsPath;
|
|
9
|
+
basename(filePath: string, extension?: string): PathSegment;
|
|
10
|
+
isCaseSensitive(): boolean;
|
|
11
|
+
isRooted(path: string): boolean;
|
|
12
|
+
isRoot(path: AbsoluteFsPath): boolean;
|
|
13
|
+
normalize<T extends PathString>(path: T): T;
|
|
14
|
+
protected splitPath<T>(path: string): string[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbsoluteFsPath, PathSegment, PathString } from '../../src/types';
|
|
2
|
+
import { MockFileSystem } from './mock_file_system';
|
|
3
|
+
export declare class MockFileSystemPosix extends MockFileSystem {
|
|
4
|
+
resolve(...paths: string[]): AbsoluteFsPath;
|
|
5
|
+
dirname<T extends string>(file: T): T;
|
|
6
|
+
join<T extends string>(basePath: T, ...paths: string[]): T;
|
|
7
|
+
relative<T extends PathString>(from: T, to: T): PathSegment | AbsoluteFsPath;
|
|
8
|
+
basename(filePath: string, extension?: string): PathSegment;
|
|
9
|
+
isRooted(path: string): boolean;
|
|
10
|
+
protected splitPath<T extends PathString>(path: T): string[];
|
|
11
|
+
normalize<T extends PathString>(path: T): T;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbsoluteFsPath, PathSegment, PathString } from '../../src/types';
|
|
2
|
+
import { MockFileSystem } from './mock_file_system';
|
|
3
|
+
export declare class MockFileSystemWindows extends MockFileSystem {
|
|
4
|
+
resolve(...paths: string[]): AbsoluteFsPath;
|
|
5
|
+
dirname<T extends string>(path: T): T;
|
|
6
|
+
join<T extends string>(basePath: T, ...paths: string[]): T;
|
|
7
|
+
relative<T extends PathString>(from: T, to: T): PathSegment | AbsoluteFsPath;
|
|
8
|
+
basename(filePath: string, extension?: string): PathSegment;
|
|
9
|
+
isRooted(path: string): boolean;
|
|
10
|
+
protected splitPath<T extends PathString>(path: T): string[];
|
|
11
|
+
normalize<T extends PathString>(path: T): T;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AbsoluteFsPath } from '../../src/types';
|
|
2
|
+
import { MockFileSystem } from './mock_file_system';
|
|
3
|
+
export interface TestFile {
|
|
4
|
+
name: AbsoluteFsPath;
|
|
5
|
+
contents: string;
|
|
6
|
+
isRoot?: boolean | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface RunInEachFileSystemFn {
|
|
9
|
+
(callback: (os: string) => void): void;
|
|
10
|
+
windows(callback: (os: string) => void): void;
|
|
11
|
+
unix(callback: (os: string) => void): void;
|
|
12
|
+
native(callback: (os: string) => void): void;
|
|
13
|
+
osX(callback: (os: string) => void): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const runInEachFileSystem: RunInEachFileSystemFn;
|
|
16
|
+
export declare function initMockFileSystem(os: string, cwd?: AbsoluteFsPath): MockFileSystem;
|
|
@@ -219,6 +219,13 @@ export interface AstFactory<TStatement, TExpression> {
|
|
|
219
219
|
* @param type whether this variable should be declared as `var`, `let` or `const`.
|
|
220
220
|
*/
|
|
221
221
|
createVariableDeclaration(variableName: string, initializer: TExpression | null, type: VariableDeclarationType): TStatement;
|
|
222
|
+
/**
|
|
223
|
+
* Create a regular expression literal (e.g. `/\d+/g`).
|
|
224
|
+
*
|
|
225
|
+
* @param body Body of the regex.
|
|
226
|
+
* @param flags Flags of the regex, if any.
|
|
227
|
+
*/
|
|
228
|
+
createRegularExpressionLiteral(body: string, flags: string | null): TExpression;
|
|
222
229
|
/**
|
|
223
230
|
* Attach a source map range to the given node.
|
|
224
231
|
*
|
|
@@ -35,6 +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
39
|
visitLocalizedString(ast: o.LocalizedString, context: Context): TExpression;
|
|
39
40
|
private createTaggedTemplateExpression;
|
|
40
41
|
/**
|
|
@@ -45,6 +45,7 @@ export declare class TypeScriptAstFactory implements AstFactory<ts.Statement, ts
|
|
|
45
45
|
createVoidExpression: (expression: ts.Expression) => ts.VoidExpression;
|
|
46
46
|
createUnaryExpression(operator: UnaryOperator, operand: ts.Expression): ts.Expression;
|
|
47
47
|
createVariableDeclaration(variableName: string, initializer: ts.Expression | null, type: VariableDeclarationType): ts.Statement;
|
|
48
|
+
createRegularExpressionLiteral(body: string, flags: string | null): ts.Expression;
|
|
48
49
|
setSourceMapRange<T extends ts.Node>(node: T, sourceMapRange: SourceMapRange | null): T;
|
|
49
50
|
}
|
|
50
51
|
export declare function createTemplateMiddle(cooked: string, raw: string): ts.TemplateMiddle;
|
|
@@ -204,6 +204,10 @@ export interface TemplateTypeChecker {
|
|
|
204
204
|
* Retrieve the type checking engine's metadata for the given pipe class, if available.
|
|
205
205
|
*/
|
|
206
206
|
getPipeMetadata(pipe: ts.ClassDeclaration): PipeMeta | null;
|
|
207
|
+
/**
|
|
208
|
+
* Gets the directives that apply to the given template node in a component's template.
|
|
209
|
+
*/
|
|
210
|
+
getDirectivesOfNode(component: ts.ClassDeclaration, node: TmplAstElement | TmplAstTemplate): TypeCheckableDirectiveMeta[] | null;
|
|
207
211
|
/**
|
|
208
212
|
* Gets the directives that have been used in a component's template.
|
|
209
213
|
*/
|
|
@@ -55,16 +55,6 @@ export interface TemplateCheckFactory<Code extends ErrorCode, Name extends Exten
|
|
|
55
55
|
* This abstract class provides a base implementation for the run method.
|
|
56
56
|
*/
|
|
57
57
|
export declare abstract class TemplateCheckWithVisitor<Code extends ErrorCode> implements TemplateCheck<Code> {
|
|
58
|
-
/**
|
|
59
|
-
* When extended diagnostics were first introduced, the visitor wasn't implemented correctly
|
|
60
|
-
* which meant that it wasn't visiting the `templateAttrs` of structural directives (e.g.
|
|
61
|
-
* the expression of `*ngIf`). Fixing the issue causes a lot of internal breakages and will likely
|
|
62
|
-
* need to be done in a major version to avoid external breakages. This flag is used to opt out
|
|
63
|
-
* pre-existing diagnostics from the correct behavior until the breakages have been fixed while
|
|
64
|
-
* ensuring that newly-written diagnostics are correct from the beginning.
|
|
65
|
-
* TODO(crisbeto): remove this flag and fix the internal brekages.
|
|
66
|
-
*/
|
|
67
|
-
readonly canVisitStructuralAttributes: boolean;
|
|
68
58
|
abstract code: Code;
|
|
69
59
|
/**
|
|
70
60
|
* Base implementation for run function, visits all nodes in template and calls
|
|
@@ -0,0 +1,10 @@
|
|
|
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 { ErrorCode, ExtendedTemplateDiagnosticName } from '../../../../diagnostics';
|
|
9
|
+
import { TemplateCheckFactory } from '../../api';
|
|
10
|
+
export declare const factory: TemplateCheckFactory<ErrorCode.DEFER_TRIGGER_MISCONFIGURATION, ExtendedTemplateDiagnosticName.DEFER_TRIGGER_MISCONFIGURATION>;
|
|
@@ -78,6 +78,7 @@ export declare class TemplateTypeCheckerImpl implements TemplateTypeChecker {
|
|
|
78
78
|
constructor(originalProgram: ts.Program, programDriver: ProgramDriver, typeCheckAdapter: ProgramTypeCheckAdapter, config: TypeCheckingConfig, refEmitter: ReferenceEmitter, reflector: ReflectionHost, compilerHost: Pick<ts.CompilerHost, 'getCanonicalFileName'>, priorBuild: IncrementalBuild<unknown, FileTypeCheckingData>, metaReader: MetadataReader, localMetaReader: MetadataReaderWithIndex, ngModuleIndex: NgModuleIndex, componentScopeReader: ComponentScopeReader, typeCheckScopeRegistry: TypeCheckScopeRegistry, perf: PerfRecorder);
|
|
79
79
|
getTemplate(component: ts.ClassDeclaration, optimizeFor?: OptimizeFor): TmplAstNode[] | null;
|
|
80
80
|
getHostElement(directive: ts.ClassDeclaration, optimizeFor?: OptimizeFor): TmplAstHostElement | null;
|
|
81
|
+
getDirectivesOfNode(component: ts.ClassDeclaration, node: TmplAstElement | TmplAstTemplate): TypeCheckableDirectiveMeta[] | null;
|
|
81
82
|
getUsedDirectives(component: ts.ClassDeclaration): TypeCheckableDirectiveMeta[] | null;
|
|
82
83
|
getUsedPipes(component: ts.ClassDeclaration): string[] | null;
|
|
83
84
|
private getLatestComponentState;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { ImportedSymbolsTracker } from '../../../imports';
|
|
10
|
+
import { ReflectionHost } from '../../../reflection';
|
|
11
|
+
import { SourceFileValidatorRule } from './api';
|
|
12
|
+
/**
|
|
13
|
+
* Rule that flags forbidden invocations of required initializers in property initializers and constructors.
|
|
14
|
+
*/
|
|
15
|
+
export declare class ForbiddenRequiredInitializersInvocationRule implements SourceFileValidatorRule {
|
|
16
|
+
private reflector;
|
|
17
|
+
private importedSymbolsTracker;
|
|
18
|
+
constructor(reflector: ReflectionHost, importedSymbolsTracker: ImportedSymbolsTracker);
|
|
19
|
+
shouldCheck(sourceFile: ts.SourceFile): boolean;
|
|
20
|
+
checkNode(node: ts.Node): ts.Diagnostic[] | null;
|
|
21
|
+
private isPropDeclarationARequiredInitializer;
|
|
22
|
+
}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
-
import { InterpolationConfig } from '@angular/compiler';
|
|
9
8
|
/**
|
|
10
9
|
* Captures template information intended for extraction of i18n messages from a template.
|
|
11
10
|
*
|
|
@@ -21,5 +20,5 @@ export interface Xi18nContext {
|
|
|
21
20
|
* the return type is declared as `void` for simplicity, since any parse errors would be reported
|
|
22
21
|
* as diagnostics anyway.
|
|
23
22
|
*/
|
|
24
|
-
updateFromTemplate(html: string, url: string
|
|
23
|
+
updateFromTemplate(html: string, url: string): void;
|
|
25
24
|
}
|