Skip to content

Function: createBehaviorSubjectBuffer()

createBehaviorSubjectBuffer<T>(initialValue?): SubjectBuffer<T>

Defined in: primitives/buffer.ts:269

Creates a BehaviorSubject-like buffer.

This implementation wraps an underlying SubjectBuffer to provide the specific behavior of a BehaviorSubject: it holds a current value and emits that value immediately to any new reader upon attachment.

Type Parameters

T

T = any

The type of the value the buffer will hold.

Parameters

initialValue?

T

The optional initial value to hold upon creation.

Returns

SubjectBuffer<T>

A new SingleValueBuffer instance.

Released under the MIT License.