@ng-doc/builder
Version:
<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>
22 lines • 822 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsDocAction = jsDocAction;
const ts_morph_1 = require("ts-morph");
const helpers_1 = require("../../../helpers");
/**
*
* @param declarationPath
*/
function jsDocAction(declarationPath) {
return (entry) => {
const project = entry.sourceFile.getProject();
const declaration = (0, helpers_1.getDeclarationByPath)(project, declarationPath);
return {
output: ts_morph_1.Node.isVariableDeclaration(declaration)
? (0, helpers_1.getJsDocDescription)(declaration.getVariableStatement())
: (0, helpers_1.getJsDocDescription)(declaration),
dependencies: [declaration.getSourceFile().getFilePath()],
};
};
}
//# sourceMappingURL=js-doc.action.js.map
;