/** * @license Use of this source code is governed by an MIT-style license that * can be found in the LICENSE file at https://github.com/cartant/rxjs-etc */ import { Observable, OperatorFunction } from "rxjs"; export function takeSync(): OperatorFunction { return (source) => new Observable((subscriber) => { const subscription = source.subscribe(subscriber); subscriber.complete(); return subscription; }); }