Type Alias: CopyRx_Transform<TIn, TOut, ThisArg>
CopyRx_Transform<
TIn,TOut,ThisArg> = (this,newValue,output) =>ValueOrPromise<TOut> | typeofIGNORE_UPDATE_SYMBOL
Defined in: packages/rx/src/copyRx.ts:73
Value modifier function definition for copyRx.
This function is executed for each new value emitted by the input observable(s).
thiscontext: Thethiscontext within thetransformfunction can be set using theoptions.thisArg- Ignoring updates: Returning copyRx.IGNORE will prevent the output observable from emitting the current update.
- Asynchronous transformations: If a
Promiseis returned, the output observable will only be updated once the promise resolves. However, this can introduce race conditions if new input values arrive before the previous promise resolves. To prevent such race conditions, enable thetransformSequentiallyflag inCopyRx_Options. - Error handling: If the
transformfunction throws an error, the update is gracefully ignored, and theonErrorcallback (if provided inCopyRx_Options) will be invoked.
Type Parameters
TIn
TIn = unknown
TOut
TOut = TIn
ThisArg
ThisArg = unknown
Parameters
this
ThisArg
newValue
TIn
output
Observable<TOut>
Returns
ValueOrPromise<TOut> | typeof IGNORE_UPDATE_SYMBOL