// Minimal ambient Temporal declarations (no polyfill); extend as needed. declare global { namespace Temporal { type TimeZoneId = string; type DurationLike = { days?: number; hours?: number; milliseconds?: number; }; interface Duration { readonly days: number; total(options: { unit: 'millisecond' | 'day' }): number; } namespace Duration { function from(durationLike: DurationLike): Duration; } interface Instant { readonly epochMilliseconds: number; add(durationLike: { hours?: number; milliseconds?: number }): Instant; toString(options?: { smallestUnit?: 'millisecond' }): string; toZonedDateTimeISO(timeZone: TimeZoneId): ZonedDateTime; toLocaleString( locales?: string | string[], options?: Intl.DateTimeFormatOptions, ): string; } namespace Instant { function compare(a: string | Instant, b: string | Instant): number; function from(iso: string): Instant; function fromEpochMilliseconds(ms: number): Instant; } interface ZonedDateTime { add(durationLike: DurationLike): ZonedDateTime; startOfDay(): ZonedDateTime; toInstant(): Instant; toPlainDate(): PlainDate; toLocaleString( locales?: string | string[], options?: Intl.DateTimeFormatOptions, ): string; } interface PlainDate { /** ISO day of week: Monday = 1 … Sunday = 7. */ readonly dayOfWeek: number; add(durationLike: DurationLike): PlainDate; subtract(durationLike: DurationLike): PlainDate; /** Difference to another date; largest unit defaults to days. */ until(other: PlainDate): Duration; toZonedDateTime(timeZone: TimeZoneId): ZonedDateTime; toString(): string; } namespace PlainDate { function from( plainDateLike: { year: number; month: number; day: number } | string, ): PlainDate; } namespace Now { function instant(): Instant; function timeZoneId(): TimeZoneId; } } } export {};