Skip to content
Source
Sign inSign up
samwillis/neon-realtime-electric
Open History to see the last commit

react-native-shim.d.ts

11 lines439 Bytes

1// Minimal declaration used only to type-check the conditional React Native
2// entrypoint without adding react-native as a dependency of the client package.
3declare module 'react-native' {
4 export const AppState: {
5 currentState: 'active' | 'background' | 'inactive' | null
6 addEventListener: (
7 type: 'change',
8 listener: (state: 'active' | 'background' | 'inactive' | null) => void
9 ) => { remove: () => void }
10 }