* 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)
| 123 | * @returns The error message |
| 124 | */ |
| 125 | function 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. |
no test coverage detected
searching dependent graphs…