I have a situation where I possess an access token, and if it is present, then I will return it as an observable of type string:
if (this.accessToken){
return of(this.accessToken);
}
However, I recently realized that the of
method has been deprecated with the message:
of is deprecated: use scheduled instead 'scheduled([a, b, c], scheduler)' (deprecation)
The new syntax using scheduled
seems more complex. Does anyone know the equivalent version of the simple of
using scheduled
? The name of the keyword makes it challenging to search for information on it.
Appreciate any insights!