@angular/compiler-cli 14.0.0-next.7 → 14.0.0-rc.0

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 (125) hide show
  1. package/bundles/{chunk-AR265E4B.js → chunk-2IMT6JFI.js} +1 -1
  2. package/bundles/chunk-2IMT6JFI.js.map +6 -0
  3. package/bundles/{chunk-VGNMN2NK.js → chunk-53V6MPBS.js} +19 -8
  4. package/bundles/chunk-53V6MPBS.js.map +6 -0
  5. package/bundles/{chunk-OOJDZK5W.js → chunk-7XY4OMWJ.js} +110 -70
  6. package/bundles/chunk-7XY4OMWJ.js.map +6 -0
  7. package/bundles/{chunk-NM2N677S.js → chunk-BHGVN4MI.js} +70 -25
  8. package/bundles/chunk-BHGVN4MI.js.map +6 -0
  9. package/bundles/{chunk-26T3CJIJ.js → chunk-GJVJ6GH4.js} +1079 -815
  10. package/bundles/chunk-GJVJ6GH4.js.map +6 -0
  11. package/bundles/{chunk-WQ3TNYTD.js → chunk-GMSUYBZP.js} +8 -11
  12. package/bundles/{chunk-WQ3TNYTD.js.map → chunk-GMSUYBZP.js.map} +0 -0
  13. package/bundles/{chunk-5RC6M6GX.js → chunk-JDKMNZ6O.js} +6 -8
  14. package/bundles/chunk-JDKMNZ6O.js.map +6 -0
  15. package/bundles/{chunk-U5ES6WUL.js → chunk-KPGMJT2X.js} +3 -3
  16. package/bundles/chunk-KPGMJT2X.js.map +6 -0
  17. package/bundles/{chunk-646P2DOR.js → chunk-LX5Q27EF.js} +1 -1
  18. package/bundles/chunk-LX5Q27EF.js.map +6 -0
  19. package/bundles/{chunk-KMCI52ED.js → chunk-N6HUFHQ6.js} +967 -901
  20. package/bundles/chunk-N6HUFHQ6.js.map +6 -0
  21. package/bundles/{chunk-MXJN5K6C.js → chunk-OLGEBPBY.js} +3 -3
  22. package/bundles/chunk-OLGEBPBY.js.map +6 -0
  23. package/bundles/{chunk-QDWL7SZJ.js → chunk-R3C7RFJ4.js} +1 -1
  24. package/bundles/chunk-R3C7RFJ4.js.map +6 -0
  25. package/bundles/{chunk-GLCRIILX.js → chunk-R4NY3TJC.js} +1 -1
  26. package/bundles/chunk-R4NY3TJC.js.map +6 -0
  27. package/bundles/{chunk-FXU7FMZC.js → chunk-T7MYRXIE.js} +3 -3
  28. package/bundles/chunk-T7MYRXIE.js.map +6 -0
  29. package/bundles/{chunk-3MNDX4LL.js → chunk-W6KM7BUM.js} +3 -3
  30. package/bundles/chunk-W6KM7BUM.js.map +6 -0
  31. package/bundles/{chunk-K2Z44JHH.js → chunk-WGBFSDVQ.js} +3 -3
  32. package/bundles/chunk-WGBFSDVQ.js.map +6 -0
  33. package/bundles/index.js +11 -12
  34. package/bundles/index.js.map +1 -1
  35. package/bundles/linker/babel/index.js +6 -6
  36. package/bundles/linker/babel/index.js.map +1 -1
  37. package/bundles/linker/index.js +5 -5
  38. package/bundles/ngcc/index.js +12 -12
  39. package/bundles/ngcc/index.js.map +1 -1
  40. package/bundles/ngcc/main-ngcc.js +13 -13
  41. package/bundles/ngcc/main-ngcc.js.map +1 -1
  42. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +11 -11
  43. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
  44. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +4 -4
  45. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js.map +1 -1
  46. package/bundles/private/bazel.js +2 -2
  47. package/bundles/private/localize.js +4 -4
  48. package/bundles/private/migrations.js +6 -6
  49. package/bundles/private/tooling.js +3 -3
  50. package/bundles/src/bin/ng_xi18n.js +8 -8
  51. package/bundles/src/bin/ng_xi18n.js.map +1 -1
  52. package/bundles/src/bin/ngc.js +8 -8
  53. package/bundles/src/bin/ngc.js.map +1 -1
  54. package/bundles_metadata.json +1 -1
  55. package/linker/src/file_linker/emit_scopes/emit_scope.d.ts +7 -3
  56. package/linker/src/file_linker/emit_scopes/{iife_emit_scope.d.ts → local_emit_scope.d.ts} +7 -11
  57. package/linker/src/file_linker/partial_linkers/partial_class_metadata_linker_1.d.ts +3 -3
  58. package/linker/src/file_linker/partial_linkers/partial_component_linker_1.d.ts +3 -3
  59. package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.d.ts +3 -3
  60. package/linker/src/file_linker/partial_linkers/partial_factory_linker_1.d.ts +3 -3
  61. package/linker/src/file_linker/partial_linkers/partial_injectable_linker_1.d.ts +3 -3
  62. package/linker/src/file_linker/partial_linkers/partial_injector_linker_1.d.ts +3 -3
  63. package/linker/src/file_linker/partial_linkers/partial_linker.d.ts +8 -1
  64. package/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.d.ts +4 -4
  65. package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.d.ts +3 -3
  66. package/ngcc/src/dependencies/module_resolver.d.ts +5 -2
  67. package/ngcc/src/execution/cluster/api.d.ts +1 -1
  68. package/ngcc/src/execution/cluster/package_json_updater.d.ts +1 -1
  69. package/ngcc/src/execution/tasks/api.d.ts +2 -2
  70. package/ngcc/src/packages/build_marker.d.ts +1 -1
  71. package/ngcc/src/packages/entry_point.d.ts +1 -7
  72. package/ngcc/src/utils.d.ts +26 -0
  73. package/ngcc/src/writing/package_json_updater.d.ts +2 -1
  74. package/package.json +4 -4
  75. package/src/ngtsc/annotations/common/index.d.ts +1 -0
  76. package/src/ngtsc/annotations/common/src/schema.d.ts +12 -0
  77. package/src/ngtsc/annotations/common/src/util.d.ts +1 -1
  78. package/src/ngtsc/annotations/component/src/metadata.d.ts +7 -8
  79. package/src/ngtsc/annotations/component/src/resources.d.ts +1 -1
  80. package/src/ngtsc/annotations/ng_module/src/handler.d.ts +10 -7
  81. package/src/ngtsc/core/api/src/adapter.d.ts +12 -1
  82. package/src/ngtsc/core/src/host.d.ts +9 -2
  83. package/src/ngtsc/diagnostics/src/error_code.d.ts +10 -0
  84. package/src/ngtsc/metadata/src/api.d.ts +32 -5
  85. package/src/ngtsc/metadata/src/util.d.ts +1 -0
  86. package/src/ngtsc/partial_evaluator/index.d.ts +1 -0
  87. package/src/ngtsc/partial_evaluator/src/dynamic.d.ts +9 -1
  88. package/src/ngtsc/partial_evaluator/src/interface.d.ts +2 -1
  89. package/src/ngtsc/partial_evaluator/src/result.d.ts +2 -1
  90. package/src/ngtsc/partial_evaluator/src/synthetic.d.ts +19 -0
  91. package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +2 -2
  92. package/src/ngtsc/scope/index.d.ts +4 -3
  93. package/src/ngtsc/scope/src/api.d.ts +36 -14
  94. package/src/ngtsc/scope/src/component_scope.d.ts +2 -16
  95. package/src/ngtsc/scope/src/local.d.ts +4 -11
  96. package/src/ngtsc/scope/src/standalone.d.ts +26 -0
  97. package/src/ngtsc/scope/src/typecheck.d.ts +1 -1
  98. package/src/ngtsc/scope/src/util.d.ts +15 -0
  99. package/src/ngtsc/shims/api.d.ts +0 -1
  100. package/src/ngtsc/transform/src/compilation.d.ts +3 -1
  101. package/src/ngtsc/tsc_plugin.d.ts +1 -1
  102. package/src/ngtsc/typecheck/api/checker.d.ts +6 -6
  103. package/src/ngtsc/typecheck/api/completion.d.ts +3 -3
  104. package/src/ngtsc/typecheck/api/symbols.d.ts +23 -16
  105. package/src/ngtsc/typecheck/src/checker.d.ts +5 -4
  106. package/src/ngtsc/typecheck/src/completion.d.ts +6 -5
  107. package/src/ngtsc/typecheck/src/template_symbol_builder.d.ts +4 -3
  108. package/src/ngtsc/typecheck/src/ts_util.d.ts +7 -0
  109. package/src/ngtsc/util/src/typescript.d.ts +0 -5
  110. package/bundles/chunk-26T3CJIJ.js.map +0 -6
  111. package/bundles/chunk-3MNDX4LL.js.map +0 -6
  112. package/bundles/chunk-5RC6M6GX.js.map +0 -6
  113. package/bundles/chunk-646P2DOR.js.map +0 -6
  114. package/bundles/chunk-AR265E4B.js.map +0 -6
  115. package/bundles/chunk-FXU7FMZC.js.map +0 -6
  116. package/bundles/chunk-GLCRIILX.js.map +0 -6
  117. package/bundles/chunk-K2Z44JHH.js.map +0 -6
  118. package/bundles/chunk-KMCI52ED.js.map +0 -6
  119. package/bundles/chunk-MXJN5K6C.js.map +0 -6
  120. package/bundles/chunk-NM2N677S.js.map +0 -6
  121. package/bundles/chunk-OOJDZK5W.js.map +0 -6
  122. package/bundles/chunk-QDWL7SZJ.js.map +0 -6
  123. package/bundles/chunk-U5ES6WUL.js.map +0 -6
  124. package/bundles/chunk-VGNMN2NK.js.map +0 -6
  125. package/src/ngtsc/annotations/component/src/scope.d.ts +0 -20
