ixfx
    Preparing search index...

    Variable OpsConst

    Ops: {
        annotate: <V, TAnnotation>(
            annotator: (input: V) => V & TAnnotation,
        ) => <In, TAnnotation>(
            source: ReactiveOrSource<In>,
        ) => Reactive<{ annotation: TAnnotation; value: In }>;
        annotateWithOp: <TIn, TAnnotation>(
            annotatorOp: ReactiveOp<TIn, TAnnotation>,
        ) => <In, TAnnotation>(
            source: ReactiveOrSource<In>,
        ) => Reactive<{ annotation: TAnnotation; value: In }>;
        average: <TIn = number>(
            options?: OpMathOptions,
        ) => (source: ReactiveOrSource<TIn>) => Reactive<number>;
        chunk: <V>(options: Partial<ChunkOptions>) => ReactiveOp<V, V[]>;
        cloneFromFields: <V>() => ReactiveOp<V, V>;
        combineLatestToArray: <const T extends readonly ReactiveOrSource<any>[]>(
            options?: Partial<Rx.CombineLatestOptions>,
        ) => (sources: T) => Reactive<RxValueTypes<T>>;
        combineLatestToObject: <
            const T extends Record<string, ReactiveOrSource<any>>,
        >(
            options?: Partial<Rx.CombineLatestOptions>,
        ) => (reactiveSources: T) => CombineLatestToObject<T>;
        debounce: <V>(options: Partial<DebounceOptions>) => ReactiveOp<V, V>;
        drop: <V>(
            predicate: (value: V) => boolean,
        ) => <In>(source: ReactiveOrSource<In>) => Reactive<In>;
        elapsed: <V>() => ReactiveOp<V, number>;
        field: <TSource extends object, TFieldType>(
            fieldName: keyof TSource,
            options: FieldOptions<TSource, TFieldType>,
        ) => (source: ReactiveOrSource<TSource>) => Reactive<TFieldType>;
        filter: <V>(
            predicate: (value: V) => boolean,
        ) => <In>(source: ReactiveOrSource<In>) => Reactive<In>;
        interpolate: <TIn = number>(
            options?: Partial<OpInterpolateOptions>,
        ) => (source: ReactiveOrSource<TIn>) => ReactivePingable<number>;
        max: <TIn = number>(
            options?: OpMathOptions,
        ) => (source: ReactiveOrSource<TIn>) => Reactive<number>;
        min: <TIn = number>(
            options?: OpMathOptions,
        ) => (source: ReactiveOrSource<TIn>) => Reactive<number>;
        pipe: <TInput, TOutput>(
            ...streams: (Reactive<any> & { set(value: any): void })[],
        ) => (source: ReactiveOrSource<TInput>) => Reactive<unknown>;
        rank: <TIn>(
            rank: RankFunction<TIn>,
            options?: RankOptions & Partial<InitStreamOptions> & {
                annotate?: boolean;
                skipIdentical?: boolean;
                skipUndefined?: boolean;
            },
        ) => (source: ReactiveOrSource<TIn>) => Reactive<TIn>;
        singleFromArray: <V>(
            options?: Partial<SingleFromArrayOptions<V>>,
        ) => (source: ReactiveOrSource<V[]>) => Reactive<V>;
        split: <V>(
            options?: Partial<SplitOptions>,
        ) => (source: ReactiveOrSource<V>) => ReactiveStream<V>[];
        splitLabelled: <V>(
            labels: string[],
        ) => (source: ReactiveOrSource<V>) => Record<string, Reactive<V>>;
        sum: <TIn = number>(
            options?: OpMathOptions,
        ) => (source: ReactiveOrSource<TIn>) => Reactive<number>;
        switcher: <
            TValue,
            TRec extends Record<string, FilterPredicate<TValue>>,
            TLabel extends string | number | symbol,
        >(
            cases: TRec,
            options?: Partial<SwitcherOptions>,
        ) => (source: ReactiveOrSource<TValue>) => Record<TLabel, Reactive<TValue>>;
        syncToArray: <const T extends readonly ReactiveOrSource<any>[]>(
            options?: Partial<Rx.SyncOptions>,
        ) => (reactiveSources: T) => Reactive<RxValueTypes<T>>;
        syncToObject: <const T extends Record<string, ReactiveOrSource<any>>>(
            options?: Partial<Rx.SyncOptions>,
        ) => (reactiveSources: T) => Reactive<RxValueTypeObject<T>>;
        tally: <TIn>(
            options?: TallyOptions,
        ) => (source: ReactiveOrSource<TIn>) => Reactive<number>;
        tapOps: <In, Out>(
            ...ops: ReactiveOp<In, Out>[],
        ) => (source: ReactiveOrSource<In>) => Reactive<Out>;
        tapProcess: <In>(processor: (value: In) => any) => ReactiveOp<In, In>;
        tapStream: <In>(divergedStream: ReactiveWritable<In>) => ReactiveOp<In, In>;
        throttle: <V>(
            options: Partial<ThrottleOptions>,
        ) => (source: ReactiveOrSource<V>) => Reactive<V>;
        timeoutPing: <V>(
            options: TimeoutPingOptions,
        ) => (source: ReactiveOrSource<V>) => Reactive<V>;
        timeoutValue: <V, TTriggerValue>(
            options: TimeoutValueOptions<TTriggerValue>,
        ) => (source: ReactiveOrSource<V>) => Reactive<V | TTriggerValue>;
        transform: <In, Out>(
            transformer: (value: In) => Out,
            options?: Partial<TransformOpts>,
        ) => ReactiveOp<In, Out>;
        withValue: <V>(opts: Partial<WithValueOptions<V>>) => ReactiveOp<V, V>;
    } = ...

    Type declaration

    • Readonlyannotate: <V, TAnnotation>(
          annotator: (input: V) => V & TAnnotation,
      ) => <In, TAnnotation>(
          source: ReactiveOrSource<In>,
      ) => Reactive<{ annotation: TAnnotation; value: In }>

      Annotates values with the result of a function. The input value needs to be an object.

      For every value input emits, run it through annotator, which should return the original value with additional fields.

      Conceptually the same as transform, just with typing to enforce result values are V & TAnnotation

    • ReadonlyannotateWithOp: <TIn, TAnnotation>(
          annotatorOp: ReactiveOp<TIn, TAnnotation>,
      ) => <In, TAnnotation>(
          source: ReactiveOrSource<In>,
      ) => Reactive<{ annotation: TAnnotation; value: In }>

      Annotates the input stream using ReactiveOp as the source of annotations. The output values will have the shape of { value: TIn, annotation: TAnnotation }. Meaning that the original value is stored under .value, and the annotation under .annotation.

      // Emit values from an array
      const r1 = Rx.run(
      Rx.From.array([ 1, 2, 3 ]),
      Rx.Ops.annotateWithOp(
      // Add the 'max' operator to emit the largest-seen value
      Rx.Ops.sum()
      )
      );
      const data = await Rx.toArray(r1);
      // Data = [ { value: 1, annotation: 1 }, { value: 2, annotation: 3 }, { value: 3, annotation: 6 } ]
    • Readonlyaverage: <TIn = number>(
          options?: OpMathOptions,
      ) => (source: ReactiveOrSource<TIn>) => Reactive<number>
    • Readonlychunk: <V>(options: Partial<ChunkOptions>) => ReactiveOp<V, V[]>

      Takes a stream of values and chunks them up (by quantity or time elapsed), emitting them as an array.

    • ReadonlycloneFromFields: <V>() => ReactiveOp<V, V>
    • ReadonlycombineLatestToArray: <const T extends readonly ReactiveOrSource<any>[]>(
          options?: Partial<Rx.CombineLatestOptions>,
      ) => (sources: T) => Reactive<RxValueTypes<T>>

      Merges values from several sources into a single source that emits values as an array.

    • ReadonlycombineLatestToObject: <const T extends Record<string, ReactiveOrSource<any>>>(
          options?: Partial<Rx.CombineLatestOptions>,
      ) => (reactiveSources: T) => CombineLatestToObject<T>

      Merges values from several sources into a single source that emits values as an object.

    • Readonlydebounce: <V>(options: Partial<DebounceOptions>) => ReactiveOp<V, V>

      Debounce values from the stream. It will wait until a certain time has elapsed before emitting latest value.

      Effect is that no values are emitted if input emits faster than the provided timeout.

      See also: throttle

    • Readonlydrop: <V>(
          predicate: (value: V) => boolean,
      ) => <In>(source: ReactiveOrSource<In>) => Reactive<In>

      Drops values from the input stream that match predicate

    • Readonlyelapsed: <V>() => ReactiveOp<V, number>

      Every upstream value is considered the target for interpolation. Output value interpolates by a given amount toward the target.

    • Readonlyfield: <TSource extends object, TFieldType>(
          fieldName: keyof TSource,
          options: FieldOptions<TSource, TFieldType>,
      ) => (source: ReactiveOrSource<TSource>) => Reactive<TFieldType>

      Yields the value of a field from an input stream of values. Eg if the source reactive emits { colour: string, size: number }, we might use field to pluck out the colour field, thus returning a stream of string values.

    • Readonlyfilter: <V>(
          predicate: (value: V) => boolean,
      ) => <In>(source: ReactiveOrSource<In>) => Reactive<In>

      Filters the input stream, only re-emitting values that pass the predicate

    • Readonlyinterpolate: <TIn = number>(
          options?: Partial<OpInterpolateOptions>,
      ) => (source: ReactiveOrSource<TIn>) => ReactivePingable<number>

      Every upstream value is considered the target for interpolation. Output value interpolates by a given amount toward the target.

    • Readonlymax: <TIn = number>(
          options?: OpMathOptions,
      ) => (source: ReactiveOrSource<TIn>) => Reactive<number>

      Outputs the maxium numerical value of the stream. A value is only emitted when maximum increases.

    • Readonlymin: <TIn = number>(
          options?: OpMathOptions,
      ) => (source: ReactiveOrSource<TIn>) => Reactive<number>

      Outputs the minimum numerical value of the stream. A value is only emitted when minimum decreases.

    • Readonlypipe: <TInput, TOutput>(
          ...streams: (Reactive<any> & { set(value: any): void })[],
      ) => (source: ReactiveOrSource<TInput>) => Reactive<unknown>
    • Readonlyrank: <TIn>(
          rank: RankFunction<TIn>,
          options?: RankOptions & Partial<InitStreamOptions> & {
              annotate?: boolean;
              skipIdentical?: boolean;
              skipUndefined?: boolean;
          },
      ) => (source: ReactiveOrSource<TIn>) => Reactive<TIn>
    • ReadonlysingleFromArray: <V>(
          options?: Partial<SingleFromArrayOptions<V>>,
      ) => (source: ReactiveOrSource<V[]>) => Reactive<V>
    • Readonlysplit: <V>(
          options?: Partial<SplitOptions>,
      ) => (source: ReactiveOrSource<V>) => ReactiveStream<V>[]
    • ReadonlysplitLabelled: <V>(
          labels: string[],
      ) => (source: ReactiveOrSource<V>) => Record<string, Reactive<V>>
    • Readonlysum: <TIn = number>(
          options?: OpMathOptions,
      ) => (source: ReactiveOrSource<TIn>) => Reactive<number>
    • Readonlyswitcher: <
          TValue,
          TRec extends Record<string, FilterPredicate<TValue>>,
          TLabel extends string | number | symbol,
      >(
          cases: TRec,
          options?: Partial<SwitcherOptions>,
      ) => (source: ReactiveOrSource<TValue>) => Record<TLabel, Reactive<TValue>>
    • ReadonlysyncToArray: <const T extends readonly ReactiveOrSource<any>[]>(
          options?: Partial<Rx.SyncOptions>,
      ) => (reactiveSources: T) => Reactive<RxValueTypes<T>>
    • ReadonlysyncToObject: <const T extends Record<string, ReactiveOrSource<any>>>(
          options?: Partial<Rx.SyncOptions>,
      ) => (reactiveSources: T) => Reactive<RxValueTypeObject<T>>
    • Readonlytally: <TIn>(
          options?: TallyOptions,
      ) => (source: ReactiveOrSource<TIn>) => Reactive<number>
    • ReadonlytapOps: <In, Out>(
          ...ops: ReactiveOp<In, Out>[],
      ) => (source: ReactiveOrSource<In>) => Reactive<Out>
    • ReadonlytapProcess: <In>(processor: (value: In) => any) => ReactiveOp<In, In>
    • ReadonlytapStream: <In>(divergedStream: ReactiveWritable<In>) => ReactiveOp<In, In>
    • Readonlythrottle: <V>(
          options: Partial<ThrottleOptions>,
      ) => (source: ReactiveOrSource<V>) => Reactive<V>

      Throttle values from the stream. Only emits a value if some minimum time has elapsed.

    • ReadonlytimeoutPing: <V>(options: TimeoutPingOptions) => (source: ReactiveOrSource<V>) => Reactive<V>
    • ReadonlytimeoutValue: <V, TTriggerValue>(
          options: TimeoutValueOptions<TTriggerValue>,
      ) => (source: ReactiveOrSource<V>) => Reactive<V | TTriggerValue>

      Trigger a value if 'source' does not emit a value within an interval. Trigger value can be a fixed value, result of function, or step through an iterator.

    • Readonlytransform: <In, Out>(
          transformer: (value: In) => Out,
          options?: Partial<TransformOpts>,
      ) => ReactiveOp<In, Out>
    • ReadonlywithValue: <V>(opts: Partial<WithValueOptions<V>>) => ReactiveOp<V, V>

      Reactive where last (or a given initial) value is available to read