reason-types-webpack-plugin
v1.0.0
Published
Webpack plugin for generating types for ReasonML
Downloads
3
Maintainers
Readme
reason-types-webpack-plugin
yarn add --dev reason-webpack-plugin
Installation
Add the plugin to your webpack config
// webpack.config.js
const ReasonTypesPlugin = require('reason-types-webpack-plugin')
module.exports = {
// ...
plugins: [
new ReasonTypesPlugin({ sources: 'src' })
]
}
ReasonTypesPlugin will generate .js.flow
files for you
// @flow
import { add } from './my_reason_file'
// The `add` function is typed!
const value = add(100, 200)