Provide a general summary of the issue here
DayOfWeek type ('sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat') is no longer importable from @internationalized/date as of 3.12.1, despite being used in the public signatures of startOfWeek, endOfWeek, and getDayOfWeek.
🤔 Expected Behavior?
DayOfWeek should be importable from @internationalized/date since it appears directly in the public API and consumers need it to type their own firstDayOfWeek props.
😯 Current Behavior
import { type DayOfWeek } from '@internationalized/date';
// TS error: '"@internationalized/date"' has no exported member named 'DayOfWeek'.
💁 Possible Solution
Export DayOfWeek from queries.ts and re-export it from index.ts:
// queries.ts
export type DayOfWeek = 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat';
// index.ts
export type { DayOfWeek } from './queries';
🔦 Context
DayOfWeek appears in the public signatures of exported functions:
startOfWeek(date: DateValue, locale: string, firstDayOfWeek?: DayOfWeek): DateValue
endOfWeek(date: DateValue, locale: string, firstDayOfWeek?: DayOfWeek): DateValue
getDayOfWeek(date: DateValue, locale: string, firstDayOfWeek?: DayOfWeek): number
Consumers who accept firstDayOfWeek as a prop and forward it to these functions need to type that prop. Without an exported DayOfWeek there is no canonical type — users must either duplicate the string union or derive it unsafely.
🖥️ Steps to Reproduce
- Install
@internationalized/date@3.12.1
- Add
import { type DayOfWeek } from '@internationalized/date' to any TypeScript file
- TypeScript reports:
Module '"@internationalized/date"' has no exported member named 'DayOfWeek'
Was working in 3.12.0.
Version
@internationalized/date: 3.12.1
Provide a general summary of the issue here
DayOfWeektype ('sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat') is no longer importable from@internationalized/dateas of 3.12.1, despite being used in the public signatures ofstartOfWeek,endOfWeek, andgetDayOfWeek.🤔 Expected Behavior?
DayOfWeekshould be importable from@internationalized/datesince it appears directly in the public API and consumers need it to type their ownfirstDayOfWeekprops.😯 Current Behavior
💁 Possible Solution
Export
DayOfWeekfromqueries.tsand re-export it fromindex.ts:🔦 Context
DayOfWeekappears in the public signatures of exported functions:Consumers who accept
firstDayOfWeekas a prop and forward it to these functions need to type that prop. Without an exportedDayOfWeekthere is no canonical type — users must either duplicate the string union or derive it unsafely.🖥️ Steps to Reproduce
@internationalized/date@3.12.1import { type DayOfWeek } from '@internationalized/date'to any TypeScript fileModule '"@internationalized/date"' has no exported member named 'DayOfWeek'Was working in
3.12.0.Version
@internationalized/date: 3.12.1