mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[react-intl] Inline types for formatMessage, formatHTMLMessage and FormattedMessage
This commit is contained in:
Vendored
+3
-11
@@ -10,14 +10,6 @@
|
||||
|
||||
declare namespace ReactIntl {
|
||||
|
||||
interface Values {
|
||||
[key: string]: string | JSX.Element;
|
||||
}
|
||||
|
||||
interface HTMLValues {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
interface Locale {
|
||||
locale: string;
|
||||
fields?: { [key: string]: string },
|
||||
@@ -74,8 +66,8 @@ declare namespace ReactIntl {
|
||||
formatRelative: (value: number, options?: FormattedRelative.PropsBase & { now?: any }) => string;
|
||||
formatNumber: (value: number, options?: FormattedNumber.PropsBase) => string;
|
||||
formatPlural: (value: number, options?: FormattedPlural.Base) => keyof FormattedPlural.PropsBase;
|
||||
formatMessage: (messageDescriptor: FormattedMessage.MessageDescriptor, values?: Values) => string;
|
||||
formatHTMLMessage: (messageDescriptor: FormattedMessage.MessageDescriptor, values?: HTMLValues) => string;
|
||||
formatMessage: (messageDescriptor: FormattedMessage.MessageDescriptor, values?: {[key: string]: string}) => string;
|
||||
formatHTMLMessage: (messageDescriptor: FormattedMessage.MessageDescriptor, values?: {[key: string]: string}) => string;
|
||||
locale: string;
|
||||
formats: any;
|
||||
messages: { [id: string]: string };
|
||||
@@ -143,7 +135,7 @@ declare namespace ReactIntl {
|
||||
}
|
||||
|
||||
export interface Props extends MessageDescriptor {
|
||||
values?: Values;
|
||||
values?: {[key: string]: string | JSX.Element};
|
||||
tagName?: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user