From 75b8d8a4e717bd96c0712e593c255d02ee73c76f Mon Sep 17 00:00:00 2001 From: Kyle Roach Date: Thu, 17 Aug 2017 13:21:15 -0400 Subject: [PATCH] [rn] Fix redeclaration of global --- types/react-native/index.d.ts | 39 ++++++++++++----------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 848f4f4d2d..f5dbd81217 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -9163,31 +9163,6 @@ export interface ErrorUtils { getGlobalHandler: () => ErrorHandlerCallback; } -export interface GlobalStatic { - - /** - * Accepts a function as its only argument and calls that function before the next repaint. - * It is an essential building block for animations that underlies all of the JavaScript-based animation APIs. - * In general, you shouldn't need to call this yourself - the animation API's will manage frame updates for you. - * @see https://facebook.github.io/react-native/docs/animations.html#requestanimationframe - */ - requestAnimationFrame(fn: () => void): void; - - /** - * This contains the non-native `XMLHttpRequest` object, which you can use if you want to route network requests - * through DevTools (to trace them): - * - * global.XMLHttpRequest = global.originalXMLHttpRequest; - * - * @see https://github.com/facebook/react-native/issues/934 - */ - originalXMLHttpRequest: Object; - XMLHttpRequest: Object; - - __BUNDLE_START_TIME__: number; - ErrorUtils: ErrorUtils; -} - // // Add-Ons // @@ -9213,9 +9188,21 @@ export var EdgeInsetsPropType: React.Requireable export var PointPropType: React.Requireable declare global { - const global: GlobalStatic; function require(name: string): any; + /** + * This contains the non-native `XMLHttpRequest` object, which you can use if you want to route network requests + * through DevTools (to trace them): + * + * global.XMLHttpRequest = global.originalXMLHttpRequest; + * + * @see https://github.com/facebook/react-native/issues/934 + */ + var originalXMLHttpRequest: Object; + + var __BUNDLE_START_TIME__: number; + var ErrorUtils: ErrorUtils; + /** * This variable is set to true when react-native is running in Dev mode * Typical usage: