Rocky_Mountain_Vending/.pnpm-store/v10/files/41/f0d8b15ff0c3e94138eb31b0198f36c2980bd55be247b12e2137c937e07416f267b514b04f1efc6106f1b0495238874c7c037a6f0f28ad9ec75d8990323421
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

62 lines
2 KiB
Text

import type { ContextOptions, Interval, StepOptions } from "./types.js";
/**
* The {@link eachDayOfInterval} function options.
*/
export interface EachDayOfIntervalOptions<DateType extends Date = Date>
extends StepOptions,
ContextOptions<DateType> {}
/**
* The {@link eachDayOfInterval} function result type. It resolves the proper data type.
* It uses the first argument date object type, starting from the date argument,
* then the start interval date, and finally the end interval date. If
* a context function is passed, it uses the context function return type.
*/
export type EachDayOfIntervalResult<
IntervalType extends Interval,
Options extends EachDayOfIntervalOptions | undefined,
> = Array<
Options extends EachDayOfIntervalOptions<infer DateType>
? DateType
: IntervalType["start"] extends Date
? IntervalType["start"]
: IntervalType["end"] extends Date
? IntervalType["end"]
: Date
>;
/**
* @name eachDayOfInterval
* @category Interval Helpers
* @summary Return the array of dates within the specified time interval.
*
* @description
* Return the array of dates within the specified time interval.
*
* @typeParam IntervalType - Interval type.
* @typeParam Options - Options type.
*
* @param interval - The interval.
* @param options - An object with options.
*
* @returns The array with starts of days from the day of the interval start to the day of the interval end
*
* @example
* // Each day between 6 October 2014 and 10 October 2014:
* const result = eachDayOfInterval({
* start: new Date(2014, 9, 6),
* end: new Date(2014, 9, 10)
* })
* //=> [
* // Mon Oct 06 2014 00:00:00,
* // Tue Oct 07 2014 00:00:00,
* // Wed Oct 08 2014 00:00:00,
* // Thu Oct 09 2014 00:00:00,
* // Fri Oct 10 2014 00:00:00
* // ]
*/
export declare function eachDayOfInterval<
IntervalType extends Interval,
Options extends EachDayOfIntervalOptions | undefined = undefined,
>(
interval: IntervalType,
options?: Options,
): EachDayOfIntervalResult<IntervalType, Options>;