DefinitelyTyped/types/react-intl
Tomas Carnecky 08c13378e4 react-intl: change the FormattedMessage tagName prop to accept any ReactType (#31906)
In the react-intl source the prop is defined as follows:

    tagName: PropTypes.oneOfType([PropTypes.string, PropTypes.element])

But it's actually passed straight to React.createElement(tagName, …),
so any type that is accepted by createElement should be allowed here.

It is useful to allow passing custom components to FormattedMessage,
for example when you use styled components, eg.

    const FancyHeading = styled('h1')`font-size: 32px`;
    <FormattedMessage … tagName={FancyHeading} />
2019-01-06 11:04:11 -08:00
..
v1
index.d.ts
react-intl-tests.tsx
tsconfig.json
tslint.json