From a3634e47964baaabcaffe5f62bb43829f3e8b1a0 Mon Sep 17 00:00:00 2001 From: Alexis Mangin Date: Fri, 29 Sep 2017 15:10:15 +0100 Subject: [PATCH] react-native: Add support for Pad and TVOS in Platform --- types/react-native/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 2d6d569570..9bde519670 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -5614,7 +5614,7 @@ export interface PixelRatioStatic { */ export type PlatformOSType = 'ios' | 'android' | 'windows' | 'web' -interface PlatformStatic { +interface PlatformStatic extends PlatformIOSStatic { OS: PlatformOSType Version: number @@ -5624,6 +5624,11 @@ interface PlatformStatic { select( specifics: { ios?: T, android?: T} ): T; } +interface PlatformIOSStatic { + isPad: boolean + isTVOS: boolean +} + /** * Deprecated - subclass NativeEventEmitter to create granular event modules instead of * adding all event listeners directly to RCTDeviceEventEmitter.