@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>
23 lines • 877 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsDocHasTagAction = jsDocHasTagAction;
const ts_morph_1 = require("ts-morph");
const helpers_1 = require("../../../helpers");
/**
*
* @param declarationPath
* @param tagName
*/
function jsDocHasTagAction(declarationPath, tagName) {
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.hasJsDocTag)(declaration.getVariableStatement(), tagName)
: (0, helpers_1.hasJsDocTag)(declaration, tagName),
dependencies: [declaration.getSourceFile().getFilePath()],
};
};
}
//# sourceMappingURL=js-doc-has-tag.action.js.map
;