Skip to content

Commit bd374af

Browse files
committed
use flow and flow-runtime instead of typecheck
1 parent 9995c7b commit bd374af

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

.babelrc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@
77
"plugins": [
88
"transform-runtime",
99
"add-module-exports",
10-
"transform-decorators-legacy"
10+
"transform-decorators-legacy",
11+
[
12+
"flow-runtime",
13+
{
14+
"assert": true,
15+
"annotate": true
16+
}
17+
]
1118
],
1219
"env": {
1320
"development": {
14-
"plugins": [
15-
"typecheck"
16-
]
21+
"plugins": []
1722
}
1823
}
1924
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
"feathers-nedb": "^2.6.0",
128128
"feathers-rest": "^1.6.0",
129129
"feathers-socketio": "^1.4.2",
130+
"flow-runtime": "^0.2.1",
130131
"http-proxy": "^1.16.2",
131132
"is-promise": "^2.1.0",
132133
"js-cookie": "^2.1.3",
@@ -164,7 +165,7 @@
164165
"babel-eslint": "^7.1.1",
165166
"babel-jest": "^18.0.0",
166167
"babel-loader": "^6.2.10",
167-
"babel-plugin-typecheck": "^3.9.0",
168+
"babel-plugin-flow-runtime": "^0.2.1",
168169
"better-npm-run": "^0.0.14",
169170
"bootstrap-loader": "^2.0.0-beta.20",
170171
"bootstrap-sass": "^3.3.7",

src/containers/App/App.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ export default class App extends Component {
7171
const { user, notifs, children } = this.props;
7272
const styles = require('./App.scss');
7373

74+
const add = (a: number, b: number): number => a + b;
75+
console.log(add(3, 4));
76+
console.log(add(3, false));
77+
7478
return (
7579
<div className={styles.app}>
7680
<Helmet {...config.app.head} />

0 commit comments

Comments
 (0)