jsdoc-to-condition
Babel plugin which сreates validation code from jsdoc comments
Example
Before:
/** * @param * @param * @param */ {}
After:
/** * @param * @param * @param */ { if !typeof param === 'number' console; if !typeof b === 'string' console; if !c === undefined || Array && c console; }
Usage
yarn add babel-plugin-jsdoc-to-condition --dev
// .babelrc