import { INormRuleOptionsBase, IRecurrenceRuleModule, IRuleOptionsBase, } from '@rschedule/core'; import { CollectionIterator, ICollectionsArgs, IOccurrencesArgs, IRunArgs, OccurrenceGenerator, OccurrenceGeneratorRunResult, OccurrenceIterator, } from './occurrence-generator'; export interface IRuleArgs { data?: D; timezone?: string | null; maxDuration?: number; } export declare abstract class RuleBase< Options extends IRuleOptionsBase, NOptions extends INormRuleOptionsBase, Data = any > extends OccurrenceGenerator { /** * Convenience property for holding arbitrary data. Accessible on individual DateAdapters * generated by this `Rule` object via the `DateAdapter#generators` property. Unlike * the rest of the `Rule` object, the data property is mutable. */ data: Data; readonly isInfinite: boolean; readonly hasDuration: boolean; readonly duration: number | undefined; readonly timezone: string | null; readonly options: Options; protected readonly recurrenceRules: readonly IRecurrenceRuleModule< any, any >[]; protected readonly normOptions: NOptions; constructor( recurrenceRules: readonly IRecurrenceRuleModule[], config: Options, options?: IRuleArgs, ); occurrences(args?: IOccurrencesArgs): OccurrenceIterator<[this]>; collections(args?: ICollectionsArgs): CollectionIterator<[this]>; /** * Rule's are immutable. This allows you to create a new Rule with an updated timezone * or rule option. * * ### Important! * When updating the rule's timezone, this does not change the *options* associated with this * `Rule`, so the rule is still processed using whatever timezone is * associated with the rule's `start` time. When the rule is run, and * a date is found to be valid, that date is only then converted to * the timezone you specify here and returned to you. If you wish * to update the timezone associated with the rule options, change the rule's * `start` time. */ abstract set( prop: 'timezone', value: string | null, tzoptions?: { keepLocalTime?: boolean; }, ): RuleBase; abstract set( prop: 'options', value: Options, ): RuleBase; abstract set( prop: Prop, value: Options[Prop], ): RuleBase; _run(rawArgs?: IRunArgs): OccurrenceGeneratorRunResult; }