@angular/compiler 14.2.0 → 15.0.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.2.0
2
+ * @license Angular v15.0.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.2.0
2
+ * @license Angular v15.0.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -2922,6 +2922,7 @@ Identifiers.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', m
2922
2922
  Identifiers.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE };
2923
2923
  Identifiers.StandaloneFeature = { name: 'ɵɵStandaloneFeature', moduleName: CORE };
2924
2924
  Identifiers.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };
2925
+ Identifiers.HostDirectivesFeature = { name: 'ɵɵHostDirectivesFeature', moduleName: CORE };
2925
2926
  Identifiers.listener = { name: 'ɵɵlistener', moduleName: CORE };
2926
2927
  Identifiers.getInheritedFactory = {
2927
2928
  name: 'ɵɵgetInheritedFactory',
@@ -14784,42 +14785,42 @@ const SCHEMA = [
14784
14785
  'time^[HTMLElement]|dateTime',
14785
14786
  ':svg:cursor^:svg:|',
14786
14787
  ];
14787
- const _ATTR_TO_PROP = {
14788
+ const _ATTR_TO_PROP = new Map(Object.entries({
14788
14789
  'class': 'className',
14789
14790
  'for': 'htmlFor',
14790
14791
  'formaction': 'formAction',
14791
14792
  'innerHtml': 'innerHTML',
14792
14793
  'readonly': 'readOnly',
14793
14794
  'tabindex': 'tabIndex',
14794
- };
14795
+ }));
14795
14796
  // Invert _ATTR_TO_PROP.
14796
- const _PROP_TO_ATTR = Object.keys(_ATTR_TO_PROP).reduce((inverted, attr) => {
14797
- inverted[_ATTR_TO_PROP[attr]] = attr;
14797
+ const _PROP_TO_ATTR = Array.from(_ATTR_TO_PROP).reduce((inverted, [propertyName, attributeName]) => {
14798
+ inverted.set(propertyName, attributeName);
14798
14799
  return inverted;
14799
- }, {});
14800
+ }, new Map());
14800
14801
  class DomElementSchemaRegistry extends ElementSchemaRegistry {
14801
14802
  constructor() {
14802
14803
  super();
14803
- this._schema = {};
14804
+ this._schema = new Map();
14804
14805
  // We don't allow binding to events for security reasons. Allowing event bindings would almost
14805
14806
  // certainly introduce bad XSS vulnerabilities. Instead, we store events in a separate schema.
14806
- this._eventSchema = {};
14807
+ this._eventSchema = new Map;
14807
14808
  SCHEMA.forEach(encodedType => {
14808
- const type = {};
14809
+ const type = new Map();
14809
14810
  const events = new Set();
14810
14811
  const [strType, strProperties] = encodedType.split('|');
14811
14812
  const properties = strProperties.split(',');
14812
14813
  const [typeNames, superName] = strType.split('^');
14813
14814
  typeNames.split(',').forEach(tag => {
14814
- this._schema[tag.toLowerCase()] = type;
14815
- this._eventSchema[tag.toLowerCase()] = events;
14815
+ this._schema.set(tag.toLowerCase(), type);
14816
+ this._eventSchema.set(tag.toLowerCase(), events);
14816
14817
  });
14817
- const superType = superName && this._schema[superName.toLowerCase()];
14818
+ const superType = superName && this._schema.get(superName.toLowerCase());
14818
14819
  if (superType) {
14819
- Object.keys(superType).forEach((prop) => {
14820
- type[prop] = superType[prop];
14821
- });
14822
- for (const superEvent of this._eventSchema[superName.toLowerCase()]) {
14820
+ for (const [prop, value] of superType) {
14821
+ type.set(prop, value);
14822
+ }
14823
+ for (const superEvent of this._eventSchema.get(superName.toLowerCase())) {
14823
14824
  events.add(superEvent);
14824
14825
  }
14825
14826
  }
@@ -14830,16 +14831,16 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
14830
14831
  events.add(property.substring(1));
14831
14832
  break;
14832
14833
  case '!':
14833
- type[property.substring(1)] = BOOLEAN;
14834
+ type.set(property.substring(1), BOOLEAN);
14834
14835
  break;
14835
14836
  case '#':
14836
- type[property.substring(1)] = NUMBER;
14837
+ type.set(property.substring(1), NUMBER);
14837
14838
  break;
14838
14839
  case '%':
14839
- type[property.substring(1)] = OBJECT;
14840
+ type.set(property.substring(1), OBJECT);
14840
14841
  break;
14841
14842
  default:
14842
- type[property] = STRING;
14843
+ type.set(property, STRING);
14843
14844
  }
14844
14845
  }
14845
14846
  });
@@ -14859,8 +14860,8 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
14859
14860
  return true;
14860
14861
  }
14861
14862
  }
14862
- const elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];
14863
- return !!elementProperties[propName];
14863
+ const elementProperties = this._schema.get(tagName.toLowerCase()) || this._schema.get('unknown');
14864
+ return elementProperties.has(propName);
14864
14865
  }
14865
14866
  hasElement(tagName, schemaMetas) {
14866
14867
  if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) {
@@ -14875,7 +14876,7 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
14875
14876
  return true;
14876
14877
  }
14877
14878
  }
14878
- return !!this._schema[tagName.toLowerCase()];
14879
+ return this._schema.has(tagName.toLowerCase());
14879
14880
  }
14880
14881
  /**
14881
14882
  * securityContext returns the security context for the given property on the given DOM tag.
@@ -14904,7 +14905,7 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
14904
14905
  return ctx ? ctx : SecurityContext.NONE;
14905
14906
  }
14906
14907
  getMappedPropName(propName) {
14907
- return _ATTR_TO_PROP[propName] || propName;
14908
+ return _ATTR_TO_PROP.get(propName) ?? propName;
14908
14909
  }
14909
14910
  getDefaultComponentElementName() {
14910
14911
  return 'ng-component';
@@ -14932,15 +14933,15 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
14932
14933
  }
14933
14934
  }
14934
14935
  allKnownElementNames() {
14935
- return Object.keys(this._schema);
14936
+ return Array.from(this._schema.keys());
14936
14937
  }
14937
14938
  allKnownAttributesOfElement(tagName) {
14938
- const elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];
14939
+ const elementProperties = this._schema.get(tagName.toLowerCase()) || this._schema.get('unknown');
14939
14940
  // Convert properties to attributes.
14940
- return Object.keys(elementProperties).map(prop => _PROP_TO_ATTR[prop] ?? prop);
14941
+ return Array.from(elementProperties.keys()).map(prop => _PROP_TO_ATTR.get(prop) ?? prop);
14941
14942
  }
14942
14943
  allKnownEventsOfElement(tagName) {
14943
- return Array.from(this._eventSchema[tagName.toLowerCase()] ?? []);
14944
+ return Array.from(this._eventSchema.get(tagName.toLowerCase()) ?? []);
14944
14945
  }
14945
14946
  normalizeAnimationStyleProperty(propName) {
14946
14947
  return dashCaseToCamelCase(propName);
@@ -18829,6 +18830,9 @@ function addFeatures(definitionMap, meta) {
18829
18830
  if (meta.hasOwnProperty('template') && meta.isStandalone) {
18830
18831
  features.push(importExpr(Identifiers.StandaloneFeature));
18831
18832
  }
18833
+ if (meta.hostDirectives?.length) {
18834
+ features.push(importExpr(Identifiers.HostDirectivesFeature).callFn([createHostDirectivesFeatureArg(meta.hostDirectives)]));
18835
+ }
18832
18836
  if (features.length) {
18833
18837
  definitionMap.set('features', literalArr(features));
18834
18838
  }
@@ -18941,6 +18945,7 @@ function createComponentType(meta) {
18941
18945
  const typeParams = createBaseDirectiveTypeParams(meta);
18942
18946
  typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
18943
18947
  typeParams.push(expressionType(literal(meta.isStandalone)));
18948
+ typeParams.push(createHostDirectivesType(meta));
18944
18949
  return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));
18945
18950
  }
18946
18951
  /**
@@ -19016,7 +19021,7 @@ function createContentQueriesFunction(queries, constantPool, name) {
19016
19021
  function stringAsType(str) {
19017
19022
  return expressionType(literal(str));
19018
19023
  }
19019
- function stringMapAsType(map) {
19024
+ function stringMapAsLiteralExpression(map) {
19020
19025
  const mapValues = Object.keys(map).map(key => {
19021
19026
  const value = Array.isArray(map[key]) ? map[key][0] : map[key];
19022
19027
  return {
@@ -19025,7 +19030,7 @@ function stringMapAsType(map) {
19025
19030
  quoted: true,
19026
19031
  };
19027
19032
  });
19028
- return expressionType(literalMap(mapValues));
19033
+ return literalMap(mapValues);
19029
19034
  }
19030
19035
  function stringArrayAsType(arr) {
19031
19036
  return arr.length > 0 ? expressionType(literalArr(arr.map(value => literal(value)))) :
@@ -19039,8 +19044,8 @@ function createBaseDirectiveTypeParams(meta) {
19039
19044
  typeWithParameters(meta.type.type, meta.typeArgumentCount),
19040
19045
  selectorForType !== null ? stringAsType(selectorForType) : NONE_TYPE,
19041
19046
  meta.exportAs !== null ? stringArrayAsType(meta.exportAs) : NONE_TYPE,
19042
- stringMapAsType(meta.inputs),
19043
- stringMapAsType(meta.outputs),
19047
+ expressionType(stringMapAsLiteralExpression(meta.inputs)),
19048
+ expressionType(stringMapAsLiteralExpression(meta.outputs)),
19044
19049
  stringArrayAsType(meta.queries.map(q => q.propertyName)),
19045
19050
  ];
19046
19051
  }
@@ -19054,6 +19059,7 @@ function createDirectiveType(meta) {
19054
19059
  // so that future fields align.
19055
19060
  typeParams.push(NONE_TYPE);
19056
19061
  typeParams.push(expressionType(literal(meta.isStandalone)));
19062
+ typeParams.push(createHostDirectivesType(meta));
19057
19063
  return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
19058
19064
  }
19059
19065
  // Define and update any view queries
@@ -19357,6 +19363,68 @@ function compileStyles(styles, selector, hostSelector) {
19357
19363
  return shadowCss.shimCssText(style, selector, hostSelector);
19358
19364
  });
19359
19365
  }
19366
+ function createHostDirectivesType(meta) {
19367
+ if (!meta.hostDirectives?.length) {
19368
+ return NONE_TYPE;
19369
+ }
19370
+ return expressionType(literalArr(meta.hostDirectives.map(hostMeta => literalMap([
19371
+ { key: 'directive', value: typeofExpr(hostMeta.directive.type), quoted: false },
19372
+ { key: 'inputs', value: stringMapAsLiteralExpression(hostMeta.inputs || {}), quoted: false },
19373
+ { key: 'outputs', value: stringMapAsLiteralExpression(hostMeta.outputs || {}), quoted: false },
19374
+ ]))));
19375
+ }
19376
+ function createHostDirectivesFeatureArg(hostDirectives) {
19377
+ const expressions = [];
19378
+ let hasForwardRef = false;
19379
+ for (const current of hostDirectives) {
19380
+ // Use a shorthand if there are no inputs or outputs.
19381
+ if (!current.inputs && !current.outputs) {
19382
+ expressions.push(current.directive.type);
19383
+ }
19384
+ else {
19385
+ const keys = [{ key: 'directive', value: current.directive.type, quoted: false }];
19386
+ if (current.inputs) {
19387
+ const inputsLiteral = createHostDirectivesMappingArray(current.inputs);
19388
+ if (inputsLiteral) {
19389
+ keys.push({ key: 'inputs', value: inputsLiteral, quoted: false });
19390
+ }
19391
+ }
19392
+ if (current.outputs) {
19393
+ const outputsLiteral = createHostDirectivesMappingArray(current.outputs);
19394
+ if (outputsLiteral) {
19395
+ keys.push({ key: 'outputs', value: outputsLiteral, quoted: false });
19396
+ }
19397
+ }
19398
+ expressions.push(literalMap(keys));
19399
+ }
19400
+ if (current.isForwardReference) {
19401
+ hasForwardRef = true;
19402
+ }
19403
+ }
19404
+ // If there's a forward reference, we generate a `function() { return [HostDir] }`,
19405
+ // otherwise we can save some bytes by using a plain array, e.g. `[HostDir]`.
19406
+ return hasForwardRef ?
19407
+ new FunctionExpr([], [new ReturnStatement(literalArr(expressions))]) :
19408
+ literalArr(expressions);
19409
+ }
19410
+ /**
19411
+ * Converts an input/output mapping object literal into an array where the even keys are the
19412
+ * public name of the binding and the odd ones are the name it was aliased to. E.g.
19413
+ * `{inputOne: 'aliasOne', inputTwo: 'aliasTwo'}` will become
19414
+ * `['inputOne', 'aliasOne', 'inputTwo', 'aliasTwo']`.
19415
+ *
19416
+ * This conversion is necessary, because hosts bind to the public name of the host directive and
19417
+ * keeping the mapping in an object literal will break for apps using property renaming.
19418
+ */
19419
+ function createHostDirectivesMappingArray(mapping) {
19420
+ const elements = [];
19421
+ for (const publicName in mapping) {
19422
+ if (mapping.hasOwnProperty(publicName)) {
19423
+ elements.push(literal(publicName), literal(mapping[publicName]));
19424
+ }
19425
+ }
19426
+ return elements.length > 0 ? literalArr(elements) : null;
19427
+ }
19360
19428
 
