Skip to content

Instantly share code, notes, and snippets.

@jeromeetienne
Last active April 18, 2016 15:53
Show Gist options
  • Save jeromeetienne/b52036b2dac622b2ea0b4c6aa77fb9e6 to your computer and use it in GitHub Desktop.
Save jeromeetienne/b52036b2dac622b2ea0b4c6aa77fb9e6 to your computer and use it in GitHub Desktop.
debugging babel-plugin-transform-jsdoced template and \n
// source testbed.js
/**
* A description
* @returns {Number} - a number
*/
function foo() {
return 2
}
// SOURCE generated by transform-jsdoc
/**
* A description
* @returns {Number} - a number
*/
function foo() {
var _returnValue = 2;
console.assert(typeof _returnValue === 'number', "Invalid type for return value");
return _returnValue;
}
// Source testbed.js
/**
* A description
* @returns {Number} - a number
*/
function foo() {
return 2 + 2
}
// Source generated with transform-jsdoced
/**
* A description
* @returns {Number} - a number
*/
function foo() {
var _returnValue = 2 + 2;
console.assert(typeof _returnValue === 'number', "Invalid type for return value");
return _returnValue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment