mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
Fix missing splat in react-intl types (#25046)
This commit is contained in:
committed by
Ryan Cavanaugh
parent
e460cfa0a3
commit
2b5e8a5dd3
Vendored
+1
-1
@@ -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<FormattedMessage.Props> { }
|
||||
|
||||
@@ -150,6 +150,20 @@ class SomeComponent extends React.Component<SomeComponentProps & InjectedIntlPro
|
||||
{(text) => <div className="messageDiv">{text}</div>}
|
||||
</FormattedMessage>
|
||||
|
||||
<FormattedMessage
|
||||
id="test"
|
||||
description="Test"
|
||||
>
|
||||
{(text) => <input placeholder={text} />}
|
||||
</FormattedMessage>
|
||||
|
||||
<FormattedMessage
|
||||
id="test"
|
||||
description="Test"
|
||||
>
|
||||
{(...text) => <ul>{text.map(t => <li>{t}</li>)}</ul>}
|
||||
</FormattedMessage>
|
||||
|
||||
<FormattedHTMLMessage
|
||||
id="test"
|
||||
description="Test"
|
||||
|
||||
Reference in New Issue
Block a user