* 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, )
| 423 | * or an error state (represented as `3`). |
| 424 | */ |
| 425 | function isValidStateChange( |
| 426 | currentState: DeferBlockState | DeferBlockInternalState, |
| 427 | newState: DeferBlockState, |
| 428 | ): boolean { |
| 429 | return currentState < newState; |
| 430 | } |
| 431 | |
| 432 | /** Utility function to render placeholder content (if present) */ |
| 433 | export function renderPlaceholder(lView: LView, tNode: TNode) { |
no outgoing calls
no test coverage detected