UNPKG

@kermank/slots

Version:

A TypeScript library for handling time slots, scheduling, and timezone operations

13 lines (12 loc) 609 B
import { Slot } from '../types'; import { SlotRule } from '../types'; type SlotMatcher = (slot: Slot) => boolean; /** * Creates a rule that adds buffer time before and after matching slots * @param matcher - Function that returns true for slots that should have buffers * @param bufferBefore - Minutes to block before the matching slot * @param bufferAfter - Minutes to block after the matching slot * @returns A rule that returns buffer slots that should be forbidden */ export declare const createBufferRule: (matcher: SlotMatcher, bufferBefore?: number, bufferAfter?: number) => SlotRule; export {};