Files
test-repo/tests/flow/more_react/API.react.js
T

8 lines
295 B
JavaScript
Raw Normal View History

2016-12-23 19:31:38 +00:00
var app = require('JSX');
app.setProps({y:42}); // error, y:number but foo expects string in App.react
app.setState({z:42}); // error, z:number but foo expects string in App.react
function bar(x:number) { }
bar(app.props.children); // No error, App doesn't specify propTypes so anything goes