kosich / rxjs-autorun

Re-evaluate an expression whenever Observable in it emits
MIT License
33 stars 2 forks source link

Complete/error tracked expression with inner observables #4

Closed kosich closed 3 years ago

kosich commented 3 years ago

If underlying observables of tracked expression complete — the resulting observable should complete too, e.g:

const o = of(1);
const r = run(() => $(o));
r.subscribe({
  next: v => console.log(v),
  complete: () => console.log('DONE')
});

Current behavior

> 1

Expected behavior

> 1
> DONE

(same goes with errors)

kosich commented 3 years ago

Resolved in #5