@angular/compiler-cli 20.0.0-next.1 → 20.0.0-next.3

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.
Files changed (74) hide show
  1. package/bundles/{chunk-YSSSYIZJ.js → chunk-22GWKJOS.js} +5 -5
  2. package/bundles/{chunk-PLKJMRGZ.js → chunk-2AJMO7DE.js} +7685 -7172
  3. package/bundles/chunk-2AJMO7DE.js.map +6 -0
  4. package/bundles/{chunk-77D5CI2U.js → chunk-5UDS2TPQ.js} +7 -7
  5. package/bundles/{chunk-UAA7BTBW.js → chunk-ACYTOLUT.js} +31 -31
  6. package/bundles/{chunk-O2OVHMWL.js → chunk-BTNMUYEF.js} +213 -149
  7. package/bundles/chunk-BTNMUYEF.js.map +6 -0
  8. package/bundles/{chunk-FKXFEX7K.js → chunk-GBKXY6BH.js} +3 -3
  9. package/bundles/{chunk-Q2WE7ECN.js → chunk-I6R3GL3L.js} +5 -5
  10. package/bundles/{chunk-SNXU6YPZ.js → chunk-PQSJQCH7.js} +3 -3
  11. package/bundles/{chunk-QYORKQDN.js → chunk-SOZYYFP3.js} +46 -43
  12. package/bundles/chunk-SOZYYFP3.js.map +6 -0
  13. package/bundles/{chunk-37JMVF7H.js → chunk-STORTTKY.js} +8 -8
  14. package/bundles/{chunk-SEPXPBD2.js → chunk-V53QJA3R.js} +12 -12
  15. package/bundles/index.js +12 -12
  16. package/bundles/linker/babel/index.js +12 -12
  17. package/bundles/linker/index.js +4 -4
  18. package/bundles/private/bazel.js +1 -1
  19. package/bundles/private/localize.js +3 -3
  20. package/bundles/private/migrations.js +6 -6
  21. package/bundles/private/tooling.js +6 -6
  22. package/bundles/src/bin/ng_xi18n.js +10 -10
  23. package/bundles/src/bin/ngc.js +8 -8
  24. package/bundles_metadata.json +1 -1
  25. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  26. package/package.json +3 -3
  27. package/private/migrations.d.ts +1 -1
  28. package/src/ngtsc/annotations/common/src/evaluation.d.ts +1 -1
  29. package/src/ngtsc/annotations/common/src/util.d.ts +19 -2
  30. package/src/ngtsc/annotations/component/src/handler.d.ts +2 -1
  31. package/src/ngtsc/annotations/component/src/metadata.d.ts +5 -2
  32. package/src/ngtsc/annotations/component/src/resources.d.ts +3 -2
  33. package/src/ngtsc/annotations/directive/src/handler.d.ts +12 -3
  34. package/src/ngtsc/annotations/directive/src/shared.d.ts +10 -4
  35. package/src/ngtsc/annotations/index.d.ts +1 -1
  36. package/src/ngtsc/core/api/src/options.d.ts +10 -2
  37. package/src/ngtsc/core/api/src/public_options.d.ts +4 -2
  38. package/src/ngtsc/core/src/compiler.d.ts +3 -3
  39. package/src/ngtsc/diagnostics/src/error_code.d.ts +4 -0
  40. package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +2 -1
  41. package/src/ngtsc/docs/src/function_extractor.d.ts +1 -1
  42. package/src/ngtsc/hmr/src/update_declaration.d.ts +3 -2
  43. package/src/ngtsc/metadata/index.d.ts +1 -1
  44. package/src/ngtsc/metadata/src/resource_registry.d.ts +13 -9
  45. package/src/ngtsc/typecheck/api/api.d.ts +22 -24
  46. package/src/ngtsc/typecheck/api/checker.d.ts +8 -4
  47. package/src/ngtsc/typecheck/api/context.d.ts +36 -18
  48. package/src/ngtsc/typecheck/diagnostics/src/diagnostic.d.ts +2 -2
  49. package/src/ngtsc/typecheck/diagnostics/src/id.d.ts +2 -2
  50. package/src/ngtsc/typecheck/extended/checks/unparenthesized_nullish_coalescing/index.d.ts +10 -0
  51. package/src/ngtsc/typecheck/index.d.ts +1 -0
  52. package/src/ngtsc/typecheck/src/checker.d.ts +8 -7
  53. package/src/ngtsc/typecheck/src/completion.d.ts +2 -2
  54. package/src/ngtsc/typecheck/src/context.d.ts +28 -26
  55. package/src/ngtsc/typecheck/src/diagnostics.d.ts +5 -5
  56. package/src/ngtsc/typecheck/src/dom.d.ts +19 -8
  57. package/src/ngtsc/typecheck/src/host_bindings.d.ts +31 -0
  58. package/src/ngtsc/typecheck/src/oob.d.ts +41 -45
  59. package/src/ngtsc/typecheck/src/source.d.ts +14 -22
  60. package/src/ngtsc/typecheck/src/tcb_util.d.ts +23 -15
  61. package/src/ngtsc/typecheck/src/template_symbol_builder.d.ts +3 -3
  62. package/src/ngtsc/typecheck/src/ts_util.d.ts +1 -1
  63. package/src/ngtsc/typecheck/src/type_check_block.d.ts +10 -6
  64. package/bundles/chunk-O2OVHMWL.js.map +0 -6
  65. package/bundles/chunk-PLKJMRGZ.js.map +0 -6
  66. package/bundles/chunk-QYORKQDN.js.map +0 -6
  67. /package/bundles/{chunk-YSSSYIZJ.js.map → chunk-22GWKJOS.js.map} +0 -0
  68. /package/bundles/{chunk-77D5CI2U.js.map → chunk-5UDS2TPQ.js.map} +0 -0
  69. /package/bundles/{chunk-UAA7BTBW.js.map → chunk-ACYTOLUT.js.map} +0 -0
  70. /package/bundles/{chunk-FKXFEX7K.js.map → chunk-GBKXY6BH.js.map} +0 -0
  71. /package/bundles/{chunk-Q2WE7ECN.js.map → chunk-I6R3GL3L.js.map} +0 -0
  72. /package/bundles/{chunk-SNXU6YPZ.js.map → chunk-PQSJQCH7.js.map} +0 -0
  73. /package/bundles/{chunk-37JMVF7H.js.map → chunk-STORTTKY.js.map} +0 -0
  74. /package/bundles/{chunk-SEPXPBD2.js.map → chunk-V53QJA3R.js.map} +0 -0
