* Checks whether we can transition to the next state. * * We transition to the next state if the previous state was represented * with a number that is less than the next state. For example, if the current * state is "loading" (represented as `1`), we should not show a placeholder * (represente
( currentState: DeferBlockState | DeferBlockInternalState, newState: DeferBlockState, )
| 407 | * or an error state (represented as `3`). |
| 408 | */ |
| 409 | function isValidStateChange( |
| 410 | currentState: DeferBlockState | DeferBlockInternalState, |
| 411 | newState: DeferBlockState, |
| 412 | ): boolean { |
| 413 | return currentState < newState; |
| 414 | } |
| 415 | |
| 416 | /** Utility function to render placeholder content (if present) */ |
| 417 | export function renderPlaceholder(lView: LView, tNode: TNode) { |
no outgoing calls
no test coverage detected
searching dependent graphs…