Skip to content
tRPC

Partners

Interface: BehaviorSubject<TValue>

On this page

Defined in: packages/server/src/observable/behaviorSubject.ts:5

An observable that holds a current value.

Extends

Type Parameters

Type Parameter
TValue

Properties

get()

get: () => TValue

Defined in: packages/server/src/observable/behaviorSubject.ts:13

The current value.

Returns

TValue


next()

next: (value) => void

Defined in: packages/server/src/observable/behaviorSubject.ts:11

Sets the value and sends it to subscribers, if it changed. A subscriber that throws doesn't stop the others; its error is rethrown asynchronously.

Parameters

ParameterType
valueTValue

Returns

void


observable

observable: Observable<TValue, never>

Defined in: packages/server/src/observable/behaviorSubject.ts:6

Methods

pipe()

Call Signature

pipe(): Observable<TValue, never>

Defined in: packages/server/src/observable/types.ts:22

Returns an observable with the operators applied, in order.

Returns

Observable<TValue, never>

Inherited from

Observable.pipe

Call Signature

pipe<TValue1, TError1>(op1): Observable<TValue1, TError1>

Defined in: packages/server/src/observable/types.ts:23

Type Parameters
Type Parameter
TValue1
TError1
Parameters
ParameterType
op1OperatorFunction<TValue, never, TValue1, TError1>
Returns

Observable<TValue1, TError1>

Inherited from

Observable.pipe

Call Signature

pipe<TValue1, TError1, TValue2, TError2>(op1, op2): Observable<TValue2, TError2>

Defined in: packages/server/src/observable/types.ts:26

Type Parameters
Type Parameter
TValue1
TError1
TValue2
TError2
Parameters
ParameterType
op1OperatorFunction<TValue, never, TValue1, TError1>
op2OperatorFunction<TValue1, TError1, TValue2, TError2>
Returns

Observable<TValue2, TError2>

Inherited from

Observable.pipe

Call Signature

pipe<TValue1, TError1, TValue2, TError2, TValue3, TError3>(op1, op2, op3): Observable<TValue2, TError2>

Defined in: packages/server/src/observable/types.ts:30

Type Parameters
Type Parameter
TValue1
TError1
TValue2
TError2
TValue3
TError3
Parameters
ParameterType
op1OperatorFunction<TValue, never, TValue1, TError1>
op2OperatorFunction<TValue1, TError1, TValue2, TError2>
op3OperatorFunction<TValue2, TError2, TValue3, TError3>
Returns

Observable<TValue2, TError2>

Inherited from

Observable.pipe

Call Signature

pipe<TValue1, TError1, TValue2, TError2, TValue3, TError3, TValue4, TError4>(op1, op2, op3, op4): Observable<TValue2, TError2>

Defined in: packages/server/src/observable/types.ts:35

Type Parameters
Type Parameter
TValue1
TError1
TValue2
TError2
TValue3
TError3
TValue4
TError4
Parameters
ParameterType
op1OperatorFunction<TValue, never, TValue1, TError1>
op2OperatorFunction<TValue1, TError1, TValue2, TError2>
op3OperatorFunction<TValue2, TError2, TValue3, TError3>
op4OperatorFunction<TValue3, TError3, TValue4, TError4>
Returns

Observable<TValue2, TError2>

Inherited from

Observable.pipe

Call Signature

pipe<TValue1, TError1, TValue2, TError2, TValue3, TError3, TValue4, TError4, TValue5, TError5>(op1, op2, op3, op4, op5): Observable<TValue2, TError2>

Defined in: packages/server/src/observable/types.ts:41

Type Parameters
Type Parameter
TValue1
TError1
TValue2
TError2
TValue3
TError3
TValue4
TError4
TValue5
TError5
Parameters
ParameterType
op1OperatorFunction<TValue, never, TValue1, TError1>
op2OperatorFunction<TValue1, TError1, TValue2, TError2>
op3OperatorFunction<TValue2, TError2, TValue3, TError3>
op4OperatorFunction<TValue3, TError3, TValue4, TError4>
op5OperatorFunction<TValue4, TError4, TValue5, TError5>
Returns

Observable<TValue2, TError2>

Inherited from

Observable.pipe


subscribe()

subscribe(observer): Unsubscribable

Defined in: packages/server/src/observable/types.ts:10

Starts the observable, sending what it emits to observer.

Parameters

ParameterType
observerPartial<Observer<TValue, never>>

Returns

Unsubscribable

Inherited from

Observable.subscribe