MCPcopy Create free account
hub / github.com/angular/angular / directiveDefs

Function directiveDefs

packages/core/src/render3/jit/directive.ts:249–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247 let cachedDirectiveDefs: DirectiveDefList | null = null;
248 let cachedPipeDefs: PipeDefList | null = null;
249 const directiveDefs = () => {
250 if (ngDevMode) {
251 for (const rawDep of imports) {
252 verifyStandaloneImport(rawDep, type);
253 }
254 }
255
256 if (!isComponent(type)) {
257 return [];
258 }
259
260 const scope = depsTracker.getStandaloneComponentScope(type, imports);
261
262 return [...scope.compilation.directives]
263 .map((p) => (getComponentDef(p) || getDirectiveDef(p))!)
264 .filter((d) => d !== null);
265 };
266
267 const pipeDefs = () => {
268 if (ngDevMode) {

Callers

nothing calls this directly

Calls 7

verifyStandaloneImportFunction · 0.90
isComponentFunction · 0.90
getComponentDefFunction · 0.90
getDirectiveDefFunction · 0.90
mapMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected