/** * @packageDocumentation * @module Number */ import { Observable, Subscribable } from 'rxjs'; /** * Returns an Observable that emits numbers as a type-safe number generator from a source, if no source is passed it * will generate an infinite sequence of positive numbers starting from 0 * * @category Create * * @param input Optional number source to emit from * * @example * Return an Observable that emits numbers from an Array and multiply by `2` * ```ts * fromNumber([1, 2, 3, 4]).pipe(mul(2)).subscribe(); * ``` * Output: `2, 4, 6, 8` * * @example * Returns an Observable of numbers and take the first 1000, and reduce to an array * ```ts * fromNumber().pipe(take(1000), reduce((acc, val) => [...acc, val], [])).subscribe(); * ``` * Output: `[0, 1, 2, 3, 4, ...]` * * @returns Observable that emits numbers passed from arguments or array */ export declare function fromNumber(input?: Subscribable | T> | Iterable | T): Observable;