diff --git a/types/react-intl/index.d.ts b/types/react-intl/index.d.ts index 7da9dbd487..c6a06d39aa 100644 --- a/types/react-intl/index.d.ts +++ b/types/react-intl/index.d.ts @@ -142,7 +142,7 @@ declare namespace ReactIntl { interface Props extends MessageDescriptor { values?: {[key: string]: MessageValue | JSX.Element}; tagName?: string; - children?: (formattedMessage: string[]) => React.ReactNode; + children?: (...formattedMessage: string[]) => React.ReactNode; } } class FormattedMessage extends React.Component { } diff --git a/types/react-intl/react-intl-tests.tsx b/types/react-intl/react-intl-tests.tsx index 75490a5ca1..51d5065fe3 100644 --- a/types/react-intl/react-intl-tests.tsx +++ b/types/react-intl/react-intl-tests.tsx @@ -150,6 +150,20 @@ class SomeComponent extends React.Component
{text}
} + + {(text) => } + + + + {(...text) =>
    {text.map(t =>
  • {t}
  • )}
} +
+