2018-11-16 11:41:46 -02:00
|
|
|
declare module 'react-native-languages' {
|
|
|
|
interface EventData {
|
2019-01-01 16:51:11 +01:00
|
|
|
language: string;
|
|
|
|
languages: string[];
|
2018-11-16 11:41:46 -02:00
|
|
|
}
|
|
|
|
|
2019-01-01 16:51:11 +01:00
|
|
|
type EventHandler = (eventData: EventData) => any;
|
2018-11-16 11:41:46 -02:00
|
|
|
|
|
|
|
interface RNLanguagesModule {
|
2019-01-01 16:51:11 +01:00
|
|
|
readonly language: string;
|
|
|
|
readonly languages: string[];
|
|
|
|
addEventListener: (type: 'change', handler: EventHandler) => void;
|
|
|
|
removeEventListener: (type: 'change', handler: EventHandler) => void;
|
2018-11-16 11:41:46 -02:00
|
|
|
}
|
|
|
|
|
2019-01-01 16:51:11 +01:00
|
|
|
export const language: string;
|
|
|
|
export const languages: string[];
|
2018-11-16 11:41:46 -02:00
|
|
|
|
2019-01-01 16:51:11 +01:00
|
|
|
let Module: RNLanguagesModule;
|
2018-11-16 11:41:46 -02:00
|
|
|
|
2019-01-01 16:51:11 +01:00
|
|
|
export default Module;
|
2018-11-16 11:41:46 -02:00
|
|
|
}
|