Change the input type of defineMessages to T

This allows for full intellisense on the return value, so `messages.foo` will work.
This commit is contained in:
Thomas Johansson
2016-01-18 17:03:02 -08:00
parent 70bf7e2bfe
commit 7cecac8c67
+2 -2
View File
@@ -24,7 +24,7 @@ declare module ReactIntl {
[key: string]: FormattedMessage.MessageDescriptor
}
function defineMessages<T extends Messages>(messages: Messages): T;
function defineMessages<T extends Messages>(messages: T): T;
interface IntlShape extends React.Requireable<any> {
}
@@ -236,4 +236,4 @@ declare module "react-intl" {
declare module "react-intl/lib/locale-data/en" {
var data: ReactIntl.LocaleData;
export = data;
}
}