( tDetails: TDeferBlockDetails, currentState: DeferBlockState, )
| 99 | * not specified - returns `null`. |
| 100 | */ |
| 101 | export 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. */ |
| 114 | export function getLoadingBlockAfter(tDetails: TDeferBlockDetails): number | null { |
no outgoing calls
no test coverage detected
searching dependent graphs…