static-injector 1.0.8

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 (146) hide show
  1. package/import/commonjs/index.js +1248 -0
  2. package/import/es2015/decorator/injectable.js +14 -0
  3. package/import/es2015/decorator/interface/provider.js +8 -0
  4. package/import/es2015/di/forward_ref.js +53 -0
  5. package/import/es2015/di/inject_switch.js +31 -0
  6. package/import/es2015/di/injection_token.js +71 -0
  7. package/import/es2015/di/injector.js +63 -0
  8. package/import/es2015/di/injector_compatibility.js +172 -0
  9. package/import/es2015/di/injector_marker.js +8 -0
  10. package/import/es2015/di/injector_token.js +21 -0
  11. package/import/es2015/di/interface/defs.js +72 -0
  12. package/import/es2015/di/interface/injector.js +25 -0
  13. package/import/es2015/di/interface/provider.js +8 -0
  14. package/import/es2015/di/metadata.js +49 -0
  15. package/import/es2015/di/null_injector.js +19 -0
  16. package/import/es2015/di/provider_token.js +8 -0
  17. package/import/es2015/di/r3_injector.js +382 -0
  18. package/import/es2015/di/scope.js +14 -0
  19. package/import/es2015/index.js +11 -0
  20. package/import/es2015/interface/lifecycle_hooks.js +8 -0
  21. package/import/es2015/interface/type.js +8 -0
  22. package/import/es2015/render3/definition_factory.js +15 -0
  23. package/import/es2015/render3/error_code.js +29 -0
  24. package/import/es2015/render3/errors_di.js +14 -0
  25. package/import/es2015/render3/fields.js +11 -0
  26. package/import/es2015/render3/instructions/di.js +23 -0
  27. package/import/es2015/render3/util/stringify_utils.js +37 -0
  28. package/import/es2015/util/array_utils.js +17 -0
  29. package/import/es2015/util/closure.js +19 -0
  30. package/import/es2015/util/decorators.js +30 -0
  31. package/import/es2015/util/empty.js +14 -0
  32. package/import/es2015/util/property.js +15 -0
  33. package/import/es2015/util/stringify.js +30 -0
  34. package/import/fesm2015/index.js +1211 -0
  35. package/import/typings/decorator/injectable.d.ts +82 -0
  36. package/import/typings/decorator/interface/provider.d.ts +312 -0
  37. package/import/typings/di/forward_ref.d.ts +49 -0
  38. package/import/typings/di/inject_switch.d.ts +17 -0
  39. package/import/typings/di/injection_token.d.ts +57 -0
  40. package/import/typings/di/injector.d.ts +76 -0
  41. package/import/typings/di/injector_compatibility.d.ts +77 -0
  42. package/import/typings/di/injector_marker.d.ts +23 -0
  43. package/import/typings/di/injector_token.d.ts +18 -0
  44. package/import/typings/di/interface/defs.d.ts +155 -0
  45. package/import/typings/di/interface/injector.d.ts +48 -0
  46. package/import/typings/di/interface/provider.d.ts +312 -0
  47. package/import/typings/di/metadata.d.ts +176 -0
  48. package/import/typings/di/null_injector.d.ts +11 -0
  49. package/import/typings/di/provider_token.d.ts +17 -0
  50. package/import/typings/di/r3_injector.d.ts +92 -0
  51. package/import/typings/di/scope.d.ts +14 -0
  52. package/import/typings/index.d.ts +11 -0
  53. package/import/typings/interface/lifecycle_hooks.d.ts +28 -0
  54. package/import/typings/interface/type.d.ts +21 -0
  55. package/import/typings/render3/definition_factory.d.ts +24 -0
  56. package/import/typings/render3/error_code.d.ts +24 -0
  57. package/import/typings/render3/errors_di.d.ts +2 -0
  58. package/import/typings/render3/fields.d.ts +8 -0
  59. package/import/typings/render3/instructions/di.d.ts +20 -0
  60. package/import/typings/render3/util/stringify_utils.d.ts +20 -0
  61. package/import/typings/util/array_utils.d.ts +10 -0
  62. package/import/typings/util/closure.d.ts +17 -0
  63. package/import/typings/util/decorators.d.ts +27 -0
  64. package/import/typings/util/empty.d.ts +14 -0
  65. package/import/typings/util/property.d.ts +8 -0
  66. package/import/typings/util/stringify.d.ts +8 -0
  67. package/package.json +34 -0
  68. package/readme.md +27 -0
  69. package/transform/compiler/index.d.ts +5 -0
  70. package/transform/compiler/index.js +17 -0
  71. package/transform/compiler/src/core.d.ts +19 -0
  72. package/transform/compiler/src/core.js +9 -0
  73. package/transform/compiler/src/injectable_compiler_2.d.ts +53 -0
  74. package/transform/compiler/src/injectable_compiler_2.js +159 -0
  75. package/transform/compiler/src/output/output_ast.d.ts +534 -0
  76. package/transform/compiler/src/output/output_ast.js +986 -0
  77. package/transform/compiler/src/parse_util.d.ts +50 -0
  78. package/transform/compiler/src/parse_util.js +61 -0
  79. package/transform/compiler/src/render3/partial/api.d.ts +166 -0
  80. package/transform/compiler/src/render3/partial/api.js +11 -0
  81. package/transform/compiler/src/render3/partial/util.d.ts +16 -0
  82. package/transform/compiler/src/render3/partial/util.js +44 -0
  83. package/transform/compiler/src/render3/r3_factory.d.ts +97 -0
  84. package/transform/compiler/src/render3/r3_factory.js +239 -0
  85. package/transform/compiler/src/render3/r3_identifiers.d.ts +20 -0
  86. package/transform/compiler/src/render3/r3_identifiers.js +51 -0
  87. package/transform/compiler/src/render3/util.d.ts +21 -0
  88. package/transform/compiler/src/render3/util.js +41 -0
  89. package/transform/compiler/src/render3/view/util.d.ts +30 -0
  90. package/transform/compiler/src/render3/view/util.js +57 -0
  91. package/transform/compiler-cli/src/ngtsc/annotations/src/factory.d.ts +11 -0
  92. package/transform/compiler-cli/src/ngtsc/annotations/src/factory.js +21 -0
  93. package/transform/compiler-cli/src/ngtsc/annotations/src/injectable.d.ts +42 -0
  94. package/transform/compiler-cli/src/ngtsc/annotations/src/injectable.js +278 -0
  95. package/transform/compiler-cli/src/ngtsc/annotations/src/util.d.ts +91 -0
  96. package/transform/compiler-cli/src/ngtsc/annotations/src/util.js +370 -0
  97. package/transform/compiler-cli/src/ngtsc/diagnostics/error.d.ts +24 -0
  98. package/transform/compiler-cli/src/ngtsc/diagnostics/error.js +76 -0
  99. package/transform/compiler-cli/src/ngtsc/diagnostics/error_code.d.ts +188 -0
  100. package/transform/compiler-cli/src/ngtsc/diagnostics/error_code.js +206 -0
  101. package/transform/compiler-cli/src/ngtsc/diagnostics/index.d.ts +2 -0
  102. package/transform/compiler-cli/src/ngtsc/diagnostics/index.js +14 -0
  103. package/transform/compiler-cli/src/ngtsc/imports/index.d.ts +1 -0
  104. package/transform/compiler-cli/src/ngtsc/imports/index.js +13 -0
  105. package/transform/compiler-cli/src/ngtsc/imports/src/core.d.ts +36 -0
  106. package/transform/compiler-cli/src/ngtsc/imports/src/core.js +25 -0
  107. package/transform/compiler-cli/src/ngtsc/reflection/index.d.ts +3 -0
  108. package/transform/compiler-cli/src/ngtsc/reflection/index.js +15 -0
  109. package/transform/compiler-cli/src/ngtsc/reflection/src/host.d.ts +667 -0
  110. package/transform/compiler-cli/src/ngtsc/reflection/src/host.js +98 -0
  111. package/transform/compiler-cli/src/ngtsc/reflection/src/type_to_value.d.ts +24 -0
  112. package/transform/compiler-cli/src/ngtsc/reflection/src/type_to_value.js +271 -0
  113. package/transform/compiler-cli/src/ngtsc/reflection/src/typescript.d.ts +50 -0
  114. package/transform/compiler-cli/src/ngtsc/reflection/src/typescript.js +396 -0
  115. package/transform/compiler-cli/src/ngtsc/reflection/src/util.d.ts +12 -0
  116. package/transform/compiler-cli/src/ngtsc/reflection/src/util.js +45 -0
  117. package/transform/compiler-cli/src/ngtsc/transform/index.d.ts +2 -0
  118. package/transform/compiler-cli/src/ngtsc/transform/index.js +14 -0
  119. package/transform/compiler-cli/src/ngtsc/transform/src/api.d.ts +115 -0
  120. package/transform/compiler-cli/src/ngtsc/transform/src/api.js +30 -0
  121. package/transform/compiler-cli/src/ngtsc/transform/src/utils.d.ts +15 -0
  122. package/transform/compiler-cli/src/ngtsc/transform/src/utils.js +84 -0
  123. package/transform/compiler-cli/src/ngtsc/translator/index.d.ts +5 -0
  124. package/transform/compiler-cli/src/ngtsc/translator/index.js +17 -0
  125. package/transform/compiler-cli/src/ngtsc/translator/src/api/ast_factory.d.ts +274 -0
  126. package/transform/compiler-cli/src/ngtsc/translator/src/api/ast_factory.js +9 -0
  127. package/transform/compiler-cli/src/ngtsc/translator/src/api/import_generator.d.ts +27 -0
  128. package/transform/compiler-cli/src/ngtsc/translator/src/api/import_generator.js +9 -0
  129. package/transform/compiler-cli/src/ngtsc/translator/src/context.d.ts +18 -0
  130. package/transform/compiler-cli/src/ngtsc/translator/src/context.js +27 -0
  131. package/transform/compiler-cli/src/ngtsc/translator/src/import_manager.d.ts +29 -0
  132. package/transform/compiler-cli/src/ngtsc/translator/src/import_manager.js +70 -0
  133. package/transform/compiler-cli/src/ngtsc/translator/src/translator.d.ts +58 -0
  134. package/transform/compiler-cli/src/ngtsc/translator/src/translator.js +270 -0
  135. package/transform/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.d.ts +54 -0
  136. package/transform/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.js +245 -0
  137. package/transform/compiler-cli/src/ngtsc/translator/src/typescript_translator.d.ts +13 -0
  138. package/transform/compiler-cli/src/ngtsc/translator/src/typescript_translator.js +21 -0
  139. package/transform/compiler-cli/src/ngtsc/util/src/typescript.d.ts +11 -0
  140. package/transform/compiler-cli/src/ngtsc/util/src/typescript.js +39 -0
  141. package/transform/index.d.ts +1 -0
  142. package/transform/index.js +13 -0
  143. package/transform/injectable-transform.d.ts +41 -0
  144. package/transform/injectable-transform.js +195 -0
  145. package/transform/node-Iteration.d.ts +2 -0
  146. package/transform/node-Iteration.js +12 -0
