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:
parent
0d0f85d217
commit
5689d702e4
|
@ -1168,7 +1168,7 @@ declare module 'react-native-firebase' {
|
||||||
): () => any;
|
): () => any;
|
||||||
|
|
||||||
onNotificationDisplayed(
|
onNotificationDisplayed(
|
||||||
listener: (notification: Notification, done: CompletionHandler) => any
|
listener: (notification: Notification) => any
|
||||||
): () => any;
|
): () => any;
|
||||||
|
|
||||||
onNotificationOpened(
|
onNotificationOpened(
|
||||||
|
@ -1473,6 +1473,7 @@ declare module 'react-native-firebase' {
|
||||||
hasAction?: boolean;
|
hasAction?: boolean;
|
||||||
launchImage?: string;
|
launchImage?: string;
|
||||||
threadIdentifier?: string;
|
threadIdentifier?: string;
|
||||||
|
complete?: CompletionHandler;
|
||||||
|
|
||||||
addAttachment(
|
addAttachment(
|
||||||
identifier: string,
|
identifier: string,
|
||||||
|
|
|
@ -12,9 +12,7 @@ import AndroidAction from './AndroidAction';
|
||||||
import AndroidChannel from './AndroidChannel';
|
import AndroidChannel from './AndroidChannel';
|
||||||
import AndroidChannelGroup from './AndroidChannelGroup';
|
import AndroidChannelGroup from './AndroidChannelGroup';
|
||||||
import AndroidNotifications from './AndroidNotifications';
|
import AndroidNotifications from './AndroidNotifications';
|
||||||
import IOSNotifications, {
|
import IOSNotifications from './IOSNotifications';
|
||||||
type BackgroundFetchResultValue,
|
|
||||||
} from './IOSNotifications';
|
|
||||||
import AndroidRemoteInput from './AndroidRemoteInput';
|
import AndroidRemoteInput from './AndroidRemoteInput';
|
||||||
import Notification from './Notification';
|
import Notification from './Notification';
|
||||||
import {
|
import {
|
||||||
|
@ -36,9 +34,7 @@ import type {
|
||||||
Schedule,
|
Schedule,
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
type CompletionHandler = BackgroundFetchResultValue => void;
|
type OnNotification = Notification => any;
|
||||||
|
|
||||||
type OnNotification = (Notification, CompletionHandler) => any;
|
|
||||||
|
|
||||||
type OnNotificationObserver = {
|
type OnNotificationObserver = {
|
||||||
next: OnNotification,
|
next: OnNotification,
|
||||||
|
|
Loading…
Reference in New Issue