@angular/compiler-cli 20.0.0 → 20.0.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-TSBVO2TY.js → chunk-3TXROOKD.js} +35 -5
- package/bundles/chunk-3TXROOKD.js.map +6 -0
- package/bundles/chunk-4OIPE63R.js +1 -1
- package/bundles/{chunk-A7TLTAA4.js → chunk-C5GIHHVB.js} +2 -2
- package/bundles/{chunk-YZVRRB6E.js → chunk-KGJOQ7ZK.js} +3 -3
- package/bundles/{chunk-5PLBB4J5.js → chunk-NODL47CE.js} +2 -2
- package/bundles/{chunk-T36IFLGD.js → chunk-QAGJD3X3.js} +2 -2
- package/bundles/index.js +5 -5
- package/bundles/private/migrations.js +1 -1
- 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/index.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +3 -6
- package/src/ngtsc/diagnostics/src/error_code.d.ts +24 -0
- package/src/ngtsc/typecheck/src/oob.d.ts +11 -0
- package/src/ngtsc/typecheck/src/type_check_block.d.ts +1 -1
- package/bundles/chunk-TSBVO2TY.js.map +0 -6
- /package/bundles/{chunk-A7TLTAA4.js.map → chunk-C5GIHHVB.js.map} +0 -0
- /package/bundles/{chunk-YZVRRB6E.js.map → chunk-KGJOQ7ZK.js.map} +0 -0
- /package/bundles/{chunk-5PLBB4J5.js.map → chunk-NODL47CE.js.map} +0 -0
- /package/bundles/{chunk-T36IFLGD.js.map → chunk-QAGJD3X3.js.map} +0 -0
|
@@ -106,6 +106,8 @@ var ErrorCode;
|
|
|
106
106
|
ErrorCode2[ErrorCode2["LET_USED_BEFORE_DEFINITION"] = 8016] = "LET_USED_BEFORE_DEFINITION";
|
|
107
107
|
ErrorCode2[ErrorCode2["CONFLICTING_LET_DECLARATION"] = 8017] = "CONFLICTING_LET_DECLARATION";
|
|
108
108
|
ErrorCode2[ErrorCode2["UNCLAIMED_DIRECTIVE_BINDING"] = 8018] = "UNCLAIMED_DIRECTIVE_BINDING";
|
|
109
|
+
ErrorCode2[ErrorCode2["DEFER_IMPLICIT_TRIGGER_MISSING_PLACEHOLDER"] = 8019] = "DEFER_IMPLICIT_TRIGGER_MISSING_PLACEHOLDER";
|
|
110
|
+
ErrorCode2[ErrorCode2["DEFER_IMPLICIT_TRIGGER_INVALID_PLACEHOLDER"] = 8020] = "DEFER_IMPLICIT_TRIGGER_INVALID_PLACEHOLDER";
|
|
109
111
|
ErrorCode2[ErrorCode2["INVALID_BANANA_IN_BOX"] = 8101] = "INVALID_BANANA_IN_BOX";
|
|
110
112
|
ErrorCode2[ErrorCode2["NULLISH_COALESCING_NOT_NULLABLE"] = 8102] = "NULLISH_COALESCING_NOT_NULLABLE";
|
|
111
113
|
ErrorCode2[ErrorCode2["MISSING_CONTROL_FLOW_DIRECTIVE"] = 8103] = "MISSING_CONTROL_FLOW_DIRECTIVE";
|
|
@@ -11484,6 +11486,12 @@ Deferred blocks can only access triggers in same view, a parent embedded view or
|
|
|
11484
11486
|
const errorMsg = `Directive ${directive.name} does not have an ${node instanceof TmplAstBoundEvent2 ? "output" : "input"} named "${node.name}". Bindings to directives must target existing inputs or outputs.`;
|
|
11485
11487
|
this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), node.keySpan || node.sourceSpan, ts55.DiagnosticCategory.Error, ngErrorCode(ErrorCode.UNCLAIMED_DIRECTIVE_BINDING), errorMsg));
|
|
11486
11488
|
}
|
|
11489
|
+
deferImplicitTriggerMissingPlaceholder(id, trigger) {
|
|
11490
|
+
this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), trigger.sourceSpan, ts55.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DEFER_IMPLICIT_TRIGGER_MISSING_PLACEHOLDER), "Trigger with no parameters can only be placed on an @defer that has a @placeholder block"));
|
|
11491
|
+
}
|
|
11492
|
+
deferImplicitTriggerInvalidPlaceholder(id, trigger) {
|
|
11493
|
+
this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), trigger.sourceSpan, ts55.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DEFER_IMPLICIT_TRIGGER_INVALID_PLACEHOLDER), "Trigger with no parameters can only be placed on an @defer that has a @placeholder block with exactly one root element node"));
|
|
11494
|
+
}
|
|
11487
11495
|
};
|
|
11488
11496
|
function makeInlineDiagnostic(id, code, node, messageText, relatedInformation) {
|
|
11489
11497
|
return {
|
|
@@ -13527,16 +13535,38 @@ var _Scope = class {
|
|
|
13527
13535
|
this.opQueue.push(new TcbExpressionOp(this.tcb, this, triggers.when.value));
|
|
13528
13536
|
}
|
|
13529
13537
|
if (triggers.hover !== void 0) {
|
|
13530
|
-
this.
|
|
13538
|
+
this.validateReferenceBasedDeferredTrigger(block, triggers.hover);
|
|
13531
13539
|
}
|
|
13532
13540
|
if (triggers.interaction !== void 0) {
|
|
13533
|
-
this.
|
|
13541
|
+
this.validateReferenceBasedDeferredTrigger(block, triggers.interaction);
|
|
13534
13542
|
}
|
|
13535
13543
|
if (triggers.viewport !== void 0) {
|
|
13536
|
-
this.
|
|
13544
|
+
this.validateReferenceBasedDeferredTrigger(block, triggers.viewport);
|
|
13537
13545
|
}
|
|
13538
13546
|
}
|
|
13539
|
-
|
|
13547
|
+
validateReferenceBasedDeferredTrigger(block, trigger) {
|
|
13548
|
+
if (trigger.reference === null) {
|
|
13549
|
+
if (block.placeholder === null) {
|
|
13550
|
+
this.tcb.oobRecorder.deferImplicitTriggerMissingPlaceholder(this.tcb.id, trigger);
|
|
13551
|
+
return;
|
|
13552
|
+
}
|
|
13553
|
+
let rootNode = null;
|
|
13554
|
+
for (const child of block.placeholder.children) {
|
|
13555
|
+
if (!this.tcb.hostPreserveWhitespaces && child instanceof TmplAstText && child.value.trim().length === 0) {
|
|
13556
|
+
continue;
|
|
13557
|
+
}
|
|
13558
|
+
if (rootNode === null) {
|
|
13559
|
+
rootNode = child;
|
|
13560
|
+
} else {
|
|
13561
|
+
rootNode = null;
|
|
13562
|
+
break;
|
|
13563
|
+
}
|
|
13564
|
+
}
|
|
13565
|
+
if (rootNode === null || !(rootNode instanceof TmplAstElement2)) {
|
|
13566
|
+
this.tcb.oobRecorder.deferImplicitTriggerInvalidPlaceholder(this.tcb.id, trigger);
|
|
13567
|
+
}
|
|
13568
|
+
return;
|
|
13569
|
+
}
|
|
13540
13570
|
if (this.tcb.boundTarget.getDeferredTriggerTarget(block, trigger) === null) {
|
|
13541
13571
|
this.tcb.oobRecorder.inaccessibleDeferredTriggerElement(this.tcb.id, trigger);
|
|
13542
13572
|
}
|
|
@@ -19157,4 +19187,4 @@ export {
|
|
|
19157
19187
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19158
19188
|
* found in the LICENSE file at https://angular.dev/license
|
|
19159
19189
|
*/
|
|
19160
|
-
//# sourceMappingURL=chunk-
|
|
19190
|
+
//# sourceMappingURL=chunk-3TXROOKD.js.map
|