@@ -5,39 +5,57 @@
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 { ParseError, ParseSourceFile, R3TargetBinder, SchemaMetadata, TmplAstNode } from '@angular/compiler';
8
+ import { ParseError, ParseSourceFile, R3TargetBinder, SchemaMetadata, TmplAstHostElement, TmplAstNode } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { Reference } from '../../imports';
11
11
  import { PipeMeta } from '../../metadata';
12
12
  import { ClassDeclaration } from '../../reflection';
13
- import { TemplateSourceMapping, TypeCheckableDirectiveMeta } from './api';
13
+ import { SourceMapping, TypeCheckableDirectiveMeta } from './api';
14
+ /** Contextuable data for type checking the template of a component. */
15
+ export interface TemplateContext {
16
+ /** AST nodes representing the template. */
17
+ nodes: TmplAstNode[];
18
+ /** Describes the origin of the template text. Used for mapping errors back. */
19
+ sourceMapping: SourceMapping;
20
+ /** `ParseSourceFile` associated with the template. */
21
+ file: ParseSourceFile;
22
+ /** Errors produced while parsing the template. */
23
+ parseErrors: ParseError[] | null;
24
+ /** Pipes available within the template. */
25
+ pipes: Map<string, PipeMeta>;
26
+ /** Whether the template preserves whitespaces. */
27
+ preserveWhitespaces: boolean;
28
+ }
29
+ /** Contextual data for type checking the host bindings of a directive. */
30
+ export interface HostBindingsContext {
31
+ /** AST node representing the host element of the directive. */
32
+ node: TmplAstHostElement;
33
+ /** Describes the source of the host bindings. Used for mapping errors back. */
34
+ sourceMapping: SourceMapping;
35
+ }
14
36
  /**
15
37
  * A currently pending type checking operation, into which templates for type-checking can be
16
38
  * registered.
17
39
  */
18
40
  export interface TypeCheckContext {
19
41
  /**
20
- * Register a template to potentially be type-checked.
42
+ * Register a directive to be potentially be type-checked.
21
43
  *
22
- * Templates registered via `addTemplate` are available for checking, but might be skipped if
23
- * checking of that component is not required. This can happen for a few reasons, including if
24
- * the component was previously checked and the prior results are still valid.
44
+ * Directives registered via `addDIrective` are available for checking, but might be skipped if
45
+ * checking of that class is not required. This can happen for a few reasons, including if it was
46
+ * previously checked and the prior results are still valid.
25
47
  *
26
- * @param ref a `Reference` to the component class which yielded this template.
48
+ * @param ref a `Reference` to the directive class which yielded this template.
27
49
  * @param binder an `R3TargetBinder` which encapsulates the scope of this template, including all
28
50
  * available directives.
29
- * @param template the original template AST of this component.
30
- * @param pipes a `Map` of pipes available within the scope of this template.
31
- * @param schemas any schemas which apply to this template.
32
- * @param sourceMapping a `TemplateSourceMapping` instance which describes the origin of the
33
- * template text described by the AST.
34
- * @param file the `ParseSourceFile` associated with the template.
35
- * @param parseErrors the `ParseError`'s associated with the template.
36
- * @param isStandalone a boolean indicating whether the component is standalone.
37
- * @param preserveWhitespaces a boolean indicating whether the component's template preserves
38
- * whitespaces.
51
+ * @param schemas Schemas that will apply when checking the directive.
52
+ * @param templateContext Contextual information necessary for checking the template.
53
+ * Only relevant for component classes.
54
+ * @param hostBindingContext Contextual information necessary for checking the host bindings of
55
+ * a directive.
56
+ * @param isStandalone a boolean indicating whether the directive is standalone.
39
57
  */
40
- addTemplate(ref: Reference<ClassDeclaration<ts.ClassDeclaration>>, binder: R3TargetBinder<TypeCheckableDirectiveMeta>, template: TmplAstNode[], pipes: Map<string, PipeMeta>, schemas: SchemaMetadata[], sourceMapping: TemplateSourceMapping, file: ParseSourceFile, parseErrors: ParseError[] | null, isStandalone: boolean, preserveWhitespaces: boolean): void;
58
+ addDirective(ref: Reference<ClassDeclaration<ts.ClassDeclaration>>, binder: R3TargetBinder<TypeCheckableDirectiveMeta>, schemas: SchemaMetadata[], templateContext: TemplateContext | null, hostBindingContext: HostBindingsContext | null, isStandalone: boolean): void;
41
59
  }
42
60
  /**
43
61
  * Interface to trigger generation of type-checking code for a program given a new
@@ -7,11 +7,11 @@
7
7
  */
8
8
  import { ParseSourceSpan } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
- import { TemplateDiagnostic, TemplateId, TemplateSourceMapping } from '../../api';
10
+ import { TemplateDiagnostic, TypeCheckId, SourceMapping } from '../../api';
11
11
  /**
12
12
  * Constructs a `ts.Diagnostic` for a given `ParseSourceSpan` within a template.
13
13
  */
