@angular/compiler-cli 11.1.0-next.5 → 11.1.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/linker/src/file_linker/partial_linkers/partial_directive_linker_1.js +2 -1
- package/linker/src/file_linker/partial_linkers/partial_linker_selector.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/partial_linker_selector.js +15 -16
- package/ngcc/src/host/umd_host.js +2 -2
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/ngcc/src/packages/build_marker.js +1 -1
- package/ngcc/src/rendering/esm_rendering_formatter.d.ts +1 -1
- package/ngcc/src/rendering/esm_rendering_formatter.js +2 -2
- package/ngcc/src/rendering/source_maps.js +18 -19
- package/ngcc/src/writing/new_entry_point_file_writer.d.ts +14 -1
- package/ngcc/src/writing/new_entry_point_file_writer.js +43 -7
- package/package.json +2 -2
- package/src/ngtsc/annotations/src/component.d.ts +48 -3
- package/src/ngtsc/annotations/src/component.js +202 -118
- package/src/ngtsc/annotations/src/directive.js +13 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +2 -2
- package/src/ngtsc/core/api/src/public_options.js +1 -1
- package/src/ngtsc/core/index.d.ts +1 -1
- package/src/ngtsc/core/index.js +5 -5
- package/src/ngtsc/core/src/compiler.d.ts +83 -7
- package/src/ngtsc/core/src/compiler.js +205 -51
- package/src/ngtsc/diagnostics/index.d.ts +1 -1
- package/src/ngtsc/diagnostics/index.js +4 -2
- package/src/ngtsc/diagnostics/src/error_code.d.ts +6 -1
- package/src/ngtsc/diagnostics/src/error_code.js +29 -2
- package/src/ngtsc/incremental/src/strategy.d.ts +7 -0
- package/src/ngtsc/incremental/src/strategy.js +7 -1
- package/src/ngtsc/program.js +47 -19
- package/src/ngtsc/resource/src/loader.d.ts +4 -0
- package/src/ngtsc/resource/src/loader.js +7 -1
- package/src/ngtsc/sourcemaps/index.d.ts +3 -2
- package/src/ngtsc/sourcemaps/index.js +12 -3
- package/src/ngtsc/sourcemaps/src/content_origin.d.ts +34 -0
- package/src/ngtsc/sourcemaps/src/content_origin.js +48 -0
- package/src/ngtsc/sourcemaps/src/raw_source_map.d.ts +19 -1
- package/src/ngtsc/sourcemaps/src/raw_source_map.js +1 -8
- package/src/ngtsc/sourcemaps/src/segment_marker.d.ts +1 -1
- package/src/ngtsc/sourcemaps/src/segment_marker.js +1 -1
- package/src/ngtsc/sourcemaps/src/source_file.d.ts +5 -9
- package/src/ngtsc/sourcemaps/src/source_file.js +3 -6
- package/src/ngtsc/sourcemaps/src/source_file_loader.d.ts +34 -14
- package/src/ngtsc/sourcemaps/src/source_file_loader.js +72 -19
- package/src/ngtsc/transform/src/api.d.ts +5 -0
- package/src/ngtsc/transform/src/api.js +1 -1
- package/src/ngtsc/transform/src/compilation.d.ts +1 -0
- package/src/ngtsc/transform/src/compilation.js +40 -17
- package/src/ngtsc/tsc_plugin.js +20 -3
- package/src/ngtsc/typecheck/api/checker.d.ts +6 -19
- package/src/ngtsc/typecheck/api/checker.js +1 -1
- package/src/ngtsc/typecheck/src/checker.d.ts +10 -20
- package/src/ngtsc/typecheck/src/checker.js +56 -119
- package/src/ngtsc/typecheck/src/context.d.ts +0 -9
- package/src/ngtsc/typecheck/src/context.js +1 -7
- package/src/transformers/patch_alias_reference_resolution.js +2 -2
- package/src/version.js +1 -1
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/typecheck/src/checker" />
|
|
9
|
-
import { MethodCall,
|
|
9
|
+
import { MethodCall, PropertyRead, SafeMethodCall, SafePropertyRead, TmplAstElement, TmplAstNode, TmplAstTemplate } from '@angular/compiler';
|
|
10
10
|
import * as ts from 'typescript';
|
|
11
11
|
import { AbsoluteFsPath } from '../../file_system';
|
|
12
12
|
import { ReferenceEmitter } from '../../imports';
|
|
13
13
|
import { IncrementalBuild } from '../../incremental/api';
|
|
14
14
|
import { ReflectionHost } from '../../reflection';
|
|
15
15
|
import { ComponentScopeReader, TypeCheckScopeRegistry } from '../../scope';
|
|
16
|
-
import { DirectiveInScope, ElementSymbol, FullTemplateMapping, GlobalCompletion, OptimizeFor, PipeInScope, ProgramTypeCheckAdapter, ShimLocation,
|
|
17
|
-
import { ShimTypeCheckingData
|
|
16
|
+
import { DirectiveInScope, ElementSymbol, FullTemplateMapping, GlobalCompletion, OptimizeFor, PipeInScope, ProgramTypeCheckAdapter, ShimLocation, TemplateSymbol, TemplateTypeChecker, TypeCheckableDirectiveMeta, TypeCheckingConfig, TypeCheckingProgramStrategy } from '../api';
|
|
17
|
+
import { ShimTypeCheckingData } from './context';
|
|
18
18
|
import { TemplateSourceManager } from './source';
|
|
19
19
|
/**
|
|
20
20
|
* Primary template type-checking engine, which performs type-checking using a
|
|
@@ -52,31 +52,24 @@ export declare class TemplateTypeCheckerImpl implements TemplateTypeChecker {
|
|
|
52
52
|
/**
|
|
53
53
|
* Stores directives and pipes that are in scope for each component.
|
|
54
54
|
*
|
|
55
|
-
* Unlike other caches, the scope of a component is not affected by its template
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* replaced.
|
|
55
|
+
* Unlike other caches, the scope of a component is not affected by its template. It will be
|
|
56
|
+
* destroyed when the `ts.Program` changes and the `TemplateTypeCheckerImpl` as a whole is
|
|
57
|
+
* destroyed and replaced.
|
|
59
58
|
*/
|
|
60
59
|
private scopeCache;
|
|
61
60
|
/**
|
|
62
61
|
* Stores potential element tags for each component (a union of DOM tags as well as directive
|
|
63
62
|
* tags).
|
|
64
63
|
*
|
|
65
|
-
* Unlike other caches, the scope of a component is not affected by its template
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* replaced.
|
|
64
|
+
* Unlike other caches, the scope of a component is not affected by its template. It will be
|
|
65
|
+
* destroyed when the `ts.Program` changes and the `TemplateTypeCheckerImpl` as a whole is
|
|
66
|
+
* destroyed and replaced.
|
|
69
67
|
*/
|
|
70
68
|
private elementTagCache;
|
|
71
69
|
private isComplete;
|
|
72
70
|
constructor(originalProgram: ts.Program, typeCheckingStrategy: TypeCheckingProgramStrategy, typeCheckAdapter: ProgramTypeCheckAdapter, config: TypeCheckingConfig, refEmitter: ReferenceEmitter, reflector: ReflectionHost, compilerHost: Pick<ts.CompilerHost, 'getCanonicalFileName'>, priorBuild: IncrementalBuild<unknown, FileTypeCheckingData>, componentScopeReader: ComponentScopeReader, typeCheckScopeRegistry: TypeCheckScopeRegistry);
|
|
73
|
-
resetOverrides(): void;
|
|
74
71
|
getTemplate(component: ts.ClassDeclaration): TmplAstNode[] | null;
|
|
75
72
|
private getLatestComponentState;
|
|
76
|
-
overrideComponentTemplate(component: ts.ClassDeclaration, template: string): {
|
|
77
|
-
nodes: TmplAstNode[];
|
|
78
|
-
errors: ParseError[] | null;
|
|
79
|
-
};
|
|
80
73
|
isTrackedTypeCheckFile(filePath: AbsoluteFsPath): boolean;
|
|
81
74
|
private getFileAndShimRecordsForPath;
|
|
82
75
|
getTemplateMappingAtShimLocation({ shimPath, positionInShimFile }: ShimLocation): FullTemplateMapping | null;
|
|
@@ -90,6 +83,7 @@ export declare class TemplateTypeCheckerImpl implements TemplateTypeChecker {
|
|
|
90
83
|
getTypeCheckBlock(component: ts.ClassDeclaration): ts.Node | null;
|
|
91
84
|
getGlobalCompletions(context: TmplAstTemplate | null, component: ts.ClassDeclaration): GlobalCompletion | null;
|
|
92
85
|
getExpressionCompletionLocation(ast: PropertyRead | SafePropertyRead | MethodCall | SafeMethodCall, component: ts.ClassDeclaration): ShimLocation | null;
|
|
86
|
+
invalidateClass(clazz: ts.ClassDeclaration): void;
|
|
93
87
|
private getOrCreateCompletionEngine;
|
|
94
88
|
private maybeAdoptPriorResultsForFile;
|
|
95
89
|
private ensureAllShimsForAllFiles;
|
|
@@ -133,10 +127,6 @@ export interface FileTypeCheckingData {
|
|
|
133
127
|
* original template.
|
|
134
128
|
*/
|
|
135
129
|
sourceManager: TemplateSourceManager;
|
|
136
|
-
/**
|
|
137
|
-
* Map of template overrides applied to any components in this input file.
|
|
138
|
-
*/
|
|
139
|
-
templateOverrides: Map<TemplateId, TemplateOverride> | null;
|
|
140
130
|
/**
|
|
141
131
|
* Data for each shim generated from this input file.
|
|
142
132
|
*
|