@@ -6,7 +6,9 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { ConstantPool, outputAst as o } from '@angular/compiler';
9
+ import { ConstantPool } from '@angular/compiler';
10
+ import { AstFactory } from '../../../../src/ngtsc/translator';
11
+ import { LinkedDefinition } from '../partial_linkers/partial_linker';
10
12
  import { Translator } from '../translator';
11
13
  /**
12
14
  * This class represents (from the point of view of the `FileLinker`) the scope in which
@@ -20,16 +22,18 @@ import { Translator } from '../translator';
20
22
  export declare class EmitScope<TStatement, TExpression> {
21
23
  protected readonly ngImport: TExpression;
22
24
  protected readonly translator: Translator<TStatement, TExpression>;
25
+ private readonly factory;
23
26
  readonly constantPool: ConstantPool;
24
- constructor(ngImport: TExpression, translator: Translator<TStatement, TExpression>);
27
+ constructor(ngImport: TExpression, translator: Translator<TStatement, TExpression>, factory: AstFactory<TStatement, TExpression>);
25
28
  /**
26
29
  * Translate the given Output AST definition expression into a generic `TExpression`.
27
30
  *
28
31
  * Use a `LinkerImportGenerator` to handle any imports in the definition.
29
32
  */
30
- translateDefinition(definition: o.Expression): TExpression;
33
+ translateDefinition(definition: LinkedDefinition): TExpression;
31
34
  /**
32
35
  * Return any constant statements that are shared between all uses of this `EmitScope`.
33
36
  */
