import { Injector } from '@angular/core';
import { Observable } from 'rxjs';

type RxMethodRef = {
    destroy: () => void;
};
type RxMethod<Input> = ((input: Input | (() => Input) | Observable<Input>, config?: {
    injector?: Injector;
}) => RxMethodRef) & RxMethodRef;
declare function rxMethod<Input>(generator: (source$: Observable<Input>) => Observable<unknown>, config?: {
    injector?: Injector;
}): RxMethod<Input>;

export { rxMethod };
export type { RxMethod };
