@angular/core 18.1.0-next.0 → 18.1.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/esm2022/primitives/event-dispatch/index.mjs +2 -1
  2. package/esm2022/primitives/event-dispatch/src/dispatcher.mjs +4 -3
  3. package/esm2022/primitives/event-dispatch/src/event_dispatcher.mjs +4 -6
  4. package/esm2022/primitives/event-dispatch/src/event_type.mjs +2 -2
  5. package/esm2022/primitives/signals/src/graph.mjs +6 -5
  6. package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +2 -4
  7. package/esm2022/src/core.mjs +1 -1
  8. package/esm2022/src/core_private_export.mjs +2 -2
  9. package/esm2022/src/event_delegation_utils.mjs +68 -0
  10. package/esm2022/src/event_emitter.mjs +20 -11
  11. package/esm2022/src/hydration/annotate.mjs +18 -7
  12. package/esm2022/src/hydration/api.mjs +2 -2
  13. package/esm2022/src/hydration/event_replay.mjs +46 -69
  14. package/esm2022/src/hydration/tokens.mjs +6 -1
  15. package/esm2022/src/pending_tasks.mjs +15 -20
  16. package/esm2022/src/render3/after_render_hooks.mjs +67 -132
  17. package/esm2022/src/render3/component_ref.mjs +1 -1
  18. package/esm2022/src/render3/instructions/change_detection.mjs +27 -24
  19. package/esm2022/src/render3/instructions/listener.mjs +5 -5
  20. package/esm2022/src/render3/instructions/shared.mjs +3 -3
  21. package/esm2022/src/render3/reactive_lview_consumer.mjs +56 -3
  22. package/esm2022/src/version.mjs +1 -1
  23. package/esm2022/testing/src/logger.mjs +3 -3
  24. package/fesm2022/core.mjs +474 -432
  25. package/fesm2022/core.mjs.map +1 -1
  26. package/fesm2022/primitives/event-dispatch.mjs +9 -10
  27. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  28. package/fesm2022/primitives/signals.mjs +6 -5
  29. package/fesm2022/primitives/signals.mjs.map +1 -1
  30. package/fesm2022/rxjs-interop.mjs +1 -1
  31. package/fesm2022/testing.mjs +1 -1
  32. package/index.d.ts +218 -28
  33. package/package.json +2 -2
  34. package/primitives/event-dispatch/index.d.ts +66 -1
  35. package/primitives/signals/index.d.ts +1 -1
  36. package/rxjs-interop/index.d.ts +1 -1
  37. package/schematics/migrations/after-render-phase/bundle.js +602 -0
  38. package/schematics/migrations/after-render-phase/bundle.js.map +7 -0
  39. package/schematics/migrations/http-providers/bundle.js +10 -2
  40. package/schematics/migrations/http-providers/bundle.js.map +2 -2
  41. package/schematics/migrations/invalid-two-way-bindings/bundle.js +177 -8
  42. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +3 -3
  43. package/schematics/migrations.json +5 -0
  44. package/schematics/ng-generate/control-flow-migration/bundle.js +192 -16
  45. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  46. package/schematics/ng-generate/standalone-migration/bundle.js +9197 -9490
  47. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  48. package/testing/index.d.ts +1 -1
@@ -9,6 +9,11 @@
9
9
  "version": "18.0.0",
10
10
  "description": "Replace deprecated HTTP related modules with provider functions",
11
11
  "factory": "./migrations/http-providers/bundle"
12
+ },
13
+ "migration-after-render-phase": {
14
+ "version": "18.1.0",
15
+ "description": "Updates calls to afterRender with an explicit phase to the new API",
16
+ "factory": "./migrations/after-render-phase/bundle"
12
17
  }
13
18
  }
14
19
  }
@@ -4434,6 +4434,18 @@ var UnknownBlock = class {
4434
4434
  return visitor.visitUnknownBlock(this);
4435
4435
  }
4436
4436
  };