34
37
  getConstantStatements(): TStatement[];
38
+ private wrapInIifeWithStatements;
35
39
  }
@@ -1,4 +1,3 @@
1
- /// <amd-module name="@angular/compiler-cli/linker/src/file_linker/emit_scopes/iife_emit_scope" />
2
1
  /**
3
2
  * @license
4
3
  * Copyright Google LLC All Rights Reserved.
@@ -6,25 +5,22 @@
6
5
  * Use of this source code is governed by an MIT-style license that can be
7
6
  * found in the LICENSE file at https://angular.io/license
8
7
  */
9
- import { outputAst as o } from '@angular/compiler';
10
- import { AstFactory } from '../../../../src/ngtsc/translator';
11
- import { Translator } from '../translator';
8
+ /// <amd-module name="@angular/compiler-cli/linker/src/file_linker/emit_scopes/local_emit_scope" />
9
+ import { LinkedDefinition } from '../partial_linkers/partial_linker';
12
10
  import { EmitScope } from './emit_scope';
13
11
  /**
14
12
  * This class is a specialization of the `EmitScope` class that is designed for the situation where
15
13
  * there is no clear shared scope for constant statements. In this case they are bundled with the
16
- * translated definition inside an IIFE.
14
+ * translated definition and will be emitted into an IIFE.
17
15
  */
18
- export declare class IifeEmitScope<TStatement, TExpression> extends EmitScope<TStatement, TExpression> {
19
- private readonly factory;
20
- constructor(ngImport: TExpression, translator: Translator<TStatement, TExpression>, factory: AstFactory<TStatement, TExpression>);
16
+ export declare class LocalEmitScope<TStatement, TExpression> extends EmitScope<TStatement, TExpression> {
21
17
  /**
22
18
  * Translate the given Output AST definition expression into a generic `TExpression`.
23
19
  *
24
- * Wraps the output from `EmitScope.translateDefinition()` and `EmitScope.getConstantStatements()`
25
- * in an IIFE.
20
+ * Merges the `ConstantPool` statements with the definition statements when generating the
21
+ * definition expression. This means that `ConstantPool` statements will be emitted into an IIFE.
26
22
  */
27
- translateDefinition(definition: o.Expression): TExpression;
23
+ translateDefinition(definition: LinkedDefinition): TExpression;
28
24
  /**
29
25
  * It is not valid to call this method, since there will be no shared constant statements - they
30
26
  * are already emitted in the IIFE alongside the translated definition.
@@ -6,14 +6,14 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { ConstantPool, outputAst as o, R3ClassMetadata, R3DeclareClassMetadata, R3PartialDeclaration } from '@angular/compiler';
9
+ import { ConstantPool, R3ClassMetadata, R3DeclareClassMetadata, R3PartialDeclaration } from '@angular/compiler';
10
10
  import { AstObject } from '../../ast/ast_value';
11
- import { PartialLinker } from './partial_linker';
11
+ import { LinkedDefinition, PartialLinker } from './partial_linker';
12
12
  /**
13
13
  * A `PartialLinker` that is designed to process `ɵɵngDeclareClassMetadata()` call expressions.
14
14
  */
15
15
  export declare class PartialClassMetadataLinkerVersion1<TExpression> implements PartialLinker<TExpression> {
16
- linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): o.Expression;
16
+ linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): LinkedDefinition;
17
17
  }
18
18
  /**
19
19
  * Derives the `R3ClassMetadata` structure from the AST object.
@@ -6,11 +6,11 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { ConstantPool, outputAst as o, R3PartialDeclaration } from '@angular/compiler';
9
+ import { ConstantPool, R3PartialDeclaration } from '@angular/compiler';
10
10
  import { AbsoluteFsPath } from '../../../../src/ngtsc/file_system';
11
11
  import { AstObject } from '../../ast/ast_value';
12
12
  import { GetSourceFileFn } from '../get_source_file';
13
- import { PartialLinker } from './partial_linker';
13
+ import { LinkedDefinition, PartialLinker } from './partial_linker';
14
14
  /**
15
15
  * A `PartialLinker` that is designed to process `ɵɵngDeclareComponent()` call expressions.
16
16
  */
@@ -19,7 +19,7 @@ export declare class PartialComponentLinkerVersion1<TStatement, TExpression> imp
19
19
  private sourceUrl;
20
20
  private code;
21
21
  constructor(getSourceFile: GetSourceFileFn, sourceUrl: AbsoluteFsPath, code: string);
22
- linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): o.Expression;
22
+ linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): LinkedDefinition;
23
23
  /**
24
24
  * This function derives the `R3ComponentMetadata` from the provided AST object.
25
25
  */
@@ -6,11 +6,11 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { ConstantPool, outputAst as o, ParseSourceSpan, R3DeclareDirectiveMetadata, R3DirectiveMetadata, R3PartialDeclaration } from '@angular/compiler';
9
+ import { ConstantPool, ParseSourceSpan, R3DeclareDirectiveMetadata, R3DirectiveMetadata, R3PartialDeclaration } from '@angular/compiler';
10
10
  import { AbsoluteFsPath } from '../../../../src/ngtsc/file_system';
11
11
  import { Range } from '../../ast/ast_host';
12
12
  import { AstObject } from '../../ast/ast_value';
13
- import { PartialLinker } from './partial_linker';
13
+ import { LinkedDefinition, PartialLinker } from './partial_linker';
14
14
  /**
15
15
  * A `PartialLinker` that is designed to process `ɵɵngDeclareDirective()` call expressions.
16
16
  */
