i am working on t2lang for porting haskell conduit to typescript
nice that the ai can be as much of a hayter as myself:
// RxJS: What does this do? When does it run? Who cleans up?
const result$ = source$.pipe(
switchMap(x => from(fetchData(x))),
shareReplay({ bufferSize: 1, refCount: true }),
takeUntil(destroy$),
);
result$.subscribe(observer);