@angular/compiler-cli 17.2.3 → 17.3.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/{chunk-LWM7EW6L.js → chunk-2CAUFIKU.js} +3 -3
- package/bundles/{chunk-SGHI77T2.js → chunk-5A5Y7O22.js} +29 -19
- package/bundles/chunk-5A5Y7O22.js.map +6 -0
- package/bundles/{chunk-YBXVKJOM.js → chunk-7VU7HCQZ.js} +290 -286
- package/bundles/chunk-7VU7HCQZ.js.map +6 -0
- package/bundles/{chunk-NQAH24UD.js → chunk-FPKC3HSK.js} +2 -2
- package/bundles/{chunk-FS75LCNP.js → chunk-IIZOI4XA.js} +7 -4
- package/bundles/{chunk-FS75LCNP.js.map → chunk-IIZOI4XA.js.map} +1 -1
- package/bundles/{chunk-MV5DSSRA.js → chunk-YVYW546M.js} +3 -3
- package/bundles/{chunk-MV5DSSRA.js.map → chunk-YVYW546M.js.map} +1 -1
- package/bundles/index.js +8 -5
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +2 -2
- package/bundles/linker/index.js +2 -2
- package/bundles/private/migrations.js +2 -2
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +4 -4
- package/bundles/src/bin/ngc.js +4 -4
- package/bundles_metadata.json +1 -1
- package/index.d.ts +1 -0
- package/linker/src/file_linker/partial_linkers/util.d.ts +2 -2
- package/package.json +3 -3
- package/src/ngtsc/core/src/feature_detection.d.ts +13 -0
- package/src/ngtsc/diagnostics/index.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/error.d.ts +7 -0
- package/src/ngtsc/diagnostics/src/error_code.d.ts +9 -3
- package/bundles/chunk-SGHI77T2.js.map +0 -6
- package/bundles/chunk-YBXVKJOM.js.map +0 -6
- /package/bundles/{chunk-LWM7EW6L.js.map → chunk-2CAUFIKU.js.map} +0 -0
- /package/bundles/{chunk-NQAH24UD.js.map → chunk-FPKC3HSK.js.map} +0 -0
|
@@ -14,13 +14,208 @@ import {
|
|
|
14
14
|
toRelativeImport
|
|
15
15
|
} from "./chunk-75YFKYUJ.js";
|
|
16
16
|
|
|
17
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
18
|
+
import ts from "typescript";
|
|
19
|
+
|
|
20
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.mjs
|
|
21
|
+
var ErrorCode;
|
|
22
|
+
(function(ErrorCode2) {
|
|
23
|
+
ErrorCode2[ErrorCode2["DECORATOR_ARG_NOT_LITERAL"] = 1001] = "DECORATOR_ARG_NOT_LITERAL";
|
|
24
|
+
ErrorCode2[ErrorCode2["DECORATOR_ARITY_WRONG"] = 1002] = "DECORATOR_ARITY_WRONG";
|
|
25
|
+
ErrorCode2[ErrorCode2["DECORATOR_NOT_CALLED"] = 1003] = "DECORATOR_NOT_CALLED";
|
|
26
|
+
ErrorCode2[ErrorCode2["DECORATOR_UNEXPECTED"] = 1005] = "DECORATOR_UNEXPECTED";
|
|
27
|
+
ErrorCode2[ErrorCode2["DECORATOR_COLLISION"] = 1006] = "DECORATOR_COLLISION";
|
|
28
|
+
ErrorCode2[ErrorCode2["VALUE_HAS_WRONG_TYPE"] = 1010] = "VALUE_HAS_WRONG_TYPE";
|
|
29
|
+
ErrorCode2[ErrorCode2["VALUE_NOT_LITERAL"] = 1011] = "VALUE_NOT_LITERAL";
|
|
30
|
+
ErrorCode2[ErrorCode2["INITIALIZER_API_WITH_DISALLOWED_DECORATOR"] = 1050] = "INITIALIZER_API_WITH_DISALLOWED_DECORATOR";
|
|
31
|
+
ErrorCode2[ErrorCode2["INITIALIZER_API_DECORATOR_METADATA_COLLISION"] = 1051] = "INITIALIZER_API_DECORATOR_METADATA_COLLISION";
|
|
32
|
+
ErrorCode2[ErrorCode2["INITIALIZER_API_NO_REQUIRED_FUNCTION"] = 1052] = "INITIALIZER_API_NO_REQUIRED_FUNCTION";
|
|
33
|
+
ErrorCode2[ErrorCode2["INCORRECTLY_DECLARED_ON_STATIC_MEMBER"] = 1100] = "INCORRECTLY_DECLARED_ON_STATIC_MEMBER";
|
|
34
|
+
ErrorCode2[ErrorCode2["COMPONENT_MISSING_TEMPLATE"] = 2001] = "COMPONENT_MISSING_TEMPLATE";
|
|
35
|
+
ErrorCode2[ErrorCode2["PIPE_MISSING_NAME"] = 2002] = "PIPE_MISSING_NAME";
|
|
36
|
+
ErrorCode2[ErrorCode2["PARAM_MISSING_TOKEN"] = 2003] = "PARAM_MISSING_TOKEN";
|
|
37
|
+
ErrorCode2[ErrorCode2["DIRECTIVE_MISSING_SELECTOR"] = 2004] = "DIRECTIVE_MISSING_SELECTOR";
|
|
38
|
+
ErrorCode2[ErrorCode2["UNDECORATED_PROVIDER"] = 2005] = "UNDECORATED_PROVIDER";
|
|
39
|
+
ErrorCode2[ErrorCode2["DIRECTIVE_INHERITS_UNDECORATED_CTOR"] = 2006] = "DIRECTIVE_INHERITS_UNDECORATED_CTOR";
|
|
40
|
+
ErrorCode2[ErrorCode2["UNDECORATED_CLASS_USING_ANGULAR_FEATURES"] = 2007] = "UNDECORATED_CLASS_USING_ANGULAR_FEATURES";
|
|
41
|
+
ErrorCode2[ErrorCode2["COMPONENT_RESOURCE_NOT_FOUND"] = 2008] = "COMPONENT_RESOURCE_NOT_FOUND";
|
|
42
|
+
ErrorCode2[ErrorCode2["COMPONENT_INVALID_SHADOW_DOM_SELECTOR"] = 2009] = "COMPONENT_INVALID_SHADOW_DOM_SELECTOR";
|
|
43
|
+
ErrorCode2[ErrorCode2["COMPONENT_NOT_STANDALONE"] = 2010] = "COMPONENT_NOT_STANDALONE";
|
|
44
|
+
ErrorCode2[ErrorCode2["COMPONENT_IMPORT_NOT_STANDALONE"] = 2011] = "COMPONENT_IMPORT_NOT_STANDALONE";
|
|
45
|
+
ErrorCode2[ErrorCode2["COMPONENT_UNKNOWN_IMPORT"] = 2012] = "COMPONENT_UNKNOWN_IMPORT";
|
|
46
|
+
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_INVALID"] = 2013] = "HOST_DIRECTIVE_INVALID";
|
|
47
|
+
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_NOT_STANDALONE"] = 2014] = "HOST_DIRECTIVE_NOT_STANDALONE";
|
|
48
|
+
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_COMPONENT"] = 2015] = "HOST_DIRECTIVE_COMPONENT";
|
|
49
|
+
ErrorCode2[ErrorCode2["INJECTABLE_INHERITS_INVALID_CONSTRUCTOR"] = 2016] = "INJECTABLE_INHERITS_INVALID_CONSTRUCTOR";
|
|
50
|
+
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_UNDEFINED_BINDING"] = 2017] = "HOST_DIRECTIVE_UNDEFINED_BINDING";
|
|
51
|
+
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_CONFLICTING_ALIAS"] = 2018] = "HOST_DIRECTIVE_CONFLICTING_ALIAS";
|
|
52
|
+
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_MISSING_REQUIRED_BINDING"] = 2019] = "HOST_DIRECTIVE_MISSING_REQUIRED_BINDING";
|
|
53
|
+
ErrorCode2[ErrorCode2["CONFLICTING_INPUT_TRANSFORM"] = 2020] = "CONFLICTING_INPUT_TRANSFORM";
|
|
54
|
+
ErrorCode2[ErrorCode2["COMPONENT_INVALID_STYLE_URLS"] = 2021] = "COMPONENT_INVALID_STYLE_URLS";
|
|
55
|
+
ErrorCode2[ErrorCode2["COMPONENT_UNKNOWN_DEFERRED_IMPORT"] = 2022] = "COMPONENT_UNKNOWN_DEFERRED_IMPORT";
|
|
56
|
+
ErrorCode2[ErrorCode2["SYMBOL_NOT_EXPORTED"] = 3001] = "SYMBOL_NOT_EXPORTED";
|
|
57
|
+
ErrorCode2[ErrorCode2["IMPORT_CYCLE_DETECTED"] = 3003] = "IMPORT_CYCLE_DETECTED";
|
|
58
|
+
ErrorCode2[ErrorCode2["IMPORT_GENERATION_FAILURE"] = 3004] = "IMPORT_GENERATION_FAILURE";
|
|
59
|
+
ErrorCode2[ErrorCode2["CONFIG_FLAT_MODULE_NO_INDEX"] = 4001] = "CONFIG_FLAT_MODULE_NO_INDEX";
|
|
60
|
+
ErrorCode2[ErrorCode2["CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK"] = 4002] = "CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK";
|
|
61
|
+
ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES"] = 4003] = "CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES";
|
|
62
|
+
ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL"] = 4004] = "CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL";
|
|
63
|
+
ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK"] = 4005] = "CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK";
|
|
64
|
+
ErrorCode2[ErrorCode2["HOST_BINDING_PARSE_ERROR"] = 5001] = "HOST_BINDING_PARSE_ERROR";
|
|
65
|
+
ErrorCode2[ErrorCode2["TEMPLATE_PARSE_ERROR"] = 5002] = "TEMPLATE_PARSE_ERROR";
|
|
66
|
+
ErrorCode2[ErrorCode2["NGMODULE_INVALID_DECLARATION"] = 6001] = "NGMODULE_INVALID_DECLARATION";
|
|
67
|
+
ErrorCode2[ErrorCode2["NGMODULE_INVALID_IMPORT"] = 6002] = "NGMODULE_INVALID_IMPORT";
|
|
68
|
+
ErrorCode2[ErrorCode2["NGMODULE_INVALID_EXPORT"] = 6003] = "NGMODULE_INVALID_EXPORT";
|
|
69
|
+
ErrorCode2[ErrorCode2["NGMODULE_INVALID_REEXPORT"] = 6004] = "NGMODULE_INVALID_REEXPORT";
|
|
70
|
+
ErrorCode2[ErrorCode2["NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC"] = 6005] = "NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC";
|
|
71
|
+
ErrorCode2[ErrorCode2["NGMODULE_REEXPORT_NAME_COLLISION"] = 6006] = "NGMODULE_REEXPORT_NAME_COLLISION";
|
|
72
|
+
ErrorCode2[ErrorCode2["NGMODULE_DECLARATION_NOT_UNIQUE"] = 6007] = "NGMODULE_DECLARATION_NOT_UNIQUE";
|
|
73
|
+
ErrorCode2[ErrorCode2["NGMODULE_DECLARATION_IS_STANDALONE"] = 6008] = "NGMODULE_DECLARATION_IS_STANDALONE";
|
|
74
|
+
ErrorCode2[ErrorCode2["NGMODULE_BOOTSTRAP_IS_STANDALONE"] = 6009] = "NGMODULE_BOOTSTRAP_IS_STANDALONE";
|
|
75
|
+
ErrorCode2[ErrorCode2["WARN_NGMODULE_ID_UNNECESSARY"] = 6100] = "WARN_NGMODULE_ID_UNNECESSARY";
|
|
76
|
+
ErrorCode2[ErrorCode2["SCHEMA_INVALID_ELEMENT"] = 8001] = "SCHEMA_INVALID_ELEMENT";
|
|
77
|
+
ErrorCode2[ErrorCode2["SCHEMA_INVALID_ATTRIBUTE"] = 8002] = "SCHEMA_INVALID_ATTRIBUTE";
|
|
78
|
+
ErrorCode2[ErrorCode2["MISSING_REFERENCE_TARGET"] = 8003] = "MISSING_REFERENCE_TARGET";
|
|
79
|
+
ErrorCode2[ErrorCode2["MISSING_PIPE"] = 8004] = "MISSING_PIPE";
|
|
80
|
+
ErrorCode2[ErrorCode2["WRITE_TO_READ_ONLY_VARIABLE"] = 8005] = "WRITE_TO_READ_ONLY_VARIABLE";
|
|
81
|
+
ErrorCode2[ErrorCode2["DUPLICATE_VARIABLE_DECLARATION"] = 8006] = "DUPLICATE_VARIABLE_DECLARATION";
|
|
82
|
+
ErrorCode2[ErrorCode2["SPLIT_TWO_WAY_BINDING"] = 8007] = "SPLIT_TWO_WAY_BINDING";
|
|
83
|
+
ErrorCode2[ErrorCode2["MISSING_REQUIRED_INPUTS"] = 8008] = "MISSING_REQUIRED_INPUTS";
|
|
84
|
+
ErrorCode2[ErrorCode2["ILLEGAL_FOR_LOOP_TRACK_ACCESS"] = 8009] = "ILLEGAL_FOR_LOOP_TRACK_ACCESS";
|
|
85
|
+
ErrorCode2[ErrorCode2["INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT"] = 8010] = "INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT";
|
|
86
|
+
ErrorCode2[ErrorCode2["CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION"] = 8011] = "CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION";
|
|
87
|
+
ErrorCode2[ErrorCode2["DEFERRED_PIPE_USED_EAGERLY"] = 8012] = "DEFERRED_PIPE_USED_EAGERLY";
|
|
88
|
+
ErrorCode2[ErrorCode2["DEFERRED_DIRECTIVE_USED_EAGERLY"] = 8013] = "DEFERRED_DIRECTIVE_USED_EAGERLY";
|
|
89
|
+
ErrorCode2[ErrorCode2["DEFERRED_DEPENDENCY_IMPORTED_EAGERLY"] = 8014] = "DEFERRED_DEPENDENCY_IMPORTED_EAGERLY";
|
|
90
|
+
ErrorCode2[ErrorCode2["INVALID_BANANA_IN_BOX"] = 8101] = "INVALID_BANANA_IN_BOX";
|
|
91
|
+
ErrorCode2[ErrorCode2["NULLISH_COALESCING_NOT_NULLABLE"] = 8102] = "NULLISH_COALESCING_NOT_NULLABLE";
|
|
92
|
+
ErrorCode2[ErrorCode2["MISSING_CONTROL_FLOW_DIRECTIVE"] = 8103] = "MISSING_CONTROL_FLOW_DIRECTIVE";
|
|
93
|
+
ErrorCode2[ErrorCode2["TEXT_ATTRIBUTE_NOT_BINDING"] = 8104] = "TEXT_ATTRIBUTE_NOT_BINDING";
|
|
94
|
+
ErrorCode2[ErrorCode2["MISSING_NGFOROF_LET"] = 8105] = "MISSING_NGFOROF_LET";
|
|
95
|
+
ErrorCode2[ErrorCode2["SUFFIX_NOT_SUPPORTED"] = 8106] = "SUFFIX_NOT_SUPPORTED";
|
|
96
|
+
ErrorCode2[ErrorCode2["OPTIONAL_CHAIN_NOT_NULLABLE"] = 8107] = "OPTIONAL_CHAIN_NOT_NULLABLE";
|
|
97
|
+
ErrorCode2[ErrorCode2["SKIP_HYDRATION_NOT_STATIC"] = 8108] = "SKIP_HYDRATION_NOT_STATIC";
|
|
98
|
+
ErrorCode2[ErrorCode2["INTERPOLATED_SIGNAL_NOT_INVOKED"] = 8109] = "INTERPOLATED_SIGNAL_NOT_INVOKED";
|
|
99
|
+
ErrorCode2[ErrorCode2["INLINE_TCB_REQUIRED"] = 8900] = "INLINE_TCB_REQUIRED";
|
|
100
|
+
ErrorCode2[ErrorCode2["INLINE_TYPE_CTOR_REQUIRED"] = 8901] = "INLINE_TYPE_CTOR_REQUIRED";
|
|
101
|
+
ErrorCode2[ErrorCode2["INJECTABLE_DUPLICATE_PROV"] = 9001] = "INJECTABLE_DUPLICATE_PROV";
|
|
102
|
+
ErrorCode2[ErrorCode2["SUGGEST_STRICT_TEMPLATES"] = 10001] = "SUGGEST_STRICT_TEMPLATES";
|
|
103
|
+
ErrorCode2[ErrorCode2["SUGGEST_SUBOPTIMAL_TYPE_INFERENCE"] = 10002] = "SUGGEST_SUBOPTIMAL_TYPE_INFERENCE";
|
|
104
|
+
ErrorCode2[ErrorCode2["LOCAL_COMPILATION_UNRESOLVED_CONST"] = 11001] = "LOCAL_COMPILATION_UNRESOLVED_CONST";
|
|
105
|
+
ErrorCode2[ErrorCode2["LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION"] = 11003] = "LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION";
|
|
106
|
+
})(ErrorCode || (ErrorCode = {}));
|
|
107
|
+
|
|
108
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/util.mjs
|
|
109
|
+
var ERROR_CODE_MATCHER = /(\u001b\[\d+m ?)TS-99(\d+: ?\u001b\[\d+m)/g;
|
|
110
|
+
function replaceTsWithNgInErrors(errors) {
|
|
111
|
+
return errors.replace(ERROR_CODE_MATCHER, "$1NG$2");
|
|
112
|
+
}
|
|
113
|
+
function ngErrorCode(code) {
|
|
114
|
+
return parseInt("-99" + code);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
118
|
+
var FatalDiagnosticError = class extends Error {
|
|
119
|
+
constructor(code, node, diagnosticMessage, relatedInformation) {
|
|
120
|
+
super(`FatalDiagnosticError #${code}: ${diagnosticMessage}`);
|
|
121
|
+
this.code = code;
|
|
122
|
+
this.node = node;
|
|
123
|
+
this.diagnosticMessage = diagnosticMessage;
|
|
124
|
+
this.relatedInformation = relatedInformation;
|
|
125
|
+
this.message = null;
|
|
126
|
+
this._isFatalDiagnosticError = true;
|
|
127
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
128
|
+
}
|
|
129
|
+
toDiagnostic() {
|
|
130
|
+
return makeDiagnostic(this.code, this.node, this.diagnosticMessage, this.relatedInformation);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
function makeDiagnostic(code, node, messageText, relatedInformation) {
|
|
134
|
+
node = ts.getOriginalNode(node);
|
|
135
|
+
return {
|
|
136
|
+
category: ts.DiagnosticCategory.Error,
|
|
137
|
+
code: ngErrorCode(code),
|
|
138
|
+
file: ts.getOriginalNode(node).getSourceFile(),
|
|
139
|
+
start: node.getStart(void 0, false),
|
|
140
|
+
length: node.getWidth(),
|
|
141
|
+
messageText,
|
|
142
|
+
relatedInformation
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function makeDiagnosticChain(messageText, next) {
|
|
146
|
+
return {
|
|
147
|
+
category: ts.DiagnosticCategory.Message,
|
|
148
|
+
code: 0,
|
|
149
|
+
messageText,
|
|
150
|
+
next
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function makeRelatedInformation(node, messageText) {
|
|
154
|
+
node = ts.getOriginalNode(node);
|
|
155
|
+
return {
|
|
156
|
+
category: ts.DiagnosticCategory.Message,
|
|
157
|
+
code: 0,
|
|
158
|
+
file: node.getSourceFile(),
|
|
159
|
+
start: node.getStart(),
|
|
160
|
+
length: node.getWidth(),
|
|
161
|
+
messageText
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function addDiagnosticChain(messageText, add) {
|
|
165
|
+
if (typeof messageText === "string") {
|
|
166
|
+
return makeDiagnosticChain(messageText, add);
|
|
167
|
+
}
|
|
168
|
+
if (messageText.next === void 0) {
|
|
169
|
+
messageText.next = add;
|
|
170
|
+
} else {
|
|
171
|
+
messageText.next.push(...add);
|
|
172
|
+
}
|
|
173
|
+
return messageText;
|
|
174
|
+
}
|
|
175
|
+
function isFatalDiagnosticError(err) {
|
|
176
|
+
return err._isFatalDiagnosticError === true;
|
|
177
|
+
}
|
|
178
|
+
function isLocalCompilationDiagnostics(diagnostic) {
|
|
179
|
+
return diagnostic.code === ngErrorCode(ErrorCode.LOCAL_COMPILATION_UNRESOLVED_CONST) || diagnostic.code === ngErrorCode(ErrorCode.LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.mjs
|
|
183
|
+
var COMPILER_ERRORS_WITH_GUIDES = /* @__PURE__ */ new Set([
|
|
184
|
+
ErrorCode.DECORATOR_ARG_NOT_LITERAL,
|
|
185
|
+
ErrorCode.IMPORT_CYCLE_DETECTED,
|
|
186
|
+
ErrorCode.PARAM_MISSING_TOKEN,
|
|
187
|
+
ErrorCode.SCHEMA_INVALID_ELEMENT,
|
|
188
|
+
ErrorCode.SCHEMA_INVALID_ATTRIBUTE,
|
|
189
|
+
ErrorCode.MISSING_REFERENCE_TARGET,
|
|
190
|
+
ErrorCode.COMPONENT_INVALID_SHADOW_DOM_SELECTOR,
|
|
191
|
+
ErrorCode.WARN_NGMODULE_ID_UNNECESSARY
|
|
192
|
+
]);
|
|
193
|
+
|
|
194
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.mjs
|
|
195
|
+
var ERROR_DETAILS_PAGE_BASE_URL = "https://angular.io/errors";
|
|
196
|
+
|
|
197
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.mjs
|
|
198
|
+
var ExtendedTemplateDiagnosticName;
|
|
199
|
+
(function(ExtendedTemplateDiagnosticName2) {
|
|
200
|
+
ExtendedTemplateDiagnosticName2["INVALID_BANANA_IN_BOX"] = "invalidBananaInBox";
|
|
201
|
+
ExtendedTemplateDiagnosticName2["NULLISH_COALESCING_NOT_NULLABLE"] = "nullishCoalescingNotNullable";
|
|
202
|
+
ExtendedTemplateDiagnosticName2["OPTIONAL_CHAIN_NOT_NULLABLE"] = "optionalChainNotNullable";
|
|
203
|
+
ExtendedTemplateDiagnosticName2["MISSING_CONTROL_FLOW_DIRECTIVE"] = "missingControlFlowDirective";
|
|
204
|
+
ExtendedTemplateDiagnosticName2["TEXT_ATTRIBUTE_NOT_BINDING"] = "textAttributeNotBinding";
|
|
205
|
+
ExtendedTemplateDiagnosticName2["MISSING_NGFOROF_LET"] = "missingNgForOfLet";
|
|
206
|
+
ExtendedTemplateDiagnosticName2["SUFFIX_NOT_SUPPORTED"] = "suffixNotSupported";
|
|
207
|
+
ExtendedTemplateDiagnosticName2["SKIP_HYDRATION_NOT_STATIC"] = "skipHydrationNotStatic";
|
|
208
|
+
ExtendedTemplateDiagnosticName2["INTERPOLATED_SIGNAL_NOT_INVOKED"] = "interpolatedSignalNotInvoked";
|
|
209
|
+
ExtendedTemplateDiagnosticName2["CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION"] = "controlFlowPreventingContentProjection";
|
|
210
|
+
})(ExtendedTemplateDiagnosticName || (ExtendedTemplateDiagnosticName = {}));
|
|
211
|
+
|
|
17
212
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/typescript.mjs
|
|
18
|
-
import
|
|
213
|
+
import ts5 from "typescript";
|
|
19
214
|
|
|
20
215
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/host.mjs
|
|
21
|
-
import
|
|
216
|
+
import ts2 from "typescript";
|
|
22
217
|
function isDecoratorIdentifier(exp) {
|
|
23
|
-
return
|
|
218
|
+
return ts2.isIdentifier(exp) || ts2.isPropertyAccessExpression(exp) && ts2.isIdentifier(exp.expression) && ts2.isIdentifier(exp.name);
|
|
24
219
|
}
|
|
25
220
|
var ClassMemberKind;
|
|
26
221
|
(function(ClassMemberKind2) {
|
|
@@ -33,13 +228,13 @@ var ClassMemberKind;
|
|
|
33
228
|
var AmbientImport = {};
|
|
34
229
|
|
|
35
230
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/type_to_value.mjs
|
|
36
|
-
import
|
|
231
|
+
import ts3 from "typescript";
|
|
37
232
|
function typeToValue(typeNode, checker, isLocalCompilation) {
|
|
38
233
|
var _a, _b;
|
|
39
234
|
if (typeNode === null) {
|
|
40
235
|
return missingType();
|
|
41
236
|
}
|
|
42
|
-
if (!
|
|
237
|
+
if (!ts3.isTypeReferenceNode(typeNode)) {
|
|
43
238
|
return unsupportedType(typeNode);
|
|
44
239
|
}
|
|
45
240
|
const symbols = resolveTypeSymbols(typeNode, checker);
|
|
@@ -47,22 +242,22 @@ function typeToValue(typeNode, checker, isLocalCompilation) {
|
|
|
47
242
|
return unknownReference(typeNode);
|
|
48
243
|
}
|
|
49
244
|
const { local, decl } = symbols;
|
|
50
|
-
if (decl.valueDeclaration === void 0 || decl.flags &
|
|
245
|
+
if (decl.valueDeclaration === void 0 || decl.flags & ts3.SymbolFlags.ConstEnum) {
|
|
51
246
|
let typeOnlyDecl = null;
|
|
52
247
|
if (decl.declarations !== void 0 && decl.declarations.length > 0) {
|
|
53
248
|
typeOnlyDecl = decl.declarations[0];
|
|
54
249
|
}
|
|
55
250
|
if (!isLocalCompilation || typeOnlyDecl && [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
251
|
+
ts3.SyntaxKind.TypeParameter,
|
|
252
|
+
ts3.SyntaxKind.TypeAliasDeclaration,
|
|
253
|
+
ts3.SyntaxKind.InterfaceDeclaration
|
|
59
254
|
].includes(typeOnlyDecl.kind)) {
|
|
60
255
|
return noValueDeclaration(typeNode, typeOnlyDecl);
|
|
61
256
|
}
|
|
62
257
|
}
|
|
63
258
|
const firstDecl = local.declarations && local.declarations[0];
|
|
64
259
|
if (firstDecl !== void 0) {
|
|
65
|
-
if (
|
|
260
|
+
if (ts3.isImportClause(firstDecl) && firstDecl.name !== void 0) {
|
|
66
261
|
if (firstDecl.isTypeOnly) {
|
|
67
262
|
return typeOnlyImport(typeNode, firstDecl);
|
|
68
263
|
}
|
|
@@ -71,7 +266,7 @@ function typeToValue(typeNode, checker, isLocalCompilation) {
|
|
|
71
266
|
expression: firstDecl.name,
|
|
72
267
|
defaultImportStatement: firstDecl.parent
|
|
73
268
|
};
|
|
74
|
-
} else if (
|
|
269
|
+
} else if (ts3.isImportSpecifier(firstDecl)) {
|
|
75
270
|
if (firstDecl.isTypeOnly) {
|
|
76
271
|
return typeOnlyImport(typeNode, firstDecl);
|
|
77
272
|
}
|
|
@@ -88,7 +283,7 @@ function typeToValue(typeNode, checker, isLocalCompilation) {
|
|
|
88
283
|
importedName,
|
|
89
284
|
nestedPath
|
|
90
285
|
};
|
|
91
|
-
} else if (
|
|
286
|
+
} else if (ts3.isNamespaceImport(firstDecl)) {
|
|
92
287
|
if (firstDecl.parent.isTypeOnly) {
|
|
93
288
|
return typeOnlyImport(typeNode, firstDecl.parent);
|
|
94
289
|
}
|
|
@@ -154,7 +349,7 @@ function missingType() {
|
|
|
154
349
|
};
|
|
155
350
|
}
|
|
156
351
|
function typeNodeToValueExpr(node) {
|
|
157
|
-
if (
|
|
352
|
+
if (ts3.isTypeReferenceNode(node)) {
|
|
158
353
|
return entityNameToValue(node.typeName);
|
|
159
354
|
} else {
|
|
160
355
|
return null;
|
|
@@ -169,7 +364,7 @@ function resolveTypeSymbols(typeRef, checker) {
|
|
|
169
364
|
let local = typeRefSymbol;
|
|
170
365
|
let leftMost = typeName;
|
|
171
366
|
const symbolNames = [];
|
|
172
|
-
while (
|
|
367
|
+
while (ts3.isQualifiedName(leftMost)) {
|
|
173
368
|
symbolNames.unshift(leftMost.right.text);
|
|
174
369
|
leftMost = leftMost.left;
|
|
175
370
|
}
|
|
@@ -181,17 +376,17 @@ function resolveTypeSymbols(typeRef, checker) {
|
|
|
181
376
|
}
|
|
182
377
|
}
|
|
183
378
|
let decl = typeRefSymbol;
|
|
184
|
-
if (typeRefSymbol.flags &
|
|
379
|
+
if (typeRefSymbol.flags & ts3.SymbolFlags.Alias) {
|
|
185
380
|
decl = checker.getAliasedSymbol(typeRefSymbol);
|
|
186
381
|
}
|
|
187
382
|
return { local, decl, symbolNames };
|
|
188
383
|
}
|
|
189
384
|
function entityNameToValue(node) {
|
|
190
|
-
if (
|
|
385
|
+
if (ts3.isQualifiedName(node)) {
|
|
191
386
|
const left = entityNameToValue(node.left);
|
|
192
|
-
return left !== null ?
|
|
193
|
-
} else if (
|
|
194
|
-
const clone =
|
|
387
|
+
return left !== null ? ts3.factory.createPropertyAccessExpression(left, node.right) : null;
|
|
388
|
+
} else if (ts3.isIdentifier(node)) {
|
|
389
|
+
const clone = ts3.setOriginalNode(ts3.factory.createIdentifier(node.text), node);
|
|
195
390
|
clone.parent = node.parent;
|
|
196
391
|
return clone;
|
|
197
392
|
} else {
|
|
@@ -199,19 +394,19 @@ function entityNameToValue(node) {
|
|
|
199
394
|
}
|
|
200
395
|
}
|
|
201
396
|
function extractModuleName(node) {
|
|
202
|
-
if (!
|
|
397
|
+
if (!ts3.isStringLiteral(node.moduleSpecifier)) {
|
|
203
398
|
throw new Error("not a module specifier");
|
|
204
399
|
}
|
|
205
400
|
return node.moduleSpecifier.text;
|
|
206
401
|
}
|
|
207
402
|
|
|
208
403
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/util.mjs
|
|
209
|
-
import
|
|
404
|
+
import ts4 from "typescript";
|
|
210
405
|
function isNamedClassDeclaration(node) {
|
|
211
|
-
return
|
|
406
|
+
return ts4.isClassDeclaration(node) && isIdentifier(node.name);
|
|
212
407
|
}
|
|
213
408
|
function isIdentifier(node) {
|
|
214
|
-
return node !== void 0 &&
|
|
409
|
+
return node !== void 0 && ts4.isIdentifier(node);
|
|
215
410
|
}
|
|
216
411
|
|
|
217
412
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/typescript.mjs
|
|
@@ -221,7 +416,7 @@ var TypeScriptReflectionHost = class {
|
|
|
221
416
|
this.isLocalCompilation = isLocalCompilation;
|
|
222
417
|
}
|
|
223
418
|
getDecoratorsOfDeclaration(declaration) {
|
|
224
|
-
const decorators =
|
|
419
|
+
const decorators = ts5.canHaveDecorators(declaration) ? ts5.getDecorators(declaration) : void 0;
|
|
225
420
|
return decorators !== void 0 && decorators.length ? decorators.map((decorator) => this._reflectDecorator(decorator)).filter((dec) => dec !== null) : null;
|
|
226
421
|
}
|
|
227
422
|
getMembersOfClass(clazz) {
|
|
@@ -231,7 +426,7 @@ var TypeScriptReflectionHost = class {
|
|
|
231
426
|
getConstructorParameters(clazz) {
|
|
232
427
|
const tsClazz = castDeclarationToClassOrDie(clazz);
|
|
233
428
|
const isDeclaration2 = tsClazz.getSourceFile().isDeclarationFile;
|
|
234
|
-
const ctor = tsClazz.members.find((member) =>
|
|
429
|
+
const ctor = tsClazz.members.find((member) => ts5.isConstructorDeclaration(member) && (isDeclaration2 || member.body !== void 0));
|
|
235
430
|
if (ctor === void 0) {
|
|
236
431
|
return null;
|
|
237
432
|
}
|
|
@@ -240,8 +435,8 @@ var TypeScriptReflectionHost = class {
|
|
|
240
435
|
const decorators = this.getDecoratorsOfDeclaration(node);
|
|
241
436
|
let originalTypeNode = node.type || null;
|
|
242
437
|
let typeNode = originalTypeNode;
|
|
243
|
-
if (typeNode &&
|
|
244
|
-
let childTypeNodes = typeNode.types.filter((childTypeNode) => !(
|
|
438
|
+
if (typeNode && ts5.isUnionTypeNode(typeNode)) {
|
|
439
|
+
let childTypeNodes = typeNode.types.filter((childTypeNode) => !(ts5.isLiteralTypeNode(childTypeNode) && childTypeNode.literal.kind === ts5.SyntaxKind.NullKeyword));
|
|
245
440
|
if (childTypeNodes.length === 1) {
|
|
246
441
|
typeNode = childTypeNodes[0];
|
|
247
442
|
}
|
|
@@ -260,16 +455,16 @@ var TypeScriptReflectionHost = class {
|
|
|
260
455
|
const directImport = this.getDirectImportOfIdentifier(id);
|
|
261
456
|
if (directImport !== null) {
|
|
262
457
|
return directImport;
|
|
263
|
-
} else if (
|
|
458
|
+
} else if (ts5.isQualifiedName(id.parent) && id.parent.right === id) {
|
|
264
459
|
return this.getImportOfNamespacedIdentifier(id, getQualifiedNameRoot(id.parent));
|
|
265
|
-
} else if (
|
|
460
|
+
} else if (ts5.isPropertyAccessExpression(id.parent) && id.parent.name === id) {
|
|
266
461
|
return this.getImportOfNamespacedIdentifier(id, getFarLeftIdentifier(id.parent));
|
|
267
462
|
} else {
|
|
268
463
|
return null;
|
|
269
464
|
}
|
|
270
465
|
}
|
|
271
466
|
getExportsOfModule(node) {
|
|
272
|
-
if (!
|
|
467
|
+
if (!ts5.isSourceFile(node)) {
|
|
273
468
|
throw new Error(`getExportsOfModule() called on non-SourceFile in TS code`);
|
|
274
469
|
}
|
|
275
470
|
const symbol = this.checker.getSymbolAtLocation(node);
|
|
@@ -292,10 +487,10 @@ var TypeScriptReflectionHost = class {
|
|
|
292
487
|
return this.getBaseClassExpression(clazz) !== null;
|
|
293
488
|
}
|
|
294
489
|
getBaseClassExpression(clazz) {
|
|
295
|
-
if (!(
|
|
490
|
+
if (!(ts5.isClassDeclaration(clazz) || ts5.isClassExpression(clazz)) || clazz.heritageClauses === void 0) {
|
|
296
491
|
return null;
|
|
297
492
|
}
|
|
298
|
-
const extendsClause = clazz.heritageClauses.find((clause) => clause.token ===
|
|
493
|
+
const extendsClause = clazz.heritageClauses.find((clause) => clause.token === ts5.SyntaxKind.ExtendsKeyword);
|
|
299
494
|
if (extendsClause === void 0) {
|
|
300
495
|
return null;
|
|
301
496
|
}
|
|
@@ -313,15 +508,15 @@ var TypeScriptReflectionHost = class {
|
|
|
313
508
|
return this.getDeclarationOfSymbol(symbol, id);
|
|
314
509
|
}
|
|
315
510
|
getDefinitionOfFunction(node) {
|
|
316
|
-
if (!
|
|
511
|
+
if (!ts5.isFunctionDeclaration(node) && !ts5.isMethodDeclaration(node) && !ts5.isFunctionExpression(node) && !ts5.isArrowFunction(node)) {
|
|
317
512
|
return null;
|
|
318
513
|
}
|
|
319
514
|
let body = null;
|
|
320
515
|
if (node.body !== void 0) {
|
|
321
|
-
body =
|
|
516
|
+
body = ts5.isBlock(node.body) ? Array.from(node.body.statements) : [ts5.factory.createReturnStatement(node.body)];
|
|
322
517
|
}
|
|
323
518
|
const type = this.checker.getTypeAtLocation(node);
|
|
324
|
-
const signatures = this.checker.getSignaturesOfType(type,
|
|
519
|
+
const signatures = this.checker.getSignaturesOfType(type, ts5.SignatureKind.Call);
|
|
325
520
|
return {
|
|
326
521
|
node,
|
|
327
522
|
body,
|
|
@@ -335,7 +530,7 @@ var TypeScriptReflectionHost = class {
|
|
|
335
530
|
};
|
|
336
531
|
}
|
|
337
532
|
getGenericArityOfClass(clazz) {
|
|
338
|
-
if (!
|
|
533
|
+
if (!ts5.isClassDeclaration(clazz)) {
|
|
339
534
|
return null;
|
|
340
535
|
}
|
|
341
536
|
return clazz.typeParameters !== void 0 ? clazz.typeParameters.length : 0;
|
|
@@ -345,14 +540,14 @@ var TypeScriptReflectionHost = class {
|
|
|
345
540
|
}
|
|
346
541
|
isStaticallyExported(decl) {
|
|
347
542
|
let topLevel = decl;
|
|
348
|
-
if (
|
|
543
|
+
if (ts5.isVariableDeclaration(decl) && ts5.isVariableDeclarationList(decl.parent)) {
|
|
349
544
|
topLevel = decl.parent.parent;
|
|
350
545
|
}
|
|
351
|
-
const modifiers =
|
|
352
|
-
if (modifiers !== void 0 && modifiers.some((modifier) => modifier.kind ===
|
|
546
|
+
const modifiers = ts5.canHaveModifiers(topLevel) ? ts5.getModifiers(topLevel) : void 0;
|
|
547
|
+
if (modifiers !== void 0 && modifiers.some((modifier) => modifier.kind === ts5.SyntaxKind.ExportKeyword)) {
|
|
353
548
|
return true;
|
|
354
549
|
}
|
|
355
|
-
if (topLevel.parent === void 0 || !
|
|
550
|
+
if (topLevel.parent === void 0 || !ts5.isSourceFile(topLevel.parent)) {
|
|
356
551
|
return false;
|
|
357
552
|
}
|
|
358
553
|
const localExports = this.getLocalExportedDeclarationsOfSourceFile(decl.getSourceFile());
|
|
@@ -368,7 +563,7 @@ var TypeScriptReflectionHost = class {
|
|
|
368
563
|
if (importDecl === null) {
|
|
369
564
|
return null;
|
|
370
565
|
}
|
|
371
|
-
if (!
|
|
566
|
+
if (!ts5.isStringLiteral(importDecl.moduleSpecifier)) {
|
|
372
567
|
return null;
|
|
373
568
|
}
|
|
374
569
|
return {
|
|
@@ -389,12 +584,12 @@ var TypeScriptReflectionHost = class {
|
|
|
389
584
|
if (!declaration) {
|
|
390
585
|
return null;
|
|
391
586
|
}
|
|
392
|
-
const namespaceDeclaration =
|
|
587
|
+
const namespaceDeclaration = ts5.isNamespaceImport(declaration) ? declaration : null;
|
|
393
588
|
if (!namespaceDeclaration) {
|
|
394
589
|
return null;
|
|
395
590
|
}
|
|
396
591
|
const importDeclaration = namespaceDeclaration.parent.parent;
|
|
397
|
-
if (!
|
|
592
|
+
if (!ts5.isStringLiteral(importDeclaration.moduleSpecifier)) {
|
|
398
593
|
return null;
|
|
399
594
|
}
|
|
400
595
|
return {
|
|
@@ -410,13 +605,13 @@ var TypeScriptReflectionHost = class {
|
|
|
410
605
|
} else if (symbol.declarations !== void 0 && symbol.declarations.length > 0) {
|
|
411
606
|
valueDeclaration = symbol.declarations[0];
|
|
412
607
|
}
|
|
413
|
-
if (valueDeclaration !== void 0 &&
|
|
608
|
+
if (valueDeclaration !== void 0 && ts5.isShorthandPropertyAssignment(valueDeclaration)) {
|
|
414
609
|
const shorthandSymbol = this.checker.getShorthandAssignmentValueSymbol(valueDeclaration);
|
|
415
610
|
if (shorthandSymbol === void 0) {
|
|
416
611
|
return null;
|
|
417
612
|
}
|
|
418
613
|
return this.getDeclarationOfSymbol(shorthandSymbol, originalId);
|
|
419
|
-
} else if (valueDeclaration !== void 0 &&
|
|
614
|
+
} else if (valueDeclaration !== void 0 && ts5.isExportSpecifier(valueDeclaration)) {
|
|
420
615
|
const targetSymbol = this.checker.getExportSpecifierLocalTargetSymbol(valueDeclaration);
|
|
421
616
|
if (targetSymbol === void 0) {
|
|
422
617
|
return null;
|
|
@@ -424,7 +619,7 @@ var TypeScriptReflectionHost = class {
|
|
|
424
619
|
return this.getDeclarationOfSymbol(targetSymbol, originalId);
|
|
425
620
|
}
|
|
426
621
|
const importInfo = originalId && this.getImportOfIdentifier(originalId);
|
|
427
|
-
while (symbol.flags &
|
|
622
|
+
while (symbol.flags & ts5.SymbolFlags.Alias) {
|
|
428
623
|
symbol = this.checker.getAliasedSymbol(symbol);
|
|
429
624
|
}
|
|
430
625
|
if (symbol.valueDeclaration !== void 0) {
|
|
@@ -444,14 +639,14 @@ var TypeScriptReflectionHost = class {
|
|
|
444
639
|
_reflectDecorator(node) {
|
|
445
640
|
let decoratorExpr = node.expression;
|
|
446
641
|
let args = null;
|
|
447
|
-
if (
|
|
642
|
+
if (ts5.isCallExpression(decoratorExpr)) {
|
|
448
643
|
args = Array.from(decoratorExpr.arguments);
|
|
449
644
|
decoratorExpr = decoratorExpr.expression;
|
|
450
645
|
}
|
|
451
646
|
if (!isDecoratorIdentifier(decoratorExpr)) {
|
|
452
647
|
return null;
|
|
453
648
|
}
|
|
454
|
-
const decoratorIdentifier =
|
|
649
|
+
const decoratorIdentifier = ts5.isIdentifier(decoratorExpr) ? decoratorExpr : decoratorExpr.name;
|
|
455
650
|
const importDecl = this.getImportOfIdentifier(decoratorIdentifier);
|
|
456
651
|
return {
|
|
457
652
|
name: decoratorIdentifier.text,
|
|
@@ -466,34 +661,34 @@ var TypeScriptReflectionHost = class {
|
|
|
466
661
|
let value = null;
|
|
467
662
|
let name = null;
|
|
468
663
|
let nameNode = null;
|
|
469
|
-
if (
|
|
664
|
+
if (ts5.isPropertyDeclaration(node)) {
|
|
470
665
|
kind = ClassMemberKind.Property;
|
|
471
666
|
value = node.initializer || null;
|
|
472
|
-
} else if (
|
|
667
|
+
} else if (ts5.isGetAccessorDeclaration(node)) {
|
|
473
668
|
kind = ClassMemberKind.Getter;
|
|
474
|
-
} else if (
|
|
669
|
+
} else if (ts5.isSetAccessorDeclaration(node)) {
|
|
475
670
|
kind = ClassMemberKind.Setter;
|
|
476
|
-
} else if (
|
|
671
|
+
} else if (ts5.isMethodDeclaration(node)) {
|
|
477
672
|
kind = ClassMemberKind.Method;
|
|
478
|
-
} else if (
|
|
673
|
+
} else if (ts5.isConstructorDeclaration(node)) {
|
|
479
674
|
kind = ClassMemberKind.Constructor;
|
|
480
675
|
} else {
|
|
481
676
|
return null;
|
|
482
677
|
}
|
|
483
|
-
if (
|
|
678
|
+
if (ts5.isConstructorDeclaration(node)) {
|
|
484
679
|
name = "constructor";
|
|
485
|
-
} else if (
|
|
680
|
+
} else if (ts5.isIdentifier(node.name)) {
|
|
486
681
|
name = node.name.text;
|
|
487
682
|
nameNode = node.name;
|
|
488
|
-
} else if (
|
|
683
|
+
} else if (ts5.isStringLiteral(node.name)) {
|
|
489
684
|
name = node.name.text;
|
|
490
685
|
nameNode = node.name;
|
|
491
686
|
} else {
|
|
492
687
|
return null;
|
|
493
688
|
}
|
|
494
689
|
const decorators = this.getDecoratorsOfDeclaration(node);
|
|
495
|
-
const modifiers =
|
|
496
|
-
const isStatic = modifiers !== void 0 && modifiers.some((mod) => mod.kind ===
|
|
690
|
+
const modifiers = ts5.getModifiers(node);
|
|
691
|
+
const isStatic = modifiers !== void 0 && modifiers.some((mod) => mod.kind === ts5.SyntaxKind.StaticKeyword);
|
|
497
692
|
return {
|
|
498
693
|
node,
|
|
499
694
|
implementation: node,
|
|
@@ -521,7 +716,7 @@ var TypeScriptReflectionHost = class {
|
|
|
521
716
|
let item = iter.next();
|
|
522
717
|
while (item.done !== true) {
|
|
523
718
|
let exportedSymbol = item.value;
|
|
524
|
-
if (exportedSymbol.flags &
|
|
719
|
+
if (exportedSymbol.flags & ts5.SymbolFlags.Alias) {
|
|
525
720
|
exportedSymbol = this.checker.getAliasedSymbol(exportedSymbol);
|
|
526
721
|
}
|
|
527
722
|
if (exportedSymbol.valueDeclaration !== void 0 && exportedSymbol.valueDeclaration.getSourceFile() === file) {
|
|
@@ -543,7 +738,7 @@ function reflectTypeEntityToDeclaration(type, checker) {
|
|
|
543
738
|
if (realSymbol === void 0) {
|
|
544
739
|
throw new Error(`Cannot resolve type entity ${type.getText()} to symbol`);
|
|
545
740
|
}
|
|
546
|
-
while (realSymbol.flags &
|
|
741
|
+
while (realSymbol.flags & ts5.SymbolFlags.Alias) {
|
|
547
742
|
realSymbol = checker.getAliasedSymbol(realSymbol);
|
|
548
743
|
}
|
|
549
744
|
let node = null;
|
|
@@ -554,8 +749,8 @@ function reflectTypeEntityToDeclaration(type, checker) {
|
|
|
554
749
|
} else {
|
|
555
750
|
throw new Error(`Cannot resolve type entity symbol to declaration`);
|
|
556
751
|
}
|
|
557
|
-
if (
|
|
558
|
-
if (!
|
|
752
|
+
if (ts5.isQualifiedName(type)) {
|
|
753
|
+
if (!ts5.isIdentifier(type.left)) {
|
|
559
754
|
throw new Error(`Cannot handle qualified name with non-identifier lhs`);
|
|
560
755
|
}
|
|
561
756
|
const symbol = checker.getSymbolAtLocation(type.left);
|
|
@@ -563,14 +758,14 @@ function reflectTypeEntityToDeclaration(type, checker) {
|
|
|
563
758
|
throw new Error(`Cannot resolve qualified type entity lhs to symbol`);
|
|
564
759
|
}
|
|
565
760
|
const decl = symbol.declarations[0];
|
|
566
|
-
if (
|
|
761
|
+
if (ts5.isNamespaceImport(decl)) {
|
|
567
762
|
const clause = decl.parent;
|
|
568
763
|
const importDecl = clause.parent;
|
|
569
|
-
if (!
|
|
764
|
+
if (!ts5.isStringLiteral(importDecl.moduleSpecifier)) {
|
|
570
765
|
throw new Error(`Module specifier is not a string`);
|
|
571
766
|
}
|
|
572
767
|
return { node, from: importDecl.moduleSpecifier.text };
|
|
573
|
-
} else if (
|
|
768
|
+
} else if (ts5.isModuleDeclaration(decl)) {
|
|
574
769
|
return { node, from: null };
|
|
575
770
|
} else {
|
|
576
771
|
throw new Error(`Unknown import type?`);
|
|
@@ -600,13 +795,13 @@ function filterToMembersWithDecorator(members, name, module) {
|
|
|
600
795
|
function reflectObjectLiteral(node) {
|
|
601
796
|
const map = /* @__PURE__ */ new Map();
|
|
602
797
|
node.properties.forEach((prop) => {
|
|
603
|
-
if (
|
|
798
|
+
if (ts5.isPropertyAssignment(prop)) {
|
|
604
799
|
const name = propertyNameToString(prop.name);
|
|
605
800
|
if (name === null) {
|
|
606
801
|
return;
|
|
607
802
|
}
|
|
608
803
|
map.set(name, prop.initializer);
|
|
609
|
-
} else if (
|
|
804
|
+
} else if (ts5.isShorthandPropertyAssignment(prop)) {
|
|
610
805
|
map.set(prop.name.text, prop.name);
|
|
611
806
|
} else {
|
|
612
807
|
return;
|
|
@@ -615,41 +810,41 @@ function reflectObjectLiteral(node) {
|
|
|
615
810
|
return map;
|
|
616
811
|
}
|
|
617
812
|
function castDeclarationToClassOrDie(declaration) {
|
|
618
|
-
if (!
|
|
619
|
-
throw new Error(`Reflecting on a ${
|
|
813
|
+
if (!ts5.isClassDeclaration(declaration)) {
|
|
814
|
+
throw new Error(`Reflecting on a ${ts5.SyntaxKind[declaration.kind]} instead of a ClassDeclaration.`);
|
|
620
815
|
}
|
|
621
816
|
return declaration;
|
|
622
817
|
}
|
|
623
818
|
function parameterName(name) {
|
|
624
|
-
if (
|
|
819
|
+
if (ts5.isIdentifier(name)) {
|
|
625
820
|
return name.text;
|
|
626
821
|
} else {
|
|
627
822
|
return null;
|
|
628
823
|
}
|
|
629
824
|
}
|
|
630
825
|
function propertyNameToString(node) {
|
|
631
|
-
if (
|
|
826
|
+
if (ts5.isIdentifier(node) || ts5.isStringLiteral(node) || ts5.isNumericLiteral(node)) {
|
|
632
827
|
return node.text;
|
|
633
828
|
} else {
|
|
634
829
|
return null;
|
|
635
830
|
}
|
|
636
831
|
}
|
|
637
832
|
function getQualifiedNameRoot(qualifiedName) {
|
|
638
|
-
while (
|
|
833
|
+
while (ts5.isQualifiedName(qualifiedName.left)) {
|
|
639
834
|
qualifiedName = qualifiedName.left;
|
|
640
835
|
}
|
|
641
|
-
return
|
|
836
|
+
return ts5.isIdentifier(qualifiedName.left) ? qualifiedName.left : null;
|
|
642
837
|
}
|
|
643
838
|
function getFarLeftIdentifier(propertyAccess) {
|
|
644
|
-
while (
|
|
839
|
+
while (ts5.isPropertyAccessExpression(propertyAccess.expression)) {
|
|
645
840
|
propertyAccess = propertyAccess.expression;
|
|
646
841
|
}
|
|
647
|
-
return
|
|
842
|
+
return ts5.isIdentifier(propertyAccess.expression) ? propertyAccess.expression : null;
|
|
648
843
|
}
|
|
649
844
|
function getContainingImportDeclaration(node) {
|
|
650
845
|
let parent = node.parent;
|
|
651
|
-
while (parent && !
|
|
652
|
-
if (
|
|
846
|
+
while (parent && !ts5.isSourceFile(parent)) {
|
|
847
|
+
if (ts5.isImportDeclaration(parent)) {
|
|
653
848
|
return parent;
|
|
654
849
|
}
|
|
655
850
|
parent = parent.parent;
|
|
@@ -657,12 +852,12 @@ function getContainingImportDeclaration(node) {
|
|
|
657
852
|
return null;
|
|
658
853
|
}
|
|
659
854
|
function getExportedName(decl, originalId) {
|
|
660
|
-
return
|
|
855
|
+
return ts5.isImportSpecifier(decl) ? (decl.propertyName !== void 0 ? decl.propertyName : decl.name).text : originalId.text;
|
|
661
856
|
}
|
|
662
857
|
var LocalExportedDeclarations = Symbol("LocalExportedDeclarations");
|
|
663
858
|
|
|
664
859
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/typescript.mjs
|
|
665
|
-
import
|
|
860
|
+
import ts6 from "typescript";
|
|
666
861
|
var TS = /\.tsx?$/i;
|
|
667
862
|
var D_TS = /\.d\.ts$/i;
|
|
668
863
|
function isSymbolWithValueDeclaration(symbol) {
|
|
@@ -677,31 +872,31 @@ function isNonDeclarationTsPath(filePath) {
|
|
|
677
872
|
function isFromDtsFile(node) {
|
|
678
873
|
let sf = node.getSourceFile();
|
|
679
874
|
if (sf === void 0) {
|
|
680
|
-
sf =
|
|
875
|
+
sf = ts6.getOriginalNode(node).getSourceFile();
|
|
681
876
|
}
|
|
682
877
|
return sf !== void 0 && sf.isDeclarationFile;
|
|
683
878
|
}
|
|
684
879
|
function nodeNameForError(node) {
|
|
685
|
-
if (node.name !== void 0 &&
|
|
880
|
+
if (node.name !== void 0 && ts6.isIdentifier(node.name)) {
|
|
686
881
|
return node.name.text;
|
|
687
882
|
} else {
|
|
688
|
-
const kind =
|
|
689
|
-
const { line, character } =
|
|
883
|
+
const kind = ts6.SyntaxKind[node.kind];
|
|
884
|
+
const { line, character } = ts6.getLineAndCharacterOfPosition(node.getSourceFile(), node.getStart());
|
|
690
885
|
return `${kind}@${line}:${character}`;
|
|
691
886
|
}
|
|
692
887
|
}
|
|
693
888
|
function getSourceFile(node) {
|
|
694
889
|
const directSf = node.getSourceFile();
|
|
695
|
-
return directSf !== void 0 ? directSf :
|
|
890
|
+
return directSf !== void 0 ? directSf : ts6.getOriginalNode(node).getSourceFile();
|
|
696
891
|
}
|
|
697
892
|
function getSourceFileOrNull(program, fileName) {
|
|
698
893
|
return program.getSourceFile(fileName) || null;
|
|
699
894
|
}
|
|
700
895
|
function getTokenAtPosition(sf, pos) {
|
|
701
|
-
return
|
|
896
|
+
return ts6.getTokenAtPosition(sf, pos);
|
|
702
897
|
}
|
|
703
898
|
function identifierOfNode(decl) {
|
|
704
|
-
if (decl.name !== void 0 &&
|
|
899
|
+
if (decl.name !== void 0 && ts6.isIdentifier(decl.name)) {
|
|
705
900
|
return decl.name;
|
|
706
901
|
} else {
|
|
707
902
|
return null;
|
|
@@ -711,14 +906,14 @@ function isDeclaration(node) {
|
|
|
711
906
|
return isValueDeclaration(node) || isTypeDeclaration(node);
|
|
712
907
|
}
|
|
713
908
|
function isValueDeclaration(node) {
|
|
714
|
-
return
|
|
909
|
+
return ts6.isClassDeclaration(node) || ts6.isFunctionDeclaration(node) || ts6.isVariableDeclaration(node);
|
|
715
910
|
}
|
|
716
911
|
function isTypeDeclaration(node) {
|
|
717
|
-
return
|
|
912
|
+
return ts6.isEnumDeclaration(node) || ts6.isTypeAliasDeclaration(node) || ts6.isInterfaceDeclaration(node);
|
|
718
913
|
}
|
|
719
914
|
function isNamedDeclaration(node) {
|
|
720
915
|
const namedNode = node;
|
|
721
|
-
return namedNode.name !== void 0 &&
|
|
916
|
+
return namedNode.name !== void 0 && ts6.isIdentifier(namedNode.name);
|
|
722
917
|
}
|
|
723
918
|
function getRootDirs(host, options) {
|
|
724
919
|
const rootDirs = [];
|
|
@@ -735,8 +930,8 @@ function getRootDirs(host, options) {
|
|
|
735
930
|
}
|
|
736
931
|
function nodeDebugInfo(node) {
|
|
737
932
|
const sf = getSourceFile(node);
|
|
738
|
-
const { line, character } =
|
|
739
|
-
return `[${sf.fileName}: ${
|
|
933
|
+
const { line, character } = ts6.getLineAndCharacterOfPosition(sf, node.pos);
|
|
934
|
+
return `[${sf.fileName}: ${ts6.SyntaxKind[node.kind]} @ ${line}:${character}]`;
|
|
740
935
|
}
|
|
741
936
|
function resolveModuleName(moduleName, containingFile, compilerOptions, compilerHost, moduleResolutionCache) {
|
|
742
937
|
if (compilerHost.resolveModuleNames) {
|
|
@@ -748,11 +943,11 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, compiler
|
|
|
748
943
|
compilerOptions
|
|
749
944
|
)[0];
|
|
750
945
|
} else {
|
|
751
|
-
return
|
|
946
|
+
return ts6.resolveModuleName(moduleName, containingFile, compilerOptions, compilerHost, moduleResolutionCache !== null ? moduleResolutionCache : void 0).resolvedModule;
|
|
752
947
|
}
|
|
753
948
|
}
|
|
754
949
|
function isAssignment(node) {
|
|
755
|
-
return
|
|
950
|
+
return ts6.isBinaryExpression(node) && node.operatorToken.kind === ts6.SyntaxKind.EqualsToken;
|
|
756
951
|
}
|
|
757
952
|
function toUnredirectedSourceFile(sf) {
|
|
758
953
|
const redirectInfo = sf.redirectInfo;
|
|
@@ -838,198 +1033,6 @@ import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
|
|
|
838
1033
|
import { ExternalExpr, ExternalReference, WrappedNodeExpr } from "@angular/compiler";
|
|
839
1034
|
import ts7 from "typescript";
|
|
840
1035
|
|
|
841
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.mjs
|
|
842
|
-
var ErrorCode;
|
|
843
|
-
(function(ErrorCode2) {
|
|
844
|
-
ErrorCode2[ErrorCode2["DECORATOR_ARG_NOT_LITERAL"] = 1001] = "DECORATOR_ARG_NOT_LITERAL";
|
|
845
|
-
ErrorCode2[ErrorCode2["DECORATOR_ARITY_WRONG"] = 1002] = "DECORATOR_ARITY_WRONG";
|
|
846
|
-
ErrorCode2[ErrorCode2["DECORATOR_NOT_CALLED"] = 1003] = "DECORATOR_NOT_CALLED";
|
|
847
|
-
ErrorCode2[ErrorCode2["DECORATOR_UNEXPECTED"] = 1005] = "DECORATOR_UNEXPECTED";
|
|
848
|
-
ErrorCode2[ErrorCode2["DECORATOR_COLLISION"] = 1006] = "DECORATOR_COLLISION";
|
|
849
|
-
ErrorCode2[ErrorCode2["VALUE_HAS_WRONG_TYPE"] = 1010] = "VALUE_HAS_WRONG_TYPE";
|
|
850
|
-
ErrorCode2[ErrorCode2["VALUE_NOT_LITERAL"] = 1011] = "VALUE_NOT_LITERAL";
|
|
851
|
-
ErrorCode2[ErrorCode2["INITIALIZER_API_WITH_DISALLOWED_DECORATOR"] = 1050] = "INITIALIZER_API_WITH_DISALLOWED_DECORATOR";
|
|
852
|
-
ErrorCode2[ErrorCode2["INITIALIZER_API_DECORATOR_METADATA_COLLISION"] = 1051] = "INITIALIZER_API_DECORATOR_METADATA_COLLISION";
|
|
853
|
-
ErrorCode2[ErrorCode2["INITIALIZER_API_NO_REQUIRED_FUNCTION"] = 1052] = "INITIALIZER_API_NO_REQUIRED_FUNCTION";
|
|
854
|
-
ErrorCode2[ErrorCode2["INCORRECTLY_DECLARED_ON_STATIC_MEMBER"] = 1100] = "INCORRECTLY_DECLARED_ON_STATIC_MEMBER";
|
|
855
|
-
ErrorCode2[ErrorCode2["COMPONENT_MISSING_TEMPLATE"] = 2001] = "COMPONENT_MISSING_TEMPLATE";
|
|
856
|
-
ErrorCode2[ErrorCode2["PIPE_MISSING_NAME"] = 2002] = "PIPE_MISSING_NAME";
|
|
857
|
-
ErrorCode2[ErrorCode2["PARAM_MISSING_TOKEN"] = 2003] = "PARAM_MISSING_TOKEN";
|
|
858
|
-
ErrorCode2[ErrorCode2["DIRECTIVE_MISSING_SELECTOR"] = 2004] = "DIRECTIVE_MISSING_SELECTOR";
|
|
859
|
-
ErrorCode2[ErrorCode2["UNDECORATED_PROVIDER"] = 2005] = "UNDECORATED_PROVIDER";
|
|
860
|
-
ErrorCode2[ErrorCode2["DIRECTIVE_INHERITS_UNDECORATED_CTOR"] = 2006] = "DIRECTIVE_INHERITS_UNDECORATED_CTOR";
|
|
861
|
-
ErrorCode2[ErrorCode2["UNDECORATED_CLASS_USING_ANGULAR_FEATURES"] = 2007] = "UNDECORATED_CLASS_USING_ANGULAR_FEATURES";
|
|
862
|
-
ErrorCode2[ErrorCode2["COMPONENT_RESOURCE_NOT_FOUND"] = 2008] = "COMPONENT_RESOURCE_NOT_FOUND";
|
|
863
|
-
ErrorCode2[ErrorCode2["COMPONENT_INVALID_SHADOW_DOM_SELECTOR"] = 2009] = "COMPONENT_INVALID_SHADOW_DOM_SELECTOR";
|
|
864
|
-
ErrorCode2[ErrorCode2["COMPONENT_NOT_STANDALONE"] = 2010] = "COMPONENT_NOT_STANDALONE";
|
|
865
|
-
ErrorCode2[ErrorCode2["COMPONENT_IMPORT_NOT_STANDALONE"] = 2011] = "COMPONENT_IMPORT_NOT_STANDALONE";
|
|
866
|
-
ErrorCode2[ErrorCode2["COMPONENT_UNKNOWN_IMPORT"] = 2012] = "COMPONENT_UNKNOWN_IMPORT";
|
|
867
|
-
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_INVALID"] = 2013] = "HOST_DIRECTIVE_INVALID";
|
|
868
|
-
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_NOT_STANDALONE"] = 2014] = "HOST_DIRECTIVE_NOT_STANDALONE";
|
|
869
|
-
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_COMPONENT"] = 2015] = "HOST_DIRECTIVE_COMPONENT";
|
|
870
|
-
ErrorCode2[ErrorCode2["INJECTABLE_INHERITS_INVALID_CONSTRUCTOR"] = 2016] = "INJECTABLE_INHERITS_INVALID_CONSTRUCTOR";
|
|
871
|
-
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_UNDEFINED_BINDING"] = 2017] = "HOST_DIRECTIVE_UNDEFINED_BINDING";
|
|
872
|
-
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_CONFLICTING_ALIAS"] = 2018] = "HOST_DIRECTIVE_CONFLICTING_ALIAS";
|
|
873
|
-
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_MISSING_REQUIRED_BINDING"] = 2019] = "HOST_DIRECTIVE_MISSING_REQUIRED_BINDING";
|
|
874
|
-
ErrorCode2[ErrorCode2["CONFLICTING_INPUT_TRANSFORM"] = 2020] = "CONFLICTING_INPUT_TRANSFORM";
|
|
875
|
-
ErrorCode2[ErrorCode2["COMPONENT_INVALID_STYLE_URLS"] = 2021] = "COMPONENT_INVALID_STYLE_URLS";
|
|
876
|
-
ErrorCode2[ErrorCode2["COMPONENT_UNKNOWN_DEFERRED_IMPORT"] = 2022] = "COMPONENT_UNKNOWN_DEFERRED_IMPORT";
|
|
877
|
-
ErrorCode2[ErrorCode2["SYMBOL_NOT_EXPORTED"] = 3001] = "SYMBOL_NOT_EXPORTED";
|
|
878
|
-
ErrorCode2[ErrorCode2["IMPORT_CYCLE_DETECTED"] = 3003] = "IMPORT_CYCLE_DETECTED";
|
|
879
|
-
ErrorCode2[ErrorCode2["IMPORT_GENERATION_FAILURE"] = 3004] = "IMPORT_GENERATION_FAILURE";
|
|
880
|
-
ErrorCode2[ErrorCode2["CONFIG_FLAT_MODULE_NO_INDEX"] = 4001] = "CONFIG_FLAT_MODULE_NO_INDEX";
|
|
881
|
-
ErrorCode2[ErrorCode2["CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK"] = 4002] = "CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK";
|
|
882
|
-
ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES"] = 4003] = "CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES";
|
|
883
|
-
ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL"] = 4004] = "CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL";
|
|
884
|
-
ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK"] = 4005] = "CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK";
|
|
885
|
-
ErrorCode2[ErrorCode2["HOST_BINDING_PARSE_ERROR"] = 5001] = "HOST_BINDING_PARSE_ERROR";
|
|
886
|
-
ErrorCode2[ErrorCode2["TEMPLATE_PARSE_ERROR"] = 5002] = "TEMPLATE_PARSE_ERROR";
|
|
887
|
-
ErrorCode2[ErrorCode2["NGMODULE_INVALID_DECLARATION"] = 6001] = "NGMODULE_INVALID_DECLARATION";
|
|
888
|
-
ErrorCode2[ErrorCode2["NGMODULE_INVALID_IMPORT"] = 6002] = "NGMODULE_INVALID_IMPORT";
|
|
889
|
-
ErrorCode2[ErrorCode2["NGMODULE_INVALID_EXPORT"] = 6003] = "NGMODULE_INVALID_EXPORT";
|
|
890
|
-
ErrorCode2[ErrorCode2["NGMODULE_INVALID_REEXPORT"] = 6004] = "NGMODULE_INVALID_REEXPORT";
|
|
891
|
-
ErrorCode2[ErrorCode2["NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC"] = 6005] = "NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC";
|
|
892
|
-
ErrorCode2[ErrorCode2["NGMODULE_REEXPORT_NAME_COLLISION"] = 6006] = "NGMODULE_REEXPORT_NAME_COLLISION";
|
|
893
|
-
ErrorCode2[ErrorCode2["NGMODULE_DECLARATION_NOT_UNIQUE"] = 6007] = "NGMODULE_DECLARATION_NOT_UNIQUE";
|
|
894
|
-
ErrorCode2[ErrorCode2["NGMODULE_DECLARATION_IS_STANDALONE"] = 6008] = "NGMODULE_DECLARATION_IS_STANDALONE";
|
|
895
|
-
ErrorCode2[ErrorCode2["NGMODULE_BOOTSTRAP_IS_STANDALONE"] = 6009] = "NGMODULE_BOOTSTRAP_IS_STANDALONE";
|
|
896
|
-
ErrorCode2[ErrorCode2["WARN_NGMODULE_ID_UNNECESSARY"] = 6100] = "WARN_NGMODULE_ID_UNNECESSARY";
|
|
897
|
-
ErrorCode2[ErrorCode2["SCHEMA_INVALID_ELEMENT"] = 8001] = "SCHEMA_INVALID_ELEMENT";
|
|
898
|
-
ErrorCode2[ErrorCode2["SCHEMA_INVALID_ATTRIBUTE"] = 8002] = "SCHEMA_INVALID_ATTRIBUTE";
|
|
899
|
-
ErrorCode2[ErrorCode2["MISSING_REFERENCE_TARGET"] = 8003] = "MISSING_REFERENCE_TARGET";
|
|
900
|
-
ErrorCode2[ErrorCode2["MISSING_PIPE"] = 8004] = "MISSING_PIPE";
|
|
901
|
-
ErrorCode2[ErrorCode2["WRITE_TO_READ_ONLY_VARIABLE"] = 8005] = "WRITE_TO_READ_ONLY_VARIABLE";
|
|
902
|
-
ErrorCode2[ErrorCode2["DUPLICATE_VARIABLE_DECLARATION"] = 8006] = "DUPLICATE_VARIABLE_DECLARATION";
|
|
903
|
-
ErrorCode2[ErrorCode2["SPLIT_TWO_WAY_BINDING"] = 8007] = "SPLIT_TWO_WAY_BINDING";
|
|
904
|
-
ErrorCode2[ErrorCode2["MISSING_REQUIRED_INPUTS"] = 8008] = "MISSING_REQUIRED_INPUTS";
|
|
905
|
-
ErrorCode2[ErrorCode2["ILLEGAL_FOR_LOOP_TRACK_ACCESS"] = 8009] = "ILLEGAL_FOR_LOOP_TRACK_ACCESS";
|
|
906
|
-
ErrorCode2[ErrorCode2["INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT"] = 8010] = "INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT";
|
|
907
|
-
ErrorCode2[ErrorCode2["CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION"] = 8011] = "CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION";
|
|
908
|
-
ErrorCode2[ErrorCode2["DEFERRED_PIPE_USED_EAGERLY"] = 8012] = "DEFERRED_PIPE_USED_EAGERLY";
|
|
909
|
-
ErrorCode2[ErrorCode2["DEFERRED_DIRECTIVE_USED_EAGERLY"] = 8013] = "DEFERRED_DIRECTIVE_USED_EAGERLY";
|
|
910
|
-
ErrorCode2[ErrorCode2["DEFERRED_DEPENDENCY_IMPORTED_EAGERLY"] = 8014] = "DEFERRED_DEPENDENCY_IMPORTED_EAGERLY";
|
|
911
|
-
ErrorCode2[ErrorCode2["INVALID_BANANA_IN_BOX"] = 8101] = "INVALID_BANANA_IN_BOX";
|
|
912
|
-
ErrorCode2[ErrorCode2["NULLISH_COALESCING_NOT_NULLABLE"] = 8102] = "NULLISH_COALESCING_NOT_NULLABLE";
|
|
913
|
-
ErrorCode2[ErrorCode2["MISSING_CONTROL_FLOW_DIRECTIVE"] = 8103] = "MISSING_CONTROL_FLOW_DIRECTIVE";
|
|
914
|
-
ErrorCode2[ErrorCode2["TEXT_ATTRIBUTE_NOT_BINDING"] = 8104] = "TEXT_ATTRIBUTE_NOT_BINDING";
|
|
915
|
-
ErrorCode2[ErrorCode2["MISSING_NGFOROF_LET"] = 8105] = "MISSING_NGFOROF_LET";
|
|
916
|
-
ErrorCode2[ErrorCode2["SUFFIX_NOT_SUPPORTED"] = 8106] = "SUFFIX_NOT_SUPPORTED";
|
|
917
|
-
ErrorCode2[ErrorCode2["OPTIONAL_CHAIN_NOT_NULLABLE"] = 8107] = "OPTIONAL_CHAIN_NOT_NULLABLE";
|
|
918
|
-
ErrorCode2[ErrorCode2["SKIP_HYDRATION_NOT_STATIC"] = 8108] = "SKIP_HYDRATION_NOT_STATIC";
|
|
919
|
-
ErrorCode2[ErrorCode2["INTERPOLATED_SIGNAL_NOT_INVOKED"] = 8109] = "INTERPOLATED_SIGNAL_NOT_INVOKED";
|
|
920
|
-
ErrorCode2[ErrorCode2["INLINE_TCB_REQUIRED"] = 8900] = "INLINE_TCB_REQUIRED";
|
|
921
|
-
ErrorCode2[ErrorCode2["INLINE_TYPE_CTOR_REQUIRED"] = 8901] = "INLINE_TYPE_CTOR_REQUIRED";
|
|
922
|
-
ErrorCode2[ErrorCode2["INJECTABLE_DUPLICATE_PROV"] = 9001] = "INJECTABLE_DUPLICATE_PROV";
|
|
923
|
-
ErrorCode2[ErrorCode2["SUGGEST_STRICT_TEMPLATES"] = 10001] = "SUGGEST_STRICT_TEMPLATES";
|
|
924
|
-
ErrorCode2[ErrorCode2["SUGGEST_SUBOPTIMAL_TYPE_INFERENCE"] = 10002] = "SUGGEST_SUBOPTIMAL_TYPE_INFERENCE";
|
|
925
|
-
ErrorCode2[ErrorCode2["LOCAL_COMPILATION_UNRESOLVED_CONST"] = 11001] = "LOCAL_COMPILATION_UNRESOLVED_CONST";
|
|
926
|
-
ErrorCode2[ErrorCode2["LOCAL_COMPILATION_EXPRESSION_FOR_HOST_DIRECTIVE"] = 11003] = "LOCAL_COMPILATION_EXPRESSION_FOR_HOST_DIRECTIVE";
|
|
927
|
-
})(ErrorCode || (ErrorCode = {}));
|
|
928
|
-
|
|
929
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.mjs
|
|
930
|
-
var COMPILER_ERRORS_WITH_GUIDES = /* @__PURE__ */ new Set([
|
|
931
|
-
ErrorCode.DECORATOR_ARG_NOT_LITERAL,
|
|
932
|
-
ErrorCode.IMPORT_CYCLE_DETECTED,
|
|
933
|
-
ErrorCode.PARAM_MISSING_TOKEN,
|
|
934
|
-
ErrorCode.SCHEMA_INVALID_ELEMENT,
|
|
935
|
-
ErrorCode.SCHEMA_INVALID_ATTRIBUTE,
|
|
936
|
-
ErrorCode.MISSING_REFERENCE_TARGET,
|
|
937
|
-
ErrorCode.COMPONENT_INVALID_SHADOW_DOM_SELECTOR,
|
|
938
|
-
ErrorCode.WARN_NGMODULE_ID_UNNECESSARY
|
|
939
|
-
]);
|
|
940
|
-
|
|
941
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
942
|
-
import ts6 from "typescript";
|
|
943
|
-
|
|
944
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/util.mjs
|
|
945
|
-
var ERROR_CODE_MATCHER = /(\u001b\[\d+m ?)TS-99(\d+: ?\u001b\[\d+m)/g;
|
|
946
|
-
function replaceTsWithNgInErrors(errors) {
|
|
947
|
-
return errors.replace(ERROR_CODE_MATCHER, "$1NG$2");
|
|
948
|
-
}
|
|
949
|
-
function ngErrorCode(code) {
|
|
950
|
-
return parseInt("-99" + code);
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
954
|
-
var FatalDiagnosticError = class extends Error {
|
|
955
|
-
constructor(code, node, diagnosticMessage, relatedInformation) {
|
|
956
|
-
super(`FatalDiagnosticError #${code}: ${diagnosticMessage}`);
|
|
957
|
-
this.code = code;
|
|
958
|
-
this.node = node;
|
|
959
|
-
this.diagnosticMessage = diagnosticMessage;
|
|
960
|
-
this.relatedInformation = relatedInformation;
|
|
961
|
-
this.message = null;
|
|
962
|
-
this._isFatalDiagnosticError = true;
|
|
963
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
964
|
-
}
|
|
965
|
-
toDiagnostic() {
|
|
966
|
-
return makeDiagnostic(this.code, this.node, this.diagnosticMessage, this.relatedInformation);
|
|
967
|
-
}
|
|
968
|
-
};
|
|
969
|
-
function makeDiagnostic(code, node, messageText, relatedInformation) {
|
|
970
|
-
node = ts6.getOriginalNode(node);
|
|
971
|
-
return {
|
|
972
|
-
category: ts6.DiagnosticCategory.Error,
|
|
973
|
-
code: ngErrorCode(code),
|
|
974
|
-
file: ts6.getOriginalNode(node).getSourceFile(),
|
|
975
|
-
start: node.getStart(void 0, false),
|
|
976
|
-
length: node.getWidth(),
|
|
977
|
-
messageText,
|
|
978
|
-
relatedInformation
|
|
979
|
-
};
|
|
980
|
-
}
|
|
981
|
-
function makeDiagnosticChain(messageText, next) {
|
|
982
|
-
return {
|
|
983
|
-
category: ts6.DiagnosticCategory.Message,
|
|
984
|
-
code: 0,
|
|
985
|
-
messageText,
|
|
986
|
-
next
|
|
987
|
-
};
|
|
988
|
-
}
|
|
989
|
-
function makeRelatedInformation(node, messageText) {
|
|
990
|
-
node = ts6.getOriginalNode(node);
|
|
991
|
-
return {
|
|
992
|
-
category: ts6.DiagnosticCategory.Message,
|
|
993
|
-
code: 0,
|
|
994
|
-
file: node.getSourceFile(),
|
|
995
|
-
start: node.getStart(),
|
|
996
|
-
length: node.getWidth(),
|
|
997
|
-
messageText
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
function addDiagnosticChain(messageText, add) {
|
|
1001
|
-
if (typeof messageText === "string") {
|
|
1002
|
-
return makeDiagnosticChain(messageText, add);
|
|
1003
|
-
}
|
|
1004
|
-
if (messageText.next === void 0) {
|
|
1005
|
-
messageText.next = add;
|
|
1006
|
-
} else {
|
|
1007
|
-
messageText.next.push(...add);
|
|
1008
|
-
}
|
|
1009
|
-
return messageText;
|
|
1010
|
-
}
|
|
1011
|
-
function isFatalDiagnosticError(err) {
|
|
1012
|
-
return err._isFatalDiagnosticError === true;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.mjs
|
|
1016
|
-
var ERROR_DETAILS_PAGE_BASE_URL = "https://angular.io/errors";
|
|
1017
|
-
|
|
1018
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.mjs
|
|
1019
|
-
var ExtendedTemplateDiagnosticName;
|
|
1020
|
-
(function(ExtendedTemplateDiagnosticName2) {
|
|
1021
|
-
ExtendedTemplateDiagnosticName2["INVALID_BANANA_IN_BOX"] = "invalidBananaInBox";
|
|
1022
|
-
ExtendedTemplateDiagnosticName2["NULLISH_COALESCING_NOT_NULLABLE"] = "nullishCoalescingNotNullable";
|
|
1023
|
-
ExtendedTemplateDiagnosticName2["OPTIONAL_CHAIN_NOT_NULLABLE"] = "optionalChainNotNullable";
|
|
1024
|
-
ExtendedTemplateDiagnosticName2["MISSING_CONTROL_FLOW_DIRECTIVE"] = "missingControlFlowDirective";
|
|
1025
|
-
ExtendedTemplateDiagnosticName2["TEXT_ATTRIBUTE_NOT_BINDING"] = "textAttributeNotBinding";
|
|
1026
|
-
ExtendedTemplateDiagnosticName2["MISSING_NGFOROF_LET"] = "missingNgForOfLet";
|
|
1027
|
-
ExtendedTemplateDiagnosticName2["SUFFIX_NOT_SUPPORTED"] = "suffixNotSupported";
|
|
1028
|
-
ExtendedTemplateDiagnosticName2["SKIP_HYDRATION_NOT_STATIC"] = "skipHydrationNotStatic";
|
|
1029
|
-
ExtendedTemplateDiagnosticName2["INTERPOLATED_SIGNAL_NOT_INVOKED"] = "interpolatedSignalNotInvoked";
|
|
1030
|
-
ExtendedTemplateDiagnosticName2["CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION"] = "controlFlowPreventingContentProjection";
|
|
1031
|
-
})(ExtendedTemplateDiagnosticName || (ExtendedTemplateDiagnosticName = {}));
|
|
1032
|
-
|
|
1033
1036
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/find_export.mjs
|
|
1034
1037
|
function findExportedNameOfNode(target, file, reflector) {
|
|
1035
1038
|
const exports = reflector.getExportsOfModule(file);
|
|
@@ -2547,6 +2550,7 @@ export {
|
|
|
2547
2550
|
makeRelatedInformation,
|
|
2548
2551
|
addDiagnosticChain,
|
|
2549
2552
|
isFatalDiagnosticError,
|
|
2553
|
+
isLocalCompilationDiagnostics,
|
|
2550
2554
|
ERROR_DETAILS_PAGE_BASE_URL,
|
|
2551
2555
|
ExtendedTemplateDiagnosticName,
|
|
2552
2556
|
isSymbolWithValueDeclaration,
|
|
@@ -2619,4 +2623,4 @@ export {
|
|
|
2619
2623
|
* Use of this source code is governed by an MIT-style license that can be
|
|
2620
2624
|
* found in the LICENSE file at https://angular.io/license
|
|
2621
2625
|
*/
|
|
2622
|
-
//# sourceMappingURL=chunk-
|
|
2626
|
+
//# sourceMappingURL=chunk-7VU7HCQZ.js.map
|