From 4381378a6421f6e77cc8a3d21ade507d3ab07cce Mon Sep 17 00:00:00 2001 From: krister Date: Tue, 12 Sep 2017 18:30:08 +0300 Subject: [PATCH] [react-intl] Allow booleans and dates when formatting a message --- types/react-intl/index.d.ts | 2 +- types/react-intl/react-intl-tests.tsx | 35 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/types/react-intl/index.d.ts b/types/react-intl/index.d.ts index 018d7ec9a2..8557f22cb0 100644 --- a/types/react-intl/index.d.ts +++ b/types/react-intl/index.d.ts @@ -138,7 +138,7 @@ declare namespace ReactIntl { } interface Props extends MessageDescriptor { - values?: {[key: string]: string | number | JSX.Element}; + values?: {[key: string]: string | number | boolean | Date | JSX.Element}; tagName?: string; } } diff --git a/types/react-intl/react-intl-tests.tsx b/types/react-intl/react-intl-tests.tsx index c3882f9461..25f1016026 100644 --- a/types/react-intl/react-intl-tests.tsx +++ b/types/react-intl/react-intl-tests.tsx @@ -115,6 +115,20 @@ class SomeComponent extends React.Component + + + + + + + + + +