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>

20 lines 702 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPlaygroundById = getPlaygroundById; const ts_morph_1 = require("ts-morph"); /** * * @param expression * @param playgroundId */ function getPlaygroundById(expression, playgroundId) { const playgroundExpression = expression.getProperty(playgroundId); if (ts_morph_1.Node.isPropertyAssignment(playgroundExpression)) { const playgroundInitializer = playgroundExpression.getInitializer(); if (ts_morph_1.Node.isObjectLiteralExpression(playgroundInitializer)) { return playgroundInitializer; } } return undefined; } //# sourceMappingURL=get-playground-by-id.js.map