mirror of
https://github.com/status-im/react-native-languages.git
synced 2025-01-13 17:54:33 +00:00
23 lines
550 B
TypeScript
23 lines
550 B
TypeScript
declare module 'react-native-languages' {
|
|
interface EventData {
|
|
language: string;
|
|
languages: string[];
|
|
}
|
|
|
|
type EventHandler = (eventData: EventData) => any;
|
|
|
|
interface RNLanguagesModule {
|
|
readonly language: string;
|
|
readonly languages: string[];
|
|
addEventListener: (type: 'change', handler: EventHandler) => void;
|
|
removeEventListener: (type: 'change', handler: EventHandler) => void;
|
|
}
|
|
|
|
export const language: string;
|
|
export const languages: string[];
|
|
|
|
let Module: RNLanguagesModule;
|
|
|
|
export default Module;
|
|
}
|