import { DateAdapter } from '../date-adapter'; import { OccurrenceGenerator } from '../interfaces'; import { Operator, OperatorFnOutput } from './interface'; declare const OCCURRENCE_STREAM_ID: unique symbol; /** * `OccurrenceStream` allows you to combine occurrence generators using * operator functions to produce new, complex recurrence schedules. * For example: internally, `Schedule` relies on an `OccurrenceStream` to combine * rrules, exrules, rdates, and exdates appropriately. * * ### Example ``` const schedule1 = new Schedule(); const schedule2 = new Rule(); const dates = new Dates(); const stream = new OccurrenceStream({ operators: [ add(schedule1), subtract(schedule2, dates) ] }) stream.occurrences().toArray() // occurrences new Calendar({ schedules: stream }).occurrences().toArray() // occurrences ``` * In general, you should not need to manually create an `OccurrenceStream`. * Instead, you can use `OccurrenceGenerater#pipe()` to pass an occurrence * generator's occurrences through various operator functions (similar to * rxjs pipes). * * ### Example ``` const schedule = new Schedule().pipe( add(schedule1), subtract(schedule2, dates) ) schedule.occurrences().toArray() // occurrences ``` * * Operator functions: * - add() * - subtract() * - intersection() * - unique() */ export declare class OccurrenceStream extends OccurrenceGenerator { /** * Similar to `Array.isArray()`, `isOccurrenceStream()` provides a surefire method * of determining if an object is an `OccurrenceStream` by checking against the * global symbol registry. */ static isOccurrenceStream(object: unknown): object is OccurrenceStream; pipe: (...operatorFns: OperatorFnOutput[]) => OccurrenceStream; readonly isInfinite: boolean; readonly hasDuration: boolean; readonly timezone: string | null; readonly operators: ReadonlyArray>; protected readonly [OCCURRENCE_STREAM_ID] = true; private readonly lastOperator; constructor(args: { operators: OperatorFnOutput[] | Operator[]; dateAdapter?: T; timezone?: string | null; }); set(prop: 'timezone', value: string | null, options?: { keepLocalTime?: boolean; }): OccurrenceStream; private emptyIterator; } export declare function pipeFn(self: OccurrenceGenerator): (...operatorFns: OperatorFnOutput[]) => OccurrenceStream; export {}; //# sourceMappingURL=occurrence-stream.d.ts.map