gajus/flow-runtime




Do you want to work on this issue?
You can request for a bounty in order to promote it!
webpack loader #165
mxstbr posted onGitHub
<!-- Thanks for using flow-runtime! To help us address your issue quickly please provide as much information about the problem you're facing, or the feature you'd like adding. -->
This is a:
- Bug Report
- Feature Request
- Question
- Other
It'd be awesome to have a webpack loader so I could automatically get runtime validation of flow types from libraries.
My use case is that I want to validate DraftJS state on the server, which I'd love to do like this:
// Note: .js.flow file
import { RawDraftContentState } from 'flow-runtime-loader!draft-js/lib/RawDraftContentState.js.flow';
const storePost = (body) => {
t.param('body', RawDraftContentState).assert(body);
return storePostInDb({ body });
}
Does something like that exist?