(type: Type<any>, importingModule: Type<any>)
| 396 | } |
| 397 | |
| 398 | function verifySemanticsOfNgModuleImport(type: Type<any>, importingModule: Type<any>) { |
| 399 | type = resolveForwardRef(type); |
| 400 | |
| 401 | const directiveDef = getComponentDef(type) || getDirectiveDef(type); |
| 402 | if (directiveDef !== null && !directiveDef.standalone) { |
| 403 | throw new Error( |
| 404 | `Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`, |
| 405 | ); |
| 406 | } |
| 407 | |
| 408 | const pipeDef = getPipeDef(type); |
| 409 | if (pipeDef !== null && !pipeDef.standalone) { |
| 410 | throw new Error( |
| 411 | `Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`, |
| 412 | ); |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | function unwrapModuleWithProvidersImports( |
no test coverage detected
searching dependent graphs…