-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/app harness #1447
Fix/app harness #1447
Conversation
if (typeof SplashScreen === 'function') { | ||
SplashScreen(logDebug).hide(); | ||
} else { | ||
(SplashScreen as any)?.hide(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ElenaDiachenko this needs to redone as casting to any is a red flag
export const addNotificationListeners = () => { | ||
console.log('addNotificationListeners not supported on this platform'); | ||
export const addNotificationListeners = (logDebug: (message: string) => void) => { | ||
logDebug('addNotificationListeners not supported on this platform'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of treating param as logDebug treat it as callback and add reusable type
export const addNotificationListeners = (callback: NotificationCallback) => {
type NotificationCallback = {
({ message: string }) => void
}
} else { | ||
(SplashScreen as any)?.hide(); | ||
} | ||
addNotificationListeners(logDebug); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with NotificationCallback (check comms below) you can make this generic:
addNotificationListeners(({message}) => logDebug(message));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Related issues
Npm releases
n/a
NOTE:
test this PR following following: