@angular-eslint/bundled-angular-compiler 22.5.1-alpha.22 → 22.5.1-alpha.24
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/dist/index.js +87 -53
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -308,7 +308,7 @@ __export(index_exports, {
|
|
|
308
308
|
});
|
|
309
309
|
module.exports = __toCommonJS(index_exports);
|
|
310
310
|
|
|
311
|
-
// ../../node_modules/.pnpm/@angular+compiler@22.2.
|
|
311
|
+
// ../../node_modules/.pnpm/@angular+compiler@22.2.1/node_modules/@angular/compiler/fesm2022/compiler.mjs
|
|
312
312
|
var _SELECTOR_REGEXP = new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g");
|
|
313
313
|
var CssSelector = class _CssSelector {
|
|
314
314
|
static {
|
|
@@ -2781,7 +2781,7 @@ var ConstantPool = class {
|
|
|
2781
2781
|
let value;
|
|
2782
2782
|
let usage;
|
|
2783
2783
|
if (this.isClosureCompilerEnabled && isLongStringLiteral(literal2)) {
|
|
2784
|
-
value = new FunctionExpr([], [new ReturnStatement(literal2)]);
|
|
2784
|
+
value = new FunctionExpr([], [new ReturnStatement(literal2)], DYNAMIC_TYPE);
|
|
2785
2785
|
usage = variable(name).callFn([]);
|
|
2786
2786
|
} else {
|
|
2787
2787
|
value = literal2;
|
|
@@ -4458,7 +4458,15 @@ var AbstractEmitterVisitor = class {
|
|
|
4458
4458
|
}
|
|
4459
4459
|
visitParenthesizedExpr(ast, ctx) {
|
|
4460
4460
|
this.printLeadingComments(ast, ctx);
|
|
4461
|
-
ast.
|
|
4461
|
+
if (ast === this.lastIfCondition) {
|
|
4462
|
+
this.lastIfCondition = ast.expr;
|
|
4463
|
+
ast.expr.visitExpression(this, ctx);
|
|
4464
|
+
} else {
|
|
4465
|
+
const preserveParens = !(ast.expr instanceof BinaryOperatorExpr) && !(ast.expr instanceof UnaryOperatorExpr) && !(ast.expr instanceof ConditionalExpr) && !(ast.expr instanceof CommaExpr) && !(ast.expr instanceof ParenthesizedExpr);
|
|
4466
|
+
preserveParens && ctx.print(ast, "(");
|
|
4467
|
+
ast.expr.visitExpression(this, ctx);
|
|
4468
|
+
preserveParens && ctx.print(ast, ")");
|
|
4469
|
+
}
|
|
4462
4470
|
}
|
|
4463
4471
|
visitSpreadElementExpr(ast, ctx) {
|
|
4464
4472
|
this.printLeadingComments(ast, ctx);
|
|
@@ -6630,7 +6638,7 @@ function wrapReference(value) {
|
|
|
6630
6638
|
__name(wrapReference, "wrapReference");
|
|
6631
6639
|
function refsToArray(refs, shouldForwardDeclare) {
|
|
6632
6640
|
const values = literalArr(refs.map((ref) => ref.value));
|
|
6633
|
-
return shouldForwardDeclare ? arrowFn([], values) : values;
|
|
6641
|
+
return shouldForwardDeclare ? arrowFn([], values, DYNAMIC_TYPE) : values;
|
|
6634
6642
|
}
|
|
6635
6643
|
__name(refsToArray, "refsToArray");
|
|
6636
6644
|
function tsIgnoreComment() {
|
|
@@ -6662,7 +6670,7 @@ function convertFromMaybeForwardRefExpression({
|
|
|
6662
6670
|
}
|
|
6663
6671
|
__name(convertFromMaybeForwardRefExpression, "convertFromMaybeForwardRefExpression");
|
|
6664
6672
|
function generateForwardRef(expr) {
|
|
6665
|
-
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]);
|
|
6673
|
+
return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr, DYNAMIC_TYPE)]);
|
|
6666
6674
|
}
|
|
6667
6675
|
__name(generateForwardRef, "generateForwardRef");
|
|
6668
6676
|
var R3FactoryDelegateType;
|
|
@@ -6712,9 +6720,9 @@ function compileFactoryFunction(meta) {
|
|
|
6712
6720
|
} else {
|
|
6713
6721
|
body.push(new ReturnStatement(retExpr, null, factoryComments));
|
|
6714
6722
|
}
|
|
6715
|
-
let factoryFn = fn([new FnParam(t.name, DYNAMIC_TYPE)], body,
|
|
6723
|
+
let factoryFn = fn([new FnParam(t.name, DYNAMIC_TYPE)], body, DYNAMIC_TYPE, void 0, `${meta.name}_Factory`);
|
|
6716
6724
|
if (baseFactoryVar !== null) {
|
|
6717
|
-
factoryFn = arrowFn([], [new DeclareVarStmt(baseFactoryVar.name, void 0, DYNAMIC_TYPE), new ReturnStatement(factoryFn)]).callFn([], void 0, true);
|
|
6725
|
+
factoryFn = arrowFn([], [new DeclareVarStmt(baseFactoryVar.name, void 0, DYNAMIC_TYPE), new ReturnStatement(factoryFn)], DYNAMIC_TYPE).callFn([], void 0, true);
|
|
6718
6726
|
}
|
|
6719
6727
|
return {
|
|
6720
6728
|
expression: factoryFn,
|
|
@@ -7686,7 +7694,7 @@ function compileInjectable(meta, resolveForwardRefs) {
|
|
|
7686
7694
|
} else {
|
|
7687
7695
|
result = {
|
|
7688
7696
|
statements: [],
|
|
7689
|
-
expression: arrowFn([], meta.useFactory.callFn([]))
|
|
7697
|
+
expression: arrowFn([], meta.useFactory.callFn([]), DYNAMIC_TYPE)
|
|
7690
7698
|
};
|
|
7691
7699
|
}
|
|
7692
7700
|
} else if (meta.useValue !== void 0) {
|
|
@@ -7737,7 +7745,7 @@ function delegateToFactory(type, useType, unwrapForwardRefs) {
|
|
|
7737
7745
|
__name(delegateToFactory, "delegateToFactory");
|
|
7738
7746
|
function createFactoryFunction(type) {
|
|
7739
7747
|
const t = new FnParam("__ngFactoryType__", DYNAMIC_TYPE);
|
|
7740
|
-
return arrowFn([t], type.prop("\u0275fac").callFn([variable(t.name)]));
|
|
7748
|
+
return arrowFn([t], type.prop("\u0275fac").callFn([variable(t.name)]), DYNAMIC_TYPE);
|
|
7741
7749
|
}
|
|
7742
7750
|
__name(createFactoryFunction, "createFactoryFunction");
|
|
7743
7751
|
var LEGACY_OPTIONAL_CHAINING_DEFAULT = false;
|
|
@@ -8106,7 +8114,7 @@ function generateSetNgModuleScopeCall(meta) {
|
|
|
8106
8114
|
}
|
|
8107
8115
|
const fnCall = new InvokeFunctionExpr(importExpr(Identifiers.setNgModuleScope), [meta.type.value, scopeMap.toLiteralMap()]);
|
|
8108
8116
|
const guardedCall = jitOnlyGuardedExpression(fnCall);
|
|
8109
|
-
const iife = new FunctionExpr([], [guardedCall.toStmt()]);
|
|
8117
|
+
const iife = new FunctionExpr([], [guardedCall.toStmt()], DYNAMIC_TYPE);
|
|
8110
8118
|
const iifeCall = new InvokeFunctionExpr(iife, []);
|
|
8111
8119
|
return iifeCall.toStmt();
|
|
8112
8120
|
}
|
|
@@ -22368,7 +22376,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
22368
22376
|
value,
|
|
22369
22377
|
quoted: isUnsafeObjectKey(key)
|
|
22370
22378
|
}))) : null;
|
|
22371
|
-
const propsExpr = propsMap !== null ? arrowFn([], propsMap) : null;
|
|
22379
|
+
const propsExpr = propsMap !== null ? arrowFn([], propsMap, DYNAMIC_TYPE) : null;
|
|
22372
22380
|
OpList.replace(op, foreignComponent(op.handle.slot, literal(op.constIndex), propsExpr, op.sourceSpan));
|
|
22373
22381
|
break;
|
|
22374
22382
|
case OpKind.ElementEnd:
|
|
@@ -22822,7 +22830,7 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
22822
22830
|
if (consumesDollarEvent) {
|
|
22823
22831
|
params.push(new FnParam("$event", DYNAMIC_TYPE));
|
|
22824
22832
|
}
|
|
22825
|
-
return fn(params, handlerStmts,
|
|
22833
|
+
return fn(params, handlerStmts, DYNAMIC_TYPE, void 0, name);
|
|
22826
22834
|
}
|
|
22827
22835
|
__name(reifyListenerHandler, "reifyListenerHandler");
|
|
22828
22836
|
function reifyTrackBy(unit, op) {
|
|
@@ -22832,7 +22840,7 @@ function reifyTrackBy(unit, op) {
|
|
|
22832
22840
|
const params = [new FnParam("$index", NUMBER_TYPE), new FnParam("$item", DYNAMIC_TYPE)];
|
|
22833
22841
|
let fn$1;
|
|
22834
22842
|
if (op.trackByOps === null) {
|
|
22835
|
-
fn$1 = op.usesComponentInstance ? fn(params, [new ReturnStatement(op.track)]) : arrowFn(params, op.track);
|
|
22843
|
+
fn$1 = op.usesComponentInstance ? fn(params, [new ReturnStatement(op.track)], DYNAMIC_TYPE) : arrowFn(params, op.track, DYNAMIC_TYPE);
|
|
22836
22844
|
} else {
|
|
22837
22845
|
reifyUpdateOperations(unit, op.trackByOps);
|
|
22838
22846
|
const statements = [];
|
|
@@ -22842,7 +22850,7 @@ function reifyTrackBy(unit, op) {
|
|
|
22842
22850
|
}
|
|
22843
22851
|
statements.push(trackOp.statement);
|
|
22844
22852
|
}
|
|
22845
|
-
fn$1 = op.usesComponentInstance || statements.length !== 1 || !(statements[0] instanceof ReturnStatement) ? fn(params, statements) : arrowFn(params, statements[0].value);
|
|
22853
|
+
fn$1 = op.usesComponentInstance || statements.length !== 1 || !(statements[0] instanceof ReturnStatement) ? fn(params, statements, DYNAMIC_TYPE) : arrowFn(params, statements[0].value, DYNAMIC_TYPE);
|
|
22846
22854
|
}
|
|
22847
22855
|
op.trackByFn = unit.job.pool.getSharedFunctionReference(fn$1, "_forTrack");
|
|
22848
22856
|
return op.trackByFn;
|
|
@@ -22858,7 +22866,7 @@ function getArrowFunctionFactory(unit, expr) {
|
|
|
22858
22866
|
statements.push(op.statement);
|
|
22859
22867
|
}
|
|
22860
22868
|
const body = statements.length === 1 && statements[0] instanceof ReturnStatement ? statements[0].value : statements;
|
|
22861
|
-
return arrowFn([new FnParam(expr.contextName, DYNAMIC_TYPE), new FnParam(expr.currentViewName, DYNAMIC_TYPE)], arrowFn(expr.parameters, body), DYNAMIC_TYPE);
|
|
22869
|
+
return arrowFn([new FnParam(expr.contextName, DYNAMIC_TYPE), new FnParam(expr.currentViewName, DYNAMIC_TYPE)], arrowFn(expr.parameters, body, DYNAMIC_TYPE), DYNAMIC_TYPE);
|
|
22862
22870
|
}
|
|
22863
22871
|
__name(getArrowFunctionFactory, "getArrowFunctionFactory");
|
|
22864
22872
|
function removeEmptyBindings(job) {
|
|
@@ -23704,6 +23712,7 @@ function stripNonrequiredParentheses(job) {
|
|
|
23704
23712
|
for (const op of unit.ops()) {
|
|
23705
23713
|
visitExpressionsInOp(op, (expr) => {
|
|
23706
23714
|
if (expr instanceof BinaryOperatorExpr) {
|
|
23715
|
+
checkArrowFunctionOperandParens(expr, requiredParens);
|
|
23707
23716
|
switch (expr.operator) {
|
|
23708
23717
|
case BinaryOperator.Exponentiation:
|
|
23709
23718
|
checkExponentiationParens(expr, requiredParens);
|
|
@@ -23715,6 +23724,12 @@ function stripNonrequiredParentheses(job) {
|
|
|
23715
23724
|
case BinaryOperator.Or:
|
|
23716
23725
|
checkAndOrParens(expr, requiredParens);
|
|
23717
23726
|
}
|
|
23727
|
+
} else if (expr instanceof ReadPropExpr || expr instanceof ReadKeyExpr) {
|
|
23728
|
+
checkTargetParens(expr.receiver, requiredParens);
|
|
23729
|
+
} else if (expr instanceof InvokeFunctionExpr) {
|
|
23730
|
+
checkTargetParens(expr.fn, requiredParens);
|
|
23731
|
+
} else if (expr instanceof TaggedTemplateLiteralExpr) {
|
|
23732
|
+
checkTargetParens(expr.tag, requiredParens);
|
|
23718
23733
|
}
|
|
23719
23734
|
});
|
|
23720
23735
|
}
|
|
@@ -23732,7 +23747,7 @@ function stripNonrequiredParentheses(job) {
|
|
|
23732
23747
|
}
|
|
23733
23748
|
__name(stripNonrequiredParentheses, "stripNonrequiredParentheses");
|
|
23734
23749
|
function checkExponentiationParens(expr, requiredParens) {
|
|
23735
|
-
if (expr.lhs instanceof ParenthesizedExpr && expr.lhs.expr instanceof UnaryOperatorExpr) {
|
|
23750
|
+
if (expr.lhs instanceof ParenthesizedExpr && (expr.lhs.expr instanceof UnaryOperatorExpr || isUnaryLikeExpr(expr.lhs.expr))) {
|
|
23736
23751
|
requiredParens.add(expr.lhs);
|
|
23737
23752
|
}
|
|
23738
23753
|
}
|
|
@@ -23756,6 +23771,25 @@ function isLogicalAndOr(expr) {
|
|
|
23756
23771
|
return expr instanceof BinaryOperatorExpr && (expr.operator === BinaryOperator.And || expr.operator === BinaryOperator.Or);
|
|
23757
23772
|
}
|
|
23758
23773
|
__name(isLogicalAndOr, "isLogicalAndOr");
|
|
23774
|
+
function checkTargetParens(target, requiredParens) {
|
|
23775
|
+
if (target instanceof ParenthesizedExpr && (isUnaryLikeExpr(target.expr) || target.expr instanceof ArrowFunctionExpr$1 || target.expr instanceof LiteralExpr && typeof target.expr.value === "number")) {
|
|
23776
|
+
requiredParens.add(target);
|
|
23777
|
+
}
|
|
23778
|
+
}
|
|
23779
|
+
__name(checkTargetParens, "checkTargetParens");
|
|
23780
|
+
function checkArrowFunctionOperandParens(expr, requiredParens) {
|
|
23781
|
+
if (expr.lhs instanceof ParenthesizedExpr && expr.lhs.expr instanceof ArrowFunctionExpr$1) {
|
|
23782
|
+
requiredParens.add(expr.lhs);
|
|
23783
|
+
}
|
|
23784
|
+
if (!expr.isAssignment() && expr.rhs instanceof ParenthesizedExpr && expr.rhs.expr instanceof ArrowFunctionExpr$1) {
|
|
23785
|
+
requiredParens.add(expr.rhs);
|
|
23786
|
+
}
|
|
23787
|
+
}
|
|
23788
|
+
__name(checkArrowFunctionOperandParens, "checkArrowFunctionOperandParens");
|
|
23789
|
+
function isUnaryLikeExpr(expr) {
|
|
23790
|
+
return expr instanceof NotExpr || expr instanceof TypeofExpr || expr instanceof VoidExpr;
|
|
23791
|
+
}
|
|
23792
|
+
__name(isUnaryLikeExpr, "isUnaryLikeExpr");
|
|
23759
23793
|
function specializeStyleBindings(job) {
|
|
23760
23794
|
for (const unit of job.units) {
|
|
23761
23795
|
for (const op of unit.update) {
|
|
@@ -24660,7 +24694,7 @@ function emitView(view) {
|
|
|
24660
24694
|
}
|
|
24661
24695
|
const createCond = maybeGenerateRfBlock(1, createStatements);
|
|
24662
24696
|
const updateCond = maybeGenerateRfBlock(2, updateStatements);
|
|
24663
|
-
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE)], [...createCond, ...updateCond],
|
|
24697
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE)], [...createCond, ...updateCond], DYNAMIC_TYPE, void 0, view.fnName);
|
|
24664
24698
|
}
|
|
24665
24699
|
__name(emitView, "emitView");
|
|
24666
24700
|
function maybeGenerateRfBlock(flag, statements) {
|
|
@@ -24693,7 +24727,7 @@ function emitHostBindingFunction(job) {
|
|
|
24693
24727
|
}
|
|
24694
24728
|
const createCond = maybeGenerateRfBlock(1, createStatements);
|
|
24695
24729
|
const updateCond = maybeGenerateRfBlock(2, updateStatements);
|
|
24696
|
-
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE)], [...createCond, ...updateCond],
|
|
24730
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE)], [...createCond, ...updateCond], DYNAMIC_TYPE, void 0, job.root.fnName);
|
|
24697
24731
|
}
|
|
24698
24732
|
__name(emitHostBindingFunction, "emitHostBindingFunction");
|
|
24699
24733
|
var PROPERTY_PARTS_SEPARATOR = ".";
|
|
@@ -25766,7 +25800,7 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
25766
25800
|
} else if (ast instanceof SpreadElement) {
|
|
25767
25801
|
return new SpreadElementExpr(convertAst(ast.expression, job, baseSourceSpan));
|
|
25768
25802
|
} else if (ast instanceof ArrowFunction) {
|
|
25769
|
-
return updateParameterReferences(arrowFn(ast.parameters.map((arg) => new FnParam(arg.name, DYNAMIC_TYPE)), convertAst(ast.body, job, baseSourceSpan)));
|
|
25803
|
+
return updateParameterReferences(arrowFn(ast.parameters.map((arg) => new FnParam(arg.name, DYNAMIC_TYPE)), convertAst(ast.body, job, baseSourceSpan), DYNAMIC_TYPE));
|
|
25770
25804
|
} else {
|
|
25771
25805
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan?.start.file.url}"`);
|
|
25772
25806
|
}
|
|
@@ -26129,7 +26163,7 @@ function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
|
26129
26163
|
createStatements.push(new ExpressionStatement(viewQueryCall));
|
|
26130
26164
|
}
|
|
26131
26165
|
const viewQueryFnName = name ? `${name}_Query` : null;
|
|
26132
|
-
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE)], [renderFlagCheckIfStmt(1, createStatements), renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))],
|
|
26166
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE)], [renderFlagCheckIfStmt(1, createStatements), renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))], DYNAMIC_TYPE, null, viewQueryFnName);
|
|
26133
26167
|
}
|
|
26134
26168
|
__name(createViewQueriesFunction, "createViewQueriesFunction");
|
|
26135
26169
|
function createContentQueriesFunction(queries, constantPool, name) {
|
|
@@ -26164,7 +26198,7 @@ function createContentQueriesFunction(queries, constantPool, name) {
|
|
|
26164
26198
|
createStatements.push(new ExpressionStatement(contentQueryCall));
|
|
26165
26199
|
}
|
|
26166
26200
|
const contentQueriesFnName = name ? `${name}_ContentQueries` : null;
|
|
26167
|
-
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE), new FnParam("dirIndex", NUMBER_TYPE)], [renderFlagCheckIfStmt(1, createStatements), renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))],
|
|
26201
|
+
return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, DYNAMIC_TYPE), new FnParam("dirIndex", NUMBER_TYPE)], [renderFlagCheckIfStmt(1, createStatements), renderFlagCheckIfStmt(2, collapseAdvanceStatements(updateStatements))], DYNAMIC_TYPE, null, contentQueriesFnName);
|
|
26168
26202
|
}
|
|
26169
26203
|
__name(createContentQueriesFunction, "createContentQueriesFunction");
|
|
26170
26204
|
var HtmlParser = class extends Parser$1 {
|
|
@@ -28187,7 +28221,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
28187
28221
|
definitionMap.set("vars", literal(tpl.root.vars));
|
|
28188
28222
|
if (tpl.consts.length > 0) {
|
|
28189
28223
|
if (tpl.constsInitializers.length > 0) {
|
|
28190
|
-
definitionMap.set("consts", arrowFn([], [...tpl.constsInitializers, new ReturnStatement(literalArr(tpl.consts))]));
|
|
28224
|
+
definitionMap.set("consts", arrowFn([], [...tpl.constsInitializers, new ReturnStatement(literalArr(tpl.consts))], DYNAMIC_TYPE));
|
|
28191
28225
|
} else {
|
|
28192
28226
|
definitionMap.set("consts", literalArr(tpl.consts));
|
|
28193
28227
|
}
|
|
@@ -28265,10 +28299,10 @@ function compileDeclarationList(list, mode) {
|
|
|
28265
28299
|
case 0:
|
|
28266
28300
|
return list;
|
|
28267
28301
|
case 1:
|
|
28268
|
-
return arrowFn([], list);
|
|
28302
|
+
return arrowFn([], list, DYNAMIC_TYPE);
|
|
28269
28303
|
case 2:
|
|
28270
28304
|
const resolvedList = list.prop("map").callFn([importExpr(Identifiers.resolveForwardRef)]);
|
|
28271
|
-
return arrowFn([], resolvedList);
|
|
28305
|
+
return arrowFn([], resolvedList, DYNAMIC_TYPE);
|
|
28272
28306
|
case 3:
|
|
28273
28307
|
throw new Error(`Unsupported with an array of pre-resolved dependencies`);
|
|
28274
28308
|
}
|
|
@@ -28507,7 +28541,7 @@ function createHostDirectivesFeatureArg(hostDirectives) {
|
|
|
28507
28541
|
hasForwardRef = true;
|
|
28508
28542
|
}
|
|
28509
28543
|
}
|
|
28510
|
-
return hasForwardRef ? new FunctionExpr([], [new ReturnStatement(literalArr(expressions))]) : literalArr(expressions);
|
|
28544
|
+
return hasForwardRef ? new FunctionExpr([], [new ReturnStatement(literalArr(expressions))], DYNAMIC_TYPE) : literalArr(expressions);
|
|
28511
28545
|
}
|
|
28512
28546
|
__name(createHostDirectivesFeatureArg, "createHostDirectivesFeatureArg");
|
|
28513
28547
|
function createHostDirectivesMappingArray(mapping) {
|
|
@@ -28525,7 +28559,7 @@ function compileDeferResolverFunction(meta) {
|
|
|
28525
28559
|
if (meta.mode === 0) {
|
|
28526
28560
|
for (const dep of meta.dependencies) {
|
|
28527
28561
|
if (dep.isDeferrable) {
|
|
28528
|
-
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(dep.isDefaultImport ? "default" : dep.symbolName));
|
|
28562
|
+
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(dep.isDefaultImport ? "default" : dep.symbolName), DYNAMIC_TYPE);
|
|
28529
28563
|
const importExpr2 = new DynamicImportExpr(dep.importPath).prop("then").callFn([innerFn], void 0, void 0, [tsIgnoreComment()]);
|
|
28530
28564
|
depExpressions.push(importExpr2);
|
|
28531
28565
|
} else {
|
|
@@ -28538,12 +28572,12 @@ function compileDeferResolverFunction(meta) {
|
|
|
28538
28572
|
importPath,
|
|
28539
28573
|
isDefaultImport
|
|
28540
28574
|
} of meta.dependencies) {
|
|
28541
|
-
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(isDefaultImport ? "default" : symbolName));
|
|
28575
|
+
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(isDefaultImport ? "default" : symbolName), DYNAMIC_TYPE);
|
|
28542
28576
|
const importExpr2 = new DynamicImportExpr(importPath).prop("then").callFn([innerFn], void 0, void 0, [tsIgnoreComment()]);
|
|
28543
28577
|
depExpressions.push(importExpr2);
|
|
28544
28578
|
}
|
|
28545
28579
|
}
|
|
28546
|
-
return arrowFn([], literalArr(depExpressions));
|
|
28580
|
+
return arrowFn([], literalArr(depExpressions), DYNAMIC_TYPE);
|
|
28547
28581
|
}
|
|
28548
28582
|
__name(compileDeferResolverFunction, "compileDeferResolverFunction");
|
|
28549
28583
|
var CombinedRecursiveAstVisitor = class extends RecursiveAstVisitor2 {
|
|
@@ -29734,7 +29768,7 @@ var ResourceLoader = class {
|
|
|
29734
29768
|
function compileService(meta, resolveForwardRefs) {
|
|
29735
29769
|
const def = new DefinitionMap();
|
|
29736
29770
|
def.set("token", meta.type.value);
|
|
29737
|
-
def.set("factory", meta.factory === void 0 ? delegateToFactory(meta.type.value, meta.type.value, resolveForwardRefs) : arrowFn([], meta.factory.callFn([])));
|
|
29771
|
+
def.set("factory", meta.factory === void 0 ? delegateToFactory(meta.type.value, meta.type.value, resolveForwardRefs) : arrowFn([], meta.factory.callFn([]), DYNAMIC_TYPE));
|
|
29738
29772
|
if (meta.autoProvided === false) {
|
|
29739
29773
|
def.set("autoProvided", literal(false));
|
|
29740
29774
|
}
|
|
@@ -32063,7 +32097,7 @@ var MapPlaceholderNames = class extends CloneVisitor {
|
|
|
32063
32097
|
};
|
|
32064
32098
|
function compileClassMetadata(metadata) {
|
|
32065
32099
|
const fnCall = internalCompileClassMetadata(metadata);
|
|
32066
|
-
return arrowFn([], [devOnlyGuardedExpression(fnCall).toStmt()]).callFn([]);
|
|
32100
|
+
return arrowFn([], [devOnlyGuardedExpression(fnCall).toStmt()], DYNAMIC_TYPE).callFn([]);
|
|
32067
32101
|
}
|
|
32068
32102
|
__name(compileClassMetadata, "compileClassMetadata");
|
|
32069
32103
|
function internalCompileClassMetadata(metadata) {
|
|
@@ -32088,7 +32122,7 @@ function compileCtorParameters(ctorParameters, allowSuppressions) {
|
|
|
32088
32122
|
}
|
|
32089
32123
|
return new LiteralMapExpr(entries);
|
|
32090
32124
|
});
|
|
32091
|
-
return arrowFn([], literalArr(params));
|
|
32125
|
+
return arrowFn([], literalArr(params), DYNAMIC_TYPE);
|
|
32092
32126
|
}
|
|
32093
32127
|
__name(compileCtorParameters, "compileCtorParameters");
|
|
32094
32128
|
function compileComponentClassMetadata(metadata, dependencies) {
|
|
@@ -32109,9 +32143,9 @@ function compileOpaqueAsyncClassMetadata(metadata, deferResolver, deferredDepend
|
|
|
32109
32143
|
__name(compileOpaqueAsyncClassMetadata, "compileOpaqueAsyncClassMetadata");
|
|
32110
32144
|
function internalCompileSetClassMetadataAsync(metadata, wrapperParams, dependencyResolverFn) {
|
|
32111
32145
|
const setClassMetadataCall = internalCompileClassMetadata(metadata);
|
|
32112
|
-
const setClassMetaWrapper = arrowFn(wrapperParams, [setClassMetadataCall.toStmt()]);
|
|
32146
|
+
const setClassMetaWrapper = arrowFn(wrapperParams, [setClassMetadataCall.toStmt()], DYNAMIC_TYPE);
|
|
32113
32147
|
const setClassMetaAsync = importExpr(Identifiers.setClassMetadataAsync).callFn([metadata.type, dependencyResolverFn, setClassMetaWrapper]);
|
|
32114
|
-
return arrowFn([], [devOnlyGuardedExpression(setClassMetaAsync).toStmt()]).callFn([]);
|
|
32148
|
+
return arrowFn([], [devOnlyGuardedExpression(setClassMetaAsync).toStmt()], DYNAMIC_TYPE).callFn([]);
|
|
32115
32149
|
}
|
|
32116
32150
|
__name(internalCompileSetClassMetadataAsync, "internalCompileSetClassMetadataAsync");
|
|
32117
32151
|
function compileComponentMetadataAsyncResolver(dependencies) {
|
|
@@ -32120,10 +32154,10 @@ function compileComponentMetadataAsyncResolver(dependencies) {
|
|
|
32120
32154
|
importPath,
|
|
32121
32155
|
isDefaultImport
|
|
32122
32156
|
}) => {
|
|
32123
|
-
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(isDefaultImport ? "default" : symbolName));
|
|
32157
|
+
const innerFn = arrowFn([new FnParam("m", DYNAMIC_TYPE)], variable("m").prop(isDefaultImport ? "default" : symbolName), DYNAMIC_TYPE);
|
|
32124
32158
|
return new DynamicImportExpr(importPath).prop("then").callFn([innerFn], void 0, void 0, [tsIgnoreComment()]);
|
|
32125
32159
|
});
|
|
32126
|
-
return arrowFn([], literalArr(dynamicImports));
|
|
32160
|
+
return arrowFn([], literalArr(dynamicImports), DYNAMIC_TYPE);
|
|
32127
32161
|
}
|
|
32128
32162
|
__name(compileComponentMetadataAsyncResolver, "compileComponentMetadataAsyncResolver");
|
|
32129
32163
|
var MINIMUM_PARTIAL_LINKER_VERSION$6 = "12.0.0";
|
|
@@ -32131,7 +32165,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
32131
32165
|
function compileDeclareClassMetadata(metadata) {
|
|
32132
32166
|
const definitionMap = new DefinitionMap();
|
|
32133
32167
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
32134
|
-
definitionMap.set("version", literal("22.2.
|
|
32168
|
+
definitionMap.set("version", literal("22.2.1"));
|
|
32135
32169
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32136
32170
|
definitionMap.set("type", metadata.type);
|
|
32137
32171
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -32150,11 +32184,11 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
32150
32184
|
callbackReturnDefinitionMap.set("ctorParameters", compileCtorParameters(metadata.ctorParameters, false));
|
|
32151
32185
|
callbackReturnDefinitionMap.set("propDecorators", metadata.propDecorators ?? literal(null));
|
|
32152
32186
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
32153
|
-
definitionMap.set("version", literal("22.2.
|
|
32187
|
+
definitionMap.set("version", literal("22.2.1"));
|
|
32154
32188
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32155
32189
|
definitionMap.set("type", metadata.type);
|
|
32156
32190
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
32157
|
-
definitionMap.set("resolveMetadata", arrowFn(dependencies.map((dep) => new FnParam(dep.symbolName, DYNAMIC_TYPE)), callbackReturnDefinitionMap.toLiteralMap()));
|
|
32191
|
+
definitionMap.set("resolveMetadata", arrowFn(dependencies.map((dep) => new FnParam(dep.symbolName, DYNAMIC_TYPE)), callbackReturnDefinitionMap.toLiteralMap(), DYNAMIC_TYPE));
|
|
32158
32192
|
return importExpr(Identifiers.declareClassMetadataAsync).callFn([definitionMap.toLiteralMap()]);
|
|
32159
32193
|
}
|
|
32160
32194
|
__name(compileComponentDeclareClassMetadata, "compileComponentDeclareClassMetadata");
|
|
@@ -32227,7 +32261,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
32227
32261
|
const definitionMap = new DefinitionMap();
|
|
32228
32262
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
32229
32263
|
definitionMap.set("minVersion", literal(minVersion));
|
|
32230
|
-
definitionMap.set("version", literal("22.2.
|
|
32264
|
+
definitionMap.set("version", literal("22.2.1"));
|
|
32231
32265
|
definitionMap.set("type", meta.type.value);
|
|
32232
32266
|
if (meta.isStandalone !== void 0) {
|
|
32233
32267
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -32583,7 +32617,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION$5 = "12.0.0";
|
|
|
32583
32617
|
function compileDeclareFactoryFunction(meta) {
|
|
32584
32618
|
const definitionMap = new DefinitionMap();
|
|
32585
32619
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
32586
|
-
definitionMap.set("version", literal("22.2.
|
|
32620
|
+
definitionMap.set("version", literal("22.2.1"));
|
|
32587
32621
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32588
32622
|
definitionMap.set("type", meta.type.value);
|
|
32589
32623
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -32610,7 +32644,7 @@ __name(compileDeclareInjectableFromMetadata, "compileDeclareInjectableFromMetada
|
|
|
32610
32644
|
function createInjectableDefinitionMap(meta) {
|
|
32611
32645
|
const definitionMap = new DefinitionMap();
|
|
32612
32646
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
32613
|
-
definitionMap.set("version", literal("22.2.
|
|
32647
|
+
definitionMap.set("version", literal("22.2.1"));
|
|
32614
32648
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32615
32649
|
definitionMap.set("type", meta.type.value);
|
|
32616
32650
|
if (meta.providedIn !== void 0) {
|
|
@@ -32652,7 +32686,7 @@ __name(compileDeclareServiceFromMetadata, "compileDeclareServiceFromMetadata");
|
|
|
32652
32686
|
function createServiceDefinitionMap(meta) {
|
|
32653
32687
|
const definitionMap = new DefinitionMap();
|
|
32654
32688
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
32655
|
-
definitionMap.set("version", literal("22.2.
|
|
32689
|
+
definitionMap.set("version", literal("22.2.1"));
|
|
32656
32690
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32657
32691
|
definitionMap.set("type", meta.type.value);
|
|
32658
32692
|
if (meta.autoProvided === false) {
|
|
@@ -32679,7 +32713,7 @@ __name(compileDeclareInjectorFromMetadata, "compileDeclareInjectorFromMetadata")
|
|
|
32679
32713
|
function createInjectorDefinitionMap(meta) {
|
|
32680
32714
|
const definitionMap = new DefinitionMap();
|
|
32681
32715
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
32682
|
-
definitionMap.set("version", literal("22.2.
|
|
32716
|
+
definitionMap.set("version", literal("22.2.1"));
|
|
32683
32717
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32684
32718
|
definitionMap.set("type", meta.type.value);
|
|
32685
32719
|
definitionMap.set("providers", meta.providers);
|
|
@@ -32710,7 +32744,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
32710
32744
|
throw new Error("Invalid path! Isolated compilation mode should not get into the partial compilation path");
|
|
32711
32745
|
}
|
|
32712
32746
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
32713
|
-
definitionMap.set("version", literal("22.2.
|
|
32747
|
+
definitionMap.set("version", literal("22.2.1"));
|
|
32714
32748
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32715
32749
|
definitionMap.set("type", meta.type.value);
|
|
32716
32750
|
if (meta.bootstrap.length > 0) {
|
|
@@ -32749,7 +32783,7 @@ __name(compileDeclarePipeFromMetadata, "compileDeclarePipeFromMetadata");
|
|
|
32749
32783
|
function createPipeDefinitionMap(meta) {
|
|
32750
32784
|
const definitionMap = new DefinitionMap();
|
|
32751
32785
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
32752
|
-
definitionMap.set("version", literal("22.2.
|
|
32786
|
+
definitionMap.set("version", literal("22.2.1"));
|
|
32753
32787
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
32754
32788
|
definitionMap.set("type", meta.type.value);
|
|
32755
32789
|
if (meta.isStandalone !== void 0) {
|
|
@@ -32774,7 +32808,7 @@ function compileClassDebugInfo(debugInfo) {
|
|
|
32774
32808
|
debugInfoObject.forbidOrphanRendering = literal(true);
|
|
32775
32809
|
}
|
|
32776
32810
|
const fnCall = importExpr(Identifiers.setClassDebugInfo).callFn([debugInfo.type, mapLiteral(debugInfoObject)]);
|
|
32777
|
-
const iife = arrowFn([], [devOnlyGuardedExpression(fnCall).toStmt()]);
|
|
32811
|
+
const iife = arrowFn([], [devOnlyGuardedExpression(fnCall).toStmt()], DYNAMIC_TYPE);
|
|
32778
32812
|
return iife.callFn([]);
|
|
32779
32813
|
}
|
|
32780
32814
|
__name(compileClassDebugInfo, "compileClassDebugInfo");
|
|
@@ -32792,14 +32826,14 @@ function compileHmrInitializer(meta) {
|
|
|
32792
32826
|
});
|
|
32793
32827
|
const defaultRead = variable(moduleName).prop("default");
|
|
32794
32828
|
const replaceCall = importExpr(Identifiers.replaceMetadata).callFn([meta.type, defaultRead, literalArr(namespaces), literalArr(meta.localDependencies.map((l) => l.runtimeRepresentation)), variable("import").prop("meta"), variable(idName)]);
|
|
32795
|
-
const replaceCallback = arrowFn([new FnParam(moduleName, DYNAMIC_TYPE)], defaultRead.and(replaceCall));
|
|
32829
|
+
const replaceCallback = arrowFn([new FnParam(moduleName, DYNAMIC_TYPE)], defaultRead.and(replaceCall), DYNAMIC_TYPE);
|
|
32796
32830
|
const url = importExpr(Identifiers.getReplaceMetadataURL).callFn([variable(idName), variable(timestampName), variable("import").prop("meta").prop("url")]);
|
|
32797
|
-
const importCallback = new DeclareFunctionStmt(importCallbackName, [new FnParam(timestampName, DYNAMIC_TYPE)], [new DynamicImportExpr(url, null, "@vite-ignore").prop("then").callFn([replaceCallback]).toStmt()],
|
|
32798
|
-
const updateCallback = arrowFn([new FnParam(dataName, DYNAMIC_TYPE)], variable(dataName).prop("id").identical(variable(idName)).and(variable(importCallbackName).callFn([variable(dataName).prop("timestamp")])));
|
|
32831
|
+
const importCallback = new DeclareFunctionStmt(importCallbackName, [new FnParam(timestampName, DYNAMIC_TYPE)], [new DynamicImportExpr(url, null, "@vite-ignore").prop("then").callFn([replaceCallback]).toStmt()], DYNAMIC_TYPE, StmtModifier.Final);
|
|
32832
|
+
const updateCallback = arrowFn([new FnParam(dataName, DYNAMIC_TYPE)], variable(dataName).prop("id").identical(variable(idName)).and(variable(importCallbackName).callFn([variable(dataName).prop("timestamp")])), DYNAMIC_TYPE);
|
|
32799
32833
|
const initialCall = variable(importCallbackName).callFn([variable("Date").prop("now").callFn([])]);
|
|
32800
32834
|
const hotRead = variable("import").prop("meta").prop("hot");
|
|
32801
32835
|
const hotListener = hotRead.clone().prop("on").callFn([literal("angular:component-update"), updateCallback]);
|
|
32802
|
-
return arrowFn([], [new DeclareVarStmt(idName, literal(encodeURIComponent(`${meta.filePath}@${meta.className}`)), null, StmtModifier.Final), importCallback, devOnlyGuardedExpression(initialCall).toStmt(), devOnlyGuardedExpression(hotRead.and(hotListener)).toStmt()]).callFn([]);
|
|
32836
|
+
return arrowFn([], [new DeclareVarStmt(idName, literal(encodeURIComponent(`${meta.filePath}@${meta.className}`)), null, StmtModifier.Final), importCallback, devOnlyGuardedExpression(initialCall).toStmt(), devOnlyGuardedExpression(hotRead.and(hotListener)).toStmt()], DYNAMIC_TYPE).callFn([]);
|
|
32803
32837
|
}
|
|
32804
32838
|
__name(compileHmrInitializer, "compileHmrInitializer");
|
|
32805
32839
|
function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
@@ -32821,10 +32855,10 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
|
|
|
32821
32855
|
}
|
|
32822
32856
|
}
|
|
32823
32857
|
}
|
|
32824
|
-
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body,
|
|
32858
|
+
return new DeclareFunctionStmt(`${meta.className}_UpdateMetadata`, params, body, DYNAMIC_TYPE, StmtModifier.Final);
|
|
32825
32859
|
}
|
|
32826
32860
|
__name(compileHmrUpdateCallback, "compileHmrUpdateCallback");
|
|
32827
|
-
var VERSION = new Version("22.2.
|
|
32861
|
+
var VERSION = new Version("22.2.1");
|
|
32828
32862
|
var HOST_BINDING_GUARD_COMMENT_TEXT = "hostBindingsBlockGuard";
|
|
32829
32863
|
function createHostElement(type, selector, nameSpan, hostObjectLiteralBindings, hostBindingDecorators, hostListenerDecorators) {
|
|
32830
32864
|
const bindings = [];
|
|
@@ -36304,7 +36338,7 @@ publishFacade(_global);
|
|
|
36304
36338
|
|
|
36305
36339
|
@angular/compiler/fesm2022/compiler.mjs:
|
|
36306
36340
|
(**
|
|
36307
|
-
* @license Angular v22.2.
|
|
36341
|
+
* @license Angular v22.2.1
|
|
36308
36342
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
36309
36343
|
* License: MIT
|
|
36310
36344
|
*)
|