// RxJS v6+import { interval } from'rxjs';import { throttle, map } from'rxjs/operators';//emit value every 1 secondconstsource=interval(1000);//incrementally increase the time to resolve based on sourceconstpromise= val =>newPromise(resolve =>setTimeout(() =>resolve(`Resolved: ${val}`), val *100) );//when promise resolves emit item from sourceconstexample=source.pipe(throttle(promise),map(val =>`Throttled off Promise: ${val}`));constsubscribe=example.subscribe(val =>console.log(val));