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?


Or maybe this already works?

import type { RawDraftContentState } from 'draft-js/lib/RawDraftContentState.js.flow';

const storePost = (body: RawDraftContentState) => {
  return storePostInDb({ body });
}
posted by mxstbr over 7 years ago

@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.

posted by phpnode over 7 years ago

@issuehunt has funded $200.00 to this issue.


posted by issuehunt-app[bot] over 5 years ago

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.

posted by anikethsaha over 5 years ago

Fund this Issue

$200.00
Funded
Only logged in users can fund an issue

Pull requests

Recent activities

issuehunt funded 200.00 for gajus/flow-runtime# 165
over 5 years ago