@@ -0,0 +1,188 @@
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
+ /**
9
+ * @publicApi
10
+ */
11
+ export declare enum ErrorCode {
12
+ DECORATOR_ARG_NOT_LITERAL = 1001,
13
+ DECORATOR_ARITY_WRONG = 1002,
14
+ DECORATOR_NOT_CALLED = 1003,
15
+ DECORATOR_ON_ANONYMOUS_CLASS = 1004,
16
+ DECORATOR_UNEXPECTED = 1005,
17
+ /**
18
+ * This error code indicates that there are incompatible decorators on a type or a class field.
19
+ */
20
+ DECORATOR_COLLISION = 1006,
21
+ VALUE_HAS_WRONG_TYPE = 1010,
22
+ VALUE_NOT_LITERAL = 1011,
23
+ COMPONENT_MISSING_TEMPLATE = 2001,
24
+ PIPE_MISSING_NAME = 2002,
25
+ PARAM_MISSING_TOKEN = 2003,
26
+ DIRECTIVE_MISSING_SELECTOR = 2004,
27
+ /** Raised when an undecorated class is passed in as a provider to a module or a directive. */
28
+ UNDECORATED_PROVIDER = 2005,
29
+ /**
30
+ * Raised when a Directive inherits its constructor from a base class without an Angular
31
+ * decorator.
32
+ */
33
+ DIRECTIVE_INHERITS_UNDECORATED_CTOR = 2006,
34
+ /**
35
+ * Raised when an undecorated class that is using Angular features
36
+ * has been discovered.
37
+ */
38
+ UNDECORATED_CLASS_USING_ANGULAR_FEATURES = 2007,
39
+ /**
40
+ * Raised when an component cannot resolve an external resource, such as a template or a style
41
+ * sheet.
42
+ */
43
+ COMPONENT_RESOURCE_NOT_FOUND = 2008,
44
+ /**
45
+ * Raised when a component uses `ShadowDom` view encapsulation, but its selector
46
+ * does not match the shadow DOM tag name requirements.
47
+ */
48
+ COMPONENT_INVALID_SHADOW_DOM_SELECTOR = 2009,
49
+ SYMBOL_NOT_EXPORTED = 3001,
50
+ SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME = 3002,
51
+ /**
52
+ * Raised when a relationship between directives and/or pipes would cause a cyclic import to be
53
+ * created that cannot be handled, such as in partial compilation mode.
54
+ */
55
+ IMPORT_CYCLE_DETECTED = 3003,
56
+ CONFIG_FLAT_MODULE_NO_INDEX = 4001,
57
+ CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK = 4002,
58
+ /**
59
+ * Raised when a host expression has a parse error, such as a host listener or host binding
60
+ * expression containing a pipe.
61
+ */
62
+ HOST_BINDING_PARSE_ERROR = 5001,
63
+ /**
64
+ * Raised when the compiler cannot parse a component's template.
65
+ */
66
+ TEMPLATE_PARSE_ERROR = 5002,
67
+ /**
68
+ * Raised when an NgModule contains an invalid reference in `declarations`.
69
+ */
70
+ NGMODULE_INVALID_DECLARATION = 6001,
71
+ /**
72
+ * Raised when an NgModule contains an invalid type in `imports`.
73
+ */
74
+ NGMODULE_INVALID_IMPORT = 6002,
75
+ /**
76
+ * Raised when an NgModule contains an invalid type in `exports`.
77
+ */
78
+ NGMODULE_INVALID_EXPORT = 6003,
79
+ /**
80
+ * Raised when an NgModule contains a type in `exports` which is neither in `declarations` nor
81
+ * otherwise imported.
82
+ */
83
+ NGMODULE_INVALID_REEXPORT = 6004,
84
+ /**
85
+ * Raised when a `ModuleWithProviders` with a missing
86
+ * generic type argument is passed into an `NgModule`.
87
+ */
88
+ NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC = 6005,
89
+ /**
90
+ * Raised when an NgModule exports multiple directives/pipes of the same name and the compiler
91
+ * attempts to generate private re-exports within the NgModule file.
92
+ */
93
+ NGMODULE_REEXPORT_NAME_COLLISION = 6006,
94
+ /**
95
+ * Raised when a directive/pipe is part of the declarations of two or more NgModules.
96
+ */
97
+ NGMODULE_DECLARATION_NOT_UNIQUE = 6007,
98
+ /**
99
+ * Not actually raised by the compiler, but reserved for documentation of a View Engine error when
100
+ * a View Engine build depends on an Ivy-compiled NgModule.
101
+ */
102
+ NGMODULE_VE_DEPENDENCY_ON_IVY_LIB = 6999,
103
+ /**
104
+ * An element name failed validation against the DOM schema.
105
+ */
106
+ SCHEMA_INVALID_ELEMENT = 8001,
107
+ /**
108
+ * An element's attribute name failed validation against the DOM schema.
109
+ */
110
+ SCHEMA_INVALID_ATTRIBUTE = 8002,
111
+ /**
112
+ * No matching directive was found for a `#ref="target"` expression.
113
+ */
114
+ MISSING_REFERENCE_TARGET = 8003,
115
+ /**
116
+ * No matching pipe was found for a
117
+ */
118
+ MISSING_PIPE = 8004,
119
+ /**
120
+ * The left-hand side of an assignment expression was a template variable. Effectively, the
121
+ * template looked like:
122
+ *
123
+ * ```
124
+ * <ng-template let-something>
125
+ * <button (click)="something = ...">...</button>
126
+ * </ng-template>
127
+ * ```
128
+ *
129
+ * Template variables are read-only.
130
+ */
131
+ WRITE_TO_READ_ONLY_VARIABLE = 8005,
132
+ /**
133
+ * A template variable was declared twice. For example:
134
+ *
135
+ * ```html
136
+ * <div *ngFor="let i of items; let i = index">
137
+ * </div>
138
+ * ```
139
+ */
140
+ DUPLICATE_VARIABLE_DECLARATION = 8006,
141
+ /**
142
+ * A template has a two way binding (two bindings created by a single syntactial element)
143
+ * in which the input and output are going to different places.
144
+ */
145
+ SPLIT_TWO_WAY_BINDING = 8007,
146
+ /**
147
+ * The template type-checking engine would need to generate an inline type check block for a
148
+ * component, but the current type-checking environment doesn't support it.
149
+ */
150
+ INLINE_TCB_REQUIRED = 8900,
151
+ /**
152
+ * The template type-checking engine would need to generate an inline type constructor for a
153
+ * directive or component, but the current type-checking environment doesn't support it.
154
+ */
155
+ INLINE_TYPE_CTOR_REQUIRED = 8901,
156
+ /**
157
+ * An injectable already has a `ɵprov` property.
158
+ */
159
+ INJECTABLE_DUPLICATE_PROV = 9001,
160
+ /**
161
+ * Suggest users to enable `strictTemplates` to make use of full capabilities
162
+ * provided by Angular language service.
163
+ */
164
+ SUGGEST_STRICT_TEMPLATES = 10001,
165
+ /**
166
+ * Indicates that a particular structural directive provides advanced type narrowing
167
+ * functionality, but the current template type-checking configuration does not allow its usage in
168
+ * type inference.
169
+ */
170
+ SUGGEST_SUBOPTIMAL_TYPE_INFERENCE = 10002
171
+ }
172
+ /**
173
+ * @internal
174
+ * Base URL for the error details page.
175
+ * Keep this value in sync with a similar const in
176
+ * `packages/core/src/render3/error_code.ts`.
177
+ */
178
+ export declare const ERROR_DETAILS_PAGE_BASE_URL = "https://angular.io/errors";
179
+ /**
180
+ * @internal
181
+ * Contains a set of error messages that have detailed guides at angular.io.
182
+ * Full list of available error guides can be found at https://angular.io/errors
183
+ */
184
+ export declare const COMPILER_ERRORS_WITH_GUIDES: Set<ErrorCode>;
185
+ /**
186
+ * @internal
187
+ */
188
+ export declare function ngErrorCode(code: ErrorCode): number;
@@ -0,0 +1,206 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ngErrorCode = exports.COMPILER_ERRORS_WITH_GUIDES = exports.ERROR_DETAILS_PAGE_BASE_URL = exports.ErrorCode = void 0;
11
+ /**
12
+ * @publicApi
13
+ */
14
+ var ErrorCode;
15
+ (function (ErrorCode) {
16
+ ErrorCode[ErrorCode["DECORATOR_ARG_NOT_LITERAL"] = 1001] = "DECORATOR_ARG_NOT_LITERAL";
17
+ ErrorCode[ErrorCode["DECORATOR_ARITY_WRONG"] = 1002] = "DECORATOR_ARITY_WRONG";
18
+ ErrorCode[ErrorCode["DECORATOR_NOT_CALLED"] = 1003] = "DECORATOR_NOT_CALLED";
19
+ ErrorCode[ErrorCode["DECORATOR_ON_ANONYMOUS_CLASS"] = 1004] = "DECORATOR_ON_ANONYMOUS_CLASS";
20
+ ErrorCode[ErrorCode["DECORATOR_UNEXPECTED"] = 1005] = "DECORATOR_UNEXPECTED";
21
+ /**
22
+ * This error code indicates that there are incompatible decorators on a type or a class field.
23
+ */
24
+ ErrorCode[ErrorCode["DECORATOR_COLLISION"] = 1006] = "DECORATOR_COLLISION";
25
+ ErrorCode[ErrorCode["VALUE_HAS_WRONG_TYPE"] = 1010] = "VALUE_HAS_WRONG_TYPE";
26
+ ErrorCode[ErrorCode["VALUE_NOT_LITERAL"] = 1011] = "VALUE_NOT_LITERAL";
27
+ ErrorCode[ErrorCode["COMPONENT_MISSING_TEMPLATE"] = 2001] = "COMPONENT_MISSING_TEMPLATE";
28
+ ErrorCode[ErrorCode["PIPE_MISSING_NAME"] = 2002] = "PIPE_MISSING_NAME";
29
+ ErrorCode[ErrorCode["PARAM_MISSING_TOKEN"] = 2003] = "PARAM_MISSING_TOKEN";
30
+ ErrorCode[ErrorCode["DIRECTIVE_MISSING_SELECTOR"] = 2004] = "DIRECTIVE_MISSING_SELECTOR";
31
+ /** Raised when an undecorated class is passed in as a provider to a module or a directive. */
32
+ ErrorCode[ErrorCode["UNDECORATED_PROVIDER"] = 2005] = "UNDECORATED_PROVIDER";
33
+ /**
34
+ * Raised when a Directive inherits its constructor from a base class without an Angular
35
+ * decorator.
36
+ */
37
+ ErrorCode[ErrorCode["DIRECTIVE_INHERITS_UNDECORATED_CTOR"] = 2006] = "DIRECTIVE_INHERITS_UNDECORATED_CTOR";
38
+ /**
39
+ * Raised when an undecorated class that is using Angular features
40
+ * has been discovered.
41
+ */
42
+ ErrorCode[ErrorCode["UNDECORATED_CLASS_USING_ANGULAR_FEATURES"] = 2007] = "UNDECORATED_CLASS_USING_ANGULAR_FEATURES";
43
+ /**
44
+ * Raised when an component cannot resolve an external resource, such as a template or a style
45
+ * sheet.
46
+ */
47
+ ErrorCode[ErrorCode["COMPONENT_RESOURCE_NOT_FOUND"] = 2008] = "COMPONENT_RESOURCE_NOT_FOUND";
48
+ /**
49
+ * Raised when a component uses `ShadowDom` view encapsulation, but its selector
50
+ * does not match the shadow DOM tag name requirements.
51
+ */
52
+ ErrorCode[ErrorCode["COMPONENT_INVALID_SHADOW_DOM_SELECTOR"] = 2009] = "COMPONENT_INVALID_SHADOW_DOM_SELECTOR";
53
+ ErrorCode[ErrorCode["SYMBOL_NOT_EXPORTED"] = 3001] = "SYMBOL_NOT_EXPORTED";
54
+ ErrorCode[ErrorCode["SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME"] = 3002] = "SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME";
55
+ /**
56
+ * Raised when a relationship between directives and/or pipes would cause a cyclic import to be
57
+ * created that cannot be handled, such as in partial compilation mode.
58
+ */
59
+ ErrorCode[ErrorCode["IMPORT_CYCLE_DETECTED"] = 3003] = "IMPORT_CYCLE_DETECTED";
60
+ ErrorCode[ErrorCode["CONFIG_FLAT_MODULE_NO_INDEX"] = 4001] = "CONFIG_FLAT_MODULE_NO_INDEX";
61
+ ErrorCode[ErrorCode["CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK"] = 4002] = "CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK";
62
+ /**
63
+ * Raised when a host expression has a parse error, such as a host listener or host binding
64
+ * expression containing a pipe.
65
+ */
66
+ ErrorCode[ErrorCode["HOST_BINDING_PARSE_ERROR"] = 5001] = "HOST_BINDING_PARSE_ERROR";
67
+ /**
68
+ * Raised when the compiler cannot parse a component's template.
69
+ */
70
+ ErrorCode[ErrorCode["TEMPLATE_PARSE_ERROR"] = 5002] = "TEMPLATE_PARSE_ERROR";
71
+ /**
72
+ * Raised when an NgModule contains an invalid reference in `declarations`.
73
+ */
74
+ ErrorCode[ErrorCode["NGMODULE_INVALID_DECLARATION"] = 6001] = "NGMODULE_INVALID_DECLARATION";
75
+ /**
76
+ * Raised when an NgModule contains an invalid type in `imports`.
77
+ */
78
+ ErrorCode[ErrorCode["NGMODULE_INVALID_IMPORT"] = 6002] = "NGMODULE_INVALID_IMPORT";
79
+ /**
80
+ * Raised when an NgModule contains an invalid type in `exports`.
81
+ */
82
+ ErrorCode[ErrorCode["NGMODULE_INVALID_EXPORT"] = 6003] = "NGMODULE_INVALID_EXPORT";
83
+ /**
84
+ * Raised when an NgModule contains a type in `exports` which is neither in `declarations` nor
85
+ * otherwise imported.
86
+ */
87
+ ErrorCode[ErrorCode["NGMODULE_INVALID_REEXPORT"] = 6004] = "NGMODULE_INVALID_REEXPORT";
88
+ /**
89
+ * Raised when a `ModuleWithProviders` with a missing
90
+ * generic type argument is passed into an `NgModule`.
91
+ */
92
+ ErrorCode[ErrorCode["NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC"] = 6005] = "NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC";
93
+ /**
94
+ * Raised when an NgModule exports multiple directives/pipes of the same name and the compiler
95
+ * attempts to generate private re-exports within the NgModule file.
96
+ */
97
+ ErrorCode[ErrorCode["NGMODULE_REEXPORT_NAME_COLLISION"] = 6006] = "NGMODULE_REEXPORT_NAME_COLLISION";
98
+ /**
99
+ * Raised when a directive/pipe is part of the declarations of two or more NgModules.
100
+ */
101
+ ErrorCode[ErrorCode["NGMODULE_DECLARATION_NOT_UNIQUE"] = 6007] = "NGMODULE_DECLARATION_NOT_UNIQUE";
102
+ /**
103
+ * Not actually raised by the compiler, but reserved for documentation of a View Engine error when
104
+ * a View Engine build depends on an Ivy-compiled NgModule.
105
+ */
106
+ ErrorCode[ErrorCode["NGMODULE_VE_DEPENDENCY_ON_IVY_LIB"] = 6999] = "NGMODULE_VE_DEPENDENCY_ON_IVY_LIB";
107
+ /**
108
+ * An element name failed validation against the DOM schema.
109
+ */
110
+ ErrorCode[ErrorCode["SCHEMA_INVALID_ELEMENT"] = 8001] = "SCHEMA_INVALID_ELEMENT";
111
+ /**
112
+ * An element's attribute name failed validation against the DOM schema.
113
+ */
114
+ ErrorCode[ErrorCode["SCHEMA_INVALID_ATTRIBUTE"] = 8002] = "SCHEMA_INVALID_ATTRIBUTE";
115
+ /**
116
+ * No matching directive was found for a `#ref="target"` expression.
117
+ */
118
+ ErrorCode[ErrorCode["MISSING_REFERENCE_TARGET"] = 8003] = "MISSING_REFERENCE_TARGET";
119
+ /**
120
+ * No matching pipe was found for a
121
+ */
122
+ ErrorCode[ErrorCode["MISSING_PIPE"] = 8004] = "MISSING_PIPE";
123
+ /**
124
+ * The left-hand side of an assignment expression was a template variable. Effectively, the
125
+ * template looked like:
126
+ *
127
+ * ```
128
+ * <ng-template let-something>
129
+ * <button (click)="something = ...">...</button>
130
+ * </ng-template>
131
+ * ```
132
+ *
133
+ * Template variables are read-only.
134
+ */
135
+ ErrorCode[ErrorCode["WRITE_TO_READ_ONLY_VARIABLE"] = 8005] = "WRITE_TO_READ_ONLY_VARIABLE";
136
+ /**
137
+ * A template variable was declared twice. For example:
138
+ *
139
+ * ```html
140
+ * <div *ngFor="let i of items; let i = index">
141
+ * </div>
142
+ * ```
143
+ */
144
+ ErrorCode[ErrorCode["DUPLICATE_VARIABLE_DECLARATION"] = 8006] = "DUPLICATE_VARIABLE_DECLARATION";
145
+ /**
146
+ * A template has a two way binding (two bindings created by a single syntactial element)
147
+ * in which the input and output are going to different places.
148
+ */
149
+ ErrorCode[ErrorCode["SPLIT_TWO_WAY_BINDING"] = 8007] = "SPLIT_TWO_WAY_BINDING";
150
+ /**
151
+ * The template type-checking engine would need to generate an inline type check block for a
152
+ * component, but the current type-checking environment doesn't support it.
153
+ */
154
+ ErrorCode[ErrorCode["INLINE_TCB_REQUIRED"] = 8900] = "INLINE_TCB_REQUIRED";
155
+ /**
156
+ * The template type-checking engine would need to generate an inline type constructor for a
157
+ * directive or component, but the current type-checking environment doesn't support it.
158
+ */
159
+ ErrorCode[ErrorCode["INLINE_TYPE_CTOR_REQUIRED"] = 8901] = "INLINE_TYPE_CTOR_REQUIRED";
160
+ /**
161
+ * An injectable already has a `ɵprov` property.
162
+ */
163
+ ErrorCode[ErrorCode["INJECTABLE_DUPLICATE_PROV"] = 9001] = "INJECTABLE_DUPLICATE_PROV";
164
+ // 10XXX error codes are reserved for diagnostics with categories other than
165
+ // `ts.DiagnosticCategory.Error`. These diagnostics are generated by the compiler when configured
166
+ // to do so by a tool such as the Language Service, or by the Language Service itself.
167
+ /**
168
+ * Suggest users to enable `strictTemplates` to make use of full capabilities
169
+ * provided by Angular language service.
170
+ */
171
+ ErrorCode[ErrorCode["SUGGEST_STRICT_TEMPLATES"] = 10001] = "SUGGEST_STRICT_TEMPLATES";
172
+ /**
173
+ * Indicates that a particular structural directive provides advanced type narrowing
174
+ * functionality, but the current template type-checking configuration does not allow its usage in
175
+ * type inference.
176
+ */
177
+ ErrorCode[ErrorCode["SUGGEST_SUBOPTIMAL_TYPE_INFERENCE"] = 10002] = "SUGGEST_SUBOPTIMAL_TYPE_INFERENCE";
178
+ })(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));
179
+ /**
180
+ * @internal
181
+ * Base URL for the error details page.
182
+ * Keep this value in sync with a similar const in
183
+ * `packages/core/src/render3/error_code.ts`.
184
+ */
185
+ exports.ERROR_DETAILS_PAGE_BASE_URL = "https://angular.io/errors";
186
+ /**
187
+ * @internal
188
+ * Contains a set of error messages that have detailed guides at angular.io.
189
+ * Full list of available error guides can be found at https://angular.io/errors
190
+ */
191
+ exports.COMPILER_ERRORS_WITH_GUIDES = new Set([
192
+ ErrorCode.DECORATOR_ARG_NOT_LITERAL,
193
+ ErrorCode.IMPORT_CYCLE_DETECTED,
194
+ ErrorCode.PARAM_MISSING_TOKEN,
195
+ ErrorCode.SCHEMA_INVALID_ELEMENT,
196
+ ErrorCode.SCHEMA_INVALID_ATTRIBUTE,
197
+ ErrorCode.MISSING_REFERENCE_TARGET,
198
+ ErrorCode.COMPONENT_INVALID_SHADOW_DOM_SELECTOR,
199
+ ]);
200
+ /**
201
+ * @internal
202
+ */
203
+ function ngErrorCode(code) {
204
+ return parseInt("-99" + code);
205
+ }
206
+ exports.ngErrorCode = ngErrorCode;
@@ -0,0 +1,2 @@
1
+ export * from "./error";
2
+ export * from "./error_code";
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./error"), exports);
14
+ __exportStar(require("./error_code"), exports);
@@ -0,0 +1 @@
1
+ export * from './src/core';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./src/core"), exports);
@@ -0,0 +1,36 @@
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
+ /**
9
+ * Rewrites imports of symbols being written into generated code.
10
+ */
11
+ export interface ImportRewriter {
12
+ /**
13
+ * Should the given symbol be imported at all?
14
+ *
15
+ * If `true`, the symbol should be imported from the given specifier. If `false`, the symbol
16
+ * should be referenced directly, without an import.
17
+ */
18
+ shouldImportSymbol(symbol: string, specifier: string): boolean;
19
+ /**
20
+ * Optionally rewrite a reference to an imported symbol, changing either the binding prefix or the
21
+ * symbol name itself.
22
+ */
23
+ rewriteSymbol(symbol: string, specifier: string): string;
24
+ /**
25
+ * Optionally rewrite the given module specifier in the context of a given file.
26
+ */
27
+ rewriteSpecifier(specifier: string, inContextOfFile: string): string;
28
+ }
29
+ /**
30
+ * `ImportRewriter` that does no rewriting.
31
+ */
32
+ export declare class NoopImportRewriter implements ImportRewriter {
33
+ shouldImportSymbol(symbol: string, specifier: string): boolean;
34
+ rewriteSymbol(symbol: string, specifier: string): string;
35
+ rewriteSpecifier(specifier: string, inContextOfFile: string): string;
36
+ }