codemix / babel-plugin-typecheck

Static and runtime type checking for JavaScript in the form of a Babel plugin.
MIT License
886 stars 44 forks source link

De-activate based on environment #91

Closed tquetano-r7 closed 8 years ago

tquetano-r7 commented 8 years ago

Based on your notes about the future state this may already be something you have in mind, but one of the concerns we have with this runtime checking is that it could introduce unexpected issues in our prod code, plus it adds a lot of additional code. What I was wondering is if there was a way to optionally turn off the injection of the type checks and only strip the flow syntax? Not trying to provide a solution to the problem, but at least for our qualm it would be based off of NODE_ENV === production.

phpnode commented 8 years ago

right now typechecks are disabled simply by disabling the plugin, but we can probably use a similar system as we use in babel contracts - let the user choose which environments to opt in / out of.

phpnode commented 8 years ago

fixed in 3.5.1

tquetano-r7 commented 8 years ago

Dude ... haha you're the man. ~bows~