[types] Add missing typescript statics for messaging, notifications and links

This commit is contained in:
Chris Bianca 2018-04-12 08:50:13 +01:00
parent 1838089684
commit 590d69ce89
1 changed files with 36 additions and 10 deletions

32
lib/index.d.ts vendored
View File

@ -30,9 +30,9 @@ declare module "react-native-firebase" {
firestore: FirebaseModuleAndStatics<RNFirebase.firestore.Firestore, RNFirebase.firestore.FirestoreStatics>;
iid: FirebaseModuleAndStatics<RNFirebase.iid.InstanceId>
// invites: FirebaseModuleAndStatics<RNFirebase.invites.Invites>
links: FirebaseModuleAndStatics<RNFirebase.links.Links>;
messaging: FirebaseModuleAndStatics<RNFirebase.messaging.Messaging>;
notifications: FirebaseModuleAndStatics<RNFirebase.notifications.Notifications>;
links: FirebaseModuleAndStatics<RNFirebase.links.Links, RNFirebase.links.LinksStatics>;
messaging: FirebaseModuleAndStatics<RNFirebase.messaging.Messaging, RNFirebase.messaging.MessagingStatics>;
notifications: FirebaseModuleAndStatics<RNFirebase.notifications.Notifications, RNFirebase.notifications.NotificationsStatics>;
// perf: FirebaseModuleAndStatics<RNFirebase.perf.Perf>;
storage: FirebaseModuleAndStatics<RNFirebase.storage.Storage>;
// utils: FirebaseModuleAndStatics<RNFirebase.utils.Utils>;
@ -940,6 +940,10 @@ declare module "react-native-firebase" {
setTo(to: string): RemoteMessage
setTtl(ttl: number): RemoteMessage
}
interface MessagingStatics {
RemoteMessage: RemoteMessage;
}
}
namespace iid {
@ -1287,6 +1291,24 @@ declare module "react-native-firebase" {
thumbnailClippingRect: any
thumbnailTime: string
}
interface NotificationsStatics {
Android: {
Action: Android.Action,
BadgeIconType: Android.BadgeIconType,
Category: Android.Category,
Channel: Android.Channel,
ChannelGroup: Android.ChannelGroup,
Defaults: Android.Defaults,
GroupAlert: Android.GroupAlert,
Importance: Android.Importance,
Priority: Android.Priority,
RemoteInput: Android.RemoteInput,
SemanticAction: Android.SemanticAction,
Visibility: Android.Visibility,
};
Notification: Notification;
}
}
namespace crash {
@ -1426,6 +1448,10 @@ declare module "react-native-firebase" {
setImageUrl(imageUrl: string): DynamicLink
setTitle(title: string): DynamicLink
}
interface LinksStatics {
DynamicLink: DynamicLink;
}
}
namespace firestore {