Files
klz-cables.com/.pnpm-store/v10/files/f6/9408a29cfd83f5db9b086ef567a17027b1030afcecd6410fc6fbbe96b95d8527d5162c1ed22d01a33962abb158fffa20edbc56e272e607700da27a5801d713
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

58 lines
1.7 KiB
Plaintext

import type { ContextOptions, Interval } from "./types.js";
/**
* The {@link eachWeekendOfInterval} function options.
*/
export interface EachWeekendOfIntervalOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* The {@link eachWeekendOfInterval} function result type.
*/
export type EachWeekendOfIntervalResult<
IntervalType extends Interval,
Options extends EachWeekendOfIntervalOptions | undefined,
> = Array<
Options extends EachWeekendOfIntervalOptions<infer DateType>
? DateType
: IntervalType["start"] extends Date
? IntervalType["start"]
: IntervalType["end"] extends Date
? IntervalType["end"]
: Date
>;
/**
* @name eachWeekendOfInterval
* @category Interval Helpers
* @summary List all the Saturdays and Sundays in the given date interval.
*
* @description
* Get all the Saturdays and Sundays in the given date interval.
*
* @typeParam IntervalType - Interval type.
* @typeParam Options - Options type.
*
* @param interval - The given interval
* @param options - An object with options
*
* @returns An array containing all the Saturdays and Sundays
*
* @example
* // Lists all Saturdays and Sundays in the given date interval
* const result = eachWeekendOfInterval({
* start: new Date(2018, 8, 17),
* end: new Date(2018, 8, 30)
* })
* //=> [
* // Sat Sep 22 2018 00:00:00,
* // Sun Sep 23 2018 00:00:00,
* // Sat Sep 29 2018 00:00:00,
* // Sun Sep 30 2018 00:00:00
* // ]
*/
export declare function eachWeekendOfInterval<
IntervalType extends Interval,
Options extends EachWeekendOfIntervalOptions | undefined = undefined,
>(
interval: IntervalType,
options?: Options,
): EachWeekendOfIntervalResult<IntervalType, Options>;