typescript - Chyba typu: Vlastnosť 'isTV' neexistuje v type 'PlatformStatic'. TS2339


Mám aplikáciu, ktorá beží na TVOS s integrovaným TypeScriptom. Na zisťovanie, či je operačný systém zariadenia TV alebo mobil, som použil nižšie uvedenú vlastnosť a funguje to dobre aj bez integrácie webpacku.

Ale po integrácii webpacku a spustení na webe čelím typovým chybám ako nižšie,

Type error: Property 'isTV' does not exist on type 'PlatformStatic'.  TS2339

Chyba typu: Typ '{ children: Element; activeOpacity: number; accessibilityLabel: string | undefined; accessibilityRole: "button"; accessibilityStates: AccessibilityState[]; onFocus:() => any; testID: string | undefined; disabled: boolean | undefined; onPress:() => any; }' nie je priraditeľný k typu 'IntrinsicAttributes & IntrinsicClassAttributes<TouchableOpacity> & Readonly<{ children?: ReactNode; }> & Readonly<TouchableOpacityProps>'. Vlastnosť 'onFocus' neexistuje v type 'IntrinsicAttributes & IntrinsicClassAttributes<TouchableOpacity> & Readonly<{ children?: ReactNode; }> & Readonly<TouchableOpacityProps>'. TS2322

Bolo by užitočné, keby niekto mohol vysvetliť, prečo čelím tejto chybe?

A ako môžem vyriešiť túto chybu?