From a6e024eb4a0df9f81b9406e3e81bbbdb0c27f835 Mon Sep 17 00:00:00 2001 From: York Yao Date: Wed, 20 Jan 2016 20:46:35 +0800 Subject: [PATCH 1/2] Update react-native.d.ts https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Writing%20Definition%20Files.md --- react-native/react-native.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react-native/react-native.d.ts b/react-native/react-native.d.ts index dc6cc5e3c5..1ffa1d5461 100644 --- a/react-native/react-native.d.ts +++ b/react-native/react-native.d.ts @@ -3459,7 +3459,7 @@ declare namespace __React { declare module "react-native" { import ReactNative = __React - export default ReactNative + export = ReactNative } declare var global: __React.GlobalStatic @@ -3469,7 +3469,7 @@ 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'; + import * as React from 'react-native'; interface Dimensions { get( what: string ): React.ScaledSize; From 3a49a791829b130853c1ad600aa259766c4e2d93 Mon Sep 17 00:00:00 2001 From: York Yao Date: Wed, 20 Jan 2016 20:47:54 +0800 Subject: [PATCH 2/2] Update react-native-tests.tsx --- react-native/react-native-tests.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-native/react-native-tests.tsx b/react-native/react-native-tests.tsx index f2e4cc22f6..d4b89ab344 100644 --- a/react-native/react-native-tests.tsx +++ b/react-native/react-native-tests.tsx @@ -20,7 +20,7 @@ For a list of complete Typescript examples: check https://github.com/bgrieder/RN /// -import React from 'react-native' +import * as React from 'react-native' const { StyleSheet, Text, View } = React var styles = StyleSheet.create(