ReactNativeLocalization
ReactNativeLocalization copied to clipboard
In 0.1.32, the typescript .d.ts file no longer exports GlobalStrings or LocalizationStringsApi
So... I can no longer do this:
import { GlobalStrings, LocalizationStringsApi } from 'react-native-localization';
import LocalizedStrings from 'react-native-localization';
...
const myGlobalStrings: GlobalStrings<MyStrings> = {
en: {
...
...
export const Strings = (new LocalizedStrings(myGlobalStrings) as any) as LocalizationStringsApi & ModuleStrings;
Because GlobalStrings and LocalizationStringsApi cant be imported anymore.
The code above works on in 0.1.31 and seems to be the suggested way to use the library based on the comments in LocalizedStrings.d.ts.