@angular/compiler-cli 21.0.0-next.7 → 21.0.0-next.9
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-O7L4BBZY.js → chunk-3UF7UI6H.js} +233 -38
- package/bundles/chunk-DT6FD4OE.js +1 -1
- package/bundles/{chunk-WX6HCNBV.js → chunk-HRLHX4UA.js} +1 -1
- package/bundles/{chunk-CXWG7H5K.js → chunk-IE2YQNTQ.js} +1 -1
- package/bundles/{chunk-3I7LEC2O.js → chunk-SIOKS4LN.js} +367 -242
- package/bundles/index.js +4 -4
- package/bundles/private/migrations.js +1 -1
- package/bundles/private/tooling.js +2 -2
- package/bundles/src/bin/ng_xi18n.js +4 -4
- package/bundles/src/bin/ngc.js +4 -4
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +2 -2
- 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/directive/src/handler.d.ts +1 -0
- package/src/ngtsc/annotations/directive/src/shared.d.ts +6 -1
- package/src/ngtsc/diagnostics/src/error_code.d.ts +11 -0
- 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/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/bundles/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
isTsDiagnostic,
|
|
29
29
|
performCompilation,
|
|
30
30
|
readConfiguration
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-SIOKS4LN.js";
|
|
32
32
|
import {
|
|
33
33
|
ConsoleLogger,
|
|
34
34
|
LogLevel
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
angularJitApplicationTransform,
|
|
38
38
|
getDownlevelDecoratorsTransform,
|
|
39
39
|
getInitializerApiJitTransform
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-HRLHX4UA.js";
|
|
41
41
|
import {
|
|
42
42
|
ActivePerfRecorder,
|
|
43
43
|
ErrorCode,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
TsCreateProgramDriver,
|
|
47
47
|
isLocalCompilationDiagnostics,
|
|
48
48
|
ngErrorCode
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-3UF7UI6H.js";
|
|
50
50
|
import "./chunk-LS5RJ5CS.js";
|
|
51
51
|
import {
|
|
52
52
|
InvalidFileSystem,
|
|
@@ -77,7 +77,7 @@ import "./chunk-G7GFT6BU.js";
|
|
|
77
77
|
|
|
78
78
|
// packages/compiler-cli/src/version.js
|
|
79
79
|
import { Version } from "@angular/compiler";
|
|
80
|
-
var VERSION = new Version("21.0.0-next.
|
|
80
|
+
var VERSION = new Version("21.0.0-next.9");
|
|
81
81
|
|
|
82
82
|
// packages/compiler-cli/private/tooling.js
|
|
83
83
|
var GLOBAL_DEFS_FOR_TERSER = {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TypeScriptReflectionHost,
|
|
14
14
|
createForwardRefResolver,
|
|
15
15
|
reflectObjectLiteral
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-3UF7UI6H.js";
|
|
17
17
|
import "../chunk-LS5RJ5CS.js";
|
|
18
18
|
import "../chunk-GWZQLAGK.js";
|
|
19
19
|
import "../chunk-XYYEESKY.js";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-HRLHX4UA.js";
|
|
8
|
+
import "../chunk-3UF7UI6H.js";
|
|
9
9
|
import "../chunk-LS5RJ5CS.js";
|
|
10
10
|
import "../chunk-GWZQLAGK.js";
|
|
11
11
|
import "../chunk-XYYEESKY.js";
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
import {
|
|
7
7
|
main,
|
|
8
8
|
readCommandLineAndConfiguration
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-IE2YQNTQ.js";
|
|
10
10
|
import {
|
|
11
11
|
EmitFlags
|
|
12
|
-
} from "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
12
|
+
} from "../../chunk-SIOKS4LN.js";
|
|
13
|
+
import "../../chunk-HRLHX4UA.js";
|
|
14
|
+
import "../../chunk-3UF7UI6H.js";
|
|
15
15
|
import "../../chunk-LS5RJ5CS.js";
|
|
16
16
|
import {
|
|
17
17
|
setFileSystem
|
package/bundles/src/bin/ngc.js
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
main
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-IE2YQNTQ.js";
|
|
9
|
+
import "../../chunk-SIOKS4LN.js";
|
|
10
|
+
import "../../chunk-HRLHX4UA.js";
|
|
11
|
+
import "../../chunk-3UF7UI6H.js";
|
|
12
12
|
import "../../chunk-LS5RJ5CS.js";
|
|
13
13
|
import {
|
|
14
14
|
setFileSystem
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { MaybeForwardRefExpression, outputAst as o, R3DeclareDependencyMetadata, R3DependencyMetadata, R3Reference } from '@angular/compiler';
|
|
9
9
|
import { AstObject, AstValue } from '../../ast/ast_value';
|
|
10
|
-
export declare const PLACEHOLDER_VERSION = "21.0.0-next.
|
|
10
|
+
export declare const PLACEHOLDER_VERSION = "21.0.0-next.9";
|
|
11
11
|
export declare function wrapReference<TExpression>(wrapped: o.WrappedNodeExpr<TExpression>): R3Reference;
|
|
12
12
|
/**
|
|
13
13
|
* Parses the value of an enum from the AST value's symbol name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/compiler-cli",
|
|
3
|
-
"version": "21.0.0-next.
|
|
3
|
+
"version": "21.0.0-next.9",
|
|
4
4
|
"description": "Angular - the compiler CLI for Node.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"yargs": "^18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@angular/compiler": "21.0.0-next.
|
|
51
|
+
"@angular/compiler": "21.0.0-next.9",
|
|
52
52
|
"typescript": ">=5.9 <6.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
@@ -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
|
|
@@ -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
|
*
|
|
@@ -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:
|
|
@@ -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 {};
|
|
@@ -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;
|