/* @flow */ var React = require('react'); var T = React.PropTypes; var Component = React.createClass({ propTypes: { message: T.string.isRequired }, render: function(){ var m: number = this.props.message; return <div key='foo'>{m}</div>; } }); $ flow /Users/mizchi/playground/babel-flow/src/index.js:7:14,21: string This type is incompatible with /Users/mizchi/playground/babel-flow/src/index.js:10:12
![FlowtypeでReact.propTypesを型チェックする - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/42678bccbf0a42a9adee5a30cc6ccb988eeee408/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-9f5428127621718a910c8b63951390ad.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTkxNiZoPTMzNiZ0eHQ9Rmxvd3R5cGUlRTMlODElQTdSZWFjdC5wcm9wVHlwZXMlRTMlODIlOTIlRTUlOUUlOEIlRTMlODMlODElRTMlODIlQTclRTMlODMlODMlRTMlODIlQUYlRTMlODElOTklRTMlODIlOEImdHh0LWNvbG9yPSUyMzIxMjEyMSZ0eHQtZm9udD1IaXJhZ2lubyUyMFNhbnMlMjBXNiZ0eHQtc2l6ZT01NiZ0eHQtY2xpcD1lbGxpcHNpcyZ0eHQtYWxpZ249bGVmdCUyQ3RvcCZzPTE2MDEyYmVlMzlkZjBiYTQ3NTE1MzRkMjcxNzg4NGY5%26mark-x%3D142%26mark-y%3D112%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTYxNiZ0eHQ9JTQwbWl6Y2hpJnR4dC1jb2xvcj0lMjMyMTIxMjEmdHh0LWZvbnQ9SGlyYWdpbm8lMjBTYW5zJTIwVzYmdHh0LXNpemU9MzYmdHh0LWFsaWduPWxlZnQlMkN0b3Amcz04YTUwN2I0MDFmMDRhMzM1YzQ4NmVjMWRkMjZjZWJmOQ%26blend-x%3D142%26blend-y%3D491%26blend-mode%3Dnormal%26s%3Df99122cc3a2b0a8792a5fdb3cefd89a7)