diff --git a/src/Calendar.tsx b/src/Calendar.tsx index 9bb37899..c736ebce 100644 --- a/src/Calendar.tsx +++ b/src/Calendar.tsx @@ -843,7 +843,7 @@ Calendar.propTypes = { minDate: isMinDate, minDetail: PropTypes.oneOf(allViews), navigationAriaLabel: PropTypes.string, - navigationAriaLive: PropTypes.oneOf(['off', 'polite', 'assertive']), + navigationAriaLive: PropTypes.oneOf(['off', 'polite', 'assertive'] as const), navigationLabel: PropTypes.func, next2AriaLabel: PropTypes.string, next2Label: PropTypes.node, @@ -863,7 +863,7 @@ Calendar.propTypes = { prev2Label: PropTypes.node, prevAriaLabel: PropTypes.string, prevLabel: PropTypes.node, - returnValue: PropTypes.oneOf(['start', 'end', 'range']), + returnValue: PropTypes.oneOf(['start', 'end', 'range'] as const), selectRange: PropTypes.bool, showDoubleView: PropTypes.bool, showFixedNumberOfWeeks: PropTypes.bool, diff --git a/src/shared/propTypes.ts b/src/shared/propTypes.ts index c37a8f7b..33a04cc0 100644 --- a/src/shared/propTypes.ts +++ b/src/shared/propTypes.ts @@ -9,7 +9,10 @@ const calendarTypes = Object.values(CALENDAR_TYPES); const deprecatedCalendarTypes = Object.values(DEPRECATED_CALENDAR_TYPES); const allViews = ['century', 'decade', 'year', 'month']; -export const isCalendarType = PropTypes.oneOf([...calendarTypes, ...deprecatedCalendarTypes]); +export const isCalendarType = PropTypes.oneOf([ + ...calendarTypes, + ...deprecatedCalendarTypes, +] as const); export const isClassName = PropTypes.oneOfType([ PropTypes.string,