MCPcopy Index your code
hub / github.com/angular/angular / compileDependency

Function compileDependency

packages/compiler/src/render3/partial/util.ts:72–91  ·  view source on GitHub ↗
(dep: R3DependencyMetadata)

Source from the content-addressed store, hash-verified

70}
71
72export function compileDependency(dep: R3DependencyMetadata): o.LiteralMapExpr {
73 const depMeta = new DefinitionMap<R3DeclareDependencyMetadata>();
74 depMeta.set('token', dep.token);
75 if (dep.attributeNameType !== null) {
76 depMeta.set('attribute', o.literal(true));
77 }
78 if (dep.host) {
79 depMeta.set('host', o.literal(true));
80 }
81 if (dep.optional) {
82 depMeta.set('optional', o.literal(true));
83 }
84 if (dep.self) {
85 depMeta.set('self', o.literal(true));
86 }
87 if (dep.skipSelf) {
88 depMeta.set('skipSelf', o.literal(true));
89 }
90 return depMeta.toLiteralMap();
91}

Callers

nothing calls this directly

Calls 2

setMethod · 0.95
toLiteralMapMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…