MCPcopy
hub / github.com/angular/angular / getMultipleMatchingPipesMessage

Function getMultipleMatchingPipesMessage

packages/core/src/render3/pipe.ts:125–136  ·  view source on GitHub ↗

* Generates a helpful error message for the user when multiple pipes match the name. * * @param name Name of the pipe * @returns The error message

(name: string)

Source from the content-addressed store, hash-verified

123 * @returns The error message
124 */
125function getMultipleMatchingPipesMessage(name: string) {
126 const lView = getLView();
127 const declarationLView = lView[DECLARATION_COMPONENT_VIEW] as LView<Type<unknown>>;
128 const context = declarationLView[CONTEXT];
129 const hostIsStandalone = isHostComponentStandalone(lView);
130 const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';
131 const verifyMessage = `check ${
132 hostIsStandalone ? "'@Component.imports' of this component" : 'the imports of this module'
133 }`;
134 const errorMessage = `Multiple pipes match the name \`${name}\`${componentInfoMessage}. ${verifyMessage}`;
135 return errorMessage;
136}
137
138/**
139 * Generates a helpful error message for the user when a pipe is not found.

Callers 1

getPipeDefFunction · 0.85

Calls 2

getLViewFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…