UNPKG

@cemusta/nestjs-pulse

Version:

The modern MongoDB-powered scheduling library pulse for NestJS

10 lines (9 loc) 664 B
import { JobOptions } from '../interfaces/job-options.interface'; export type RepeatableJobOptions = JobOptions & Record<'interval', string>; export type NonRepeatableJobOptions = JobOptions & Record<'when', string | Date>; export type PulseModuleJobOptions = RepeatableJobOptions | NonRepeatableJobOptions; export declare function Every(interval: string): MethodDecorator; export declare function Every(options: RepeatableJobOptions): MethodDecorator; export declare function Schedule(when: string): MethodDecorator; export declare function Schedule(options: NonRepeatableJobOptions): MethodDecorator; export declare function Now(name?: string): MethodDecorator;