UNPKG

837 BJavaScriptView Raw
1import { NativeModules } from 'react-native';
2const { ExponentSplashScreen: SplashScreen = {} } = NativeModules;
3export async function preventAutoHideAsync() {
4 if (SplashScreen.preventAutoHide) {
5 SplashScreen.preventAutoHide();
6 return true;
7 }
8 return false;
9}
10export async function hideAsync() {
11 if (SplashScreen.hide) {
12 SplashScreen.hide();
13 return true;
14 }
15 return false;
16}
17/**
18 * @deprecated
19 */
20export function hide() {
21 console.warn('SplashScreen.hide() is deprecated in favour of SplashScreen.hideAsync()');
22 hideAsync();
23}
24/**
25 * @deprecated
26 */
27export function preventAutoHide() {
28 console.warn('SplashScreen.preventAutoHide() is deprecated in favour of SplashScreen.preventAutoHideAsync()');
29 preventAutoHideAsync();
30}
31//# sourceMappingURL=SplashScreen.expo.js.map
\No newline at end of file