14
- export declare function makeTemplateDiagnostic(templateId: TemplateId, mapping: TemplateSourceMapping, span: ParseSourceSpan, category: ts.DiagnosticCategory, code: number, messageText: string | ts.DiagnosticMessageChain, relatedMessages?: {
14
+ export declare function makeTemplateDiagnostic(id: TypeCheckId, mapping: SourceMapping, span: ParseSourceSpan, category: ts.DiagnosticCategory, code: number, messageText: string | ts.DiagnosticMessageChain, relatedMessages?: {
15
15
  text: string;
16
16
  start: number;
17
17
  end: number;
@@ -6,5 +6,5 @@
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import { DeclarationNode } from '../../../reflection';
9
- import { TemplateId } from '../../api';
10
- export declare function getTemplateId(clazz: DeclarationNode): TemplateId;
9
+ import { TypeCheckId } from '../../api';
10
+ export declare function getTypeCheckId(clazz: DeclarationNode): TypeCheckId;
@@ -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.UNPARENTHESIZED_NULLISH_COALESCING, ExtendedTemplateDiagnosticName.UNPARENTHESIZED_NULLISH_COALESCING>;
@@ -9,3 +9,4 @@ export { FileTypeCheckingData, TemplateTypeCheckerImpl } from './src/checker';
9
9
  export { TypeCheckContextImpl, getTemplateDiagnostics } from './src/context';
10
10
  export { TypeCheckShimGenerator } from './src/shim';
11
11
  export { typeCheckFilePath } from './src/type_check_file';
12
+ export { createHostElement } from './src/host_bindings';
@@ -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 { AST, LiteralPrimitive, ParseSourceSpan, PropertyRead, SafePropertyRead, TemplateEntity, TmplAstElement, TmplAstNode, TmplAstTemplate, TmplAstTextAttribute } from '@angular/compiler';
8
+ import { AST, LiteralPrimitive, ParseSourceSpan, PropertyRead, SafePropertyRead, TemplateEntity, TmplAstElement, TmplAstHostElement, TmplAstNode, TmplAstTemplate, TmplAstTextAttribute } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { ErrorCode } from '../../diagnostics';
11
11
  import { AbsoluteFsPath } from '../../file_system';
@@ -16,9 +16,9 @@ import { PerfRecorder } from '../../perf';
16
16
  import { ProgramDriver } from '../../program_driver';
17
17
  import { ClassDeclaration, ReflectionHost } from '../../reflection';
18
18
  import { ComponentScopeReader, TypeCheckScopeRegistry } from '../../scope';
19
- import { ElementSymbol, FullTemplateMapping, GlobalCompletion, NgTemplateDiagnostic, OptimizeFor, PotentialDirective, PotentialImport, PotentialImportMode, PotentialPipe, ProgramTypeCheckAdapter, TcbLocation, TemplateSymbol, TemplateTypeChecker, TypeCheckableDirectiveMeta, TypeCheckingConfig } from '../api';
19
+ import { ElementSymbol, FullSourceMapping, GlobalCompletion, NgTemplateDiagnostic, OptimizeFor, PotentialDirective, PotentialImport, PotentialImportMode, PotentialPipe, ProgramTypeCheckAdapter, TcbLocation, TemplateSymbol, TemplateTypeChecker, TypeCheckableDirectiveMeta, TypeCheckingConfig } from '../api';
20
20
  import { ShimTypeCheckingData } from './context';
21
- import { TemplateSourceManager } from './source';
21
+ import { DirectiveSourceManager } from './source';
22
22
  /**
23
23
  * Primary template type-checking engine, which performs type-checking using a
24
24
  * `TypeCheckingProgramStrategy` for type-checking program maintenance, and the
@@ -76,13 +76,14 @@ export declare class TemplateTypeCheckerImpl implements TemplateTypeChecker {
76
76
  private isComplete;
77
77
  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);
78
78
  getTemplate(component: ts.ClassDeclaration, optimizeFor?: OptimizeFor): TmplAstNode[] | null;
79
+ getHostElement(directive: ts.ClassDeclaration, optimizeFor?: OptimizeFor): TmplAstHostElement | null;
79
80
  getUsedDirectives(component: ts.ClassDeclaration): TypeCheckableDirectiveMeta[] | null;
80
81
  getUsedPipes(component: ts.ClassDeclaration): string[] | null;
81
82
  private getLatestComponentState;
82
83
  isTrackedTypeCheckFile(filePath: AbsoluteFsPath): boolean;
83
84
  private getFileRecordForTcbLocation;
84
85
  private getFileAndShimRecordsForPath;
85
- getTemplateMappingAtTcbLocation(tcbLocation: TcbLocation): FullTemplateMapping | null;
86
+ getSourceMappingAtTcbLocation(tcbLocation: TcbLocation): FullSourceMapping | null;
86
87
  generateAllTypeCheckBlocks(): void;
87
88
  /**
88
89
  * Retrieve type-checking and template parse diagnostics from the given `ts.SourceFile` using the
@@ -150,10 +151,10 @@ export interface FileTypeCheckingData {
150
151
  */
151
152
  hasInlines: boolean;
152
153
  /**
153
- * Source mapping information for mapping diagnostics from inlined type check blocks back to the
154
- * original template.
154
+ * Information for mapping diagnostics from inlined type check blocks
155
+ * back to their original sources.
155
156
  */
156
- sourceManager: TemplateSourceManager;
157
+ sourceManager: DirectiveSourceManager;
157
158
  /**
158
159
  * Data for each shim generated from this input file.
159
160
  *
@@ -9,7 +9,7 @@ import { AST, LiteralPrimitive, PropertyRead, PropertyWrite, SafePropertyRead, T
9
9
  import ts from 'typescript';
10
10
  import { AbsoluteFsPath } from '../../file_system';
11
11
  import { GlobalCompletion, TcbLocation } from '../api';
12
- import { TemplateData } from './context';
12
+ import { TypeCheckData } from './context';
13
13
  /**
14
14
  * Powers autocompletion for a specific component.
15
15
  *
@@ -28,7 +28,7 @@ export declare class CompletionEngine {
28
28
  */
29
29
  private templateContextCache;
30
30
  private expressionCompletionCache;
31
- constructor(tcb: ts.Node, data: TemplateData, tcbPath: AbsoluteFsPath, tcbIsShim: boolean);
31
+ constructor(tcb: ts.Node, data: TypeCheckData, tcbPath: AbsoluteFsPath, tcbIsShim: boolean);
32
32
  /**
33
33
  * Get global completions within the given template context and AST node.
34
34
  *
@@ -5,18 +5,17 @@
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 { BoundTarget, ParseError, ParseSourceFile, R3TargetBinder, SchemaMetadata, TmplAstNode } from '@angular/compiler';
8
+ import { BoundTarget, ParseError, R3TargetBinder, SchemaMetadata, TmplAstHostElement, TmplAstNode } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { AbsoluteFsPath } from '../../file_system';
11
11
  import { Reference, ReferenceEmitter } from '../../imports';
12
- import { PipeMeta } from '../../metadata';
13
12
  import { PerfRecorder } from '../../perf';
14
13
  import { FileUpdate } from '../../program_driver';
15
14
  import { ClassDeclaration, ReflectionHost } from '../../reflection';
16
- import { TemplateDiagnostic, TemplateId, TemplateSourceMapping, TypeCheckableDirectiveMeta, TypeCheckContext, TypeCheckingConfig, TypeCtorMetadata } from '../api';
15
+ import { HostBindingsContext, TemplateDiagnostic, TypeCheckId, SourceMapping, TypeCheckableDirectiveMeta, TypeCheckContext, TypeCheckingConfig, TypeCtorMetadata, TemplateContext } from '../api';
17
16
  import { DomSchemaChecker } from './dom';
18
17
  import { OutOfBandDiagnosticRecorder } from './oob';
19
- import { TemplateSourceManager } from './source';
18
+ import { DirectiveSourceManager } from './source';
20
19
  import { TypeCheckFile } from './type_check_file';
21
20
  export interface ShimTypeCheckingData {
22
21
  /**
@@ -34,28 +33,32 @@ export interface ShimTypeCheckingData {
34
33
  */
35
34
  hasInlines: boolean;
36
35
  /**
37
- * Map of `TemplateId` to information collected about the template during the template
36
+ * Map of `TypeCheckId` to information collected about the template during the template
38
37
  * type-checking process.
39
38
  */
40
- templates: Map<TemplateId, TemplateData>;
39
+ data: Map<TypeCheckId, TypeCheckData>;
41
40
  }
42
41
  /**
43
- * Data tracked for each template processed by the template type-checking system.
42
+ * Data tracked for each class processed by the type-checking system.
44
43
  */
45
- export interface TemplateData {
44
+ export interface TypeCheckData {
46
45
  /**
47
46
  * Template nodes for which the TCB was generated.
48
47
  */
49
- template: TmplAstNode[];
48
+ template: TmplAstNode[] | null;
50
49
  /**
51
50
  * `BoundTarget` which was used to generate the TCB, and contains bindings for the associated
52
51
  * template nodes.
53
52
  */
54
53
  boundTarget: BoundTarget<TypeCheckableDirectiveMeta>;
55
54
  /**
56
- * Errors found while parsing them template, which have been converted to diagnostics.
55
+ * Errors found while parsing the template, which have been converted to diagnostics.
57
56
  */
58
- templateDiagnostics: TemplateDiagnostic[];
57
+ templateParsingDiagnostics: TemplateDiagnostic[];
58
+ /**
59
+ * Element representing the host bindings of a directive.
60
+ */
61
+ hostElement: TmplAstHostElement | null;
59
62
  }
60
63
  /**
61
64
  * Data for an input file which is still in the process of template type-checking code generation.
@@ -69,7 +72,7 @@ export interface PendingFileTypeCheckingData {
69
72
  * Source mapping information for mapping diagnostics from inlined type check blocks back to the
70
73
  * original template.
71
74
  */
72
- sourceManager: TemplateSourceManager;
75
+ sourceManager: DirectiveSourceManager;
73
76
  /**
74
77
  * Map of in-progress shim data for shims generated from this input file.
75
78
  */
@@ -89,9 +92,9 @@ export interface PendingShimData {
89
92
  */
90
93
  file: TypeCheckFile;
91
94
  /**
92
- * Map of `TemplateId` to information collected about the template as it's ingested.
95
+ * Map of `TypeCheckId` to information collected about the template as it's ingested.
93
96
  */
94
- templates: Map<TemplateId, TemplateData>;
97
+ data: Map<TypeCheckId, TypeCheckData>;
95
98
  }
96
99
  /**
97
100
  * Adapts the `TypeCheckContextImpl` to the larger template type-checking system.
@@ -102,23 +105,23 @@ export interface PendingShimData {
102
105
  */
103
106
  export interface TypeCheckingHost {
104
107
  /**
105
- * Retrieve the `TemplateSourceManager` responsible for components in the given input file path.
108
+ * Retrieve the `DirectiveSourceManager` responsible for directives in the given input file path.
106
109
  */
107
- getSourceManager(sfPath: AbsoluteFsPath): TemplateSourceManager;
110
+ getSourceManager(sfPath: AbsoluteFsPath): DirectiveSourceManager;
108
111
  /**
109
- * Whether a particular component class should be included in the current type-checking pass.
112
+ * Whether a particular class should be included in the current type-checking pass.
110
113
  *
111
- * Not all components offered to the `TypeCheckContext` for checking may require processing. For
112
- * example, the component may have results already available from a prior pass or from a previous
114
+ * Not all classes offered to the `TypeCheckContext` for checking may require processing. For
115
+ * example, the directive may have results already available from a prior pass or from a previous
113
116
  * program.
114
117
  */
115
- shouldCheckComponent(node: ts.ClassDeclaration): boolean;
118
+ shouldCheckClass(node: ts.ClassDeclaration): boolean;
116
119
  /**
117
120
  * Report data from a shim generated from the given input file path.
118
121
  */
119
122
  recordShimData(sfPath: AbsoluteFsPath, data: ShimTypeCheckingData): void;
120
123
  /**
121
- * Record that all of the components within the given input file path had code generated - that
124
+ * Record that all of the classes within the given input file path had code generated - that
122
125
  * is, coverage for the file can be considered complete.
123
126
  */
124
127
  recordComplete(sfPath: AbsoluteFsPath): void;
@@ -139,8 +142,7 @@ export declare enum InliningMode {
139
142
  /**
140
143
  * A template type checking context for a program.
141
144
  *
142
- * The `TypeCheckContext` allows registration of components and their templates which need to be
143
- * type checked.
145
+ * The `TypeCheckContext` allows registration of directives to be type checked.
144
146
  */
145
147
  export declare class TypeCheckContextImpl implements TypeCheckContext {
146
148
  private config;
@@ -167,7 +169,7 @@ export declare class TypeCheckContextImpl implements TypeCheckContext {
167
169
  *
168
170
  * Implements `TypeCheckContext.addTemplate`.
169
171
  */
170
- addTemplate(ref: Reference<ClassDeclaration<ts.ClassDeclaration>>, binder: R3TargetBinder<TypeCheckableDirectiveMeta>, template: TmplAstNode[], pipes: Map<string, PipeMeta>, schemas: SchemaMetadata[], sourceMapping: TemplateSourceMapping, file: ParseSourceFile, parseErrors: ParseError[] | null, isStandalone: boolean, preserveWhitespaces: boolean): void;
172
+ addDirective(ref: Reference<ClassDeclaration<ts.ClassDeclaration>>, binder: R3TargetBinder<TypeCheckableDirectiveMeta>, schemas: SchemaMetadata[], templateContext: TemplateContext | null, hostBindingContext: HostBindingsContext | null, isStandalone: boolean): void;
171
173
  /**
172
174
  * Record a type constructor for the given `node` with the given `ctorMetadata`.
173
175
  */
@@ -181,7 +183,7 @@ export declare class TypeCheckContextImpl implements TypeCheckContext {
181
183
  transform(sf: ts.SourceFile): string | null;
182
184
  finalize(): Map<AbsoluteFsPath, FileUpdate>;
183
185
  private addInlineTypeCheckBlock;
184
- private pendingShimForComponent;
186
+ private pendingShimForClass;
185
187
  private dataForFile;
186
188
  }
187
- export declare function getTemplateDiagnostics(parseErrors: ParseError[], templateId: TemplateId, sourceMapping: TemplateSourceMapping): TemplateDiagnostic[];
189
+ export declare function getTemplateDiagnostics(parseErrors: ParseError[], templateId: TypeCheckId, sourceMapping: SourceMapping): TemplateDiagnostic[];
@@ -7,8 +7,8 @@
7
7
  */
8
8
  import { AbsoluteSourceSpan, ParseSourceSpan } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
- import { TemplateDiagnostic, TemplateId } from '../api';
11
- import { TemplateSourceResolver } from './tcb_util';
10
+ import { TemplateDiagnostic, TypeCheckId } from '../api';
11
+ import { TypeCheckSourceResolver } from './tcb_util';
12
12
  /**
13
13
  * Wraps the node in parenthesis such that inserted span comments become attached to the proper
14
14
  * node. This is an alias for `ts.factory.createParenthesizedExpression` with the benefit that it
@@ -34,10 +34,10 @@ export declare function wrapForTypeChecker(expr: ts.Expression): ts.Expression;
34
34
  */
35
35
  export declare function addParseSpanInfo(node: ts.Node, span: AbsoluteSourceSpan | ParseSourceSpan): void;
36
36
  /**
37
- * Adds a synthetic comment to the function declaration that contains the template id
37
+ * Adds a synthetic comment to the function declaration that contains the type checking ID
38
38
  * of the class declaration.
39
39
  */
40
- export declare function addTemplateId(tcb: ts.FunctionDeclaration, id: TemplateId): void;
40
+ export declare function addTypeCheckId(tcb: ts.FunctionDeclaration, id: TypeCheckId): void;
41
41
  /**
42
42
  * Determines if the diagnostic should be reported. Some diagnostics are produced because of the
43
43
  * way TCBs are generated; those diagnostics should not be reported as type check errors of the
@@ -52,4 +52,4 @@ export declare function shouldReportDiagnostic(diagnostic: ts.Diagnostic): boole
52
52
  * should not be reported at all. This prevents diagnostics from non-TCB code in a user's source
53
53
  * file from being reported as type-check errors.
54
54
  */
55
- export declare function translateDiagnostic(diagnostic: ts.Diagnostic, resolver: TemplateSourceResolver): TemplateDiagnostic | null;
55
+ export declare function translateDiagnostic(diagnostic: ts.Diagnostic, resolver: TypeCheckSourceResolver): TemplateDiagnostic | null;
@@ -5,9 +5,9 @@
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 { ParseSourceSpan, SchemaMetadata, TmplAstElement } from '@angular/compiler';
9
- import { TemplateDiagnostic, TemplateId } from '../api';
10
- import { TemplateSourceResolver } from './tcb_util';
8
+ import { ParseSourceSpan, SchemaMetadata, TmplAstElement, TmplAstHostElement } from '@angular/compiler';
9
+ import { TemplateDiagnostic, TypeCheckId } from '../api';
10
+ import { TypeCheckSourceResolver } from './tcb_util';
11
11
  /**
12
12
  * Checks every non-Angular element/property processed in a template and potentially produces
13
13
  * `ts.Diagnostic`s related to improper usage.
@@ -37,7 +37,7 @@ export interface DomSchemaChecker {
37
37
  /**
38
38
  * Check a property binding on an element and record any diagnostics about it.
39
39
  *
40
- * @param id the template ID, suitable for resolution with a `TcbSourceResolver`.
40
+ * @param id the type check ID, suitable for resolution with a `TcbSourceResolver`.
41
41
  * @param element the element node in question.
42
42
  * @param name the name of the property being checked.
43
43
  * @param span the source span of the binding. This is redundant with `element.attributes` but is
@@ -45,7 +45,17 @@ export interface DomSchemaChecker {
45
45
  * @param schemas any active schemas for the template, which might affect the validity of the
46
46
  * property.
47
47
  */
48
- checkProperty(id: string, element: TmplAstElement, name: string, span: ParseSourceSpan, schemas: SchemaMetadata[], hostIsStandalone: boolean): void;
48
+ checkTemplateElementProperty(id: string, element: TmplAstElement, name: string, span: ParseSourceSpan, schemas: SchemaMetadata[], hostIsStandalone: boolean): void;
49
+ /**
50
+ * Check a property binding on a host element and record any diagnostics about it.
51
+ * @param id the type check ID, suitable for resolution with a `TcbSourceResolver`.
52
+ * @param element the element node in question.
53
+ * @param name the name of the property being checked.
54
+ * @param span the source span of the binding.
55
+ * @param schemas any active schemas for the template, which might affect the validity of the
56
+ * property.
57
+ */
58
+ checkHostElementProperty(id: string, element: TmplAstHostElement, name: string, span: ParseSourceSpan, schemas: SchemaMetadata[]): void;
49
59
  }
50
60
  /**
51
61
  * Checks non-Angular elements and properties against the `DomElementSchemaRegistry`, a schema
@@ -55,7 +65,8 @@ export declare class RegistryDomSchemaChecker implements DomSchemaChecker {
55
65
  private resolver;
56
66
  private _diagnostics;
57
67
  get diagnostics(): ReadonlyArray<TemplateDiagnostic>;
58
- constructor(resolver: TemplateSourceResolver);
59
- checkElement(id: TemplateId, element: TmplAstElement, schemas: SchemaMetadata[], hostIsStandalone: boolean): void;
60
- checkProperty(id: TemplateId, element: TmplAstElement, name: string, span: ParseSourceSpan, schemas: SchemaMetadata[], hostIsStandalone: boolean): void;
68
+ constructor(resolver: TypeCheckSourceResolver);
69
+ checkElement(id: TypeCheckId, element: TmplAstElement, schemas: SchemaMetadata[], hostIsStandalone: boolean): void;
70
+ checkTemplateElementProperty(id: TypeCheckId, element: TmplAstElement, name: string, span: ParseSourceSpan, schemas: SchemaMetadata[], hostIsStandalone: boolean): void;
71
+ checkHostElementProperty(id: TypeCheckId, element: TmplAstHostElement, name: string, span: ParseSourceSpan, schemas: SchemaMetadata[]): void;
61
72
  }
@@ -0,0 +1,31 @@
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 { TmplAstHostElement } from '@angular/compiler';
9
+ import ts from 'typescript';
10
+ import { ClassDeclaration } from '../../reflection';
11
+ /**
12
+ * Creates an AST node that represents the host element of a directive.
13
+ * Can return null if there are no valid bindings to be checked.
14
+ * @param type Whether the host element is for a directive or a component.
15
+ * @param selector Selector of the directive.
16
+ * @param sourceNode Class declaration for the directive.
17
+ * @param literal `host` object literal from the decorator.
18
+ * @param bindingDecorators `HostBinding` decorators discovered on the node.
19
+ * @param listenerDecorators `HostListener` decorators discovered on the node.
20
+ */
21
+ export declare function createHostElement(type: 'component' | 'directive', selector: string | null, sourceNode: ClassDeclaration, literal: ts.ObjectLiteralExpression | null, bindingDecorators: Iterable<ts.Decorator>, listenerDecorators: Iterable<ts.Decorator>): TmplAstHostElement | null;
22
+ /**
23
+ * Creates an AST node that can be used as a guard in `if` statements to distinguish TypeScript
24
+ * nodes used for checking host bindings from ones used for checking templates.
25
+ */
26
+ export declare function createHostBindingsBlockGuard(): ts.Expression;
27
+ /**
28
+ * Determines if a given node is a guard that indicates that descendant nodes are used to check
29
+ * host bindings.
30
+ */
31
+ export declare function isHostBindingsBlockGuard(node: ts.Node): boolean;
@@ -8,8 +8,8 @@
8
8
  import { BindingPipe, PropertyRead, PropertyWrite, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstElement, TmplAstForLoopBlock, TmplAstForLoopBlockEmpty, TmplAstHoverDeferredTrigger, TmplAstIfBlockBranch, TmplAstInteractionDeferredTrigger, TmplAstLetDeclaration, TmplAstReference, TmplAstSwitchBlockCase, TmplAstTemplate, TmplAstVariable, TmplAstViewportDeferredTrigger } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { ClassDeclaration } from '../../reflection';
11
- import { TemplateDiagnostic, TemplateId } from '../api';
12
- import { TemplateSourceResolver } from './tcb_util';
11
+ import { TemplateDiagnostic, TypeCheckId } from '../api';
12
+ import { TypeCheckSourceResolver } from './tcb_util';
13
13
  /**
14
14
  * Collects `ts.Diagnostic`s on problems which occur in the template which aren't directly sourced
15
15
  * from Type Check Blocks.
@@ -25,83 +25,79 @@ export interface OutOfBandDiagnosticRecorder {
25
25
  * Reports a `#ref="target"` expression in the template for which a target directive could not be
26
26
  * found.
27
27
  *
28
- * @param templateId the template type-checking ID of the template which contains the broken
29
- * reference.
28
+ * @param id the type-checking ID of the template which contains the broken reference.
30
29
  * @param ref the `TmplAstReference` which could not be matched to a directive.
31
30
  */
32
- missingReferenceTarget(templateId: TemplateId, ref: TmplAstReference): void;
31
+ missingReferenceTarget(id: TypeCheckId, ref: TmplAstReference): void;
33
32
  /**
34
33
  * Reports usage of a `| pipe` expression in the template for which the named pipe could not be
35
34
  * found.
36
35
  *
37
- * @param templateId the template type-checking ID of the template which contains the unknown
38
- * pipe.
36
+ * @param id the type-checking ID of the template which contains the unknown pipe.
39
37
  * @param ast the `BindingPipe` invocation of the pipe which could not be found.
40
38
  */
41
- missingPipe(templateId: TemplateId, ast: BindingPipe): void;
39
+ missingPipe(id: TypeCheckId, ast: BindingPipe): void;
42
40
  /**
43
41
  * Reports usage of a pipe imported via `@Component.deferredImports` outside
44
42
  * of a `@defer` block in a template.
45
43
  *
46
- * @param templateId the template type-checking ID of the template which contains the unknown
47
- * pipe.
44
+ * @param id the type-checking ID of the template which contains the unknown pipe.
48
45
  * @param ast the `BindingPipe` invocation of the pipe which could not be found.
49
46
  */
50
- deferredPipeUsedEagerly(templateId: TemplateId, ast: BindingPipe): void;
47
+ deferredPipeUsedEagerly(id: TypeCheckId, ast: BindingPipe): void;
51
48
  /**
52
49
  * Reports usage of a component/directive imported via `@Component.deferredImports` outside
53
50
  * of a `@defer` block in a template.
54
51
  *
55
- * @param templateId the template type-checking ID of the template which contains the unknown
56
- * pipe.
52
+ * @param id the type-checking ID of the template which contains the unknown pipe.
57
53
  * @param element the element which hosts a component that was defer-loaded.
58
54
  */
59
- deferredComponentUsedEagerly(templateId: TemplateId, element: TmplAstElement): void;
55
+ deferredComponentUsedEagerly(id: TypeCheckId, element: TmplAstElement): void;
60
56
  /**
61
57
  * Reports a duplicate declaration of a template variable.
62
58
  *
63
- * @param templateId the template type-checking ID of the template which contains the duplicate
59
+ * @param id the type-checking ID of the template which contains the duplicate
64
60
  * declaration.
65
61
  * @param variable the `TmplAstVariable` which duplicates a previously declared variable.
66
62
  * @param firstDecl the first variable declaration which uses the same name as `variable`.
67
63
  */
68
- duplicateTemplateVar(templateId: TemplateId, variable: TmplAstVariable, firstDecl: TmplAstVariable): void;
69
- requiresInlineTcb(templateId: TemplateId, node: ClassDeclaration): void;
70
- requiresInlineTypeConstructors(templateId: TemplateId, node: ClassDeclaration, directives: ClassDeclaration[]): void;
64
+ duplicateTemplateVar(id: TypeCheckId, variable: TmplAstVariable, firstDecl: TmplAstVariable): void;
65
+ requiresInlineTcb(id: TypeCheckId, node: ClassDeclaration): void;
66
+ requiresInlineTypeConstructors(id: TypeCheckId, node: ClassDeclaration, directives: ClassDeclaration[]): void;
71
67
  /**
72
68
  * Report a warning when structural directives support context guards, but the current
73
69
  * type-checking configuration prohibits their usage.
74
70
  */
75
- suboptimalTypeInference(templateId: TemplateId, variables: TmplAstVariable[]): void;
71
+ suboptimalTypeInference(id: TypeCheckId, variables: TmplAstVariable[]): void;
76
72
  /**
77
73
  * Reports a split two way binding error message.
78
74
  */
79
- splitTwoWayBinding(templateId: TemplateId, input: TmplAstBoundAttribute, output: TmplAstBoundEvent, inputConsumer: ClassDeclaration, outputConsumer: ClassDeclaration | TmplAstElement): void;
75
+ splitTwoWayBinding(id: TypeCheckId, input: TmplAstBoundAttribute, output: TmplAstBoundEvent, inputConsumer: ClassDeclaration, outputConsumer: ClassDeclaration | TmplAstElement): void;
80
76
  /** Reports required inputs that haven't been bound. */
81
- missingRequiredInputs(templateId: TemplateId, element: TmplAstElement | TmplAstTemplate, directiveName: string, isComponent: boolean, inputAliases: string[]): void;
77
+ missingRequiredInputs(id: TypeCheckId, element: TmplAstElement | TmplAstTemplate, directiveName: string, isComponent: boolean, inputAliases: string[]): void;
82
78
  /**
83
79
  * Reports accesses of properties that aren't available in a `for` block's tracking expression.
84
80
  */
85
- illegalForLoopTrackAccess(templateId: TemplateId, block: TmplAstForLoopBlock, access: PropertyRead): void;
81
+ illegalForLoopTrackAccess(id: TypeCheckId, block: TmplAstForLoopBlock, access: PropertyRead): void;
86
82
  /**
87
83
  * Reports deferred triggers that cannot access the element they're referring to.
88
84
  */
89
- inaccessibleDeferredTriggerElement(templateId: TemplateId, trigger: TmplAstHoverDeferredTrigger | TmplAstInteractionDeferredTrigger | TmplAstViewportDeferredTrigger): void;
85
+ inaccessibleDeferredTriggerElement(id: TypeCheckId, trigger: TmplAstHoverDeferredTrigger | TmplAstInteractionDeferredTrigger | TmplAstViewportDeferredTrigger): void;
90
86
  /**
91
87
  * Reports cases where control flow nodes prevent content projection.
92
88
  */
93
- controlFlowPreventingContentProjection(templateId: TemplateId, category: ts.DiagnosticCategory, projectionNode: TmplAstElement | TmplAstTemplate, componentName: string, slotSelector: string, controlFlowNode: TmplAstIfBlockBranch | TmplAstSwitchBlockCase | TmplAstForLoopBlock | TmplAstForLoopBlockEmpty, preservesWhitespaces: boolean): void;
89
+ controlFlowPreventingContentProjection(id: TypeCheckId, category: ts.DiagnosticCategory, projectionNode: TmplAstElement | TmplAstTemplate, componentName: string, slotSelector: string, controlFlowNode: TmplAstIfBlockBranch | TmplAstSwitchBlockCase | TmplAstForLoopBlock | TmplAstForLoopBlockEmpty, preservesWhitespaces: boolean): void;
94
90
  /** Reports cases where users are writing to `@let` declarations. */
95
- illegalWriteToLetDeclaration(templateId: TemplateId, node: PropertyWrite, target: TmplAstLetDeclaration): void;
91
+ illegalWriteToLetDeclaration(id: TypeCheckId, node: PropertyWrite, target: TmplAstLetDeclaration): void;
96
92
  /** Reports cases where users are accessing an `@let` before it is defined.. */
97
- letUsedBeforeDefinition(templateId: TemplateId, node: PropertyRead, target: TmplAstLetDeclaration): void;
93
+ letUsedBeforeDefinition(id: TypeCheckId, node: PropertyRead, target: TmplAstLetDeclaration): void;
98
94
  /**
99
95
  * Reports a `@let` declaration that conflicts with another symbol in the same scope.
100
96
  *
101
- * @param templateId the template type-checking ID of the template which contains the declaration.
97
+ * @param id the type-checking ID of the template which contains the declaration.
102
98
  * @param current the `TmplAstLetDeclaration` which is invalid.
103
99
  */
104
- conflictingDeclaration(templateId: TemplateId, current: TmplAstLetDeclaration): void;
100
+ conflictingDeclaration(id: TypeCheckId, current: TmplAstLetDeclaration): void;
105
101
  }
106
102
  export declare class OutOfBandDiagnosticRecorderImpl implements OutOfBandDiagnosticRecorder {
107
103
  private resolver;
@@ -111,22 +107,22 @@ export declare class OutOfBandDiagnosticRecorderImpl implements OutOfBandDiagnos
111
107
  * is ever produced per node.
112
108
  */
113
109
  private recordedPipes;
114
- constructor(resolver: TemplateSourceResolver);
110
+ constructor(resolver: TypeCheckSourceResolver);
115
111
  get diagnostics(): ReadonlyArray<TemplateDiagnostic>;
116
- missingReferenceTarget(templateId: TemplateId, ref: TmplAstReference): void;
117
- missingPipe(templateId: TemplateId, ast: BindingPipe): void;
118
- deferredPipeUsedEagerly(templateId: TemplateId, ast: BindingPipe): void;
119
- deferredComponentUsedEagerly(templateId: TemplateId, element: TmplAstElement): void;
120
- duplicateTemplateVar(templateId: TemplateId, variable: TmplAstVariable, firstDecl: TmplAstVariable): void;
121
- requiresInlineTcb(templateId: TemplateId, node: ClassDeclaration): void;
122
- requiresInlineTypeConstructors(templateId: TemplateId, node: ClassDeclaration, directives: ClassDeclaration[]): void;
123
- suboptimalTypeInference(templateId: TemplateId, variables: TmplAstVariable[]): void;
124
- splitTwoWayBinding(templateId: TemplateId, input: TmplAstBoundAttribute, output: TmplAstBoundEvent, inputConsumer: ClassDeclaration, outputConsumer: ClassDeclaration | TmplAstElement): void;
125
- missingRequiredInputs(templateId: TemplateId, element: TmplAstElement | TmplAstTemplate, directiveName: string, isComponent: boolean, inputAliases: string[]): void;
126
- illegalForLoopTrackAccess(templateId: TemplateId, block: TmplAstForLoopBlock, access: PropertyRead): void;
127
- inaccessibleDeferredTriggerElement(templateId: TemplateId, trigger: TmplAstHoverDeferredTrigger | TmplAstInteractionDeferredTrigger | TmplAstViewportDeferredTrigger): void;
128
- controlFlowPreventingContentProjection(templateId: TemplateId, category: ts.DiagnosticCategory, projectionNode: TmplAstElement | TmplAstTemplate, componentName: string, slotSelector: string, controlFlowNode: TmplAstIfBlockBranch | TmplAstSwitchBlockCase | TmplAstForLoopBlock | TmplAstForLoopBlockEmpty, preservesWhitespaces: boolean): void;
129
- illegalWriteToLetDeclaration(templateId: TemplateId, node: PropertyWrite, target: TmplAstLetDeclaration): void;
130
- letUsedBeforeDefinition(templateId: TemplateId, node: PropertyRead, target: TmplAstLetDeclaration): void;
131
- conflictingDeclaration(templateId: TemplateId, decl: TmplAstLetDeclaration): void;
112
+ missingReferenceTarget(id: TypeCheckId, ref: TmplAstReference): void;
113
+ missingPipe(id: TypeCheckId, ast: BindingPipe): void;
114
+ deferredPipeUsedEagerly(id: TypeCheckId, ast: BindingPipe): void;
115
+ deferredComponentUsedEagerly(id: TypeCheckId, element: TmplAstElement): void;
116
+ duplicateTemplateVar(id: TypeCheckId, variable: TmplAstVariable, firstDecl: TmplAstVariable): void;
117
+ requiresInlineTcb(id: TypeCheckId, node: ClassDeclaration): void;
118
+ requiresInlineTypeConstructors(id: TypeCheckId, node: ClassDeclaration, directives: ClassDeclaration[]): void;
119
+ suboptimalTypeInference(id: TypeCheckId, variables: TmplAstVariable[]): void;
120
+ splitTwoWayBinding(id: TypeCheckId, input: TmplAstBoundAttribute, output: TmplAstBoundEvent, inputConsumer: ClassDeclaration, outputConsumer: ClassDeclaration | TmplAstElement): void;
121
+ missingRequiredInputs(id: TypeCheckId, element: TmplAstElement | TmplAstTemplate, directiveName: string, isComponent: boolean, inputAliases: string[]): void;
122
+ illegalForLoopTrackAccess(id: TypeCheckId, block: TmplAstForLoopBlock, access: PropertyRead): void;
123
+ inaccessibleDeferredTriggerElement(id: TypeCheckId, trigger: TmplAstHoverDeferredTrigger | TmplAstInteractionDeferredTrigger | TmplAstViewportDeferredTrigger): void;
124
+ controlFlowPreventingContentProjection(id: TypeCheckId, category: ts.DiagnosticCategory, projectionNode: TmplAstElement | TmplAstTemplate, componentName: string, slotSelector: string, controlFlowNode: TmplAstIfBlockBranch | TmplAstSwitchBlockCase | TmplAstForLoopBlock | TmplAstForLoopBlockEmpty, preservesWhitespaces: boolean): void;
125
+ illegalWriteToLetDeclaration(id: TypeCheckId, node: PropertyWrite, target: TmplAstLetDeclaration): void;
126
+ letUsedBeforeDefinition(id: TypeCheckId, node: PropertyRead, target: TmplAstLetDeclaration): void;
127
+ conflictingDeclaration(id: TypeCheckId, decl: TmplAstLetDeclaration): void;
132
128
  }