webpack loader
This is a:
- [ ] Bug Report
- [x] 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?
IssueHunt Summary
Backers (Total: $200.00)
-
issuehunt ($200.00)
Become a backer now!
Or submit a pull request to get the deposits!
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
IssueHunt has been backed by the following sponsors. Become a sponsor
Or maybe this already works?
import type { RawDraftContentState } from 'draft-js/lib/RawDraftContentState.js.flow';
const storePost = (body: RawDraftContentState) => {
return storePostInDb({ body });
}
@mxstbr this doesn't already exist but a webpack loader is definitely something I want, it'd solve a lot of the problems we have that come from babel's single-file-at-a-time approach.
@issuehunt has funded $200.00 to this issue.
- Submit pull request via IssueHunt to receive this reward.
- Want to contribute? Chip in to this issue via IssueHunt.
- Checkout the IssueHunt Issue Explorer to see more funded issues.
- Need help from developers? Add your repository on IssueHunt to raise funds.
Hi, I would like to work in this loader. Is there any platform ( may be twitter ) where we can talk. I got few things to clear up.
Thanks.