Skip to content
Version: xstate@5.0.0

toObserver() function​

Signature:

export declare function toObserver<T>(nextHandler?: Observer<T> | ((value: T) => void), errorHandler?: (error: any) => void, completionHandler?: () => void): Observer<T>;

Parameters​

ParameterTypeDescription
nextHandlerObserver<T> | ((value: T) => void)(Optional)
errorHandler(error: any) => void(Optional)
completionHandler() => void(Optional)

Returns:

Observer<T>