Skip to content

Commit db7ff01

Browse files
author
Rodrigo Landaeta
committed
Changed the project from javascript to typescript.
1 parent 2515752 commit db7ff01

File tree

6 files changed

+69
-1096
lines changed

6 files changed

+69
-1096
lines changed

App.js

-57
This file was deleted.

index.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
import { AppRegistry } from 'react-native';
2-
import App from './App';
3-
4-
AppRegistry.registerComponent('basicAnimations', () => App);
1+
import "./lib/";

package.json

+5-11
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,14 @@
33
"version": "0.0.1",
44
"private": true,
55
"scripts": {
6-
"start": "node node_modules/react-native/local-cli/cli.js start",
7-
"test": "jest"
6+
"start": "node node_modules/react-native/local-cli/cli.js start"
87
},
98
"dependencies": {
10-
"react": "16.0.0",
9+
"react": "16.2.0",
1110
"react-native": "0.51.0"
1211
},
1312
"devDependencies": {
14-
"babel-jest": "22.0.4",
15-
"babel-preset-react-native": "4.0.0",
16-
"jest": "22.0.4",
17-
"react-test-renderer": "16.0.0"
18-
},
19-
"jest": {
20-
"preset": "react-native"
13+
"@types/react": "^16.0.34",
14+
"@types/react-native": "^0.51.9"
2115
}
22-
}
16+
}

src/index.tsx

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import * as React from "react";
2+
import { AppRegistry, View } from "react-native";
3+
4+
class AppShell extends React.Component {
5+
public render() {
6+
return (
7+
<View>
8+
</View>
9+
);
10+
}
11+
}
12+
13+
AppRegistry.registerComponent("basicAnimations", () => AppShell);

tsconfig.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2017",
4+
"module": "commonjs",
5+
"jsx": "react",
6+
"sourceMap": true,
7+
"outDir": "./lib/",
8+
"strict": true
9+
},
10+
"include": [
11+
"./src/"
12+
]
13+
}

0 commit comments

Comments
 (0)