xstateFunctionstoObservertoObserver CallabletoObserver<T>(nextHandler?: Observer<T> | (value: T) => void, errorHandler?: (error: any) => void, completionHandler?: () => void): Observer<T>Type parametersTParametersoptionalnextHandler: Observer<T> | (value: T) => voidoptionalerrorHandler: (error: any) => voidoptionalcompletionHandler: () => voidReturns Observer<T>