From 00043d869a22c12766e17fe1cda38a21c2b1870a Mon Sep 17 00:00:00 2001 From: bgrieder Date: Thu, 22 Oct 2015 10:30:32 +0200 Subject: [PATCH] fix to avoid implicit Any --- react-intl/react-intl-tests.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/react-intl/react-intl-tests.tsx b/react-intl/react-intl-tests.tsx index 74575a0cb..2258343fd 100644 --- a/react-intl/react-intl-tests.tsx +++ b/react-intl/react-intl-tests.tsx @@ -21,7 +21,7 @@ import {IntlMixin, IntlComponent, FormattedNumber, FormattedMessage, FormattedDa //////////////////////////////////////////////////////////////////////////// -const MESSAGES = { +const MESSAGES: {[key: string] : { [lang: string]: string }} = { Sorry: { 'en-US': 'Sorry {name}', @@ -75,12 +75,12 @@ class I18nDirect extends React.Component { private compileMessages = (props: I18nDirect.Props): void => { - let locale = ( props.locales && props.locales[ 0 ] ) || 'en-US' + let locale: string = ( props.locales && props.locales[ 0 ] ) || 'en-US' if (this._currentLocale !== locale) { this._messages = Object.keys( MESSAGES ).reduce( - ( dic: { [key: string]: string; }, key: string ) => { + ( dic , key ) => { dic[ key ] = MESSAGES[ key ][ locale ] return dic },