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

Function getMinimumDurationForState

packages/core/src/defer/utils.ts:101–111  ·  view source on GitHub ↗
(
  tDetails: TDeferBlockDetails,
  currentState: DeferBlockState,
)

Source from the content-addressed store, hash-verified

99 * not specified - returns `null`.
100 */
101export function getMinimumDurationForState(
102 tDetails: TDeferBlockDetails,
103 currentState: DeferBlockState,
104): number | null {
105 if (currentState === DeferBlockState.Placeholder) {
106 return tDetails.placeholderBlockConfig?.[MINIMUM_SLOT] ?? null;
107 } else if (currentState === DeferBlockState.Loading) {
108 return tDetails.loadingBlockConfig?.[MINIMUM_SLOT] ?? null;
109 }
110 return null;
111}
112
113/** Retrieves the value of the `after` parameter on the @loading block. */
114export function getLoadingBlockAfter(tDetails: TDeferBlockDetails): number | null {

Callers 2

renderDeferBlockStateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…