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>

26 lines 1.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPlaygroundsClassDeclarations = getPlaygroundsClassDeclarations; const core_1 = require("@ng-doc/core"); const get_playground_by_id_1 = require("./get-playground-by-id"); const get_playgrounds_expression_1 = require("./get-playgrounds-expression"); const get_playgrounds_ids_1 = require("./get-playgrounds-ids"); const get_target_for_playground_1 = require("./get-target-for-playground"); /** * * @param objectExpression */ function getPlaygroundsClassDeclarations(objectExpression) { const playgroundExpression = (0, get_playgrounds_expression_1.getPlaygroundsExpression)(objectExpression); if (playgroundExpression) { const ids = (0, get_playgrounds_ids_1.getPlaygroundsIds)(playgroundExpression); return ids .map((id) => { const playground = (0, get_playground_by_id_1.getPlaygroundById)(playgroundExpression, id); return playground ? (0, get_target_for_playground_1.getTargetForPlayground)(playground) : null; }) .filter(core_1.isPresent); } return []; } //# sourceMappingURL=get-playgrounds-class-declarations.js.map