ReactNativeLocalization icon indicating copy to clipboard operation
ReactNativeLocalization copied to clipboard

In 0.1.32, the typescript .d.ts file no longer exports GlobalStrings or LocalizationStringsApi

Open aarondail opened this issue 8 years ago • 0 comments

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.

aarondail avatar Oct 02 '17 02:10 aarondail