@@ -18,7 +18,7 @@ export declare class PartialDirectiveLinkerVersion1<TExpression> implements Part
18
18
  private sourceUrl;
19
19
  private code;
20
20
  constructor(sourceUrl: AbsoluteFsPath, code: string);
21
- linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): o.Expression;
21
+ linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): LinkedDefinition;
22
22
  }
23
23
  /**
24
24
  * Derives the `R3DirectiveMetadata` structure from the AST object.
@@ -6,14 +6,14 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { ConstantPool, outputAst as o, R3DeclareFactoryMetadata, R3FactoryMetadata, R3PartialDeclaration } from '@angular/compiler';
9
+ import { ConstantPool, R3DeclareFactoryMetadata, R3FactoryMetadata, R3PartialDeclaration } from '@angular/compiler';
10
10
  import { AstObject } from '../../ast/ast_value';
11
- import { PartialLinker } from './partial_linker';
11
+ import { LinkedDefinition, PartialLinker } from './partial_linker';
12
12
  /**
13
13
  * A `PartialLinker` that is designed to process `ɵɵngDeclareFactory()` call expressions.
14
14
  */
15
15
  export declare class PartialFactoryLinkerVersion1<TExpression> implements PartialLinker<TExpression> {
16
- linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): o.Expression;
16
+ linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): LinkedDefinition;
17
17
  }
18
18
  /**
19
19
  * Derives the `R3FactoryMetadata` structure from the AST object.
@@ -6,14 +6,14 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { ConstantPool, outputAst as o, R3DeclareInjectableMetadata, R3InjectableMetadata, R3PartialDeclaration } from '@angular/compiler';
9
+ import { ConstantPool, R3DeclareInjectableMetadata, R3InjectableMetadata, R3PartialDeclaration } from '@angular/compiler';
10
10
  import { AstObject } from '../../ast/ast_value';
11
- import { PartialLinker } from './partial_linker';
11
+ import { LinkedDefinition, PartialLinker } from './partial_linker';
12
12
  /**
13
13
  * A `PartialLinker` that is designed to process `ɵɵngDeclareInjectable()` call expressions.
14
14
  */
15
15
  export declare class PartialInjectableLinkerVersion1<TExpression> implements PartialLinker<TExpression> {
16
- linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): o.Expression;
16
+ linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): LinkedDefinition;
17
17
  }
18
18
  /**
19
19
  * Derives the `R3InjectableMetadata` structure from the AST object.
@@ -6,14 +6,14 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { ConstantPool, outputAst as o, R3DeclareInjectorMetadata, R3InjectorMetadata, R3PartialDeclaration } from '@angular/compiler';
9
+ import { ConstantPool, R3DeclareInjectorMetadata, R3InjectorMetadata, R3PartialDeclaration } from '@angular/compiler';
10
10
  import { AstObject } from '../../ast/ast_value';
11
- import { PartialLinker } from './partial_linker';
11
+ import { LinkedDefinition, PartialLinker } from './partial_linker';
12
12
  /**
13
13
  * A `PartialLinker` that is designed to process `ɵɵngDeclareInjector()` call expressions.
14
14
  */
15
15
  export declare class PartialInjectorLinkerVersion1<TExpression> implements PartialLinker<TExpression> {
16
- linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): o.Expression;
16
+ linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): LinkedDefinition;
17
17
  }
18
18
  /**
19
19
  * Derives the `R3InjectorMetadata` structure from the AST object.
@@ -8,6 +8,13 @@
8
8
  */
9
9
  import { ConstantPool, outputAst as o, R3PartialDeclaration } from '@angular/compiler';
10
10
  import { AstObject } from '../../ast/ast_value';
11
+ /**
12
+ * A definition generated by a `PartialLinker`, ready to emit.
13
+ */
14
+ export interface LinkedDefinition {
15
+ expression: o.Expression;
16
+ statements: o.Statement[];
17
+ }
11
18
  /**
12
19
  * An interface for classes that can link partial declarations into full definitions.
13
20
  */
@@ -18,5 +25,5 @@ export interface PartialLinker<TExpression> {
18
25
  * @param metaObj An object that fits one of the `R3DeclareDirectiveMetadata` or
19
26
  * `R3DeclareComponentMetadata` interfaces.
20
27
  */
21
- linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): o.Expression;
28
+ linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): LinkedDefinition;
22
29
  }
@@ -6,9 +6,9 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { ConstantPool, outputAst as o, R3DeclareNgModuleMetadata, R3NgModuleMetadata, R3PartialDeclaration } from '@angular/compiler';
9
+ import { ConstantPool, R3DeclareNgModuleMetadata, R3NgModuleMetadata, R3PartialDeclaration } from '@angular/compiler';
10
10
  import { AstObject } from '../../ast/ast_value';
11
- import { PartialLinker } from './partial_linker';
11
+ import { LinkedDefinition, PartialLinker } from './partial_linker';
12
12
  /**
13
13
  * A `PartialLinker` that is designed to process `ɵɵngDeclareNgModule()` call expressions.
14
14
  */
@@ -24,9 +24,9 @@ export declare class PartialNgModuleLinkerVersion1<TExpression> implements Parti
24
24
  * definition. These are only used by JIT compilation.
25
25
  */
26
26
  emitInline: boolean);
27
- linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): o.Expression;
27
+ linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): LinkedDefinition;
28
28
  }
29
29
  /**
30
30
  * Derives the `R3NgModuleMetadata` structure from the AST object.
31
31
  */
