mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-22 14:21:44 +00:00
Add Flow type checking; React >= 0.13
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"env": {
|
||||
"development": {
|
||||
"plugins": [ "typecheck" ]
|
||||
}
|
||||
},
|
||||
"optional": [
|
||||
"es7.classProperties",
|
||||
"runtime"
|
||||
|
||||
+3
-2
@@ -7,7 +7,7 @@
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rm -rf ./dist && webpack --config config/webpack.config.publish.js --sort-assets-by --progress",
|
||||
"build": "rm -rf ./dist && NODE_ENV=publish webpack --config config/webpack.config.publish.js --sort-assets-by --progress",
|
||||
"dev": "webpack-dev-server --config config/webpack.config.example.js --inline --colors --quiet",
|
||||
"lint": "eslint config src",
|
||||
"prepublish": "npm run build",
|
||||
@@ -16,7 +16,7 @@
|
||||
"test": "npm run specs && npm run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^0.13.3",
|
||||
"react": ">=0.13.3",
|
||||
"react-swipeable": "^3.0.2",
|
||||
"react-tappable": "^0.6.0"
|
||||
},
|
||||
@@ -25,6 +25,7 @@
|
||||
"babel-core": "^5.8.23",
|
||||
"babel-eslint": "^4.1.1",
|
||||
"babel-loader": "^5.3.2",
|
||||
"babel-plugin-typecheck": "^1.2.0",
|
||||
"babel-runtime": "^5.8.20",
|
||||
"css-loader": "^0.17.0",
|
||||
"eslint": "^1.3.1",
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
function filterProps(obj, props, excluded = false) {
|
||||
if (!Array.isArray(props)) {
|
||||
throw new TypeError('props is not an Array')
|
||||
}
|
||||
|
||||
function filterProps(obj, props: Array, excluded = false) {
|
||||
const filtered = {}
|
||||
for (const prop in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, prop)) {
|
||||
|
||||
Reference in New Issue
Block a user