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

Function mapDeps

packages/compiler-cli/preprocessor/src/processor.ts:280–299  ·  view source on GitHub ↗
(
  deps: nga.DependencyMetadata[],
  content: MagicString | string,
  guards: nga.SpanMetadata[] = [],
)

Source from the content-addressed store, hash-verified

278}
279
280function mapDeps(
281 deps: nga.DependencyMetadata[],
282 content: MagicString | string,
283 guards: nga.SpanMetadata[] = [],
284): R3DependencyMetadata[] {
285 return deps.map((dep): R3DependencyMetadata => {
286 let token: o.Expression | null = null;
287 if (dep.tokenSpan) {
288 token = rawSlice(content, dep.tokenSpan, guards);
289 }
290 return {
291 token,
292 attributeNameType: null,
293 host: dep.host,
294 optional: dep.optional,
295 self: dep.self,
296 skipSelf: dep.skipSelf,
297 };
298 });
299}
300
301export async function processFile(
302 rawCtx: HybridCompilerContext,

Callers 1

compileClassesFunction · 0.85

Calls 2

rawSliceFunction · 0.85
mapMethod · 0.80

Tested by

no test coverage detected