Merge pull request #6882 from bgrieder/master

Last definitions + Made sure react-native is an "extension" of react and does not re-export it
This commit is contained in:
Masahiro Wakame
2015-12-01 22:26:43 +09:00
2 changed files with 277 additions and 327 deletions
+1 -7
View File
@@ -3,10 +3,8 @@
Note: This must be compiled with the target set to ES6
The content of index.io.js could be something like
'use strict';
import { AppRegistry } from 'react-native'
@@ -15,11 +13,7 @@ The content of index.io.js could be something like
AppRegistry.registerComponent('MopNative', () => Welcome);
NOTE: I (Bruno Grieder) complete these definitions as I port the UI Explorer to Typescript
If you are in a hurry for the latest definitions, or are looking for typescript examples,
check https://github.com/bgrieder/RNTSExplorer
For a list of complete Typescript examples: check https://github.com/bgrieder/RNTSExplorer
*/
+276 -320
View File
@@ -5,24 +5,24 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// These definitions are meant to be used with the TSC compiler target set to ES6
// USING: these definitions are meant to be used with the TSC compiler target set to ES6
//
// This work is based on an original work made by Bernd Paradies: https://github.com/bparadie
// USAGE EXAMPLES: check the RNTSExplorer project at https://github.com/bgrieder/RNTSExplorer
//
// WARNING: this work is very much beta:
// -it is still missing react-native definitions (see below)
// -it re-exports the whole of react 0.14 which may not be what react-native actually does
// CONTRIBUTING: please open pull requests and make sure that the changes do not break RNTSExplorer (they should not)
// Do not hesitate to open a pull request against RNTSExplorer to provide an example for a case not covered by the current App
//
// I (Bruno Grieder) complete these definitions as I port the UI Explorer to Typescript
// If you are in a hurry for the latest definitions, check those in https://github.com/bgrieder/RNTSExplorer
// CREDITS: This work is based on an original work made by Bernd Paradies: https://github.com/bparadie
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// <reference path="../react/react.d.ts" />
//so we know what is "original" React
import React = __React;
declare namespace ReactNative {
//react-native "extends" react
declare namespace __React {
/**
@@ -47,7 +47,7 @@ declare namespace ReactNative {
// not in lib.es6.d.ts but called by react-native
done(callback?: (value: T) => void): void;
done( callback?: ( value: T ) => void ): void;
}
export interface PromiseConstructor {
@@ -121,6 +121,7 @@ declare namespace ReactNative {
// @see lib.es6.d.ts
export var Promise: PromiseConstructor;
//TODO: BGR: Replace with ComponentClass ?
// node_modules/react-tools/src/classic/class/ReactClass.js
export interface ReactClass<D, P, S> {
// TODO:
@@ -135,6 +136,73 @@ declare namespace ReactNative {
export type Runnable = ( appParameters: any ) => void;
// Similar to React.SyntheticEvent except for nativeEvent
interface NativeSyntheticEvent<T> {
bubbles: boolean
cancelable: boolean
currentTarget: EventTarget
defaultPrevented: boolean
eventPhase: number
isTrusted: boolean
nativeEvent: T
preventDefault(): void
stopPropagation(): void
target: EventTarget
timeStamp: Date
type: string
}
export interface NativeTouchEvent {
/**
* Array of all touch events that have changed since the last event
*/
changedTouches: NativeTouchEvent[]
/**
* The ID of the touch
*/
identifier: string
/**
* The X position of the touch, relative to the element
*/
locationX: number
/**
* The Y position of the touch, relative to the element
*/
locationY: number
/**
* The X position of the touch, relative to the screen
*/
pageX: number
/**
* The Y position of the touch, relative to the screen
*/
pageY: number
/**
* The node id of the element receiving the touch event
*/
target: string
/**
* A time identifier for the touch, useful for velocity calculation
*/
timestamp: number
/**
* Array of all current touches on the screen
*/
touches : NativeTouchEvent[]
}
export interface GestureResponderEvent extends NativeSyntheticEvent<NativeTouchEvent> {
}
export interface PointProperties {
x: number
y: number
@@ -147,8 +215,23 @@ declare namespace ReactNative {
right?: number
}
/**
* //FIXME: need to find documentation on which compoenent is a native (i.e. non composite component)
*/
export interface NativeComponent {
setNativeProps: (props: Object) => void
setNativeProps: ( props: Object ) => void
}
/**
* //FIXME: need to find documentation on which component is a TTouchable and can implement that interface
* @see React.DOMAtributes
*/
export interface Touchable {
onTouchStart?: ( event: GestureResponderEvent ) => void
onTouchMove?: ( event: GestureResponderEvent ) => void
onTouchEnd?: ( event: GestureResponderEvent ) => void
onTouchCancel?: ( event: GestureResponderEvent ) => void
onTouchEndCapture?: ( event: GestureResponderEvent ) => void
}
export type AppConfig = {
@@ -583,55 +666,6 @@ declare namespace ReactNative {
}
export interface GestureResponderEvent {
nativeEvent : {
/**
* Array of all touch events that have changed since the last event
*/
changedTouches: any[]
/**
* The ID of the touch
*/
identifier: string
/**
* The X position of the touch, relative to the element
*/
locationX: number
/**
* The Y position of the touch, relative to the element
*/
locationY: number
/**
* The X position of the touch, relative to the screen
*/
pageX: number
/**
* The Y position of the touch, relative to the screen
*/
pageY: number
/**
* The node id of the element receiving the touch event
*/
target: string
/**
* A time identifier for the touch, useful for velocity calculation
*/
timestamp: number
/**
* Array of all current touches on the screen
*/
touches : any[]
}
}
/**
* Gesture recognition on mobile devices is much more complicated than web.
* A touch can go through several phases as the app determines what the user's intention is.
@@ -667,12 +701,12 @@ declare namespace ReactNative {
/**
* Does this view want to become responder on the start of a touch?
*/
onStartShouldSetResponder?: (event: GestureResponderEvent) => boolean
onStartShouldSetResponder?: ( event: GestureResponderEvent ) => boolean
/**
* Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?
*/
onMoveShouldSetResponder?: (event: GestureResponderEvent) => boolean
onMoveShouldSetResponder?: ( event: GestureResponderEvent ) => boolean
/**
* If the View returns true and attempts to become the responder, one of the following will happen:
@@ -682,12 +716,12 @@ declare namespace ReactNative {
* The View is now responding for touch events.
* This is the time to highlight and show the user what is happening
*/
onResponderGrant?: (event: GestureResponderEvent) => void
onResponderGrant?: ( event: GestureResponderEvent ) => void
/**
* Something else is the responder right now and will not release it
*/
onResponderReject?: (event: GestureResponderEvent) => void
onResponderReject?: ( event: GestureResponderEvent ) => void
/**
* If the view is responding, the following handlers can be called:
@@ -696,25 +730,25 @@ declare namespace ReactNative {
/**
* The user is moving their finger
*/
onResponderMove?: (event: GestureResponderEvent) => void
onResponderMove?: ( event: GestureResponderEvent ) => void
/**
* Fired at the end of the touch, ie "touchUp"
*/
onResponderRelease?: (event: GestureResponderEvent) => void
onResponderRelease?: ( event: GestureResponderEvent ) => void
/**
* Something else wants to become responder.
* Should this view release the responder? Returning true allows release
*/
onResponderTerminationRequest?: (event: GestureResponderEvent) => boolean
onResponderTerminationRequest?: ( event: GestureResponderEvent ) => boolean
/**
* The responder has been taken from the View.
* Might be taken by other views after a call to onResponderTerminationRequest,
* or might be taken by the OS without asking (happens with control center/ notification center on iOS)
*/
onResponderTerminate?: (event: GestureResponderEvent) => void
onResponderTerminate?: ( event: GestureResponderEvent ) => void
/**
* onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern,
@@ -729,7 +763,7 @@ declare namespace ReactNative {
* So if a parent View wants to prevent the child from becoming responder on a touch start,
* it should have a onStartShouldSetResponderCapture handler which returns true.
*/
onStartShouldSetResponderCapture?: (event: GestureResponderEvent) => boolean
onStartShouldSetResponderCapture?: ( event: GestureResponderEvent ) => boolean
/**
* onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern,
@@ -864,7 +898,7 @@ declare namespace ReactNative {
/**
* @see https://facebook.github.io/react-native/docs/view.html#props
*/
export interface ViewProperties extends ViewPropertiesAndroid, ViewPropertiesIOS, GestureResponderHandlers, React.Props<ViewStatic> {
export interface ViewProperties extends ViewPropertiesAndroid, ViewPropertiesIOS, GestureResponderHandlers, Touchable, React.Props<ViewStatic> {
/**
* Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.
@@ -1680,7 +1714,7 @@ declare namespace ReactNative {
showsPointsOfInterest?: boolean
}
export interface MapViewProperties extends MapViewPropertiesIOS, React.Props<MapViewStatic> {
export interface MapViewProperties extends MapViewPropertiesIOS, Touchable, React.Props<MapViewStatic> {
/**
* Map annotations with title/subtitle.
@@ -2423,7 +2457,6 @@ declare namespace ReactNative {
}
export interface PixelRatioStatic {
get(): number;
}
@@ -2632,7 +2665,7 @@ declare namespace ReactNative {
zoomScale?: number
}
export interface ScrollViewProperties extends ScrollViewIOSProperties {
export interface ScrollViewProperties extends ScrollViewIOSProperties, Touchable {
/**
* These styles will be applied to the scroll view content container which
@@ -2962,13 +2995,13 @@ declare namespace ReactNative {
* eventName is expected to be `change`
* //FIXME: No doc - inferred from NetInfo.js
*/
addEventListener: (eventName: string, listener: (result: T) => void) => void
addEventListener: ( eventName: string, listener: ( result: T ) => void ) => void
/**
* eventName is expected to be `change`
* //FIXME: No doc - inferred from NetInfo.js
*/
removeEventListener: (eventName: string, listener: (result: T) => void) => void
removeEventListener: ( eventName: string, listener: ( result: T ) => void ) => void
}
/**
@@ -2996,30 +3029,6 @@ declare namespace ReactNative {
isConnectionMetered: any
}
/**
* //FIXME: Documentation ?
*/
export interface PanResponderEvent {
bubbles: boolean
cancelable: boolean
currentTarget: number
defaultPrevented: boolean
dispatchConfig: any
dispatchMarker: any
eventPhase: any
isDefaultPrevented: () => boolean
isPropagationStopped: () => boolean
isTrusted: boolean
nativeEvent: GestureResponderEvent
path: any
target: number
timeStamp: number
touchHistory: any[]
type: any
}
export interface PanResponderGestureState {
@@ -3083,19 +3092,19 @@ declare namespace ReactNative {
* @see documentation of GestureResponderHandlers
*/
export interface PanResponderCallbacks {
onMoveShouldSetPanResponder?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean
onStartShouldSetPanResponder?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderGrant?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderMove?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderRelease?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderTerminate?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void
onMoveShouldSetPanResponder?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => boolean
onStartShouldSetPanResponder?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderGrant?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderMove?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderRelease?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderTerminate?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => void
onMoveShouldSetPanResponderCapture?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean
onStartShouldSetPanResponderCapture?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean
onPanResponderReject?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderStart?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderEnd?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderTerminationRequest?: ( e: PanResponderEvent, gestureState: PanResponderGestureState ) => boolean
onMoveShouldSetPanResponderCapture?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => boolean
onStartShouldSetPanResponderCapture?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => boolean
onPanResponderReject?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderStart?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderEnd?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => void
onPanResponderTerminationRequest?: ( e: GestureResponderEvent, gestureState: PanResponderGestureState ) => boolean
}
export interface PanResponderInstance {
@@ -3145,7 +3154,143 @@ declare namespace ReactNative {
create( config: PanResponderCallbacks ): PanResponderInstance
}
export interface PushNotificationPermissions {
alert?: boolean
badge?: boolean
sound?: boolean
}
export interface PushNotification {
/**
* An alias for `getAlert` to get the notification's main message string
*/
getMessage(): string | Object
/**
* Gets the sound string from the `aps` object
*/
getSound(): string
/**
* Gets the notification's main message from the `aps` object
*/
getAlert(): string | Object
/**
* Gets the badge count number from the `aps` object
*/
getBadgeCount(): number
/**
* Gets the data object on the notif
*/
getData(): Object
}
/**
* Handle push notifications for your app, including permission handling and icon badge number.
* @see https://facebook.github.io/react-native/docs/pushnotificationios.html#content
*
* //FIXME: BGR: The documentation seems completely off compared to the actual js implementation. I could never get the example to run
*/
export interface PushNotificationIOSStatic {
/**
* Sets the badge number for the app icon on the home screen
*/
setApplicationIconBadgeNumber( number: number ): void
/**
* Gets the current badge number for the app icon on the home screen
*/
getApplicationIconBadgeNumber( callback: ( badge: number ) => void ): void
/**
* Attaches a listener to remote notifications while the app is running in the
* foreground or the background.
*
* The handler will get be invoked with an instance of `PushNotificationIOS`
*
* The type MUST be 'notification'
*/
addEventListener( type: string, handler: ( notification: PushNotification ) => void ):void
/**
* Requests all notification permissions from iOS, prompting the user's
* dialog box.
*/
requestPermissions(): void
/**
* See what push permissions are currently enabled. `callback` will be
* invoked with a `permissions` object:
*
* - `alert` :boolean
* - `badge` :boolean
* - `sound` :boolean
*/
checkPermissions( callback: ( permissions: PushNotificationPermissions ) => void ): void
/**
* Removes the event listener. Do this in `componentWillUnmount` to prevent
* memory leaks
*/
removeEventListener( type: string, handler: ( notification: PushNotification ) => void ): void
/**
* An initial notification will be available if the app was cold-launched
* from a notification.
*
* The first caller of `popInitialNotification` will get the initial
* notification object, or `null`. Subsequent invocations will return null.
*/
popInitialNotification(): PushNotification
}
/**
* @enum('default', 'light-content')
*/
export type StatusBarStyle = string
/**
* @enum('none','fade', 'slide')
*/
type StatusBarAnimation = string
/**
* //FIXME: No documentation is available (although this is self explanatory)
*
* @see https://facebook.github.io/react-native/docs/statusbarios.html#content
*/
export interface StatusBarIOSStatic {
setStyle(style: StatusBarStyle, animated?: boolean): void
setHidden(hidden: boolean, animation?: StatusBarAnimation): void
setNetworkActivityIndicatorVisible(visible: boolean): void
}
/**
* The Vibration API is exposed at VibrationIOS.vibrate().
* On iOS, calling this function will trigger a one second vibration.
* The vibration is asynchronous so this method will return immediately.
*
* There will be no effect on devices that do not support Vibration, eg. the iOS simulator.
*
* Vibration patterns are currently unsupported.
*
* @see https://facebook.github.io/react-native/docs/vibrationios.html#content
*/
export interface VibrationIOSStatic {
vibrate(): void
}
//////////////////////////////////////////////////////////////////////////
//
@@ -3248,6 +3393,20 @@ declare namespace ReactNative {
export var PanResponder: PanResponderStatic
export type PanResponder = PanResponderStatic
export var PushNotificationIOS: PushNotificationIOSStatic
export type PushNotificationIOS = PushNotificationIOSStatic
export var StatusBarIOS: StatusBarIOSStatic
export type StatusBarIOS = StatusBarIOSStatic
export var VibrationIOS: VibrationIOSStatic
export type VibrationIOS = VibrationIOSStatic
//
// /TODO: BGR: These are leftovers of the initial port that must be revisited
//
export var SegmentedControlIOS: React.ComponentClass<SegmentedControlIOSProperties>
export var PixelRatio: PixelRatioStatic
@@ -3256,216 +3415,11 @@ declare namespace ReactNative {
export type DeviceEventSubscription = DeviceEventSubscriptionStatic
export var InteractionManager: InteractionManagerStatic
//////////////////////////////////////////////////////////////////////////
//
// R E A C T - 0 . 1 4
//
//////////////////////////////////////////////////////////////////////////
export type ReactType = React.ReactType;
export interface ReactElement<P> extends React.ReactElement<P> {}
export interface ClassicElement<P> extends React.ClassicElement<P> {}
export interface DOMElement<P> extends React.DOMElement<P> {}
export type HTMLElement =React.ReactHTMLElement;
export type SVGElement = React.ReactSVGElement;
//
// Factories
// ----------------------------------------------------------------------
export interface Factory<P> extends React.Factory<P> {}
export interface ClassicFactory<P> extends React.ClassicFactory<P> {}
export interface DOMFactory<P> extends React.DOMFactory<P> {}
export type HTMLFactory = React.HTMLFactory;
export type SVGFactory = React.SVGFactory;
//
// React Nodes
// http://facebook.github.io/react/docs/glossary.html
// ----------------------------------------------------------------------
export type ReactText = React.ReactText;
export type ReactChild = React.ReactChild;
// Should be Array<ReactNode> but type aliases cannot be recursive
export type ReactFragment = React.ReactFragment;
export type ReactNode = React.ReactNode;
//
// Top Level API
// ----------------------------------------------------------------------
export function createClass<P, S>( spec: React.ComponentSpec<P, S> ): React.ClassicComponentClass<P>;
export function createFactory<P>( type: string ): React.DOMFactory<P>;
export function createFactory<P>( type: React.ClassicComponentClass<P> | string ): React.ClassicFactory<P>;
export function createFactory<P>( type: React.ComponentClass<P> ): React.Factory<P>;
export function createElement<P>( type: string,
props?: P,
...children: React.ReactNode[] ): React.DOMElement<P>;
export function createElement<P>( type: React.ClassicComponentClass<P> | string,
props?: P,
...children: React.ReactNode[] ): React.ClassicElement<P>;
export function createElement<P>( type: React.ComponentClass<P>,
props?: P,
...children: React.ReactNode[] ): React.ReactElement<P>;
export function cloneElement<P>( element: React.DOMElement<P>,
props?: P,
...children: React.ReactNode[] ): React.DOMElement<P>;
export function cloneElement<P>( element: React.ClassicElement<P>,
props?: P,
...children: React.ReactNode[] ): React.ClassicElement<P>;
export function cloneElement<P>( element: React.ReactElement<P>,
props?: P,
...children: React.ReactNode[] ): React.ReactElement<P>;
export function isValidElement( object: {} ): boolean;
export var DOM: React.ReactDOM;
export var PropTypes: React.ReactPropTypes;
export var Children: React.ReactChildren;
//
// Component API
// ----------------------------------------------------------------------
// Base component for plain JS classes
export class Component<P, S> extends React.Component<P,S> {}
export interface ClassicComponent<P, S> extends React.ClassicComponent<P,S> {}
export interface DOMComponent<P> extends ClassicComponent<P, any> {
tagName: string;
}
export interface ChildContextProvider<CC> extends React.ChildContextProvider<CC> {}
//
// Class Interfaces
// ----------------------------------------------------------------------
export interface ComponentClass<P> extends React.ComponentClass<P> {}
export interface ClassicComponentClass<P> extends React.ClassicComponentClass<P> {}
//
// Component Specs and Lifecycle
// ----------------------------------------------------------------------
export interface ComponentLifecycle<P, S> extends React.ComponentLifecycle<P,S> {}
export interface Mixin<P, S> extends React.Mixin<P,S> {}
export interface ComponentSpec<P, S> extends React.ComponentSpec<P,S> {}
//
// Event System
// ----------------------------------------------------------------------
export interface SyntheticEvent extends React.SyntheticEvent {}
export interface DragEvent extends React.DragEvent {}
export interface ClipboardEvent extends React.ClipboardEvent {}
export interface KeyboardEvent extends React.KeyboardEvent {}
export interface FocusEvent extends React.FocusEvent {}
export interface FormEvent extends React.FormEvent {}
export interface MouseEvent extends React.MouseEvent {}
export interface TouchEvent extends React.TouchEvent {}
export interface UIEvent extends React.UIEvent {}
export interface WheelEvent extends React.WheelEvent {}
//
// Event Handler Types
// ----------------------------------------------------------------------
export interface EventHandler<E extends React.SyntheticEvent> extends React.EventHandler<E> {}
export interface DragEventHandler extends React.DragEventHandler {}
export interface ClipboardEventHandler extends React.ClipboardEventHandler {}
export interface KeyboardEventHandler extends React.KeyboardEventHandler {}
export interface FocusEventHandler extends React.FocusEventHandler {}
export interface FormEventHandler extends React.FormEventHandler {}
export interface MouseEventHandler extends React.MouseEventHandler {}
export interface TouchEventHandler extends React.TouchEventHandler {}
export interface UIEventHandler extends React.UIEventHandler {}
export interface WheelEventHandler extends React.WheelEventHandler {}
//
// Props / DOM Attributes
// ----------------------------------------------------------------------
export interface Props<T> extends React.Props<T> {}
export interface DOMAttributes extends React.DOMAttributes {}
// This interface is not complete. Only properties accepting
// unitless numbers are listed here (see CSSProperty.js in React)
export interface CSSProperties extends React.CSSProperties {}
export interface HTMLAttributes extends React.HTMLAttributes {}
export interface SVGAttributes extends React.SVGAttributes {}
//
// React.DOM
// ----------------------------------------------------------------------
export interface ReactDOM extends React.ReactDOM {}
//
// React.PropTypes
// ----------------------------------------------------------------------
export interface Validator<T> extends React.Validator<T> {}
export interface Requireable<T> extends React.Requireable<T> {}
export interface ValidationMap<T> extends React.ValidationMap<T> {}
export interface ReactPropTypes extends React.ReactPropTypes {}
//
// React.Children
// ----------------------------------------------------------------------
export interface ReactChildren extends React.ReactChildren {}
//
// Browser Interfaces
// https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts
// ----------------------------------------------------------------------
export interface AbstractView extends React.AbstractView {}
export interface Touch extends React.Touch {}
export interface TouchList extends React.TouchList {}
//
// Additional ( and controversial)
//
//////////////////////////////////////////////////////////////////////////
export function __spread( target: any, ...sources: any[] ): any;
@@ -3504,10 +3458,16 @@ declare namespace ReactNative {
declare module "react-native" {
import ReactNative = __React
export default ReactNative
}
declare var global: __React.GlobalStatic
declare function require( name: string ): any
//TODO: BGR: this is a left-over from the initial port. Not sure it makes any sense
declare module "Dimensions" {
import React from 'react-native';
@@ -3518,7 +3478,3 @@ declare module "Dimensions" {
var ExportDimensions: Dimensions;
export = ExportDimensions;
}
declare var global: ReactNative.GlobalStatic
declare function require( name: string ): any