32
- export declare function toR3NgModuleMeta<TExpression>(metaObj: AstObject<R3DeclareNgModuleMetadata, TExpression>, emitInline: boolean): R3NgModuleMetadata;
32
+ export declare function toR3NgModuleMeta<TExpression>(metaObj: AstObject<R3DeclareNgModuleMetadata, TExpression>, supportJit: boolean): R3NgModuleMetadata;
@@ -6,15 +6,15 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { ConstantPool, outputAst as o, R3DeclarePipeMetadata, R3PartialDeclaration, R3PipeMetadata } from '@angular/compiler';
9
+ import { ConstantPool, R3DeclarePipeMetadata, R3PartialDeclaration, R3PipeMetadata } from '@angular/compiler';
10
10
  import { AstObject } from '../../ast/ast_value';
11
- import { PartialLinker } from './partial_linker';
11
+ import { LinkedDefinition, PartialLinker } from './partial_linker';
12
12
  /**
13
13
  * A `PartialLinker` that is designed to process `ɵɵngDeclarePipe()` call expressions.
14
14
  */
15
15
  export declare class PartialPipeLinkerVersion1<TExpression> implements PartialLinker<TExpression> {
16
16
  constructor();
17
- linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): o.Expression;
17
+ linkPartialDeclaration(constantPool: ConstantPool, metaObj: AstObject<R3PartialDeclaration, TExpression>): LinkedDefinition;
18
18
  }
19
19
  /**
20
20
  * Derives the `R3PipeMetadata` structure from the AST object.
@@ -65,14 +65,17 @@ export declare class ModuleResolver {
65
65
  * Try to resolve the `moduleName` as an external entry-point by searching the `node_modules`
66
66
  * folders up the tree for a matching `.../node_modules/${moduleName}`.
67
67
  *
68
- * If a folder is found but the path does not contain a `package.json` then it is marked as a
69
- * "deep-import".
68
+ * If a folder is found but the path is not considered an entry-point (see `isEntryPoint()`) then
69
+ * it is marked as a "deep-import".
70
70
  */
71
71
  private resolveAsEntryPoint;
72
72
  /**
73
73
  * Can we consider the given path as an entry-point to a package?
74
74
  *
75
75
  * This is achieved by checking for the existence of `${modulePath}/package.json`.
76
+ * If there is no `package.json`, we check whether this is an APF v14+ secondary entry-point,
77
+ * which does not have its own `package.json` but has an `exports` entry in the package's primary
78
+ * `package.json`.
76
79
  */
77
80
  private isEntryPoint;
78
81
  /**
@@ -7,7 +7,7 @@
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/ngcc/src/execution/cluster/api" />
9
9
  import { AbsoluteFsPath } from '../../../../src/ngtsc/file_system';
10
- import { JsonObject } from '../../packages/entry_point';
10
+ import { JsonObject } from '../../utils';
11
11
  import { PackageJsonChange } from '../../writing/package_json_updater';
12
12
  import { Task, TaskProcessingOutcome } from '../tasks/api';
13
13
  /** A message reporting that the worker is ready for retrieving tasks. */
@@ -7,7 +7,7 @@
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/ngcc/src/execution/cluster/package_json_updater" />
9
9
  import { AbsoluteFsPath } from '../../../../src/ngtsc/file_system';
10
- import { JsonObject } from '../../packages/entry_point';
10
+ import { JsonObject } from '../../utils';
11
11
  import { PackageJsonChange, PackageJsonUpdate, PackageJsonUpdater } from '../../writing/package_json_updater';
12
12
  /**
13
13
  * A `PackageJsonUpdater` for cluster workers that will send update changes to the master process so
@@ -6,8 +6,8 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
- import { EntryPoint, EntryPointJsonProperty, JsonObject } from '../../packages/entry_point';
10
- import { PartiallyOrderedList } from '../../utils';
9
+ import { EntryPoint, EntryPointJsonProperty } from '../../packages/entry_point';
10
+ import { JsonObject, PartiallyOrderedList } from '../../utils';
11
11
  /**
12
12
  * Represents a unit of work to be undertaken by an `Executor`.
13
13
  *
@@ -9,7 +9,7 @@
9
9
  import { AbsoluteFsPath } from '../../../src/ngtsc/file_system';
10
10
  import { PackageJsonUpdater } from '../writing/package_json_updater';
11
11
  import { EntryPointPackageJson, PackageJsonFormatProperties } from './entry_point';
12
- export declare const NGCC_VERSION = "14.0.0-next.7";
12
+ export declare const NGCC_VERSION = "14.0.0-rc.0";
13
13
  /**
14
14
  * Returns true if there is a format in this entry-point that was compiled with an outdated version
15
15
  * of ngcc.
@@ -1,6 +1,7 @@
1
1
  /// <amd-module name="@angular/compiler-cli/ngcc/src/packages/entry_point" />
2
2
  import { AbsoluteFsPath, ReadonlyFileSystem } from '../../../src/ngtsc/file_system';
3
3
  import { Logger } from '../../../src/ngtsc/logging';
4
+ import { JsonObject } from '../utils';
4
5
  import { NgccConfiguration } from './configuration';
5
6
  /**
6
7
  * The possible values for the format of an entry-point.
@@ -35,13 +36,6 @@ export interface EntryPoint extends JsonObject {
35
36
  /** Should ngcc generate deep re-exports for this entrypoint? */
36
37
  generateDeepReexports: boolean;
37
38
  }