19361
19429
  /**
19362
19430
  * @license
@@ -19638,6 +19706,7 @@ function convertDirectiveFacadeToMetadata(facade) {
19638
19706
  providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,
19639
19707
  viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),
19640
19708
  fullInheritance: false,
19709
+ hostDirectives: convertHostDirectivesToMetadata(facade),
19641
19710
  };
19642
19711
  }
19643
19712
  function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
@@ -19661,6 +19730,7 @@ function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
19661
19730
  typeArgumentCount: 0,
19662
19731
  fullInheritance: false,
19663
19732
  isStandalone: declaration.isStandalone ?? false,
19733
+ hostDirectives: convertHostDirectivesToMetadata(declaration),
19664
19734
  };
19665
19735
  }
19666
19736
  function convertHostDeclarationToMetadata(host = {}) {
@@ -19674,6 +19744,26 @@ function convertHostDeclarationToMetadata(host = {}) {
19674
19744
  },
19675
19745
  };
19676
19746
  }
19747
+ function convertHostDirectivesToMetadata(metadata) {
19748
+ if (metadata.hostDirectives?.length) {
19749
+ return metadata.hostDirectives.map(hostDirective => {
19750
+ return typeof hostDirective === 'function' ?
19751
+ {
19752
+ directive: wrapReference(hostDirective),
19753
+ inputs: null,
19754
+ outputs: null,
19755
+ isForwardReference: false
19756
+ } :
19757
+ {
19758
+ directive: wrapReference(hostDirective.directive),
19759
+ isForwardReference: false,
19760
+ inputs: hostDirective.inputs ? parseInputOutputs(hostDirective.inputs) : null,
19761
+ outputs: hostDirective.outputs ? parseInputOutputs(hostDirective.outputs) : null,
19762
+ };
19763
+ });
19764
+ }
19765
+ return null;
19766
+ }
19677
19767
  function convertOpaqueValuesToExpressions(obj) {
19678
19768
  const result = {};
19679
19769
  for (const key of Object.keys(obj)) {
@@ -19904,7 +19994,7 @@ function publishFacade(global) {
19904
19994
  * Use of this source code is governed by an MIT-style license that can be
19905
19995
  * found in the LICENSE file at https://angular.io/license
19906
19996
  */
