Skip to content

Commit

Permalink
fix(react-intl): update typescript types for FormattedDate and Format…
Browse files Browse the repository at this point in the history
…tedTime explicitly add children (#3852)
  • Loading branch information
scottdickerson committed Sep 24, 2022
1 parent e9c2150 commit 67bd664
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-intl/index.ts
Expand Up @@ -82,12 +82,14 @@ export const FormattedDate: React.FC<
Intl.DateTimeFormatOptions &
CustomFormatConfig & {
value: string | number | Date | undefined
children?(formattedDate: string): React.ReactElement | null
}
> = createFormattedComponent('formatDate')
export const FormattedTime: React.FC<
Intl.DateTimeFormatOptions &
CustomFormatConfig & {
value: string | number | Date | undefined
children?(formattedTime: string): React.ReactElement | null
}
> = createFormattedComponent('formatTime')
// @ts-ignore issue w/ TS Intl types
Expand Down

0 comments on commit 67bd664

Please sign in to comment.