I am looking to create a function in Angular and TypeScript that will return an Observable for subscription. This Observable should emit the result of a Promise every three seconds.
Currently, I have a function that returns a Promise, but I need it to return the outcome of that Promise:
public static getWifiInfos(): Observable<Promise<ConnectionInfo>> {
return Observable
.interval(3000)
.map(() => Hotspot.getConnectionInfo());
}
Any suggestions on how to achieve this desired functionality?