import { Observable, Subject } from 'rxjs'; /** Writes serialized log (e.g. json) to the target (e.g. stdout) */ export interface Target { name: string; write: (serializedData: any) => void; } /** Standard targets */ export declare namespace Target { const stderr: { name: string; write(serializedData: string): void; }; const stdout: { name: string; write(serializedData: string): void; }; /** Creates a target that emits logs as observable events, using a Subject * @param name - name of the target. Defaults to 'observable' * @param subject - the Subject to use to emit observable events. If not provided, creates a standard Subject. E.g. you can pass a ReplaySubject if you need to replay values with a specific buffer size * @param T - the type of serialized data that will be emitted from the Observable * @returns object containing the target and the observable the target will emit to */ function Observable(name?: string, subject?: Subject): { observable: Observable; target: Target; }; }