4437
+ var LetDeclaration = class {
4438
+ constructor(name, value, sourceSpan, nameSpan, valueSpan) {
4439
+ this.name = name;
4440
+ this.value = value;
4441
+ this.sourceSpan = sourceSpan;
4442
+ this.nameSpan = nameSpan;
4443
+ this.valueSpan = valueSpan;
4444
+ }
4445
+ visit(visitor) {
4446
+ return visitor.visitLetDeclaration(this);
4447
+ }
4448
+ };
4437
4449
  var Template = class {
4438
4450
  constructor(tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n2) {
4439
4451
  this.tagName = tagName;
@@ -10821,6 +10833,18 @@ var BlockParameter = class {
10821
10833
  return visitor.visitBlockParameter(this, context);
10822
10834
  }
10823
10835
  };
10836
+ var LetDeclaration2 = class {
10837
+ constructor(name, value, sourceSpan, nameSpan, valueSpan) {
10838
+ this.name = name;
10839
+ this.value = value;
10840
+ this.sourceSpan = sourceSpan;
10841
+ this.nameSpan = nameSpan;
10842
+ this.valueSpan = valueSpan;
10843
+ }
10844
+ visit(visitor, context) {
10845
+ return visitor.visitLetDeclaration(this, context);
10846
+ }
10847
+ };
10824
10848
  function visitAll2(visitor, nodes, context = null) {
10825
10849
  const result = [];
10826
10850
  const visit = visitor.visit ? (ast) => visitor.visit(ast, context) || ast.visit(visitor, context) : (ast) => ast.visit(visitor, context);
@@ -10862,6 +10886,8 @@ var RecursiveVisitor = class {
10862
10886
  }
10863
10887
  visitBlockParameter(ast, context) {
10864
10888
  }
10889
+ visitLetDeclaration(decl, context) {
10890
+ }
10865
10891
  visitChildren(context, cb) {
10866
10892
  let results = [];
10867
10893
  let t = this;
@@ -11690,6 +11716,9 @@ var _I18nVisitor = class {
11690
11716
  visitBlockParameter(_parameter, _context) {
11691
11717
  throw new Error("Unreachable code");
11692
11718
  }
11719
+ visitLetDeclaration(decl, context) {
11720
+ return null;
11721
+ }
11693
11722
  _visitTextWithInterpolation(tokens, sourceSpan, context, previousI18n) {
11694
11723
  const nodes = [];
11695
11724
  let hasInterpolation = false;
@@ -13961,6 +13990,7 @@ var _Tokenizer = class {
13961
13990
  this._preserveLineEndings = options.preserveLineEndings || false;
13962
13991
  this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;
13963
13992
  this._tokenizeBlocks = (_a2 = options.tokenizeBlocks) != null ? _a2 : true;
13993
+ this._tokenizeLet = options.tokenizeLet || false;
13964
13994
  try {
13965
13995
  this._cursor.init();
13966
13996
  } catch (e) {
@@ -13991,6 +14021,8 @@ var _Tokenizer = class {
13991
14021
  } else {
13992
14022
  this._consumeTagOpen(start);
13993
14023
  }
14024
+ } else if (this._tokenizeLet && this._cursor.peek() === $AT && !this._inInterpolation && this._attemptStr("@let")) {
14025
+ this._consumeLetDeclaration(start);
13994
14026
  } else if (this._tokenizeBlocks && this._attemptCharCode($AT)) {
13995
14027
  this._consumeBlockStart(start);
13996
14028
  } else if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode($RBRACE)) {
@@ -14002,7 +14034,7 @@ var _Tokenizer = class {
14002
14034
  this.handleError(e);
14003
14035
  }
14004
14036
  }
14005
- this._beginToken(29);
14037
+ this._beginToken(33);
14006
14038
  this._endToken([]);
14007
14039
  }
14008
14040
  _getBlockName() {
@@ -14075,6 +14107,67 @@ var _Tokenizer = class {
14075
14107
  this._attemptCharCodeUntilFn(isBlockParameterChar);
14076
14108
  }
14077
14109
  }
14110
+ _consumeLetDeclaration(start) {
14111
+ this._beginToken(29, start);
14112
+ if (isWhitespace(this._cursor.peek())) {
14113
+ this._attemptCharCodeUntilFn(isNotWhitespace);
14114
+ } else {
14115
+ const token = this._endToken([this._cursor.getChars(start)]);
14116
+ token.type = 32;
14117
+ return;
14118
+ }
14119
+ const startToken = this._endToken([this._getLetDeclarationName()]);
14120
+ this._attemptCharCodeUntilFn(isNotWhitespace);
14121
+ if (!this._attemptCharCode($EQ)) {
14122
+ startToken.type = 32;
14123
+ return;
14124
+ }
14125
+ this._attemptCharCodeUntilFn((code) => isNotWhitespace(code) && !isNewLine(code));
14126
+ this._consumeLetDeclarationValue();
14127
+ const endChar = this._cursor.peek();
14128
+ if (endChar === $SEMICOLON) {
14129
+ this._beginToken(31);
14130
+ this._endToken([]);
14131
+ this._cursor.advance();
14132
+ } else {
14133
+ startToken.type = 32;
14134
+ startToken.sourceSpan = this._cursor.getSpan(start);
14135
+ }
14136
+ }
14137
+ _getLetDeclarationName() {
14138
+ const nameCursor = this._cursor.clone();
14139
+ let allowDigit = false;
14140
+ this._attemptCharCodeUntilFn((code) => {
14141
+ if (isAsciiLetter(code) || code === $_ || allowDigit && isDigit(code)) {
14142
+ allowDigit = true;
14143
+ return false;
14144
+ }
14145
+ return true;
14146
+ });
14147
+ return this._cursor.getChars(nameCursor).trim();
14148
+ }
14149
+ _consumeLetDeclarationValue() {
14150
+ const start = this._cursor.clone();
14151
+ this._beginToken(30, start);
14152
+ while (this._cursor.peek() !== $EOF) {
14153
+ const char = this._cursor.peek();
14154
+ if (char === $SEMICOLON) {
14155
+ break;
14156
+ }
14157
+ if (isQuote(char)) {
14158
+ this._cursor.advance();
14159
+ this._attemptCharCodeUntilFn((inner) => {
14160
+ if (inner === $BACKSLASH) {
14161
+ this._cursor.advance();
14162
+ return false;
14163
+ }
14164
+ return inner === char;
14165
+ });
14166
+ }
14167
+ this._cursor.advance();
14168
+ }
14169
+ this._endToken([this._cursor.getChars(start)]);
14170
+ }
14078
14171
  _tokenizeExpansionForm() {
14079
14172
  if (this.isExpansionFormStart()) {
14080
14173
  this._consumeExpansionFormStart();
@@ -14861,7 +14954,7 @@ var _TreeBuilder = class {
14861
14954
  this._advance();
14862
14955
  }
14863
14956
  build() {
14864
- while (this._peek.type !== 29) {
14957
+ while (this._peek.type !== 33) {
14865
14958
  if (this._peek.type === 0 || this._peek.type === 4) {
14866
14959
  this._consumeStartTag(this._advance());
14867
14960
  } else if (this._peek.type === 3) {
@@ -14886,6 +14979,12 @@ var _TreeBuilder = class {
14886
14979
  } else if (this._peek.type === 28) {
14887
14980
  this._closeVoidElement();
14888
14981
  this._consumeIncompleteBlock(this._advance());
14982
+ } else if (this._peek.type === 29) {
14983
+ this._closeVoidElement();
14984
+ this._consumeLet(this._advance());
14985
+ } else if (this._peek.type === 32) {
14986
+ this._closeVoidElement();
14987
+ this._consumeIncompleteLet(this._advance());
14889
14988
  } else {
14890
14989
  this._advance();
14891
14990
  }
@@ -14950,7 +15049,7 @@ var _TreeBuilder = class {
14950
15049
  if (!exp)
14951
15050
  return null;
14952
15051
  const end = this._advance();
14953
- exp.push({ type: 29, parts: [], sourceSpan: end.sourceSpan });
15052
+ exp.push({ type: 33, parts: [], sourceSpan: end.sourceSpan });
14954
15053
  const expansionCaseParser = new _TreeBuilder(exp, this.getTagDefinition);
14955
15054
  expansionCaseParser.build();
14956
15055
  if (expansionCaseParser.errors.length > 0) {
@@ -14986,7 +15085,7 @@ var _TreeBuilder = class {
14986
15085
  return null;
14987
15086
  }
14988
15087
  }
14989
- if (this._peek.type === 29) {
15088
+ if (this._peek.type === 33) {
14990
15089
  this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`));
14991
15090
  return null;
14992
15091
  }
@@ -15158,6 +15257,44 @@ var _TreeBuilder = class {
15158
15257
  this._popContainer(null, Block, null);
15159
15258
  this.errors.push(TreeError.create(token.parts[0], span, `Incomplete block "${token.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`));
15160
15259
  }
15260
+ _consumeLet(startToken) {
15261
+ const name = startToken.parts[0];
15262
+ let valueToken;
15263
+ let endToken;
15264
+ if (this._peek.type !== 30) {
15265
+ this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Invalid @let declaration "${name}". Declaration must have a value.`));
15266
+ return;
15267
+ } else {
15268
+ valueToken = this._advance();
15269
+ }
15270
+ if (this._peek.type !== 31) {
15271
+ this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Unterminated @let declaration "${name}". Declaration must be terminated with a semicolon.`));
15272
+ return;
15273
+ } else {
15274
+ endToken = this._advance();
15275
+ }
15276
+ const end = endToken.sourceSpan.fullStart;
15277
+ const span = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart);
15278
+ const startOffset = startToken.sourceSpan.toString().lastIndexOf(name);
15279
+ const nameStart = startToken.sourceSpan.start.moveBy(startOffset);
15280
+ const nameSpan = new ParseSourceSpan(nameStart, startToken.sourceSpan.end);
15281
+ const node = new LetDeclaration2(name, valueToken.parts[0], span, nameSpan, valueToken.sourceSpan);
15282
+ this._addToParent(node);
15283
+ }
15284
+ _consumeIncompleteLet(token) {
15285
+ var _a2;
15286
+ const name = (_a2 = token.parts[0]) != null ? _a2 : "";
15287
+ const nameString = name ? ` "${name}"` : "";
15288
+ if (name.length > 0) {
15289
+ const startOffset = token.sourceSpan.toString().lastIndexOf(name);
15290
+ const nameStart = token.sourceSpan.start.moveBy(startOffset);
15291
+ const nameSpan = new ParseSourceSpan(nameStart, token.sourceSpan.end);
15292
+ const valueSpan = new ParseSourceSpan(token.sourceSpan.start, token.sourceSpan.start.moveBy(0));
15293
+ const node = new LetDeclaration2(name, "", token.sourceSpan, nameSpan, valueSpan);
15294
+ this._addToParent(node);
15295
+ }
15296
+ this.errors.push(TreeError.create(token.parts[0], token.sourceSpan, `Incomplete @let declaration${nameString}. @let declarations must be written as \`@let <name> = <value>;\``));
15297
+ }
15161
15298
  _getContainer() {
15162
15299
  return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null;
15163
15300
  }
@@ -15330,6 +15467,9 @@ var I18nMetaVisitor = class {
15330
15467
  visitBlockParameter(parameter, context) {
15331
15468
  return parameter;
15332
15469
  }
15470
+ visitLetDeclaration(decl, context) {
15471
+ return decl;
15472
+ }
15333
15473
  _parseMetadata(meta) {
15334
15474
  return typeof meta === "string" ? parseI18nMeta(meta) : meta instanceof Message ? meta : {};
15335
15475
  }
@@ -18780,6 +18920,7 @@ function ingestNodes(unit, template2) {
18780
18920
  ingestIcu(unit, node);
18781
18921
  } else if (node instanceof ForLoopBlock) {
18782
18922
  ingestForBlock(unit, node);
18923
+ } else if (node instanceof LetDeclaration) {
18783
18924
  } else {
18784
18925
  throw new Error(`Unsupported template node: ${node.constructor.name}`);
18785
18926
  }
@@ -19604,6 +19745,9 @@ var WhitespaceVisitor = class {
19604
19745
  visitBlockParameter(parameter, context) {
19605
19746
  return parameter;
19606
19747
  }
19748
+ visitLetDeclaration(decl, context) {
19749
+ return decl;
19750
+ }
19607
19751
  };
19608
19752
  function createWhitespaceProcessedTextToken({ type, parts, sourceSpan }) {
19609
19753
  return { type, parts: [processWhitespace(parts[0])], sourceSpan };
@@ -20953,6 +21097,13 @@ var HtmlAstToIvyAst = class {
20953
21097
  }
20954
21098
  return null;
20955
21099
  }
21100
+ visitLetDeclaration(decl, context) {
21101
+ const value = this.bindingParser.parseBinding(decl.value, false, decl.valueSpan, decl.valueSpan.start.offset);
21102
+ if (value.errors.length === 0 && value.ast instanceof EmptyExpr) {
21103
+ this.reportError("@let declaration value cannot be empty", decl.valueSpan);
21104
+ }
21105
+ return new LetDeclaration(decl.name, value, decl.sourceSpan, decl.nameSpan, decl.valueSpan);
21106
+ }
20956
21107
  visitBlockParameter() {
20957
21108
  return null;
20958
21109
  }
@@ -21219,6 +21370,9 @@ var NonBindableVisitor = class {
21219
21370
  visitBlockParameter(parameter, context) {
21220
21371
  return null;
21221
21372
  }
21373
+ visitLetDeclaration(decl, context) {
21374
+ return new Text(`@let ${decl.name} = ${decl.value};`, decl.sourceSpan);
21375
+ }
21222
21376
  };
21223
21377
  var NON_BINDABLE_VISITOR = new NonBindableVisitor();
21224
21378
  function normalizeAttributeName(attrName) {
@@ -21238,7 +21392,7 @@ function textContents(node) {
21238
21392
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/render3/view/template.mjs
21239
21393
  var LEADING_TRIVIA_CHARS = [" ", "\n", "\r", " "];
21240
21394
  function parseTemplate(template2, templateUrl, options = {}) {
21241
- var _a2;
21395
+ var _a2, _b2;
21242
21396
  const { interpolationConfig, preserveWhitespaces, enableI18nLegacyMessageIdFormat, allowInvalidAssignmentEvents } = options;
21243
21397
  const bindingParser = makeBindingParser(interpolationConfig, allowInvalidAssignmentEvents);
21244
21398
  const htmlParser = new HtmlParser();
@@ -21246,7 +21400,8 @@ function parseTemplate(template2, templateUrl, options = {}) {
21246
21400
  leadingTriviaChars: LEADING_TRIVIA_CHARS
21247
21401
  }, options), {
21248
21402
  tokenizeExpansionForms: true,
21249
- tokenizeBlocks: (_a2 = options.enableBlockSyntax) != null ? _a2 : true
21403
+ tokenizeBlocks: (_a2 = options.enableBlockSyntax) != null ? _a2 : true,
21404
+ tokenizeLet: (_b2 = options.enableLetSyntax) != null ? _b2 : false
21250
21405
  }));
21251
21406
  if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {
21252
21407
  const parsedTemplate2 = {
@@ -21786,6 +21941,9 @@ var Scope2 = class {
21786
21941
  visitContent(content) {
21787
21942
  this.ingestScopedNode(content);
21788
21943
  }
21944
+ visitLetDeclaration(decl) {
21945
+ this.maybeDeclare(decl);
21946
+ }
21789
21947
  visitBoundAttribute(attr) {
21790
21948
  }
21791
21949
  visitBoundEvent(event) {
@@ -21963,6 +22121,8 @@ var DirectiveBinder = class {
21963
22121
  }
21964
22122
  visitUnknownBlock(block) {
21965
22123
  }
22124
+ visitLetDeclaration(decl) {
22125
+ }
21966
22126
  };
21967
22127
  var TemplateBinder = class extends RecursiveAstVisitor {
21968
22128
  constructor(bindings, symbols, usedPipes, eagerPipes, deferBlocks, nestingLevel, scope, rootNode, level) {
@@ -22119,6 +22279,12 @@ var TemplateBinder = class extends RecursiveAstVisitor {
22119
22279
  visitBoundText(text2) {
22120
22280
  text2.value.visit(this);
22121
22281
  }
22282
+ visitLetDeclaration(decl) {
22283
+ decl.value.visit(this);
22284
+ if (this.rootNode !== null) {
22285
+ this.symbols.set(decl, this.rootNode);
22286
+ }
22287
+ }
22122
22288
  visitPipe(ast, context) {
22123
22289
  this.usedPipes.add(ast.name);
22124
22290
  if (!this.scope.isDeferred) {
@@ -22147,7 +22313,10 @@ var TemplateBinder = class extends RecursiveAstVisitor {
22147
22313
  if (!(ast.receiver instanceof ImplicitReceiver)) {
22148
22314
  return;
22149
22315
  }
22150
- let target = this.scope.lookup(name);
22316
+ const target = this.scope.lookup(name);
22317
+ if (target instanceof LetDeclaration && ast.receiver instanceof ThisReceiver) {
22318
+ return;
22319
+ }
22151
22320
  if (target !== null) {
22152
22321
  this.bindings.set(ast, target);
22153
22322
  }
@@ -22884,7 +23053,7 @@ function publishFacade(global) {
22884
23053
  }
22885
23054
 
22886
23055
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
22887
- var VERSION2 = new Version("18.1.0-next.0");
23056
+ var VERSION2 = new Version("18.1.0-next.2");
22888
23057
 
22889
23058
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
22890
23059
  var _VisitorMode;
@@ -22997,8 +23166,7 @@ var commonModulePipes = [
22997
23166
  "lowercase",
22998
23167
  "uppercase",
22999
23168
  "titlecase",
23000
- "percent",
23001
- "titlecase"
23169
+ "percent"
23002
23170
  ].map((name) => pipeMatchRegExpFor(name));
23003
23171
  var ElementToMigrate = class {
23004
23172
  constructor(el, attr, elseAttr = void 0, thenAttr = void 0, forAttrs = void 0, aliasAttrs = void 0) {
@@ -23938,16 +24106,24 @@ function migrateStandardNgFor(etm, tmpl, offset) {
23938
24106
  }
23939
24107
  if (part.match(aliasWithEqualRegexp)) {
23940
24108
  const aliasParts = part.split("=");
23941
- aliases.push(` ${aliasParts[0].trim()} = $${aliasParts[1].trim()}`);
23942
- if (aliasParts[1].trim() === "index") {
23943
- aliasedIndex = aliasParts[0].replace("let", "").trim();
24109
+ const aliasedName = aliasParts[0].replace("let", "").trim();
24110
+ const originalName = aliasParts[1].trim();
24111
+ if (aliasedName !== "$" + originalName) {
24112
+ aliases.push(` let ${aliasedName} = $${originalName}`);
24113
+ }
24114
+ if (originalName === "index") {
24115
+ aliasedIndex = aliasedName;
23944
24116
  }
23945
24117
  }
23946
24118
  if (part.match(aliasWithAsRegexp)) {
23947
24119
  const aliasParts = part.split(/\s+as\s+/);
23948
- aliases.push(` let ${aliasParts[1].trim()} = $${aliasParts[0].trim()}`);
23949
- if (aliasParts[0].trim() === "index") {
23950
- aliasedIndex = aliasParts[1].trim();
24120
+ const originalName = aliasParts[0].trim();
24121
+ const aliasedName = aliasParts[1].trim();
24122
+ if (aliasedName !== "$" + originalName) {
24123
+ aliases.push(` let ${aliasedName} = $${originalName}`);
24124
+ }
24125
+ if (originalName === "index") {
24126
+ aliasedIndex = aliasedName;
23951
24127
  }
23952
24128
  }
23953
24129
  }