38
- export declare type JsonPrimitive = string | number | boolean | null;
39
- export declare type JsonValue = JsonPrimitive | JsonArray | JsonObject | undefined;
40
- export interface JsonArray extends Array<JsonValue> {
41
- }
42
- export interface JsonObject {
43
- [key: string]: JsonValue;
44
- }
45
39
  export interface PackageJsonFormatPropertiesMap {
46
40
  browser?: string;
47
41
  fesm2015?: string;
@@ -9,6 +9,13 @@
9
9
  import ts from 'typescript';
10
10
  import { AbsoluteFsPath, ReadonlyFileSystem } from '../../src/ngtsc/file_system';
11
11
  import { DeclarationNode, KnownDeclaration } from '../../src/ngtsc/reflection';
12
+ export declare type JsonPrimitive = string | number | boolean | null;
13
+ export declare type JsonValue = JsonPrimitive | JsonArray | JsonObject | undefined;
14
+ export interface JsonArray extends Array<JsonValue> {
15
+ }
16
+ export interface JsonObject {
17
+ [key: string]: JsonValue;
18
+ }
12
19
  /**
13
20
  * A list (`Array`) of partially ordered `T` items.
14
21
  *
@@ -85,3 +92,22 @@ export declare function getTsHelperFnFromIdentifier(id: ts.Identifier): KnownDec
85
92
  */
86
93
  export declare function stripDollarSuffix(value: string): string;
87
94
  export declare function stripExtension(fileName: string): string;
95
+ /**
96
+ * Parse the JSON from a `package.json` file.
97
+ *
98
+ * @param packageJsonPath The absolute path to the `package.json` file.
99
+ * @returns JSON from the `package.json` file if it exists and is valid, `null` otherwise.
100
+ */
101
+ export declare function loadJson<T extends JsonObject = JsonObject>(fs: ReadonlyFileSystem, packageJsonPath: AbsoluteFsPath): T | null;
102
+ /**
103
+ * Given the parsed JSON of a `package.json` file, try to extract info for a secondary entry-point
104
+ * from the `exports` property. Such info will only be present for packages following Angular
105
+ * Package Format v14+.
106
+ *
107
+ * @param primaryPackageJson The parsed JSON of the primary `package.json` (or `null` if it failed
108
+ * to be loaded).
109
+ * @param packagePath The absolute path to the containing npm package.
110
+ * @param entryPointPath The absolute path to the secondary entry-point.
111
+ * @returns The `exports` info for the specified entry-point if it exists, `null` otherwise.
112
+ */
113
+ export declare function loadSecondaryEntryPointInfoForApfV14(fs: ReadonlyFileSystem, primaryPackageJson: JsonObject | null, packagePath: AbsoluteFsPath, entryPointPath: AbsoluteFsPath): JsonObject | null;
@@ -7,7 +7,7 @@
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/ngcc/src/writing/package_json_updater" />
9
9
  import { AbsoluteFsPath, FileSystem } from '../../../src/ngtsc/file_system';
10
- import { JsonObject, JsonValue } from '../packages/entry_point';
10
+ import { JsonObject, JsonValue } from '../utils';
11
11
  export declare type PackageJsonChange = [string[], JsonValue, PackageJsonPropertyPositioning];
12
12
  export declare type PackageJsonPropertyPositioning = 'unimportant' | 'alphabetic' | {
13
13
  before: string;
@@ -87,6 +87,7 @@ export declare class PackageJsonUpdate {
87
87
  */
88
88
  writeChanges(packageJsonPath: AbsoluteFsPath, parsedJson?: JsonObject): void;
89
89
  private ensureNotApplied;
90
+ private ensureNotSynthesized;
90
91
  }
91
92
  /** A `PackageJsonUpdater` that writes directly to the file-system. */
92
93
  export declare class DirectPackageJsonUpdater implements PackageJsonUpdater {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "14.0.0-next.7",
3
+ "version": "14.0.0-rc.0",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -65,8 +65,8 @@
65
65
  "yargs": "^17.2.1"
66
66
  },
67
67
  "peerDependencies": {
68
- "@angular/compiler": "14.0.0-next.7",
69
- "typescript": ">=4.4.2 <4.7"
68
+ "@angular/compiler": "14.0.0-rc.0",
69
+ "typescript": ">=4.6.2 <4.8"
70
70
  },
71
71
  "repository": {
72
72
  "type": "git",
@@ -84,7 +84,7 @@
84
84
  "bugs": {
85
85
  "url": "https://github.com/angular/angular/issues"
86
86
  },
87
- "homepage": "https://github.com/angular/angular/tree/master/packages/compiler-cli",
87
+ "homepage": "https://github.com/angular/angular/tree/main/packages/compiler-cli",
88
88
  "ng-update": {
89
89
  "packageGroup": [
90
90
  "@angular/core",
@@ -13,4 +13,5 @@ export * from './src/evaluation';
13
13
  export * from './src/factory';
14
14
  export * from './src/metadata';
15
15
  export * from './src/references_registry';
16
+ export * from './src/schema';
16
17
  export * from './src/util';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ /// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/schema" />
9
+ import { SchemaMetadata } from '@angular/compiler';
10
+ import ts from 'typescript';
11
+ import { PartialEvaluator } from '../../../partial_evaluator';
12
+ export declare function extractSchemas(rawExpr: ts.Expression, evaluator: PartialEvaluator, context: string): SchemaMetadata[];
@@ -53,7 +53,7 @@ export declare function tryUnwrapForwardRef(node: ts.Expression, reflector: Refl
53
53
  * @param args the arguments to the invocation of the forwardRef expression
54
54
  * @returns an unwrapped argument if `ref` pointed to forwardRef, or null otherwise
55
55
  */
56
- export declare function forwardRefResolver(ref: Reference<ts.FunctionDeclaration | ts.MethodDeclaration | ts.FunctionExpression>, args: ReadonlyArray<ts.Expression>): ts.Expression | null;
56
+ export declare const forwardRefResolver: ForeignFunctionResolver;
57
57
  /**
58
58
  * Combines an array of resolver functions into a one.
59
59
  * @param resolvers Resolvers to be combined.
@@ -6,7 +6,7 @@
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/component/src/metadata" />
9
- import { AnimationTriggerNames, R3ClassMetadata, R3ComponentMetadata } from '@angular/compiler';
9
+ import { AnimationTriggerNames, R3ClassMetadata, R3ComponentMetadata, R3TemplateDependencyMetadata, SchemaMetadata } from '@angular/compiler';
10
10
  import ts from 'typescript';
11
11
  import { Reference } from '../../../imports';
12
12
  import { ClassPropertyMapping, ComponentResources, DirectiveTypeCheckMeta } from '../../../metadata';
@@ -19,13 +19,13 @@ import { ParsedTemplateWithSource, StyleUrlMeta } from './resources';
19
19
  * The `keyof R3ComponentMetadata &` condition ensures that only fields of `R3ComponentMetadata` can
20
20
  * be included here.
21
21
  */
22
- export declare type ComponentMetadataResolvedFields = SubsetOfKeys<R3ComponentMetadata, 'directives' | 'pipes' | 'declarationListEmitMode'>;
22
+ export declare type ComponentMetadataResolvedFields = SubsetOfKeys<R3ComponentMetadata<R3TemplateDependencyMetadata>, 'declarations' | 'declarationListEmitMode'>;
23
23
  export interface ComponentAnalysisData {
24
24
  /**
25
25
  * `meta` includes those fields of `R3ComponentMetadata` which are calculated at `analyze` time
26
26
  * (not during resolve).
27
27
  */
28
- meta: Omit<R3ComponentMetadata, ComponentMetadataResolvedFields>;
28
+ meta: Omit<R3ComponentMetadata<R3TemplateDependencyMetadata>, ComponentMetadataResolvedFields>;
29
29
  baseClass: Reference<ClassDeclaration> | 'dynamic' | null;
30
30
  typeCheckMeta: DirectiveTypeCheckMeta;
31
31
  template: ParsedTemplateWithSource;
@@ -53,9 +53,8 @@ export interface ComponentAnalysisData {
53
53
  inlineStyles: string[] | null;
54
54
  isPoisoned: boolean;
55
55
  animationTriggerNames: AnimationTriggerNames | null;
56
- imports: {
57
- resolved: Reference<ClassDeclaration>[];
58
- raw: ts.Expression;
59
- } | null;
56
+ rawImports: ts.Expression | null;
57
+ resolvedImports: Reference<ClassDeclaration>[] | null;
58
+ schemas: SchemaMetadata[] | null;
60
59
  }
61
- export declare type ComponentResolutionData = Pick<R3ComponentMetadata, ComponentMetadataResolvedFields>;
60
+ export declare type ComponentResolutionData = Pick<R3ComponentMetadata<R3TemplateDependencyMetadata>, ComponentMetadataResolvedFields>;
@@ -116,7 +116,7 @@ export declare function makeResourceNotFoundError(file: string, nodeForError: ts
116
116
  * Additionally, the references to external resources would require libraries to ship
117
117
  * external resources exclusively for the class metadata.
118
118
  */
119
- export declare function transformDecoratorToInlineResources(dec: Decorator, component: Map<string, ts.Expression>, styles: string[], template: ParsedTemplateWithSource): Decorator;
119
+ export declare function transformDecoratorResources(dec: Decorator, component: Map<string, ts.Expression>, styles: string[], template: ParsedTemplateWithSource): Decorator;
120
120
  export declare function extractComponentStyleUrls(evaluator: PartialEvaluator, component: Map<string, ts.Expression>): StyleUrlMeta[];
121
121
  export declare function extractStyleResources(resourceLoader: ResourceLoader, component: Map<string, ts.Expression>, containingFile: string): ReadonlySet<Resource>;
122
122
  export declare function _extractTemplateStyleUrls(template: ParsedTemplateWithSource): StyleUrlMeta[];
@@ -20,14 +20,17 @@ import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerP
20
20
  import { ReferencesRegistry } from '../../common';
21
21
  export interface NgModuleAnalysis {
22
22
  mod: R3NgModuleMetadata;
23
- inj: R3InjectorMetadata;
23
+ inj: Omit<R3InjectorMetadata, 'imports'>;
24
24
  fac: R3FactoryMetadata;
25
25
  classMetadata: R3ClassMetadata | null;
26
26
  declarations: Reference<ClassDeclaration>[];
27
27
  rawDeclarations: ts.Expression | null;
28
28
  schemas: SchemaMetadata[];
29
- imports: Reference<ClassDeclaration>[];
29
+ imports: TopLevelImportedExpression[];
30
+ importRefs: Reference<ClassDeclaration>[];
31
+ rawImports: ts.Expression | null;
30
32
  exports: Reference<ClassDeclaration>[];
33
+ rawExports: ts.Expression | null;
31
34
  id: Expression | null;
32
35
  factorySymbolName: string;
33
36
  providersRequiringFactory: Set<Reference<ClassDeclaration>> | null;
@@ -72,11 +75,6 @@ export declare class NgModuleDecoratorHandler implements DecoratorHandler<Decora
72
75
  resolve(node: ClassDeclaration, analysis: Readonly<NgModuleAnalysis>): ResolveResult<NgModuleResolution>;
73
76
  compileFull(node: ClassDeclaration, { inj, mod, fac, classMetadata, declarations }: Readonly<NgModuleAnalysis>, { injectorImports }: Readonly<NgModuleResolution>): CompileResult[];
74
77
  compilePartial(node: ClassDeclaration, { inj, fac, mod, classMetadata }: Readonly<NgModuleAnalysis>, { injectorImports }: Readonly<NgModuleResolution>): CompileResult[];
75
- /**
76
- * Merge the injector imports (which are 'exports' that were later found to be NgModules)
77
- * computed during resolution with the ones from analysis.
78
- */
79
- private mergeInjectorImports;
80
78
  /**
81
79
  * Add class metadata statements, if provided, to the `ngModuleStatements`.
82
80
  */
@@ -112,3 +110,8 @@ export declare class NgModuleDecoratorHandler implements DecoratorHandler<Decora
112
110
  */
113
111
  private resolveTypeList;
114
112
  }
113
+ export interface TopLevelImportedExpression {
114
+ expression: ts.Expression;
115
+ resolvedReferences: Array<Reference<ClassDeclaration>>;
116
+ hasModuleWithProviders: boolean;
117
+ }
@@ -23,7 +23,7 @@ export declare type ExtendedCompilerHostMethods = 'getCanonicalFileName' | 'reso
23
23
  * which is relied upon by `NgCompiler`. A consumer of `NgCompiler` can therefore use the
24
24
  * `NgCompilerHost` or implement `NgCompilerAdapter` itself.
25
25
  */
26
- export interface NgCompilerAdapter extends Omit<ts.ModuleResolutionHost, 'getCurrentDirectory'>, Pick<ExtendedTsCompilerHost, 'getCurrentDirectory' | ExtendedCompilerHostMethods> {
26
+ export interface NgCompilerAdapter extends Omit<ts.ModuleResolutionHost, 'getCurrentDirectory'>, Pick<ExtendedTsCompilerHost, 'getCurrentDirectory' | ExtendedCompilerHostMethods>, SourceFileTypeIdentifier {
27
27
  /**
28
28
  * A path to a single file which represents the entrypoint of an Angular Package Format library,
29
29
  * if the current program is one.
@@ -61,6 +61,8 @@ export interface NgCompilerAdapter extends Omit<ts.ModuleResolutionHost, 'getCur
61
61
  * Resolved list of root directories explicitly set in, or inferred from, the tsconfig.
62
62
  */
63
63
  readonly rootDirs: ReadonlyArray<AbsoluteFsPath>;
64
+ }
65
+ export interface SourceFileTypeIdentifier {
64
66
  /**
65
67
  * Distinguishes between shim files added by Angular to the compilation process (both those
66
68
  * intended for output, like ngfactory files, as well as internal shims like ngtypecheck files)
@@ -70,4 +72,13 @@ export interface NgCompilerAdapter extends Omit<ts.ModuleResolutionHost, 'getCur
70
72
  * `true` if a file was written by the user, and `false` if a file was added by the compiler.
71
73
  */
72
74
  isShim(sf: ts.SourceFile): boolean;
75
+ /**
76
+ * Distinguishes between resource files added by Angular to the project and original files in the
77
+ * user's program.
78
+ *
79
+ * This is necessary only for the language service because it adds resource files as root files
80
+ * when they are read. This is done to indicate to TS Server that these resources are part of the
81
+ * project and ensures that projects are retained properly when navigating around the workspace.
82
+ */
83
+ isResource(sf: ts.SourceFile): boolean;
73
84
  }
@@ -36,14 +36,14 @@ export declare class DelegatingCompilerHost implements Omit<RequiredDelegations<
36
36
  getModifiedResourceFiles: (() => Set<string> | undefined) | undefined;
37
37
  getNewLine: () => string;
38
38
  getParsedCommandLine: ((fileName: string) => ts.ParsedCommandLine | undefined) | undefined;
39
- getSourceFileByPath: ((fileName: string, path: ts.Path, languageVersion: ts.ScriptTarget, onError?: ((message: string) => void) | undefined, shouldCreateNewSourceFile?: boolean | undefined) => ts.SourceFile | undefined) | undefined;
39
+ getSourceFileByPath: ((fileName: string, path: ts.Path, languageVersionOrOptions: ts.ScriptTarget | ts.CreateSourceFileOptions, onError?: ((message: string) => void) | undefined, shouldCreateNewSourceFile?: boolean | undefined) => ts.SourceFile | undefined) | undefined;
40
40
  readDirectory: ((rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number | undefined) => string[]) | undefined;
41
41
  readFile: (fileName: string) => string | undefined;
42
42
  readResource: ((fileName: string) => string | Promise<string>) | undefined;
43
43
  transformResource: ((data: string, context: import("@angular/compiler-cli/src/ngtsc/core/api/index").ResourceHostContext) => Promise<import("@angular/compiler-cli/src/ngtsc/core/api/index").TransformResourceResult | null>) | undefined;
44
44
  realpath: ((path: string) => string) | undefined;
45
45
  resolveModuleNames: ((moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile?: ts.SourceFile | undefined) => (ts.ResolvedModule | undefined)[]) | undefined;
46
- resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined;
46
+ resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[] | readonly ts.FileReference[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingFileMode?: ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined;
47
47
  resourceNameToFileName: ((resourceName: string, containingFilePath: string, fallbackResolve?: ((url: string, fromFile: string) => string | null) | undefined) => string | null) | undefined;
48
48
  trace: ((s: string) => void) | undefined;
49
49
  useCaseSensitiveFileNames: () => boolean;
@@ -97,6 +97,13 @@ export declare class NgCompilerHost extends DelegatingCompilerHost implements Re
97
97
  * If this returns false, the file is user-provided.
98
98
  */
99
99
  isShim(sf: ts.SourceFile): boolean;
100
+ /**
101
+ * Check whether the given `ts.SourceFile` is a resource file.
102
+ *
103
+ * This simply returns `false` for the compiler-cli since resource files are not added as root
104
+ * files to the project.
105
+ */
106
+ isResource(sf: ts.SourceFile): boolean;
100
107
  getSourceFile(fileName: string, languageVersion: ts.ScriptTarget, onError?: ((message: string) => void) | undefined, shouldCreateNewSourceFile?: boolean | undefined): ts.SourceFile | undefined;
101
108
  fileExists(fileName: string): boolean;
102
109
  get unifiedModulesHost(): UnifiedModulesHost | null;