UNPKG

outers

Version:

outers - a all in one package for your day to day use

91 lines (90 loc) 5.35 kB
/** * Executes a given function repeatedly at a specified interval. * @param Function The function to be executed. * @param ms The interval in milliseconds at which the function should be executed. * @param firstEffect Determines whether the function should be executed immediately or not. * @returns A function that can be used to clear the interval when needed. */ export declare const Ms: (Function: () => Promise<void>, ms: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a given function repeatedly at a specified interval. * * @param Function - The function to be executed. * @param Seconds - The interval in seconds at which the function should be executed. * @param firstEffect - A boolean indicating whether the function should be executed immediately. * @returns A function that can be used to clear the interval. */ export declare const Seconds: (Function: () => Promise<void>, Seconds: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a given function repeatedly at a specified interval. * * @param Function - The function to be executed. * @param Minutes - The interval in minutes at which the function should be executed. * @param firstEffect - A boolean indicating whether the function should be executed immediately. * @returns A function that can be used to clear the interval when needed. */ export declare const Minutes: (Function: () => Promise<void>, Minutes: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a given function at regular intervals. * @param Function - The function to be executed. * @param Hours - The interval duration in hours. * @param firstEffect - Determines whether to execute the function immediately or not. * @returns A function that can be used to clear the interval. */ export declare const Hours: (Function: () => Promise<void>, Hours: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a function repeatedly at a specified interval, with an optional initial execution. * @param Function - The function to be executed. * @param Days - The number of days between each execution of the function. * @param firstEffect - Determines whether the function should be executed immediately. * @returns A function that can be used to clear the interval. */ export declare const Days: (Function: () => Promise<void>, Days: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a function repeatedly at a specified interval for a given number of weeks. * @param Function - The function to be executed. * @param Weeks - The number of weeks to repeat the function execution. * @param firstEffect - A boolean indicating whether to execute the function immediately. * @returns A function that can be used to clear the interval. */ export declare const Weeks: (Function: () => Promise<void>, Weeks: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a function at regular intervals for a specified number of months. * @param Function - The function to be executed. * @param Months - The number of months between each execution of the function. * @param firstEffect - Determines whether the function should be executed immediately. * @returns A function that can be used to clear the interval. */ export declare const Months: (Function: () => Promise<void>, Months: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a function periodically at specified intervals. * @param Function - The function to be executed. * @param Years - The number of years between each execution of the function. * @param firstEffect - A boolean indicating whether to execute the function immediately. * @returns A function that can be used to clear the interval. */ export declare const Years: (Function: () => Promise<void>, Years: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a function repeatedly at a specified interval for a given number of decades. * @param Function - The function to be executed. * @param Decades - The number of decades to execute the function for. * @param firstEffect - A boolean indicating whether to execute the function immediately. * @returns A function that can be used to clear the interval. */ export declare const Decades: (Function: () => Promise<void>, Decades: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a given function periodically at specified intervals. * @param Function - The function to be executed. * @param Centuries - The number of centuries between each execution. * @param firstEffect - Determines whether the function should be executed immediately. * @returns A function that can be used to clear the interval. */ export declare const Centuries: (Function: () => Promise<void>, Centuries: number, firstEffect: boolean) => Promise<() => void>; /** * Executes a given function repeatedly at a specified interval. * @param Function - The function to be executed. * @param Millenia - The interval in milliseconds at which the function should be executed. * @param firstEffect - A boolean indicating whether the function should be executed immediately. * @returns A function that can be used to clear the interval. */ export declare const Millenia: (Function: () => Promise<void>, Millenia: number, firstEffect: boolean) => Promise<() => void>;