forked from invertase/react-native-firebase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
type-test.ts
32 lines (23 loc) · 985 Bytes
/
type-test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import firebase from '@react-native-firebase/app';
import * as inAppMessaging from '@react-native-firebase/in-app-messaging';
console.log(inAppMessaging.default().app);
// checks module exists at root
console.log(firebase.inAppMessaging().app.name);
console.log(firebase.inAppMessaging().isMessagesDisplaySuppressed);
// checks module exists at app level
console.log(firebase.app().inAppMessaging().app.name);
console.log(firebase.app().inAppMessaging().isMessagesDisplaySuppressed);
// checks statics exist
console.log(firebase.inAppMessaging.SDK_VERSION);
// checks statics exist on defaultExport
console.log(firebase.SDK_VERSION);
// check module correctly exported
console.log(inAppMessaging.default().isMessagesDisplaySuppressed);
// checks root exists
console.log(firebase.SDK_VERSION);
// checks firebase named export exists on module
console.log(inAppMessaging.firebase.SDK_VERSION);
firebase
.inAppMessaging()
.setAutomaticDataCollectionEnabled(false)
.then();