@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>
15 lines • 637 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPropertyAssignment = getPropertyAssignment;
const ts_morph_1 = require("ts-morph");
/**
* Get property assignment from object literal node as string
* @param {ObjectLiteralElementLike} objectLiteralElementLike - Object literal node
* @returns {string} Property assignment
*/
function getPropertyAssignment(objectLiteralElementLike) {
return ts_morph_1.Node.isPropertyAssignment(objectLiteralElementLike)
? objectLiteralElementLike?.getInitializer()?.getText() ?? ''
: '';
}
//# sourceMappingURL=get-property-assignment.js.map
;