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

Strip type checks in production #1

Closed jonathanglasmeyer closed 9 years ago

jonathanglasmeyer commented 9 years ago

Is there a way to strip the type annotations in production?

Otherwise this looks like a great approach.

bebraw commented 9 years ago

@jonathanewerner Shouldn't babel strip them by default? At least that has been my experience with flowcheck.

jonathanglasmeyer commented 9 years ago

Oh, you're right. :)

phpnode commented 9 years ago

yeah just disable the plugin to preserve normal behaviour. I'm thinking of adding an environment variable check to make this easier, e.g. BABEL_TYPECHECK_DISABLE=1 babel ./foo.js