@angular/compiler 19.2.0-next.2 → 19.2.0-rc.0

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.2.0-next.2
2
+ * @license Angular v19.2.0-rc.0
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -3059,10 +3059,6 @@ class Identifiers {
3059
3059
  name: 'ɵɵHostDirectivesFeature',
3060
3060
  moduleName: CORE,
3061
3061
  };
3062
- static InputTransformsFeatureFeature = {
3063
- name: 'ɵɵInputTransformsFeature',
3064
- moduleName: CORE,
3065
- };
3066
3062
  static ExternalStylesFeature = {
3067
3063
  name: 'ɵɵExternalStylesFeature',
3068
3064
  moduleName: CORE,
@@ -10292,7 +10288,14 @@ function transformExpressionsInOp(op, transform, flags) {
10292
10288
  op.trustedValueFn && transformExpressionsInExpression(op.trustedValueFn, transform, flags);
10293
10289
  break;
10294
10290
  case OpKind.RepeaterCreate:
10295
- op.track = transformExpressionsInExpression(op.track, transform, flags);
10291
+ if (op.trackByOps === null) {
10292
+ op.track = transformExpressionsInExpression(op.track, transform, flags);
10293
+ }
10294
+ else {
10295
+ for (const innerOp of op.trackByOps) {
10296
+ transformExpressionsInOp(innerOp, transform, flags | VisitorContextFlag.InChildOperation);
10297
+ }
10298
+ }
10296
10299
  if (op.trackByFn !== null) {
10297
10300
  op.trackByFn = transformExpressionsInExpression(op.trackByFn, transform, flags);
10298
10301
  }
@@ -10825,6 +10828,7 @@ function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, em
10825
10828
  emptyView,
10826
10829
  track,
10827
10830
  trackByFn: null,
10831
+ trackByOps: null,
10828
10832
  tag,
10829
10833
  emptyTag,
10830
10834
  emptyAttributes: null,
@@ -11325,6 +11329,11 @@ class CompilationUnit {
11325
11329
  yield listenerOp;
11326
11330
  }
11327
11331
  }
11332
+ else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
11333
+ for (const trackOp of op.trackByOps) {
11334
+ yield trackOp;
11335
+ }
11336
+ }
11328
11337
  }
11329
11338
  for (const op of this.update) {
11330
11339
  yield op;
@@ -13057,6 +13066,9 @@ function recursivelyProcessView(view, parentScope) {
13057
13066
  if (op.emptyView) {
13058
13067
  recursivelyProcessView(view.job.views.get(op.emptyView), scope);
13059
13068
  }
13069
+ if (op.trackByOps !== null) {
13070
+ op.trackByOps.prepend(generateVariablesInScopeForView(view, scope, false));
13071
+ }
13060
13072
  break;
13061
13073
  case OpKind.Listener:
13062
13074
  case OpKind.TwoWayListener:
@@ -23319,7 +23331,7 @@ function reifyCreateOperations(unit, ops) {
23319
23331
  emptyDecls = emptyView.decls;
23320
23332
  emptyVars = emptyView.vars;
23321
23333
  }
23322
- OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, op.trackByFn, op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.emptyTag, op.emptyAttributes, op.wholeSourceSpan));
23334
+ OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, reifyTrackBy(unit, op), op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.emptyTag, op.emptyAttributes, op.wholeSourceSpan));
23323
23335
  break;
23324
23336
  case OpKind.SourceLocation:
