mirror of
https://github.com/status-im/react-native-languages.git
synced 2025-01-14 18:24:30 +00:00
23 lines
539 B
TypeScript
23 lines
539 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
|
||
|
}
|