UNPKG

@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>

21 lines 728 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.declarationImport = declarationImport; const tslib_1 = require("tslib"); const path = tslib_1.__importStar(require("path")); const variables_1 = require("../../engine/variables"); /** * * @param declaration */ function declarationImport(declaration) { if (declaration.isExported()) { const filePath = declaration.getSourceFile().getFilePath(); const relativeImport = path .relative(variables_1.GLOBALS.workspaceRoot, filePath) .replace(/.ts$/, ''); return `import {${declaration.getName()}} from '${relativeImport}';`; } return ''; } //# sourceMappingURL=declaration-import.js.map