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

Function createCtorDepType

packages/compiler/src/render3/r3_factory.ts:299–319  ·  view source on GitHub ↗
(dep: R3DependencyMetadata)

Source from the content-addressed store, hash-verified

297}
298
299function createCtorDepType(dep: R3DependencyMetadata): o.LiteralMapExpr | null {
300 const entries: {key: string; quoted: boolean; value: o.Expression}[] = [];
301
302 if (dep.attributeNameType !== null) {
303 entries.push({key: 'attribute', value: dep.attributeNameType, quoted: false});
304 }
305 if (dep.optional) {
306 entries.push({key: 'optional', value: o.literal(true), quoted: false});
307 }
308 if (dep.host) {
309 entries.push({key: 'host', value: o.literal(true), quoted: false});
310 }
311 if (dep.self) {
312 entries.push({key: 'self', value: o.literal(true), quoted: false});
313 }
314 if (dep.skipSelf) {
315 entries.push({key: 'skipSelf', value: o.literal(true), quoted: false});
316 }
317
318 return entries.length > 0 ? o.literalMap(entries) : null;
319}
320
321export function isDelegatedFactoryMetadata(
322 meta: R3FactoryMetadata,

Callers 1

createCtorDepsTypeFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…