Represents a state describing a view to be rendered or a view already rendered. The state holds the parameterization indicating when a view should be rendered and destroyed, and also holds the rendered view if there is any.
States are created every time an ObserverCall is emitted. They are used by *onObserver
directives
to understand how a view should be rendered and initiate a commitment to render flow.
The state is immutable.
core/src/rxjs/on-observer/abstraction/types/view-render-commitment.ts
Methods |
Accessors |
Static create | ||||||||||||||||
create(call: ObserverCall<T>, showAfter: number, showFor: number)
|
||||||||||||||||
Type parameters:
|
||||||||||||||||
Creates a new state representing a new, fresh, commitment to render. Should be used in multi-view mode, or in single-view mode when there is nothing rendered.
Parameters:
Returns:
ViewRenderCommitment<T>
A new state representing fresh commitment to render. |
||||||||||||||||
Static rendered | ||||||||||||
rendered(state: ViewRenderCommitment<T>, view: RenderedView<T>)
|
||||||||||||
Type parameters:
|
||||||||||||
Clones the state and assigns it with a recently rendered view. Should be used whenever a view is rendered.
Parameters:
Returns:
ViewRenderCommitment<T>
A new state with the rendered view. |
||||||||||||
Static update | ||||||||||||
update(state: ViewRenderCommitment<T>, call: ObserverCall<T>)
|
||||||||||||
Type parameters:
|
||||||||||||
Clones the state and replaces the call which triggered it. Should be used in single-view mode when the view is already rendered and a new call is intercepted to make sure the latest emitted value is specified.
Parameters:
Returns:
ViewRenderCommitment<T>
A new state representing an updated commitment to render. |
||||||||||||
destroyAt |
getdestroyAt()
|
The timestamp at which the view should be destroyed.
Returns:
number | undefined
|
isRendered |
getisRendered()
|
Returns:
boolean
|
autoDestroys |
getautoDestroys()
|
Returns:
boolean
|