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

Function defer

packages/compiler/src/template/pipeline/src/instruction.ts:279–315  ·  view source on GitHub ↗
(
  selfSlot: number,
  primarySlot: number,
  dependencyResolverFn: o.Expression | null,
  loadingSlot: number | null,
  placeholderSlot: number | null,
  errorSlot: number | null,
  loadingConfig: o.Expression | null,
  placeholderConfig: o.Expression | null,
  enableTimerScheduling: boolean,
  sourceSpan: ParseSourceSpan | null,
  flags: ir.TDeferDetailsFlags | null,
)

Source from the content-addressed store, hash-verified

277}
278
279export function defer(
280 selfSlot: number,
281 primarySlot: number,
282 dependencyResolverFn: o.Expression | null,
283 loadingSlot: number | null,
284 placeholderSlot: number | null,
285 errorSlot: number | null,
286 loadingConfig: o.Expression | null,
287 placeholderConfig: o.Expression | null,
288 enableTimerScheduling: boolean,
289 sourceSpan: ParseSourceSpan | null,
290 flags: ir.TDeferDetailsFlags | null,
291): ir.CreateOp {
292 const args: Array<o.Expression> = [
293 o.literal(selfSlot),
294 o.literal(primarySlot),
295 dependencyResolverFn ?? o.literal(null),
296 o.literal(loadingSlot),
297 o.literal(placeholderSlot),
298 o.literal(errorSlot),
299 loadingConfig ?? o.literal(null),
300 placeholderConfig ?? o.literal(null),
301 enableTimerScheduling ? o.importExpr(Identifiers.deferEnableTimerScheduling) : o.literal(null),
302 o.literal(flags),
303 ];
304
305 let expr: o.Expression;
306 while (
307 (expr = args[args.length - 1]) !== null &&
308 expr instanceof o.LiteralExpr &&
309 expr.value === null
310 ) {
311 args.pop();
312 }
313
314 return call(Identifiers.defer, args, sourceSpan);
315}
316
317export function enableIncrementalHydrationRuntime(sourceSpan: ParseSourceSpan | null): ir.CreateOp {
318 return call(Identifiers.enableIncrementalHydrationRuntime, [], sourceSpan);

Callers 4

runCanActivateFunction · 0.85
runCanActivateChildFunction · 0.85
runResolveFunction · 0.85
rxjs.defer.spec.tsFile · 0.85

Calls 2

callFunction · 0.85
popMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…