mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-01-12 22:50:20 +08:00
Update ts/flow types
CompletionHandler is no longer passed as a param to listener. Instead it exists on the IOSNotification class.
This commit is contained in:
3
src/index.d.ts
vendored
3
src/index.d.ts
vendored
@@ -1168,7 +1168,7 @@ declare module 'react-native-firebase' {
|
||||
): () => any;
|
||||
|
||||
onNotificationDisplayed(
|
||||
listener: (notification: Notification, done: CompletionHandler) => any
|
||||
listener: (notification: Notification) => any
|
||||
): () => any;
|
||||
|
||||
onNotificationOpened(
|
||||
@@ -1473,6 +1473,7 @@ declare module 'react-native-firebase' {
|
||||
hasAction?: boolean;
|
||||
launchImage?: string;
|
||||
threadIdentifier?: string;
|
||||
complete?: CompletionHandler;
|
||||
|
||||
addAttachment(
|
||||
identifier: string,
|
||||
|
||||
@@ -12,9 +12,7 @@ import AndroidAction from './AndroidAction';
|
||||
import AndroidChannel from './AndroidChannel';
|
||||
import AndroidChannelGroup from './AndroidChannelGroup';
|
||||
import AndroidNotifications from './AndroidNotifications';
|
||||
import IOSNotifications, {
|
||||
type BackgroundFetchResultValue,
|
||||
} from './IOSNotifications';
|
||||
import IOSNotifications from './IOSNotifications';
|
||||
import AndroidRemoteInput from './AndroidRemoteInput';
|
||||
import Notification from './Notification';
|
||||
import {
|
||||
@@ -36,9 +34,7 @@ import type {
|
||||
Schedule,
|
||||
} from './types';
|
||||
|
||||
type CompletionHandler = BackgroundFetchResultValue => void;
|
||||
|
||||
type OnNotification = (Notification, CompletionHandler) => any;
|
||||
type OnNotification = Notification => any;
|
||||
|
||||
type OnNotificationObserver = {
|
||||
next: OnNotification,
|
||||
|
||||
Reference in New Issue
Block a user