Rebasely Beta: data may be purged

justintypescript-ultra-strict Public

TypeScript · 12 lines · 402 B · at 83c2f03

export type Interval = { start: number; end: number };export class SlotError extends Error {  constructor(public readonly kind: "invalid_input") {    super(kind);  }}/** Returns the earliest start minute, or undefined when nothing fits. Throws SlotError. */export function findFreeSlot(busy: Interval[], dayStart: number, dayEnd: number, durationMin: number): number | undefined {  // TODO}