import { Observable, ReplaySubject, Subject } from 'rxjs'; import { V as ValueConfig } from './types-BM3BcWj1.js'; export { f as AddObservableSpyMethods, n as CompleteValueConfig, E as ErrorValueConfig, N as NextValueConfig, K as ValueConfigPerCall } from './types-BM3BcWj1.js'; import 'vitest'; /** * Observable-returning spy helpers. * * Attaches `nextWith` / `nextWithValues` / `throwWith` / `complete` / … to * function spies, `calledWith` objects and observable properties, all backed by * a controllable `ReplaySubject`. */ declare function createObservableWithValues(valuesConfigs: ValueConfig[]): Observable; declare function createObservableWithValues(valuesConfigs: ValueConfig[], config: { returnSubject: true; }): { values$: Observable; subject: ReplaySubject; }; /** * `vitest-auto-spy/rxjs` — the optional rxjs-powered observable layer. * * ```ts * import 'vitest-auto-spy/rxjs'; // once, e.g. in your test setup * ``` * * Importing this module registers the observable spy helpers with the * framework-agnostic core (via inversion of control), enabling * `observablePropsToSpyOn`, `nextWith`, `nextWithValues`, `throwWith`, * `complete`, `returnSubject`, `nextWithPerCall`, … on spies created through * `createSpyFromClass`. Without this import the core stays completely free of any * runtime rxjs dependency. * * It also re-exports {@link createObservableWithValues} and the observable type * surface for convenience. * * **This module is also where rxjs enters the type system, and the only one.** The core's * declarations name no rxjs type — see `ObservableLike` in `lib/types.ts` for the measurement that * forced it — so `returnSubject()` is typed `SubjectOf`, which is a structural `SubjectLike` * until the augmentation below merges rxjs's own `Subject` into `AutoSpyRxjsTypes`. Importing * this module is what registers the helpers at runtime *and* what makes them rxjs-typed; the two * cannot drift apart, because it is one import. */ declare module 'vitest-auto-spy' { interface AutoSpyRxjsTypes { subject: Subject; } } export { ValueConfig, createObservableWithValues };