19907
- const VERSION = new Version('14.2.0');
19997
+ const VERSION = new Version('15.0.0-next.1');
19908
19998
 
19909
19999
  /**
19910
20000
  * @license
@@ -21606,7 +21696,7 @@ class DirectiveBinder {
21606
21696
  const cssSelector = createCssSelector(elementName, getAttrsForDirectiveMatching(node));
21607
21697
  // Next, use the `SelectorMatcher` to get the list of directives on the node.
21608
21698
  const directives = [];
21609
- this.matcher.match(cssSelector, (_, directive) => directives.push(directive));
21699
+ this.matcher.match(cssSelector, (_selector, results) => directives.push(...results));
21610
21700
  if (directives.length > 0) {
21611
21701
  this.directives.set(node, directives);
21612
21702
  }
@@ -21937,7 +22027,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21937
22027
  function compileDeclareClassMetadata(metadata) {
21938
22028
  const definitionMap = new DefinitionMap();
21939
22029
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21940
- definitionMap.set('version', literal('14.2.0'));
22030
+ definitionMap.set('version', literal('15.0.0-next.1'));
21941
22031
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21942
22032
  definitionMap.set('type', metadata.type);
21943
22033
  definitionMap.set('decorators', metadata.decorators);
@@ -22054,7 +22144,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
22054
22144
  function createDirectiveDefinitionMap(meta) {
22055
22145
  const definitionMap = new DefinitionMap();
22056
22146
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
22057
- definitionMap.set('version', literal('14.2.0'));
22147
+ definitionMap.set('version', literal('15.0.0-next.1'));
22058
22148
  // e.g. `type: MyDirective`
22059
22149
  definitionMap.set('type', meta.internalType);
22060
22150
  if (meta.isStandalone) {
@@ -22083,6 +22173,9 @@ function createDirectiveDefinitionMap(meta) {
22083
22173
  if (meta.lifecycle.usesOnChanges) {
22084
22174
  definitionMap.set('usesOnChanges', literal(true));
22085
22175
  }
22176
+ if (meta.hostDirectives?.length) {
22177
+ definitionMap.set('hostDirectives', createHostDirectives(meta.hostDirectives));
22178
+ }
22086
22179
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22087
22180
  return definitionMap;
22088
22181
  }
@@ -22137,6 +22230,28 @@ function compileHostMetadata(meta) {
22137
22230
  return null;
22138
22231
  }
22139
22232
  }
22233
+ function createHostDirectives(hostDirectives) {
22234
+ const expressions = hostDirectives.map(current => {
22235
+ const keys = [{
22236
+ key: 'directive',
22237
+ value: current.isForwardReference ? generateForwardRef(current.directive.type) :
22238
+ current.directive.type,
22239
+ quoted: false
22240
+ }];
22241
+ const inputsLiteral = current.inputs ? createHostDirectivesMappingArray(current.inputs) : null;
22242
+ const outputsLiteral = current.outputs ? createHostDirectivesMappingArray(current.outputs) : null;
22243
+ if (inputsLiteral) {
22244
+ keys.push({ key: 'inputs', value: inputsLiteral, quoted: false });
22245
+ }
22246
+ if (outputsLiteral) {
22247
+ keys.push({ key: 'outputs', value: outputsLiteral, quoted: false });
22248
+ }
22249
+ return literalMap(keys);
22250
+ });
22251
+ // If there's a forward reference, we generate a `function() { return [{directive: HostDir}] }`,
22252
+ // otherwise we can save some bytes by using a plain array, e.g. `[{directive: HostDir}]`.
22253
+ return literalArr(expressions);
22254
+ }
22140
22255
 
22141
22256
  /**
22142
22257
  * @license
@@ -22268,7 +22383,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
22268
22383
  function compileDeclareFactoryFunction(meta) {
22269
22384
  const definitionMap = new DefinitionMap();
22270
22385
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
22271
- definitionMap.set('version', literal('14.2.0'));
22386
+ definitionMap.set('version', literal('15.0.0-next.1'));
22272
22387
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22273
22388
  definitionMap.set('type', meta.internalType);
22274
22389
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -22310,7 +22425,7 @@ function compileDeclareInjectableFromMetadata(meta) {
22310
22425
  function createInjectableDefinitionMap(meta) {
22311
22426
  const definitionMap = new DefinitionMap();
22312
22427
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
22313
- definitionMap.set('version', literal('14.2.0'));
22428
+ definitionMap.set('version', literal('15.0.0-next.1'));
22314
22429
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22315
22430
  definitionMap.set('type', meta.internalType);
22316
22431
  // Only generate providedIn property if it has a non-null value
@@ -22368,7 +22483,7 @@ function compileDeclareInjectorFromMetadata(meta) {
22368
22483
  function createInjectorDefinitionMap(meta) {
22369
22484
  const definitionMap = new DefinitionMap();
22370
22485
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22371
- definitionMap.set('version', literal('14.2.0'));
22486
+ definitionMap.set('version', literal('15.0.0-next.1'));
22372
22487
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22373
22488
  definitionMap.set('type', meta.internalType);
22374
22489
  definitionMap.set('providers', meta.providers);
@@ -22405,7 +22520,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
22405
22520
  function createNgModuleDefinitionMap(meta) {
22406
22521
  const definitionMap = new DefinitionMap();
22407
22522
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22408
- definitionMap.set('version', literal('14.2.0'));
22523
+ definitionMap.set('version', literal('15.0.0-next.1'));
22409
22524
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22410
22525
  definitionMap.set('type', meta.internalType);
22411
22526
  // We only generate the keys in the metadata if the arrays contain values.
@@ -22463,7 +22578,7 @@ function compileDeclarePipeFromMetadata(meta) {
22463
22578
  function createPipeDefinitionMap(meta) {
22464
22579
  const definitionMap = new DefinitionMap();
22465
22580
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22466
- definitionMap.set('version', literal('14.2.0'));
22581
+ definitionMap.set('version', literal('15.0.0-next.1'));
22467
22582
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22468
22583
  // e.g. `type: MyPipe`
22469
22584
  definitionMap.set('type', meta.internalType);