@angular/compiler-cli 13.2.0 → 14.0.0-next.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/bundles/{chunk-QBU7RUKB.js → chunk-2XJJHADR.js} +36 -27
- package/bundles/chunk-2XJJHADR.js.map +6 -0
- package/bundles/{chunk-ADHVDA4A.js → chunk-3WNAIXKA.js} +7 -7
- package/bundles/{chunk-ADHVDA4A.js.map → chunk-3WNAIXKA.js.map} +1 -1
- package/bundles/{chunk-XHMJ6POQ.js → chunk-4EUDG74G.js} +71 -71
- package/bundles/{chunk-XHMJ6POQ.js.map → chunk-4EUDG74G.js.map} +1 -1
- package/bundles/{chunk-UESD6FVI.js → chunk-4N4Y5TPT.js} +36 -33
- package/bundles/chunk-4N4Y5TPT.js.map +6 -0
- package/bundles/{chunk-QDWL7SZJ.js → chunk-BPCUCINV.js} +2 -2
- package/bundles/{chunk-QDWL7SZJ.js.map → chunk-BPCUCINV.js.map} +0 -0
- package/bundles/{chunk-GLCRIILX.js → chunk-J6CW3T62.js} +5 -5
- package/bundles/{chunk-GLCRIILX.js.map → chunk-J6CW3T62.js.map} +0 -0
- package/bundles/{chunk-XDGI7TS4.js → chunk-JL6TC6CB.js} +181 -156
- package/bundles/chunk-JL6TC6CB.js.map +6 -0
- package/bundles/{chunk-5CHRTEXL.js → chunk-JR2JHPEZ.js} +40 -40
- package/bundles/{chunk-5CHRTEXL.js.map → chunk-JR2JHPEZ.js.map} +1 -1
- package/bundles/{chunk-SKBLJA43.js → chunk-JTYUTYS2.js} +3 -3
- package/bundles/{chunk-SKBLJA43.js.map → chunk-JTYUTYS2.js.map} +0 -0
- package/bundles/{chunk-O4XVCXRT.js → chunk-LL4S3DRM.js} +4 -4
- package/bundles/{chunk-O4XVCXRT.js.map → chunk-LL4S3DRM.js.map} +0 -0
- package/bundles/{chunk-LMCFGUUV.js → chunk-N4EP6MZR.js} +1777 -1547
- package/bundles/chunk-N4EP6MZR.js.map +6 -0
- package/bundles/{chunk-676MI6WZ.js → chunk-QZBA4KSX.js} +11 -11
- package/bundles/{chunk-676MI6WZ.js.map → chunk-QZBA4KSX.js.map} +1 -1
- package/bundles/{chunk-A5PL3TE6.js → chunk-RNVIUKDY.js} +6 -6
- package/bundles/{chunk-A5PL3TE6.js.map → chunk-RNVIUKDY.js.map} +0 -0
- package/bundles/{chunk-OFPFDCGQ.js → chunk-VOXD467J.js} +5 -5
- package/bundles/{chunk-OFPFDCGQ.js.map → chunk-VOXD467J.js.map} +0 -0
- package/bundles/{chunk-7PY7XEFH.js → chunk-XXMNTCYN.js} +6 -6
- package/bundles/{chunk-7PY7XEFH.js.map → chunk-XXMNTCYN.js.map} +0 -0
- package/bundles/index.js +12 -12
- package/bundles/linker/babel/index.js +12 -12
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +4 -4
- package/bundles/ngcc/index.js +12 -12
- package/bundles/ngcc/main-ngcc.js +13 -13
- package/bundles/ngcc/main-ngcc.js.map +1 -1
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +13 -13
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +4 -4
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +5 -5
- package/bundles/private/tooling.js +2 -2
- package/bundles/src/bin/ng_xi18n.js +10 -10
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +2 -3
- package/src/ngtsc/annotations/common/index.d.ts +16 -0
- package/src/ngtsc/annotations/{src → common/src}/api.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/di.d.ts +38 -0
- package/src/ngtsc/annotations/{src → common/src}/diagnostics.d.ts +15 -7
- package/src/ngtsc/annotations/common/src/evaluation.d.ts +18 -0
- package/src/ngtsc/annotations/{src → common/src}/factory.d.ts +2 -2
- package/src/ngtsc/annotations/{src → common/src}/metadata.d.ts +2 -2
- package/src/ngtsc/annotations/{src → common/src}/references_registry.d.ts +3 -3
- package/src/ngtsc/annotations/{src → common/src}/util.d.ts +7 -43
- package/src/ngtsc/annotations/component/index.d.ts +9 -0
- package/src/ngtsc/annotations/component/src/diagnostics.d.ts +20 -0
- package/src/ngtsc/annotations/component/src/handler.d.ts +92 -0
- package/src/ngtsc/annotations/component/src/metadata.d.ts +61 -0
- package/src/ngtsc/annotations/component/src/resources.d.ts +123 -0
- package/src/ngtsc/annotations/component/src/scope.d.ts +20 -0
- package/src/ngtsc/annotations/component/src/symbol.d.ts +20 -0
- package/src/ngtsc/annotations/component/src/util.d.ts +24 -0
- package/src/ngtsc/annotations/directive/index.d.ts +11 -0
- package/src/ngtsc/annotations/directive/src/handler.d.ts +59 -0
- package/src/ngtsc/annotations/directive/src/shared.d.ts +30 -0
- package/src/ngtsc/annotations/directive/src/symbol.d.ts +27 -0
- package/src/ngtsc/annotations/index.d.ts +4 -6
- package/src/ngtsc/annotations/ng_module/index.d.ts +9 -0
- package/src/ngtsc/annotations/{src/ng_module.d.ts → ng_module/src/handler.d.ts} +11 -11
- package/src/ngtsc/core/api/src/options.d.ts +0 -4
- package/src/ngtsc/diagnostics/src/error_code.d.ts +17 -0
- package/src/ngtsc/imports/src/emitter.d.ts +16 -2
- package/src/ngtsc/indexer/src/api.d.ts +1 -0
- package/src/ngtsc/indexer/src/template.d.ts +4 -1
- package/src/ngtsc/metadata/src/api.d.ts +5 -0
- package/bundles/chunk-LMCFGUUV.js.map +0 -6
- package/bundles/chunk-QBU7RUKB.js.map +0 -6
- package/bundles/chunk-UESD6FVI.js.map +0 -6
- package/bundles/chunk-XDGI7TS4.js.map +0 -6
- package/src/ngtsc/annotations/src/component.d.ts +0 -246
- package/src/ngtsc/annotations/src/directive.d.ts +0 -99
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
*/
|
|
8
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/component/src/util" />
|
|
9
|
+
import { AnimationTriggerNames } from '@angular/compiler';
|
|
10
|
+
import ts from 'typescript';
|
|
11
|
+
import { Reference } from '../../../imports';
|
|
12
|
+
import { ResolvedValue } from '../../../partial_evaluator';
|
|
13
|
+
import { ClassDeclaration } from '../../../reflection';
|
|
14
|
+
/**
|
|
15
|
+
* Collect the animation names from the static evaluation result.
|
|
16
|
+
* @param value the static evaluation result of the animations
|
|
17
|
+
* @param animationTriggerNames the animation names collected and whether some names could not be
|
|
18
|
+
* statically evaluated.
|
|
19
|
+
*/
|
|
20
|
+
export declare function collectAnimationNames(value: ResolvedValue, animationTriggerNames: AnimationTriggerNames): void;
|
|
21
|
+
export declare function validateAndFlattenComponentImports(imports: ResolvedValue, expr: ts.Expression): {
|
|
22
|
+
imports: Reference<ClassDeclaration>[];
|
|
23
|
+
diagnostics: ts.Diagnostic[];
|
|
24
|
+
};
|
|
@@ -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.io/license
|
|
7
|
+
*/
|
|
8
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/directive" />
|
|
9
|
+
export { DirectiveDecoratorHandler } from './src/handler';
|
|
10
|
+
export { DirectiveSymbol } from './src/symbol';
|
|
11
|
+
export * from './src/shared';
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
*/
|
|
8
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/directive/src/handler" />
|
|
9
|
+
import { ConstantPool, R3ClassMetadata, R3DirectiveMetadata } from '@angular/compiler';
|
|
10
|
+
import { Reference } from '../../../imports';
|
|
11
|
+
import { SemanticDepGraphUpdater } from '../../../incremental/semantic_graph';
|
|
12
|
+
import { ClassPropertyMapping, DirectiveTypeCheckMeta, InjectableClassRegistry, MetadataReader, MetadataRegistry } from '../../../metadata';
|
|
13
|
+
import { PartialEvaluator } from '../../../partial_evaluator';
|
|
14
|
+
import { PerfRecorder } from '../../../perf';
|
|
15
|
+
import { ClassDeclaration, Decorator, ReflectionHost } from '../../../reflection';
|
|
16
|
+
import { LocalModuleScopeRegistry } from '../../../scope';
|
|
17
|
+
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerFlags, HandlerPrecedence, ResolveResult } from '../../../transform';
|
|
18
|
+
import { DirectiveSymbol } from './symbol';
|
|
19
|
+
export interface DirectiveHandlerData {
|
|
20
|
+
baseClass: Reference<ClassDeclaration> | 'dynamic' | null;
|
|
21
|
+
typeCheckMeta: DirectiveTypeCheckMeta;
|
|
22
|
+
meta: R3DirectiveMetadata;
|
|
23
|
+
classMetadata: R3ClassMetadata | null;
|
|
24
|
+
providersRequiringFactory: Set<Reference<ClassDeclaration>> | null;
|
|
25
|
+
inputs: ClassPropertyMapping;
|
|
26
|
+
outputs: ClassPropertyMapping;
|
|
27
|
+
isPoisoned: boolean;
|
|
28
|
+
isStructural: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare class DirectiveDecoratorHandler implements DecoratorHandler<Decorator | null, DirectiveHandlerData, DirectiveSymbol, unknown> {
|
|
31
|
+
private reflector;
|
|
32
|
+
private evaluator;
|
|
33
|
+
private metaRegistry;
|
|
34
|
+
private scopeRegistry;
|
|
35
|
+
private metaReader;
|
|
36
|
+
private injectableRegistry;
|
|
37
|
+
private isCore;
|
|
38
|
+
private semanticDepGraphUpdater;
|
|
39
|
+
private annotateForClosureCompiler;
|
|
40
|
+
private compileUndecoratedClassesWithAngularFeatures;
|
|
41
|
+
private perf;
|
|
42
|
+
constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, metaReader: MetadataReader, injectableRegistry: InjectableClassRegistry, isCore: boolean, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, compileUndecoratedClassesWithAngularFeatures: boolean, perf: PerfRecorder);
|
|
43
|
+
readonly precedence = HandlerPrecedence.PRIMARY;
|
|
44
|
+
readonly name: string;
|
|
45
|
+
detect(node: ClassDeclaration, decorators: Decorator[] | null): DetectResult<Decorator | null> | undefined;
|
|
46
|
+
analyze(node: ClassDeclaration, decorator: Readonly<Decorator | null>, flags?: HandlerFlags): AnalysisOutput<DirectiveHandlerData>;
|
|
47
|
+
symbol(node: ClassDeclaration, analysis: Readonly<DirectiveHandlerData>): DirectiveSymbol;
|
|
48
|
+
register(node: ClassDeclaration, analysis: Readonly<DirectiveHandlerData>): void;
|
|
49
|
+
resolve(node: ClassDeclaration, analysis: DirectiveHandlerData, symbol: DirectiveSymbol): ResolveResult<unknown>;
|
|
50
|
+
compileFull(node: ClassDeclaration, analysis: Readonly<DirectiveHandlerData>, resolution: Readonly<unknown>, pool: ConstantPool): CompileResult[];
|
|
51
|
+
compilePartial(node: ClassDeclaration, analysis: Readonly<DirectiveHandlerData>, resolution: Readonly<unknown>): CompileResult[];
|
|
52
|
+
/**
|
|
53
|
+
* Checks if a given class uses Angular features and returns the TypeScript node
|
|
54
|
+
* that indicated the usage. Classes are considered using Angular features if they
|
|
55
|
+
* contain class members that are either decorated with a known Angular decorator,
|
|
56
|
+
* or if they correspond to a known Angular lifecycle hook.
|
|
57
|
+
*/
|
|
58
|
+
private findClassFieldWithAngularFeatures;
|
|
59
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
*/
|
|
8
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/directive/src/shared" />
|
|
9
|
+
import { ParsedHostBindings, R3DirectiveMetadata, R3QueryMetadata } from '@angular/compiler';
|
|
10
|
+
import ts from 'typescript';
|
|
11
|
+
import { ClassPropertyMapping } from '../../../metadata';
|
|
12
|
+
import { PartialEvaluator } from '../../../partial_evaluator';
|
|
13
|
+
import { ClassDeclaration, ClassMember, Decorator, ReflectionHost } from '../../../reflection';
|
|
14
|
+
import { HandlerFlags } from '../../../transform';
|
|
15
|
+
/**
|
|
16
|
+
* Helper function to extract metadata from a `Directive` or `Component`. `Directive`s without a
|
|
17
|
+
* selector are allowed to be used for abstract base classes. These abstract directives should not
|
|
18
|
+
* appear in the declarations of an `NgModule` and additional verification is done when processing
|
|
19
|
+
* the module.
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractDirectiveMetadata(clazz: ClassDeclaration, decorator: Readonly<Decorator | null>, reflector: ReflectionHost, evaluator: PartialEvaluator, isCore: boolean, flags: HandlerFlags, annotateForClosureCompiler: boolean, defaultSelector?: string | null): {
|
|
22
|
+
decorator: Map<string, ts.Expression>;
|
|
23
|
+
metadata: R3DirectiveMetadata;
|
|
24
|
+
inputs: ClassPropertyMapping;
|
|
25
|
+
outputs: ClassPropertyMapping;
|
|
26
|
+
isStructural: boolean;
|
|
27
|
+
} | undefined;
|
|
28
|
+
export declare function extractQueryMetadata(exprNode: ts.Node, name: string, args: ReadonlyArray<ts.Expression>, propertyName: string, reflector: ReflectionHost, evaluator: PartialEvaluator): R3QueryMetadata;
|
|
29
|
+
export declare function extractHostBindings(members: ClassMember[], evaluator: PartialEvaluator, coreModule: string | undefined, metadata?: Map<string, ts.Expression>): ParsedHostBindings;
|
|
30
|
+
export declare function parseFieldArrayValue(directive: Map<string, ts.Expression>, field: string, evaluator: PartialEvaluator): null | string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
*/
|
|
8
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/directive/src/symbol" />
|
|
9
|
+
import { SemanticSymbol, SemanticTypeParameter } from '../../../incremental/semantic_graph';
|
|
10
|
+
import { ClassPropertyMapping, DirectiveTypeCheckMeta } from '../../../metadata';
|
|
11
|
+
import { ClassDeclaration } from '../../../reflection';
|
|
12
|
+
/**
|
|
13
|
+
* Represents an Angular directive. Components are represented by `ComponentSymbol`, which inherits
|
|
14
|
+
* from this symbol.
|
|
15
|
+
*/
|
|
16
|
+
export declare class DirectiveSymbol extends SemanticSymbol {
|
|
17
|
+
readonly selector: string | null;
|
|
18
|
+
readonly inputs: ClassPropertyMapping;
|
|
19
|
+
readonly outputs: ClassPropertyMapping;
|
|
20
|
+
readonly exportAs: string[] | null;
|
|
21
|
+
readonly typeCheckMeta: DirectiveTypeCheckMeta;
|
|
22
|
+
readonly typeParameters: SemanticTypeParameter[] | null;
|
|
23
|
+
baseClass: SemanticSymbol | null;
|
|
24
|
+
constructor(decl: ClassDeclaration, selector: string | null, inputs: ClassPropertyMapping, outputs: ClassPropertyMapping, exportAs: string[] | null, typeCheckMeta: DirectiveTypeCheckMeta, typeParameters: SemanticTypeParameter[] | null);
|
|
25
|
+
isPublicApiAffected(previousSymbol: SemanticSymbol): boolean;
|
|
26
|
+
isTypeCheckApiAffected(previousSymbol: SemanticSymbol): boolean;
|
|
27
|
+
}
|
|
@@ -6,11 +6,9 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations" />
|
|
9
|
-
export { ResourceLoader, ResourceLoaderContext } from './
|
|
10
|
-
export { ComponentDecoratorHandler } from './
|
|
11
|
-
export { DirectiveDecoratorHandler } from './
|
|
9
|
+
export { forwardRefResolver, NoopReferencesRegistry, ReferencesRegistry, ResourceLoader, ResourceLoaderContext } from './common';
|
|
10
|
+
export { ComponentDecoratorHandler } from './component';
|
|
11
|
+
export { DirectiveDecoratorHandler } from './directive';
|
|
12
|
+
export { NgModuleDecoratorHandler } from './ng_module';
|
|
12
13
|
export { InjectableDecoratorHandler } from './src/injectable';
|
|
13
|
-
export { NgModuleDecoratorHandler } from './src/ng_module';
|
|
14
14
|
export { PipeDecoratorHandler } from './src/pipe';
|
|
15
|
-
export { NoopReferencesRegistry, ReferencesRegistry } from './src/references_registry';
|
|
16
|
-
export { forwardRefResolver } from './src/util';
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
*/
|
|
8
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/ng_module" />
|
|
9
|
+
export { NgModuleDecoratorHandler, NgModuleSymbol } from './src/handler';
|
|
@@ -5,19 +5,19 @@
|
|
|
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.io/license
|
|
7
7
|
*/
|
|
8
|
-
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/src/
|
|
8
|
+
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/ng_module/src/handler" />
|
|
9
9
|
import { Expression, R3ClassMetadata, R3FactoryMetadata, R3InjectorMetadata, R3NgModuleMetadata, SchemaMetadata } from '@angular/compiler';
|
|
10
10
|
import ts from 'typescript';
|
|
11
|
-
import { Reference, ReferenceEmitter } from '
|
|
12
|
-
import { SemanticReference, SemanticSymbol } from '
|
|
13
|
-
import { InjectableClassRegistry, MetadataReader, MetadataRegistry } from '
|
|
14
|
-
import { PartialEvaluator } from '
|
|
15
|
-
import { PerfRecorder } from '
|
|
16
|
-
import { ClassDeclaration, Decorator, ReflectionHost } from '
|
|
17
|
-
import { LocalModuleScopeRegistry } from '
|
|
18
|
-
import { FactoryTracker } from '
|
|
19
|
-
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult } from '
|
|
20
|
-
import { ReferencesRegistry } from '
|
|
11
|
+
import { Reference, ReferenceEmitter } from '../../../imports';
|
|
12
|
+
import { SemanticReference, SemanticSymbol } from '../../../incremental/semantic_graph';
|
|
13
|
+
import { InjectableClassRegistry, MetadataReader, MetadataRegistry } from '../../../metadata';
|
|
14
|
+
import { PartialEvaluator } from '../../../partial_evaluator';
|
|
15
|
+
import { PerfRecorder } from '../../../perf';
|
|
16
|
+
import { ClassDeclaration, Decorator, ReflectionHost } from '../../../reflection';
|
|
17
|
+
import { LocalModuleScopeRegistry } from '../../../scope';
|
|
18
|
+
import { FactoryTracker } from '../../../shims/api';
|
|
19
|
+
import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult } from '../../../transform';
|
|
20
|
+
import { ReferencesRegistry } from '../../common';
|
|
21
21
|
export interface NgModuleAnalysis {
|
|
22
22
|
mod: R3NgModuleMetadata;
|
|
23
23
|
inj: R3InjectorMetadata;
|
|
@@ -26,10 +26,6 @@ export interface TestOnlyOptions {
|
|
|
26
26
|
* Internal only options for compiler.
|
|
27
27
|
*/
|
|
28
28
|
export interface InternalOptions {
|
|
29
|
-
/**
|
|
30
|
-
* Whether to run all template checks and generate extended template diagnostics.
|
|
31
|
-
*/
|
|
32
|
-
_extendedTemplateDiagnostics?: boolean;
|
|
33
29
|
}
|
|
34
30
|
/**
|
|
35
31
|
* A merged interface of all of the various Angular compiler options, as well as the standard
|
|
@@ -47,6 +47,19 @@ export declare enum ErrorCode {
|
|
|
47
47
|
* does not match the shadow DOM tag name requirements.
|
|
48
48
|
*/
|
|
49
49
|
COMPONENT_INVALID_SHADOW_DOM_SELECTOR = 2009,
|
|
50
|
+
/**
|
|
51
|
+
* Raised when a component has `imports` but is not marked as `standalone: true`.
|
|
52
|
+
*/
|
|
53
|
+
COMPONENT_NOT_STANDALONE = 2010,
|
|
54
|
+
/**
|
|
55
|
+
* Raised when a type in the `imports` of a component is a directive or pipe, but is not
|
|
56
|
+
* standalone.
|
|
57
|
+
*/
|
|
58
|
+
COMPONENT_IMPORT_NOT_STANDALONE = 2011,
|
|
59
|
+
/**
|
|
60
|
+
* Raised when a type in the `imports` of a component is not a directive, pipe, or NgModule.
|
|
61
|
+
*/
|
|
62
|
+
COMPONENT_UNKNOWN_IMPORT = 2012,
|
|
50
63
|
SYMBOL_NOT_EXPORTED = 3001,
|
|
51
64
|
SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME = 3002,
|
|
52
65
|
/**
|
|
@@ -103,6 +116,10 @@ export declare enum ErrorCode {
|
|
|
103
116
|
* Raised when a directive/pipe is part of the declarations of two or more NgModules.
|
|
104
117
|
*/
|
|
105
118
|
NGMODULE_DECLARATION_NOT_UNIQUE = 6007,
|
|
119
|
+
/**
|
|
120
|
+
* Raised when a standalone directive/pipe is part of the declarations of an NgModule.
|
|
121
|
+
*/
|
|
122
|
+
NGMODULE_DECLARATION_IS_STANDALONE = 6008,
|
|
106
123
|
/**
|
|
107
124
|
* Not actually raised by the compiler, but reserved for documentation of a View Engine error when
|
|
108
125
|
* a View Engine build depends on an Ivy-compiled NgModule.
|
|
@@ -39,7 +39,20 @@ export declare enum ImportFlags {
|
|
|
39
39
|
* declaration that is not retained during emit. Including this flag allows to emit references to
|
|
40
40
|
* type-only declarations as used in e.g. template type-checking.
|
|
41
41
|
*/
|
|
42
|
-
AllowTypeImports = 4
|
|
42
|
+
AllowTypeImports = 4,
|
|
43
|
+
/**
|
|
44
|
+
* Indicates that importing from a declaration file using a relative import path is allowed.
|
|
45
|
+
*
|
|
46
|
+
* The generated imports should normally use module specifiers that are valid for use in
|
|
47
|
+
* production code, where arbitrary relative imports into e.g. node_modules are not allowed. For
|
|
48
|
+
* template type-checking code it is however acceptable to use relative imports, as such files are
|
|
49
|
+
* never emitted to JS code.
|
|
50
|
+
*
|
|
51
|
+
* Non-declaration files have to be contained within a configured `rootDir` so using relative
|
|
52
|
+
* paths may not be possible for those, hence this flag only applies when importing from a
|
|
53
|
+
* declaration file.
|
|
54
|
+
*/
|
|
55
|
+
AllowRelativeDtsImports = 8
|
|
43
56
|
}
|
|
44
57
|
/**
|
|
45
58
|
* An emitter strategy has the ability to indicate which `ts.SourceFile` is being imported by the
|
|
@@ -191,8 +204,9 @@ export declare class AbsoluteModuleStrategy implements ReferenceEmitStrategy {
|
|
|
191
204
|
export declare class LogicalProjectStrategy implements ReferenceEmitStrategy {
|
|
192
205
|
private reflector;
|
|
193
206
|
private logicalFs;
|
|
207
|
+
private relativePathStrategy;
|
|
194
208
|
constructor(reflector: ReflectionHost, logicalFs: LogicalFileSystem);
|
|
195
|
-
emit(ref: Reference, context: ts.SourceFile): ReferenceEmitResult | null;
|
|
209
|
+
emit(ref: Reference, context: ts.SourceFile, importFlags: ImportFlags): ReferenceEmitResult | null;
|
|
196
210
|
}
|
|
197
211
|
/**
|
|
198
212
|
* A `ReferenceEmitStrategy` which constructs relatives paths between `ts.SourceFile`s.
|
|
@@ -15,4 +15,7 @@ import { ComponentMeta } from './context';
|
|
|
15
15
|
* @param boundTemplate bound template target, which can be used for querying expression targets.
|
|
16
16
|
* @return identifiers in template
|
|
17
17
|
*/
|
|
18
|
-
export declare function getTemplateIdentifiers(boundTemplate: BoundTarget<ComponentMeta>):
|
|
18
|
+
export declare function getTemplateIdentifiers(boundTemplate: BoundTarget<ComponentMeta>): {
|
|
19
|
+
identifiers: Set<TopLevelIdentifier>;
|
|
20
|
+
errors: Error[];
|
|
21
|
+
};
|
|
@@ -106,6 +106,10 @@ export interface DirectiveMeta extends T2DirectiveMeta, DirectiveTypeCheckMeta {
|
|
|
106
106
|
* Whether the directive is likely a structural directive (injects `TemplateRef`).
|
|
107
107
|
*/
|
|
108
108
|
isStructural: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Whether the directive is a standalone entity.
|
|
111
|
+
*/
|
|
112
|
+
isStandalone: boolean;
|
|
109
113
|
}
|
|
110
114
|
/**
|
|
111
115
|
* Metadata that describes a template guard for one of the directive's inputs.
|
|
@@ -132,6 +136,7 @@ export interface PipeMeta {
|
|
|
132
136
|
ref: Reference<ClassDeclaration>;
|
|
133
137
|
name: string;
|
|
134
138
|
nameExpr: ts.Expression | null;
|
|
139
|
+
isStandalone: boolean;
|
|
135
140
|
}
|
|
136
141
|
/**
|
|
137
142
|
* Reads metadata for directives, pipes, and modules from a particular source, such as .d.ts files
|