DefinitelyTyped/types/react-native-i18n/react-native-i18n-tests.ts
Vincent Langlet 13a7c42013 [react-native-i18n] Add type for react-native-i18n module (#24790)
* Add type for react-native-i18n

* Fix tests with correct typescript version
2018-04-09 09:59:36 -07:00

11 lines
253 B
TypeScript

import I18n, { getLanguages } from 'react-native-i18n';
getLanguages().then(languages => languages[0]);
I18n.defaultLocale = 'en';
I18n.fallbacks = true;
I18n.translations = {};
I18n.locale = 'fr';
const currentLocale: string = I18n.currentLocale();