23325
23337
  const locationsLiteral = literalArr(op.locations.map(({ targetSlot, offset, line, column }) => {
@@ -23500,6 +23512,8 @@ function reifyIrExpression(expr) {
23500
23512
  return readContextLet(expr.targetSlot.slot);
23501
23513
  case ExpressionKind.StoreLet:
23502
23514
  return storeLet(expr.value, expr.sourceSpan);
23515
+ case ExpressionKind.TrackContext:
23516
+ return variable('this');
23503
23517
  default:
23504
23518
  throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${ExpressionKind[expr.kind]}`);
23505
23519
  }
@@ -23528,6 +23542,42 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
23528
23542
  }
23529
23543
  return fn(params, handlerStmts, undefined, undefined, name);
23530
23544
  }
23545
+ /** Reifies the tracking expression of a `RepeaterCreateOp`. */
23546
+ function reifyTrackBy(unit, op) {
23547
+ // If the tracking function was created already, there's nothing left to do.
23548
+ if (op.trackByFn !== null) {
23549
+ return op.trackByFn;
23550
+ }
23551
+ const params = [new FnParam('$index'), new FnParam('$item')];
23552
+ let fn$1;
23553
+ if (op.trackByOps === null) {
23554
+ // If there are no additional ops related to the tracking function, we just need
23555
+ // to turn it into a function that returns the result of the expression.
23556
+ fn$1 = op.usesComponentInstance
23557
+ ? fn(params, [new ReturnStatement(op.track)])
23558
+ : arrowFn(params, op.track);
23559
+ }
23560
+ else {
23561
+ // Otherwise first we need to reify the track-related ops.
23562
+ reifyUpdateOperations(unit, op.trackByOps);
23563
+ const statements = [];
23564
+ for (const trackOp of op.trackByOps) {
23565
+ if (trackOp.kind !== OpKind.Statement) {
23566
+ throw new Error(`AssertionError: expected reified statements, but found op ${OpKind[trackOp.kind]}`);
23567
+ }
23568
+ statements.push(trackOp.statement);
23569
+ }
23570
+ // Afterwards we can create the function from those ops.
23571
+ fn$1 =
23572
+ op.usesComponentInstance ||
23573
+ statements.length !== 1 ||
23574
+ !(statements[0] instanceof ReturnStatement)
23575
+ ? fn(params, statements)
23576
+ : arrowFn(params, statements[0].value);
23577
+ }
23578
+ op.trackByFn = unit.job.pool.getSharedFunctionReference(fn$1, '_forTrack');
23579
+ return op.trackByFn;
23580
+ }
23531
23581
 
23532
23582
  /**
23533
23583
  * Binding with no content can be safely deleted.
@@ -23626,6 +23676,11 @@ function processLexicalScope$1(view, ops) {
23626
23676
  case OpKind.TwoWayListener:
23627
23677
  processLexicalScope$1(view, op.handlerOps);
23628
23678
  break;
23679
+ case OpKind.RepeaterCreate:
23680
+ if (op.trackByOps !== null) {
23681
+ processLexicalScope$1(view, op.trackByOps);
23682
+ }
23683
+ break;
23629
23684
  }
23630
23685
  }
23631
23686
  if (view === view.job.root) {
@@ -24058,6 +24113,11 @@ function processLexicalScope(unit, ops, savedView) {
24058
24113
  // lexical scope.
24059
24114
  processLexicalScope(unit, op.handlerOps, savedView);
24060
24115
  break;
24116
+ case OpKind.RepeaterCreate:
24117
+ if (op.trackByOps !== null) {
24118
+ processLexicalScope(unit, op.trackByOps, savedView);
24119
+ }
24120
+ break;
24061
24121
  }
24062
24122
  }
24063
24123
  // Next, use the `scope` mapping to match `ir.LexicalReadExpr` with defined names in the lexical
@@ -24458,6 +24518,9 @@ function generateTemporaries(ops) {
24458
24518
  if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
24459
24519
  op.handlerOps.prepend(generateTemporaries(op.handlerOps));
24460
24520
  }
24521
+ else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
24522
+ op.trackByOps.prepend(generateTemporaries(op.trackByOps));
24523
+ }
24461
24524
  }
24462
24525
  return generatedStatements;
24463
24526
  }
@@ -24472,49 +24535,6 @@ function assignName(names, expr) {
24472
24535
  expr.name = name;
24473
24536
  }
24474
24537
 
24475
- /**
24476
- * Generate track functions that need to be extracted to the constant pool. This entails wrapping
24477
- * them in an arrow (or traditional) function, replacing context reads with `this.`, and storing
24478
- * them in the constant pool.
24479
- *
24480
- * Note that, if a track function was previously optimized, it will not need to be extracted, and
24481
- * this phase is a no-op.
24482
- */
24483
- function generateTrackFns(job) {
24484
- for (const unit of job.units) {
24485
- for (const op of unit.create) {
24486
- if (op.kind !== OpKind.RepeaterCreate) {
24487
- continue;
24488
- }
24489
- if (op.trackByFn !== null) {
24490
- // The final track function was already set, probably because it was optimized.
24491
- continue;
24492
- }
24493
- // Find all component context reads.
24494
- let usesComponentContext = false;
24495
- op.track = transformExpressionsInExpression(op.track, (expr) => {
24496
- if (expr instanceof PipeBindingExpr || expr instanceof PipeBindingVariadicExpr) {
24497
- throw new Error(`Illegal State: Pipes are not allowed in this context`);
24498
- }
24499
- if (expr instanceof TrackContextExpr) {
24500
- usesComponentContext = true;
24501
- return variable('this');
24502
- }
24503
- return expr;
24504
- }, VisitorContextFlag.None);
24505
- let fn;
24506
- const fnParams = [new FnParam('$index'), new FnParam('$item')];
24507
- if (usesComponentContext) {
24508
- fn = new FunctionExpr(fnParams, [new ReturnStatement(op.track)]);
24509
- }
24510
- else {
24511
- fn = arrowFn(fnParams, op.track);
24512
- }
24513
- op.trackByFn = job.pool.getSharedFunctionReference(fn, '_forTrack');
24514
- }
24515
- }
24516
- }
24517
-
24518
24538
  /**
24519
24539
  * `track` functions in `for` repeaters can sometimes be "optimized," i.e. transformed into inline
24520
24540
  * expressions, in lieu of an external function call. For example, tracking by `$index` can be be
@@ -24561,12 +24581,20 @@ function optimizeTrackFns(job) {
24561
24581
  // Replace context reads with a special IR expression, since context reads in a track
24562
24582
  // function are emitted specially.
24563
24583
  op.track = transformExpressionsInExpression(op.track, (expr) => {
24564
- if (expr instanceof ContextExpr) {
24584
+ if (expr instanceof PipeBindingExpr || expr instanceof PipeBindingVariadicExpr) {
24585
+ throw new Error(`Illegal State: Pipes are not allowed in this context`);
24586
+ }
24587
+ else if (expr instanceof ContextExpr) {
24565
24588
  op.usesComponentInstance = true;
24566
24589
  return new TrackContextExpr(expr.view);
24567
24590
  }
24568
24591
  return expr;
24569
24592
  }, VisitorContextFlag.None);
24593
+ // Also create an OpList for the tracking expression since it may need
24594
+ // additional ops when generating the final code (e.g. temporary variables).
24595
+ const trackOpList = new OpList();
24596
+ trackOpList.push(createStatementOp(new ReturnStatement(op.track, op.track.sourceSpan)));
24597
+ op.trackByOps = trackOpList;
24570
24598
  }
24571
24599
  }
24572
24600
  }
@@ -24791,6 +24819,9 @@ function optimizeVariables(job) {
24791
24819
  if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
24792
24820
  inlineAlwaysInlineVariables(op.handlerOps);
24793
24821
  }
24822
+ else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
24823
+ inlineAlwaysInlineVariables(op.trackByOps);
24824
+ }
24794
24825
  }
24795
24826
  optimizeVariablesInOpList(unit.create, job.compatibility);
24796
24827
  optimizeVariablesInOpList(unit.update, job.compatibility);
@@ -24798,6 +24829,9 @@ function optimizeVariables(job) {
24798
24829
  if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
24799
24830
  optimizeVariablesInOpList(op.handlerOps, job.compatibility);
24800
24831
  }
24832
+ else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
24833
+ optimizeVariablesInOpList(op.trackByOps, job.compatibility);
24834
+ }
24801
24835
  }
24802
24836
  }
24803
24837
  }
@@ -25378,7 +25412,6 @@ const phases = [
25378
25412
  { kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
25379
25413
  { kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
25380
25414
  { kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
25381
- { kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
25382
25415
  { kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
25383
25416
  { kind: CompilationJobKind.Tmpl, fn: collectConstExpressions },
25384
25417
  { kind: CompilationJobKind.Both, fn: collectElementConsts },
@@ -28941,7 +28974,6 @@ function addFeatures(definitionMap, meta) {
28941
28974
  const features = [];
28942
28975
  const providers = meta.providers;
28943
28976
  const viewProviders = meta.viewProviders;
28944
- const inputKeys = Object.keys(meta.inputs);
28945
28977
  if (providers || viewProviders) {
28946
28978
  const args = [providers || new LiteralArrayExpr([])];
28947
28979
  if (viewProviders) {
@@ -28949,12 +28981,6 @@ function addFeatures(definitionMap, meta) {
28949
28981
  }
28950
28982
  features.push(importExpr(Identifiers.ProvidersFeature).callFn(args));
28951
28983
  }
28952
- for (const key of inputKeys) {
28953
- if (meta.inputs[key].transformFunction !== null) {
28954
- features.push(importExpr(Identifiers.InputTransformsFeatureFeature));
28955
- break;
28956
- }
28957
- }
28958
28984
  // Note: host directives feature needs to be inserted before the
28959
28985
  // inheritance feature to ensure the correct execution order.
28960
28986
  if (meta.hostDirectives?.length) {
@@ -31008,7 +31034,7 @@ function publishFacade(global) {
31008
31034
  * @description
31009
31035
  * Entry point for all public APIs of the compiler package.
31010
31036
  */
31011
- const VERSION = new Version('19.2.0-next.2');
31037
+ const VERSION = new Version('19.2.0-rc.0');
31012
31038
 
31013
31039
  class CompilerConfig {
31014
31040
  defaultEncapsulation;
@@ -32759,29 +32785,32 @@ function compileClassDebugInfo(debugInfo) {
32759
32785
  * @param meta HMR metadata extracted from the class.
32760
32786
  */
32761
32787
  function compileHmrInitializer(meta) {
32762
- const id = encodeURIComponent(`${meta.filePath}@${meta.className}`);
32763
- const urlPartial = `./@ng/component?c=${id}&t=`;
32764
32788
  const moduleName = 'm';
32765
32789
  const dataName = 'd';
32766
32790
  const timestampName = 't';
32791
+ const idName = 'id';
32767
32792
  const importCallbackName = `${meta.className}_HmrLoad`;
32768
32793
  const namespaces = meta.namespaceDependencies.map((dep) => {
32769
32794
  return new ExternalExpr({ moduleName: dep.moduleName, name: null });
32770
32795
  });
32771
32796
  // m.default
32772
32797
  const defaultRead = variable(moduleName).prop('default');
32773
- // ɵɵreplaceMetadata(Comp, m.default, [...namespaces], [...locals]);
32798
+ // ɵɵreplaceMetadata(Comp, m.default, [...namespaces], [...locals], import.meta, id);
32774
32799
  const replaceCall = importExpr(Identifiers.replaceMetadata)
32775
32800
  .callFn([
32776
32801
  meta.type,
32777
32802
  defaultRead,
32778
32803
  literalArr(namespaces),
32779
32804
  literalArr(meta.localDependencies.map((l) => l.runtimeRepresentation)),
32805
+ variable('import').prop('meta'),
32806
+ variable(idName),
32780
32807
  ]);
32781
32808
  // (m) => m.default && ɵɵreplaceMetadata(...)
32782
32809
  const replaceCallback = arrowFn([new FnParam(moduleName)], defaultRead.and(replaceCall));
32783
- // '<urlPartial>' + encodeURIComponent(t)
32784
- const urlValue = literal(urlPartial)
32810
+ // '<url>?c=' + id + '&t=' + encodeURIComponent(t)
32811
+ const urlValue = literal(`./@ng/component?c=`)
32812
+ .plus(variable(idName))
32813
+ .plus(literal('&t='))
32785
32814
  .plus(variable('encodeURIComponent').callFn([variable(timestampName)]));
32786
32815
  // import.meta.url
32787
32816
  const urlBase = variable('import').prop('meta').prop('url');
@@ -32799,10 +32828,10 @@ function compileHmrInitializer(meta) {
32799
32828
  .callFn([replaceCallback])
32800
32829
  .toStmt(),
32801
32830
  ], null, StmtModifier.Final);
32802
- // (d) => d.id === <id> && Cmp_HmrLoad(d.timestamp)
32831
+ // (d) => d.id === id && Cmp_HmrLoad(d.timestamp)
32803
32832
  const updateCallback = arrowFn([new FnParam(dataName)], variable(dataName)
32804
32833
  .prop('id')
32805
- .identical(literal(id))
32834
+ .identical(variable(idName))
32806
32835
  .and(variable(importCallbackName).callFn([variable(dataName).prop('timestamp')])));
32807
32836
  // Cmp_HmrLoad(Date.now());
32808
32837
  // Initial call to kick off the loading in order to avoid edge cases with components
@@ -32817,6 +32846,8 @@ function compileHmrInitializer(meta) {
32817
32846
  .prop('on')
32818
32847
  .callFn([literal('angular:component-update'), updateCallback]);
32819
32848
  return arrowFn([], [
32849
+ // const id = <id>;
32850
+ new DeclareVarStmt(idName, literal(encodeURIComponent(`${meta.filePath}@${meta.className}`)), null, StmtModifier.Final),
32820
32851
  // function Cmp_HmrLoad() {...}.
32821
32852
  importCallback,
32822
32853
  // ngDevMode && Cmp_HmrLoad(Date.now());
@@ -32871,7 +32902,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
32871
32902
  function compileDeclareClassMetadata(metadata) {
32872
32903
  const definitionMap = new DefinitionMap();
32873
32904
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
32874
- definitionMap.set('version', literal('19.2.0-next.2'));
32905
+ definitionMap.set('version', literal('19.2.0-rc.0'));
32875
32906
  definitionMap.set('ngImport', importExpr(Identifiers.core));
32876
32907
  definitionMap.set('type', metadata.type);
32877
32908
  definitionMap.set('decorators', metadata.decorators);
@@ -32889,7 +32920,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
32889
32920
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
32890
32921
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
32891
32922
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
32892
- definitionMap.set('version', literal('19.2.0-next.2'));
32923
+ definitionMap.set('version', literal('19.2.0-rc.0'));
32893
32924
  definitionMap.set('ngImport', importExpr(Identifiers.core));
32894
32925
  definitionMap.set('type', metadata.type);
32895
32926
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -32984,7 +33015,7 @@ function createDirectiveDefinitionMap(meta) {
32984
33015
  const definitionMap = new DefinitionMap();
32985
33016
  const minVersion = getMinimumVersionForPartialOutput(meta);
32986
33017
  definitionMap.set('minVersion', literal(minVersion));
32987
- definitionMap.set('version', literal('19.2.0-next.2'));
33018
+ definitionMap.set('version', literal('19.2.0-rc.0'));
32988
33019
  // e.g. `type: MyDirective`
32989
33020
  definitionMap.set('type', meta.type.value);
32990
33021
  if (meta.isStandalone !== undefined) {
@@ -33403,7 +33434,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
33403
33434
  function compileDeclareFactoryFunction(meta) {
33404
33435
  const definitionMap = new DefinitionMap();
33405
33436
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
33406
- definitionMap.set('version', literal('19.2.0-next.2'));
33437
+ definitionMap.set('version', literal('19.2.0-rc.0'));
33407
33438
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33408
33439
  definitionMap.set('type', meta.type.value);
33409
33440
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -33438,7 +33469,7 @@ function compileDeclareInjectableFromMetadata(meta) {
33438
33469
  function createInjectableDefinitionMap(meta) {
33439
33470
  const definitionMap = new DefinitionMap();
33440
33471
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
33441
- definitionMap.set('version', literal('19.2.0-next.2'));
33472
+ definitionMap.set('version', literal('19.2.0-rc.0'));
33442
33473
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33443
33474
  definitionMap.set('type', meta.type.value);
33444
33475
  // Only generate providedIn property if it has a non-null value
@@ -33489,7 +33520,7 @@ function compileDeclareInjectorFromMetadata(meta) {
33489
33520
  function createInjectorDefinitionMap(meta) {
33490
33521
  const definitionMap = new DefinitionMap();
33491
33522
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
33492
- definitionMap.set('version', literal('19.2.0-next.2'));
33523
+ definitionMap.set('version', literal('19.2.0-rc.0'));
33493
33524
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33494
33525
  definitionMap.set('type', meta.type.value);
33495
33526
  definitionMap.set('providers', meta.providers);
@@ -33522,7 +33553,7 @@ function createNgModuleDefinitionMap(meta) {
33522
33553
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
33523
33554
  }
33524
33555
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
33525
- definitionMap.set('version', literal('19.2.0-next.2'));
33556
+ definitionMap.set('version', literal('19.2.0-rc.0'));
33526
33557
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33527
33558
  definitionMap.set('type', meta.type.value);
33528
33559
  // We only generate the keys in the metadata if the arrays contain values.
@@ -33573,7 +33604,7 @@ function compileDeclarePipeFromMetadata(meta) {
33573
33604
  function createPipeDefinitionMap(meta) {
33574
33605
  const definitionMap = new DefinitionMap();
33575
33606
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
33576
- definitionMap.set('version', literal('19.2.0-next.2'));
33607
+ definitionMap.set('version', literal('19.2.0-rc.0'));
33577
33608
  definitionMap.set('ngImport', importExpr(Identifiers.core));
33578
33609
  // e.g. `type: MyPipe`
33579
33610
  definitionMap.set('type', meta.type.value);