diff --git a/src/components/OfflineWithFeedback.tsx b/src/components/OfflineWithFeedback.tsx index c61d0345fe82..ac9eda4043e8 100644 --- a/src/components/OfflineWithFeedback.tsx +++ b/src/components/OfflineWithFeedback.tsx @@ -107,7 +107,8 @@ function OfflineWithFeedback({ return child; } - const childProps = child.props as {children?: React.ReactNode; style?: AllStyles}; + type ChildComponentProps = ChildrenProps & {style?: AllStyles}; + const childProps = child.props as ChildComponentProps; const props: StrikethroughProps = { style: StyleUtils.combineStyles(childProps.style ?? [], styles.offlineFeedback.deleted, styles.userSelectNone), }; diff --git a/src/components/Tooltip/PopoverAnchorTooltip.tsx b/src/components/Tooltip/PopoverAnchorTooltip.tsx index 7b6ebfd14258..5eb1f45dafcc 100644 --- a/src/components/Tooltip/PopoverAnchorTooltip.tsx +++ b/src/components/Tooltip/PopoverAnchorTooltip.tsx @@ -10,7 +10,7 @@ function PopoverAnchorTooltip({shouldRender = true, children, ...props}: Tooltip const isPopoverRelatedToTooltipOpen = useMemo(() => { // eslint-disable-next-line @typescript-eslint/dot-notation - const tooltipNode = (tooltipRef.current?.['_childNode'] as Node) ?? null; + const tooltipNode = (tooltipRef.current?.['_childNode'] as Node | undefined) ?? null; if ( isOpen && diff --git a/src/libs/Notification/PushNotification/index.native.ts b/src/libs/Notification/PushNotification/index.native.ts index 72b36fdc33f7..f8500e35995e 100644 --- a/src/libs/Notification/PushNotification/index.native.ts +++ b/src/libs/Notification/PushNotification/index.native.ts @@ -1,4 +1,4 @@ -import type {JsonValue, PushPayload} from '@ua/react-native-airship'; +import type {PushPayload} from '@ua/react-native-airship'; import Airship, {EventType} from '@ua/react-native-airship'; import Onyx from 'react-native-onyx'; import Log from '@libs/Log'; @@ -31,7 +31,7 @@ function pushNotificationEventCallback(eventType: EventType, notification: PushP // On Android, some notification payloads are sent as a JSON string rather than an object if (typeof payload === 'string') { - payload = JSON.parse(payload) as JsonValue; + payload = JSON.parse(payload) as string; } const data = payload as PushNotificationData; diff --git a/src/libs/Notification/PushNotification/shouldShowPushNotification.ts b/src/libs/Notification/PushNotification/shouldShowPushNotification.ts index f66638657a19..026dcbf4ca4a 100644 --- a/src/libs/Notification/PushNotification/shouldShowPushNotification.ts +++ b/src/libs/Notification/PushNotification/shouldShowPushNotification.ts @@ -1,4 +1,4 @@ -import type {JsonValue, PushPayload} from '@ua/react-native-airship'; +import type {PushPayload} from '@ua/react-native-airship'; import Log from '@libs/Log'; import * as ReportActionUtils from '@libs/ReportActionsUtils'; import * as Report from '@userActions/Report'; @@ -14,7 +14,7 @@ export default function shouldShowPushNotification(pushPayload: PushPayload): bo // The payload is string encoded on Android if (typeof payload === 'string') { - payload = JSON.parse(payload) as JsonValue; + payload = JSON.parse(payload) as string; } const data = payload as PushNotificationData; diff --git a/src/libs/Notification/clearReportNotifications/index.native.ts b/src/libs/Notification/clearReportNotifications/index.native.ts index 751cac3849e1..8bb00718c7b3 100644 --- a/src/libs/Notification/clearReportNotifications/index.native.ts +++ b/src/libs/Notification/clearReportNotifications/index.native.ts @@ -1,4 +1,4 @@ -import type {JsonValue, PushPayload} from '@ua/react-native-airship'; +import type {PushPayload} from '@ua/react-native-airship'; import Airship from '@ua/react-native-airship'; import Log from '@libs/Log'; import type {PushNotificationData} from '@libs/Notification/PushNotification/NotificationType'; @@ -8,7 +8,7 @@ import type ClearReportNotifications from './types'; const parseNotificationAndReportIDs = (pushPayload: PushPayload) => { let payload = pushPayload.extras.payload; if (typeof payload === 'string') { - payload = JSON.parse(payload) as JsonValue; + payload = JSON.parse(payload) as string; } const data = payload as PushNotificationData; return {