@ng-doc/builder 15.9.0 → 15.10.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/engine/.cache/apps/ng-doc/src/app/docs/content/api/ng-doc.category.js +42 -0
- package/engine/.cache/apps/ng-doc/src/app/docs/content/{api-templating → api/templating}/ng-doc.page.js +14 -5
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/demo-pane/ng-doc.page.js +51 -0
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/snippets/ng-doc.page.js +51 -0
- package/engine/.cache/apps/ng-doc/src/app/docs/{getting-started/roadmap → customization/search}/ng-doc.page.js +13 -13
- package/engine/.cache/apps/ng-doc/src/app/docs/customization/themes/ng-doc.page.js +1 -1
- package/engine/.cache/apps/ng-doc/src/app/docs/customization/type-controls/ng-doc.page.js +1 -1
- package/engine/.cache/apps/ng-doc/src/app/docs/develop/ng-doc.page.js +0 -4247
- package/engine/.cache/apps/ng-doc/src/app/docs/{entities → file-entities}/api/ng-doc.page.js +4 -4
- package/engine/.cache/apps/ng-doc/src/app/docs/{entities → file-entities}/category/ng-doc.page.js +4 -4
- package/engine/.cache/apps/ng-doc/src/app/docs/{entities → file-entities}/dependencies/ng-doc.page.js +4 -4
- package/engine/.cache/apps/ng-doc/src/app/docs/{entities → file-entities}/ng-doc.category.js +2 -2
- package/engine/.cache/apps/ng-doc/src/app/docs/{entities → file-entities}/page/ng-doc.page.js +4 -4
- package/engine/.cache/apps/ng-doc/src/app/docs/ng-doc.api.js +1 -1
- package/engine/actions/demo-pane.action.d.ts +10 -0
- package/engine/actions/demo-pane.action.js +22 -0
- package/engine/actions/demo-pane.action.js.map +1 -0
- package/engine/actions/demo.action.d.ts +3 -3
- package/engine/actions/demo.action.js +4 -4
- package/engine/actions/playground.action.js +1 -1
- package/engine/actions/playground.action.js.map +1 -1
- package/engine/actions.d.ts +2 -1
- package/engine/actions.js +4 -0
- package/engine/actions.js.map +1 -1
- package/engine/entities/abstractions/entity.d.ts +3 -0
- package/engine/entities/abstractions/entity.js +30 -8
- package/engine/entities/abstractions/entity.js.map +1 -1
- package/engine/entities/abstractions/route.entity.js +0 -5
- package/engine/entities/abstractions/route.entity.js.map +1 -1
- package/engine/entities/page.entity.d.ts +1 -0
- package/engine/entities/page.entity.js +4 -1
- package/engine/entities/page.entity.js.map +1 -1
- package/engine/entities/skeleton.entity.js +7 -9
- package/engine/entities/skeleton.entity.js.map +1 -1
- package/engine/entity-store.d.ts +1 -1
- package/engine/entity-store.js.map +1 -1
- package/engine/extentions/index.extension.d.ts +6 -0
- package/engine/extentions/index.extension.js +25 -0
- package/engine/extentions/index.extension.js.map +1 -0
- package/engine/index.d.ts +0 -1
- package/engine/index.js +0 -1
- package/engine/index.js.map +1 -1
- package/engine/renderer.js +2 -0
- package/engine/renderer.js.map +1 -1
- package/engine/template-filters.d.ts +1 -1
- package/engine/template-filters.js +2 -1
- package/engine/template-filters.js.map +1 -1
- package/helpers/build-indexes.d.ts +9 -0
- package/helpers/build-indexes.js +117 -0
- package/helpers/build-indexes.js.map +1 -0
- package/helpers/extract-docs.js +14 -8
- package/helpers/extract-docs.js.map +1 -1
- package/helpers/extract-selectors.js.map +1 -1
- package/helpers/generate-api-entities.js.map +1 -1
- package/helpers/get-demo-class-declarations.js +1 -2
- package/helpers/get-demo-class-declarations.js.map +1 -1
- package/helpers/get-keyword-type-from-entity.d.ts +1 -1
- package/helpers/get-keyword-type-from-entity.js.map +1 -1
- package/helpers/get-playground-by-id.js.map +1 -1
- package/helpers/get-playground-properties.js +2 -1
- package/helpers/get-playground-properties.js.map +1 -1
- package/helpers/import-es-module.d.ts +6 -0
- package/helpers/import-es-module.js +13 -0
- package/helpers/import-es-module.js.map +1 -0
- package/helpers/index.d.ts +1 -1
- package/helpers/index.js +1 -1
- package/helpers/index.js.map +1 -1
- package/helpers/marked.d.ts +4 -1
- package/helpers/marked.js +45 -3
- package/helpers/marked.js.map +1 -1
- package/helpers/presentation.js +10 -5
- package/helpers/presentation.js.map +1 -1
- package/helpers/typescript/display-type.d.ts +6 -1
- package/helpers/typescript/display-type.js +10 -2
- package/helpers/typescript/display-type.js.map +1 -1
- package/helpers/typescript/member/member-type.d.ts +3 -3
- package/interfaces/configuration.d.ts +1 -1
- package/interfaces/index.d.ts +0 -1
- package/interfaces/index.js +0 -1
- package/interfaces/index.js.map +1 -1
- package/package.json +6 -13
- package/schematics/api/schema.d.ts +1 -1
- package/templates/api/base.html.nunj +8 -2
- package/templates/api/class.html.nunj +1 -1
- package/templates/api/interface.html.nunj +1 -1
- package/templates/api-page.module.ts.nunj +1 -0
- package/templates/api-scope.module.ts.nunj +1 -0
- package/templates/category.module.ts.nunj +1 -0
- package/templates/helpers/accessor.html.nunj +3 -3
- package/templates/helpers/badge.html.nunj +1 -1
- package/templates/helpers/constructor.html.nunj +2 -2
- package/templates/helpers/declaration-modifiers.html.nunj +3 -3
- package/templates/helpers/decorators.html.nunj +1 -1
- package/templates/helpers/members.html.nunj +3 -3
- package/templates/helpers/method.html.nunj +4 -4
- package/templates/helpers/modifier.html.nunj +1 -1
- package/templates/helpers/no-content.html.nunj +1 -1
- package/templates/helpers/parameters.html.nunj +3 -3
- package/templates/helpers/properties.html.nunj +3 -3
- package/templates/helpers/tag.html.nunj +1 -1
- package/templates/helpers/type.html.nunj +5 -1
- package/templates/page.module.ts.nunj +1 -0
- package/templates/parts/page-tags.html.nunj +3 -3
- package/templates/parts/see-also.html.nunj +1 -1
- package/types/action.d.ts +1 -1
- package/types/artifact-processor.d.ts +1 -1
- package/types/component-asset.d.ts +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.js +0 -1
- package/types/index.js.map +1 -1
- package/types/snippet-type.d.ts +1 -1
- package/types/supported-declarations.d.ts +1 -1
- package/engine/post-processors/html-plugins/autolink-headings.d.ts +0 -6
- package/engine/post-processors/html-plugins/autolink-headings.js +0 -40
- package/engine/post-processors/html-plugins/autolink-headings.js.map +0 -1
- package/engine/post-processors/html-plugins/autolink-headings.ts +0 -40
- package/engine/post-processors/html-plugins/keywords-processor.d.ts +0 -8
- package/engine/post-processors/html-plugins/keywords-processor.js +0 -108
- package/engine/post-processors/html-plugins/keywords-processor.js.map +0 -1
- package/engine/post-processors/html-plugins/keywords-processor.ts +0 -125
- package/engine/post-processors/html-plugins/mark-elements.d.ts +0 -6
- package/engine/post-processors/html-plugins/mark-elements.js +0 -19
- package/engine/post-processors/html-plugins/mark-elements.js.map +0 -1
- package/engine/post-processors/html-plugins/mark-elements.ts +0 -17
- package/engine/post-processors/html-plugins/slugger.d.ts +0 -7
- package/engine/post-processors/html-plugins/slugger.js +0 -25
- package/engine/post-processors/html-plugins/slugger.js.map +0 -1
- package/engine/post-processors/html-plugins/slugger.ts +0 -26
- package/engine/post-processors/html-post-processor.d.ts +0 -9
- package/engine/post-processors/html-post-processor.js +0 -33
- package/engine/post-processors/html-post-processor.js.map +0 -1
- package/engine/post-processors/index.d.ts +0 -1
- package/engine/post-processors/index.js +0 -5
- package/engine/post-processors/index.js.map +0 -1
- package/helpers/build-global-indexes.d.ts +0 -6
- package/helpers/build-global-indexes.js +0 -141
- package/helpers/build-global-indexes.js.map +0 -1
- package/helpers/print-console.d.ts +0 -5
- package/helpers/print-console.js +0 -14
- package/helpers/print-console.js.map +0 -1
- package/interfaces/keyword-map.d.ts +0 -12
- package/interfaces/keyword-map.js +0 -3
- package/interfaces/keyword-map.js.map +0 -1
- package/types/keyword-type.d.ts +0 -2
- package/types/keyword-type.js +0 -3
- package/types/keyword-type.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { accessorPresentation, constructorPresentation, displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, filterUselessMembers, firstNodeWithComment, functionPresentation, getAccessorChain, getClassAccessors, getClassMethods, getClassProperties, getContentForPlayground, getDeclarationType, getImplementedMember, getInheritedParent, getInterfaceAccessors, getInterfaceMethods, getInterfaceProperties, getMemberParent, getMethodChain, getOverriddenMember, getPlaygroundClassProperties, getPropertyChain, getTargetForPlayground, getTemplateForPlayground, groupAccessors, marked, methodPresentation, noEmpty, noLineBreaks, notEmptyAssets, sortByNodesName, sortNavigationEntities, typeAliasPresentation, variablePresentation, } from '../helpers';
|
|
1
|
+
export { accessorPresentation, constructorPresentation, displayType, displayTypeNode, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, filterUselessMembers, firstNodeWithComment, functionPresentation, getAccessorChain, getClassAccessors, getClassMethods, getClassProperties, getContentForPlayground, getDeclarationType, getImplementedMember, getInheritedParent, getInterfaceAccessors, getInterfaceMethods, getInterfaceProperties, getMemberParent, getMethodChain, getOverriddenMember, getPlaygroundClassProperties, getPropertyChain, getTargetForPlayground, getTemplateForPlayground, groupAccessors, marked, methodPresentation, noEmpty, noLineBreaks, notEmptyAssets, sortByNodesName, sortNavigationEntities, typeAliasPresentation, variablePresentation, } from '../helpers';
|
|
2
2
|
export { buildPlaygroundDemoTemplate, objectKeys } from '@ng-doc/core';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* Just export filters from this file, they will be included to the template renderer automatically */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.objectKeys = exports.buildPlaygroundDemoTemplate = exports.variablePresentation = exports.typeAliasPresentation = exports.sortNavigationEntities = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.groupAccessors = exports.getTemplateForPlayground = exports.getTargetForPlayground = exports.getPropertyChain = exports.getPlaygroundClassProperties = exports.getOverriddenMember = exports.getMethodChain = exports.getMemberParent = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getInterfaceAccessors = exports.getInheritedParent = exports.getImplementedMember = exports.getDeclarationType = exports.getContentForPlayground = exports.getClassProperties = exports.getClassMethods = exports.getClassAccessors = exports.getAccessorChain = exports.functionPresentation = exports.firstNodeWithComment = exports.filterUselessMembers = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = exports.constructorPresentation = exports.accessorPresentation = void 0;
|
|
4
|
+
exports.objectKeys = exports.buildPlaygroundDemoTemplate = exports.variablePresentation = exports.typeAliasPresentation = exports.sortNavigationEntities = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.groupAccessors = exports.getTemplateForPlayground = exports.getTargetForPlayground = exports.getPropertyChain = exports.getPlaygroundClassProperties = exports.getOverriddenMember = exports.getMethodChain = exports.getMemberParent = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getInterfaceAccessors = exports.getInheritedParent = exports.getImplementedMember = exports.getDeclarationType = exports.getContentForPlayground = exports.getClassProperties = exports.getClassMethods = exports.getClassAccessors = exports.getAccessorChain = exports.functionPresentation = exports.firstNodeWithComment = exports.filterUselessMembers = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayTypeNode = exports.displayType = exports.constructorPresentation = exports.accessorPresentation = void 0;
|
|
5
5
|
var helpers_1 = require("../helpers");
|
|
6
6
|
Object.defineProperty(exports, "accessorPresentation", { enumerable: true, get: function () { return helpers_1.accessorPresentation; } });
|
|
7
7
|
Object.defineProperty(exports, "constructorPresentation", { enumerable: true, get: function () { return helpers_1.constructorPresentation; } });
|
|
8
8
|
Object.defineProperty(exports, "displayType", { enumerable: true, get: function () { return helpers_1.displayType; } });
|
|
9
|
+
Object.defineProperty(exports, "displayTypeNode", { enumerable: true, get: function () { return helpers_1.displayTypeNode; } });
|
|
9
10
|
Object.defineProperty(exports, "extractDocs", { enumerable: true, get: function () { return helpers_1.extractDocs; } });
|
|
10
11
|
Object.defineProperty(exports, "extractParameterDocs", { enumerable: true, get: function () { return helpers_1.extractParameterDocs; } });
|
|
11
12
|
Object.defineProperty(exports, "extractSeeDocs", { enumerable: true, get: function () { return helpers_1.extractSeeDocs; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-filters.js","sourceRoot":"","sources":["../../../../libs/builder/engine/template-filters.ts"],"names":[],"mappings":";AAAA,sGAAsG;;;AAEtG,
|
|
1
|
+
{"version":3,"file":"template-filters.js","sourceRoot":"","sources":["../../../../libs/builder/engine/template-filters.ts"],"names":[],"mappings":";AAAA,sGAAsG;;;AAEtG,sCA0CoB;AAzCnB,+GAAA,oBAAoB,OAAA;AACpB,kHAAA,uBAAuB,OAAA;AACvB,sGAAA,WAAW,OAAA;AACX,0GAAA,eAAe,OAAA;AACf,sGAAA,WAAW,OAAA;AACX,+GAAA,oBAAoB,OAAA;AACpB,yGAAA,cAAc,OAAA;AACd,2GAAA,gBAAgB,OAAA;AAChB,wGAAA,aAAa,OAAA;AACb,yGAAA,cAAc,OAAA;AACd,+GAAA,oBAAoB,OAAA;AACpB,+GAAA,oBAAoB,OAAA;AACpB,+GAAA,oBAAoB,OAAA;AACpB,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,6GAAA,kBAAkB,OAAA;AAClB,kHAAA,uBAAuB,OAAA;AACvB,6GAAA,kBAAkB,OAAA;AAClB,+GAAA,oBAAoB,OAAA;AACpB,6GAAA,kBAAkB,OAAA;AAClB,gHAAA,qBAAqB,OAAA;AACrB,8GAAA,mBAAmB,OAAA;AACnB,iHAAA,sBAAsB,OAAA;AACtB,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,8GAAA,mBAAmB,OAAA;AACnB,uHAAA,4BAA4B,OAAA;AAC5B,2GAAA,gBAAgB,OAAA;AAChB,iHAAA,sBAAsB,OAAA;AACtB,mHAAA,wBAAwB,OAAA;AACxB,yGAAA,cAAc,OAAA;AACd,iGAAA,MAAM,OAAA;AACN,6GAAA,kBAAkB,OAAA;AAClB,kGAAA,OAAO,OAAA;AACP,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,iHAAA,sBAAsB,OAAA;AACtB,gHAAA,qBAAqB,OAAA;AACrB,+GAAA,oBAAoB,OAAA;AAErB,qCAAqE;AAA7D,mHAAA,2BAA2B,OAAA;AAAE,kGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NgDocPageIndex } from '@ng-doc/core/interfaces';
|
|
2
|
+
import { NgDocEntity } from '../engine/entities/abstractions/entity';
|
|
3
|
+
import { NgDocBuiltOutput } from '../interfaces';
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param entity
|
|
7
|
+
* @param artifacts
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildIndexes(entity: NgDocEntity, artifacts: NgDocBuiltOutput[]): Promise<NgDocPageIndex[]>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildIndexes = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const orama_1 = require("@orama/orama");
|
|
6
|
+
const plugin_parsedoc_1 = require("@orama/plugin-parsedoc");
|
|
7
|
+
const path = tslib_1.__importStar(require("path"));
|
|
8
|
+
const rxjs_1 = require("rxjs");
|
|
9
|
+
const operators_1 = require("rxjs/operators");
|
|
10
|
+
const route_entity_1 = require("../engine/entities/abstractions/route.entity");
|
|
11
|
+
const entity_type_1 = require("./entity-type");
|
|
12
|
+
const import_es_module_1 = require("./import-es-module");
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param entity
|
|
16
|
+
* @param artifacts
|
|
17
|
+
*/
|
|
18
|
+
async function buildIndexes(entity, artifacts) {
|
|
19
|
+
const pages = [];
|
|
20
|
+
if (entity instanceof route_entity_1.NgDocRouteEntity) {
|
|
21
|
+
const htmlArifacts = artifacts.filter((artifact) => path.extname(artifact.filePath) === '.html');
|
|
22
|
+
for (const artifact of htmlArifacts) {
|
|
23
|
+
const db = await (0, orama_1.create)({
|
|
24
|
+
schema: {
|
|
25
|
+
...plugin_parsedoc_1.defaultHtmlSchema,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
const indexableContent = await removeNotIndexableContent(artifact.content);
|
|
29
|
+
await (0, plugin_parsedoc_1.populate)(db, indexableContent, 'html', {
|
|
30
|
+
transformFn: (node) => transformFn(node),
|
|
31
|
+
});
|
|
32
|
+
let section;
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
Object.values(db.data.docs.docs)
|
|
36
|
+
.filter(isIndexable)
|
|
37
|
+
.forEach((doc) => {
|
|
38
|
+
var _a;
|
|
39
|
+
if (doc) {
|
|
40
|
+
if (isHeading(doc)) {
|
|
41
|
+
section = doc;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
pages.push({
|
|
45
|
+
breadcrumbs: buildBreadcrumbs(entity),
|
|
46
|
+
pageType: (0, entity_type_1.isApiPageEntity)(entity) ? 'api' : 'guide',
|
|
47
|
+
title: entity.title,
|
|
48
|
+
section: (_a = section === null || section === void 0 ? void 0 : section.content) !== null && _a !== void 0 ? _a : '',
|
|
49
|
+
route: entity.fullRoute,
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
fragment: (section === null || section === void 0 ? void 0 : section.properties) && section.properties['id'],
|
|
53
|
+
content: doc.content.toString() === '%%API_NAME_ANCHOR%%' ? undefined : doc.content.toString(),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return pages;
|
|
61
|
+
}
|
|
62
|
+
exports.buildIndexes = buildIndexes;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @param entity
|
|
66
|
+
*/
|
|
67
|
+
function buildBreadcrumbs(entity) {
|
|
68
|
+
return (0, entity_type_1.isRouteEntity)(entity.parent) ? [...buildBreadcrumbs(entity.parent), entity.title] : [entity.title];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @param doc
|
|
73
|
+
*/
|
|
74
|
+
function isIndexable(doc) {
|
|
75
|
+
var _a;
|
|
76
|
+
return !!((_a = doc === null || doc === void 0 ? void 0 : doc.content) === null || _a === void 0 ? void 0 : _a.trim());
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @param node
|
|
81
|
+
* @param doc
|
|
82
|
+
*/
|
|
83
|
+
function isHeading(doc) {
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
return ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(doc.type) && !!(doc === null || doc === void 0 ? void 0 : doc.properties) && !!doc.properties['id'];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @param node
|
|
91
|
+
* @param entity
|
|
92
|
+
*/
|
|
93
|
+
function transformFn(node) {
|
|
94
|
+
switch (node.tag) {
|
|
95
|
+
case 'strong':
|
|
96
|
+
case 'a':
|
|
97
|
+
case 'time':
|
|
98
|
+
case 'span':
|
|
99
|
+
case 'small':
|
|
100
|
+
case 'b':
|
|
101
|
+
case 'p':
|
|
102
|
+
case 'ul':
|
|
103
|
+
return { ...node, raw: `<p>${node.content}</p>` };
|
|
104
|
+
default:
|
|
105
|
+
return node;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @param html
|
|
111
|
+
*/
|
|
112
|
+
async function removeNotIndexableContent(html) {
|
|
113
|
+
return (0, rxjs_1.from)((0, import_es_module_1.importEsModule)('@ng-doc/utils'))
|
|
114
|
+
.pipe((0, operators_1.switchMap)((utils) => utils.removeNotIndexableContent(html)))
|
|
115
|
+
.toPromise();
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=build-indexes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-indexes.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-indexes.ts"],"names":[],"mappings":";;;;AACA,wCAAoC;AACpC,4DAAgF;AAChF,mDAA6B;AAC7B,+BAA0B;AAC1B,8CAAyC;AAGzC,+EAA8E;AAE9E,+CAA6D;AAC7D,yDAAkD;AAElD;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAC,MAAmB,EAAE,SAA6B;IACpF,MAAM,KAAK,GAAqB,EAAE,CAAC;IAEnC,IAAI,MAAM,YAAY,+BAAgB,EAAE;QACvC,MAAM,YAAY,GAAuB,SAAS,CAAC,MAAM,CACxD,CAAC,QAA0B,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,OAAO,CAC3E,CAAC;QAEF,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;YACpC,MAAM,EAAE,GAAG,MAAM,IAAA,cAAM,EAAC;gBACvB,MAAM,EAAE;oBACP,GAAG,mCAAiB;iBACpB;aACD,CAAC,CAAC;YAEH,MAAM,gBAAgB,GAAW,MAAM,yBAAyB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAEnF,MAAM,IAAA,0BAAQ,EAAC,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE;gBAC5C,WAAW,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC;aACrD,CAAC,CAAC;YAEH,IAAI,OAA6C,CAAC;YAElD,6DAA6D;YAC7D,aAAa;YACb,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAkD,CAAC;iBAC5E,MAAM,CAAC,WAAW,CAAC;iBACnB,OAAO,CAAC,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aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,0CAAE,IAAI,EAAE,CAAA,CAAC;AAC/B,CAAC;AAED;;;;GAIG;AACH,SAAS,SAAS,CAAC,GAA6B;IAC/C,6DAA6D;IAC7D,aAAa;IACb,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,CAAA,IAAI,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC/G,CAAC;AAED;;;;GAIG;AACH,SAAS,WAAW,CAAC,IAAiB;IACrC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACjB,KAAK,QAAQ,CAAC;QACd,KAAK,GAAG,CAAC;QACT,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,IAAI;YACR,OAAO,EAAC,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC,OAAO,MAAM,EAAC,CAAC;QACjD;YACC,OAAO,IAAI,CAAC;KACb;AACF,CAAC;AAED;;;GAGG;AACH,KAAK,UAAU,yBAAyB,CAAC,IAAY;IACpD,OAAO,IAAA,WAAI,EAAC,IAAA,iCAAc,EAAiC,eAAe,CAAC,CAAC;SAC1E,IAAI,CAAC,IAAA,qBAAS,EAAC,CAAC,KAAqC,EAAE,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC;SACjG,SAAS,EAAE,CAAC;AACf,CAAC"}
|
package/helpers/extract-docs.js
CHANGED
|
@@ -14,12 +14,14 @@ const marked_1 = require("./marked");
|
|
|
14
14
|
function extractDocs(node, customTag) {
|
|
15
15
|
const jsDocs = (0, core_1.asArray)(node.getJsDocs()[0]);
|
|
16
16
|
const parser = new tsdoc_1.TSDocParser(getTsDocConfiguration());
|
|
17
|
-
const docs = jsDocs
|
|
17
|
+
const docs = jsDocs
|
|
18
|
+
.map((doc) => {
|
|
18
19
|
const context = parser.parseString(doc.getText());
|
|
19
20
|
return customTag
|
|
20
21
|
? ts_doc_formatter_1.TsDocFormatter.renderDocNodes(context.docComment.customBlocks.filter((block) => block.blockTag.tagName === customTag))
|
|
21
22
|
: ts_doc_formatter_1.TsDocFormatter.renderDocNode(context.docComment.summarySection);
|
|
22
|
-
})
|
|
23
|
+
})
|
|
24
|
+
.join('');
|
|
23
25
|
return (0, marked_1.marked)(docs);
|
|
24
26
|
}
|
|
25
27
|
exports.extractDocs = extractDocs;
|
|
@@ -30,12 +32,14 @@ exports.extractDocs = extractDocs;
|
|
|
30
32
|
function extractSeeDocs(node) {
|
|
31
33
|
const jsDocs = (0, core_1.asArray)(node.getJsDocs()[0]);
|
|
32
34
|
const parser = new tsdoc_1.TSDocParser(getTsDocConfiguration());
|
|
33
|
-
return jsDocs
|
|
35
|
+
return jsDocs
|
|
36
|
+
.map((jsDoc) => {
|
|
34
37
|
const context = parser.parseString(jsDoc.getText());
|
|
35
38
|
return context.docComment.seeBlocks
|
|
36
39
|
.map((seeBlock) => ts_doc_formatter_1.TsDocFormatter.renderDocNode(seeBlock))
|
|
37
|
-
.map(marked_1.marked);
|
|
38
|
-
})
|
|
40
|
+
.map((block) => (0, marked_1.marked)(block));
|
|
41
|
+
})
|
|
42
|
+
.flat();
|
|
39
43
|
}
|
|
40
44
|
exports.extractSeeDocs = extractSeeDocs;
|
|
41
45
|
/**
|
|
@@ -46,11 +50,13 @@ exports.extractSeeDocs = extractSeeDocs;
|
|
|
46
50
|
function extractParameterDocs(node, paramName) {
|
|
47
51
|
const jsDocs = (0, core_1.asArray)(node.getJsDocs()[0]);
|
|
48
52
|
const parser = new tsdoc_1.TSDocParser(getTsDocConfiguration());
|
|
49
|
-
const docs = jsDocs
|
|
53
|
+
const docs = jsDocs
|
|
54
|
+
.map((doc) => {
|
|
50
55
|
const context = parser.parseString(doc.getText());
|
|
51
56
|
const paramBlock = context.docComment.params.tryGetBlockByName(paramName);
|
|
52
57
|
return paramBlock ? ts_doc_formatter_1.TsDocFormatter.renderDocNode(paramBlock.content) : '';
|
|
53
|
-
})
|
|
58
|
+
})
|
|
59
|
+
.join('');
|
|
54
60
|
return (0, marked_1.marked)(docs);
|
|
55
61
|
}
|
|
56
62
|
exports.extractParameterDocs = extractParameterDocs;
|
|
@@ -59,7 +65,7 @@ exports.extractParameterDocs = extractParameterDocs;
|
|
|
59
65
|
*/
|
|
60
66
|
function getTsDocConfiguration() {
|
|
61
67
|
const customTags = [
|
|
62
|
-
new tsdoc_1.TSDocTagDefinition({ tagName: '@usageNotes', syntaxKind: tsdoc_1.TSDocTagSyntaxKind.BlockTag, allowMultiple: false })
|
|
68
|
+
new tsdoc_1.TSDocTagDefinition({ tagName: '@usageNotes', syntaxKind: tsdoc_1.TSDocTagSyntaxKind.BlockTag, allowMultiple: false }),
|
|
63
69
|
];
|
|
64
70
|
const configuration = new tsdoc_1.TSDocConfiguration();
|
|
65
71
|
customTags.forEach((tag) => configuration.addTagDefinition(tag));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-docs.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/extract-docs.ts"],"names":[],"mappings":";;;AAAA,4CAO0B;AAE1B,uCAAqC;AAGrC,iEAA0D;AAC1D,qCAAgC;AAEhC;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,IAAmB,EAAE,SAAkB;IAClE,MAAM,MAAM,GAAY,IAAA,cAAO,EAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,MAAM,GAAgB,IAAI,mBAAW,CAAC,qBAAqB,EAAE,CAAC,CAAC;IACrE,MAAM,IAAI,GAAW,MAAM,
|
|
1
|
+
{"version":3,"file":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AE,KAAK,EAAC,CAAC;KAC/G,CAAC;IAEF,MAAM,aAAa,GAAuB,IAAI,0BAAkB,EAAE,CAAC;IAEnE,UAAU,CAAC,OAAO,CAAC,CAAC,GAAuB,EAAE,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;IAErF,OAAO,aAAa,CAAC;AACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-selectors.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/extract-selectors.ts"],"names":[],"mappings":";;;AAAA,uCAAyC;AAEzC,4FAAqF;AAGrF;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,WAAuC;;IACvE,IAAI,eAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;QACzC,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"extract-selectors.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/extract-selectors.ts"],"names":[],"mappings":";;;AAAA,uCAAyC;AAEzC,4FAAqF;AAGrF;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,WAAuC;;IACvE,IAAI,eAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;QACzC,MAAM,SAAS,GACd,MAAA,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,mCAAI,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QAEhF,IAAI,SAAS,EAAE;YACd,MAAM,UAAU,GAAqB,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;YAEjE,IAAI,eAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,EAAE;gBAC/C,MAAM,QAAQ,GAAW,MAAA,IAAA,yDAA0B,EAAC,UAAU,CAAC,CAAC,QAAQ,mCAAI,EAAE,CAAC;gBAE/E,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;aACxD;SACD;KACD;IAED,OAAO,EAAE,CAAC;AACX,CAAC;AAjBD,4CAiBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-api-entities.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/generate-api-entities.ts"],"names":[],"mappings":";;;;AAAA,uCAAoD;AACpD,mDAA6B;AAG7B,sCAAkF;AAElF,iEAAyD;AACzD,yEAAkE;AAElE;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,aAA6B;;IAChE,MAAM,MAAM,GAAoD,EAAE,CAAC;IAEnE,MAAA,aAAa,CAAC,MAAM,0CAAE,MAAM,CAAC,OAAO,CAAC,CAAC,KAAoB,EAAE,EAAE;QAC7D,MAAM,WAAW,GAAwB,IAAI,4BAAmB,CAC/D,aAAa,CAAC,OAAO,EACrB,aAAa,CAAC,UAAU,EACxB,aAAa,CAAC,OAAO,EACrB,aAAa,EACb,KAAK,CACL,CAAC;QAEF,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEzB,IAAA,cAAO,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,OAAe,EAAE,EAAE,CAClD,IAAA,cAAO,EACN,IAAI,GAAG,CACN,aAAa,CAAC,OAAO,CAAC,OAAO;aAC3B,qBAAqB,CACrB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,IAAA,wCAAiB,EAAC,CAAC,EAAE,IAAA,cAAO,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CACtF;aACA,GAAG,CAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,IAAA,cAAO,EAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;aACvF,IAAI,CAAC,CAAC,CAAC,CACT,CACD;aACC,MAAM,CAAC,iDAAsB,CAAC;aAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"generate-api-entities.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/generate-api-entities.ts"],"names":[],"mappings":";;;;AAAA,uCAAoD;AACpD,mDAA6B;AAG7B,sCAAkF;AAElF,iEAAyD;AACzD,yEAAkE;AAElE;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,aAA6B;;IAChE,MAAM,MAAM,GAAoD,EAAE,CAAC;IAEnE,MAAA,aAAa,CAAC,MAAM,0CAAE,MAAM,CAAC,OAAO,CAAC,CAAC,KAAoB,EAAE,EAAE;QAC7D,MAAM,WAAW,GAAwB,IAAI,4BAAmB,CAC/D,aAAa,CAAC,OAAO,EACrB,aAAa,CAAC,UAAU,EACxB,aAAa,CAAC,OAAO,EACrB,aAAa,EACb,KAAK,CACL,CAAC;QAEF,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEzB,IAAA,cAAO,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,OAAe,EAAE,EAAE,CAClD,IAAA,cAAO,EACN,IAAI,GAAG,CACN,aAAa,CAAC,OAAO,CAAC,OAAO;aAC3B,qBAAqB,CACrB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,IAAA,wCAAiB,EAAC,CAAC,EAAE,IAAA,cAAO,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CACtF;aACA,GAAG,CAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,IAAA,cAAO,EAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;aACvF,IAAI,CAAC,CAAC,CAAC,CACT,CACD;aACC,MAAM,CAAC,iDAAsB,CAAC;aAC9B,OAAO,CAAC,CAAC,WAAuC,EAAE,EAAU,EAAE,YAA0C,EAAE,EAAE;YAC5G,MAAM,IAAI,GAAuB,WAAW,CAAC,OAAO,EAAE,CAAC;YACvD,MAAM,UAAU,GAAiC,YAAY,CAAC,MAAM,CACnE,CAAC,CAA6B,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,KAAK,WAAW,CAAC,WAAW,EAAE,CACxG,CAAC;YAEF,IAAI,IAAI,EAAE;gBACT,MAAM,CAAC,IAAI,CACV,IAAI,2BAAkB,CACrB,aAAa,CAAC,OAAO,EACrB,WAAW,CAAC,aAAa,EAAE,EAC3B,aAAa,CAAC,OAAO,EACrB,WAAW,EACX,IAAI,EACJ,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,CAC/B,CACD,CAAC;aACF;QACF,CAAC,CAAC,CACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AACf,CAAC;AAjDD,kDAiDC"}
|
|
@@ -9,8 +9,7 @@ const ts_morph_1 = require("ts-morph");
|
|
|
9
9
|
*/
|
|
10
10
|
function getDemoClassDeclarations(objectExpression) {
|
|
11
11
|
const demoProperty = objectExpression.getProperty('demo');
|
|
12
|
-
if (demoProperty &&
|
|
13
|
-
(ts_morph_1.Node.isPropertyAssignment(demoProperty) || ts_morph_1.Node.isShorthandPropertyAssignment(demoProperty))) {
|
|
12
|
+
if (demoProperty && (ts_morph_1.Node.isPropertyAssignment(demoProperty) || ts_morph_1.Node.isShorthandPropertyAssignment(demoProperty))) {
|
|
14
13
|
const initializer = demoProperty.getInitializer();
|
|
15
14
|
if (initializer && initializer instanceof ts_morph_1.ObjectLiteralExpression) {
|
|
16
15
|
return initializer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-demo-class-declarations.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-demo-class-declarations.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,uCAA+G;AAE/G;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,gBAAyC;IACjF,MAAM,YAAY,GAAyC,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAEhG,
|
|
1
|
+
{"version":3,"file":"get-demo-class-declarations.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-demo-class-declarations.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,uCAA+G;AAE/G;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,gBAAyC;IACjF,MAAM,YAAY,GAAyC,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAEhG,IAAI,YAAY,IAAI,CAAC,eAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,IAAI,eAAI,CAAC,6BAA6B,CAAC,YAAY,CAAC,CAAC,EAAE;QAClH,MAAM,WAAW,GAA2B,YAAY,CAAC,cAAc,EAAE,CAAC;QAE1E,IAAI,WAAW,IAAI,WAAW,YAAY,kCAAuB,EAAE;YAClE,OAAO,WAAW;iBAChB,aAAa,EAAE;iBACf,GAAG,CAAC,CAAC,QAAkC,EAAE,EAAE,WAAC,OAAA,MAAA,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,0CAAE,mBAAmB,EAAE,CAAA,EAAA,CAAC;iBAClG,MAAM,CAAC,gBAAS,CAAC;iBACjB,MAAM,CAAC,eAAI,CAAC,kBAAkB,CAAC,CAAC;SAClC;KACD;IAED,OAAO,EAAE,CAAC;AACX,CAAC;AAhBD,4DAgBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-keyword-type-from-entity.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-keyword-type-from-entity.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"get-keyword-type-from-entity.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-keyword-type-from-entity.ts"],"names":[],"mappings":";;;AAGA,+CAA4D;AAC5D,mDAA4C;AAE5C;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,MAAwB;IAChE,IAAI,IAAA,6BAAe,EAAC,MAAM,CAAC,EAAE;QAC5B,MAAM,QAAQ,GAA8B,MAAM,CAAC,WAAW,IAAI,IAAA,2BAAW,EAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAElG,OAAO,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,KAAK,CAAC;KACzB;IAED,IAAI,IAAA,0BAAY,EAAC,MAAM,CAAC,EAAE;QACzB,OAAO,OAAO,CAAC;KACf;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAZD,4DAYC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-playground-by-id.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-playground-by-id.ts"],"names":[],"mappings":";;;AAAA,uCAA6F;AAE7F;;;;GAIG;AACH,SAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"get-playground-by-id.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-playground-by-id.ts"],"names":[],"mappings":";;;AAAA,uCAA6F;AAE7F;;;;GAIG;AACH,SAAgB,iBAAiB,CAChC,UAAmC,EACnC,YAAoB;IAEpB,MAAM,oBAAoB,GAAyC,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAExG,IAAI,eAAI,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,EAAE;QACpD,MAAM,qBAAqB,GAA2B,oBAAoB,CAAC,cAAc,EAAE,CAAC;QAE5F,IAAI,eAAI,CAAC,yBAAyB,CAAC,qBAAqB,CAAC,EAAE;YAC1D,OAAO,qBAAqB,CAAC;SAC7B;KACD;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAfD,8CAeC"}
|
|
@@ -95,9 +95,10 @@ function getPlaygroundClassProperties(declaration) {
|
|
|
95
95
|
var _a, _b, _c, _d;
|
|
96
96
|
const inputName = (_c = (_b = (_a = property
|
|
97
97
|
.getDecorator('Input')) === null || _a === void 0 ? void 0 : _a.getArguments()[0]) === null || _b === void 0 ? void 0 : _b.getText().replace(/^["']|['"]$/g, '')) !== null && _c !== void 0 ? _c : property.getName();
|
|
98
|
+
const typeNode = property.getTypeNode();
|
|
98
99
|
properties[property.getName()] = {
|
|
99
100
|
name: inputName,
|
|
100
|
-
type: (0, typescript_1.displayType)(property.getType()),
|
|
101
|
+
type: typeNode ? (0, typescript_1.displayTypeNode)(typeNode) : (0, typescript_1.displayType)(property.getType()),
|
|
101
102
|
default: (_d = property.getInitializer()) === null || _d === void 0 ? void 0 : _d.getText(),
|
|
102
103
|
description: property
|
|
103
104
|
.getJsDocs()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-playground-properties.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-playground-properties.ts"],"names":[],"mappings":";;;AACA,uCASkB;AAElB,iEAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"get-playground-properties.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-playground-properties.ts"],"names":[],"mappings":";;;AACA,uCASkB;AAElB,iEAAyD;AACzD,6CAA0D;AAE1D;;;;GAIG;AACH,SAAgB,sBAAsB,CACrC,UAAmC,EACnC,YAAoB;;IAEpB,MAAM,UAAU,GAAwC,IAAA,wCAAiB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAEpG,IAAI,UAAU,EAAE;QACf,MAAM,MAAM,GAAyC,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAEtF,IAAI,eAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE;YACtC,MAAM,iBAAiB,GAA2B,MAAM,CAAC,cAAc,EAAE,CAAC;YAE1E,IAAI,eAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE;gBACzC,MAAM,WAAW,GAAqB,MAAA,MAAA,iBAAiB,CAAC,OAAO,EAAE,0CAAE,SAAS,EAAE,0CAAE,eAAe,GAAG,CAAC,CAAC,CAAC;gBAErG,IAAI,eAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;oBACzC,OAAO,WAAW,CAAC;iBACnB;aACD;SACD;KACD;IAED,OAAO,SAAS,CAAC;AA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C,CAAC,CAAC,IAAA,wBAAW,EAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YAC5E,OAAO,EAAE,MAAA,QAAQ,CAAC,cAAc,EAAE,0CAAE,OAAO,EAAE;YAC7C,WAAW,EAAE,QAAQ;iBACnB,SAAS,EAAE;iBACX,MAAM,CAAC,CAAC,OAAe,EAAE,GAAU,EAAE,EAAE,CAAC,GAAG,OAAO,KAAK,GAAG,CAAC,cAAc,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC;YAC3F,OAAO,EAAE,QAAQ;iBACf,OAAO,EAAE;iBACT,aAAa,EAAE;iBACf,GAAG,CAAC,CAAC,IAAU,EAAE,EAAE,CAAC,IAAA,wBAAW,EAAC,IAAI,CAAC,CAAC;SACxC,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AA5BD,oEA4BC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.importEsModule = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Hacky way to import ES modules dynamically.
|
|
6
|
+
*
|
|
7
|
+
* @param modulePath
|
|
8
|
+
*/
|
|
9
|
+
function importEsModule(modulePath) {
|
|
10
|
+
return new Function(`return import('${modulePath}');`)();
|
|
11
|
+
}
|
|
12
|
+
exports.importEsModule = importEsModule;
|
|
13
|
+
//# sourceMappingURL=import-es-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-es-module.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/import-es-module.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,cAAc,CAAI,UAAkB;IACnD,OAAO,IAAI,QAAQ,CAAC,kBAAkB,UAAU,KAAK,CAAC,EAAE,CAAC;AAC1D,CAAC;AAFD,wCAEC"}
|
package/helpers/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './get-keyword-type-from-entity';
|
|
|
19
19
|
export * from './get-kind-type';
|
|
20
20
|
export * from './get-playground-by-id';
|
|
21
21
|
export * from './get-playground-properties';
|
|
22
|
+
export * from './import-es-module';
|
|
22
23
|
export * from './is-not-excluded-path';
|
|
23
24
|
export * from './is-supported-declaration';
|
|
24
25
|
export * from './marked';
|
|
@@ -26,7 +27,6 @@ export * from './no-empty';
|
|
|
26
27
|
export * from './no-line-breaks';
|
|
27
28
|
export * from './not-empty-assets';
|
|
28
29
|
export * from './presentation';
|
|
29
|
-
export * from './print-console';
|
|
30
30
|
export * from './process-snippets';
|
|
31
31
|
export * from './repo-link';
|
|
32
32
|
export * from './slash';
|
package/helpers/index.js
CHANGED
|
@@ -22,6 +22,7 @@ tslib_1.__exportStar(require("./get-keyword-type-from-entity"), exports);
|
|
|
22
22
|
tslib_1.__exportStar(require("./get-kind-type"), exports);
|
|
23
23
|
tslib_1.__exportStar(require("./get-playground-by-id"), exports);
|
|
24
24
|
tslib_1.__exportStar(require("./get-playground-properties"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./import-es-module"), exports);
|
|
25
26
|
tslib_1.__exportStar(require("./is-not-excluded-path"), exports);
|
|
26
27
|
tslib_1.__exportStar(require("./is-supported-declaration"), exports);
|
|
27
28
|
tslib_1.__exportStar(require("./marked"), exports);
|
|
@@ -29,7 +30,6 @@ tslib_1.__exportStar(require("./no-empty"), exports);
|
|
|
29
30
|
tslib_1.__exportStar(require("./no-line-breaks"), exports);
|
|
30
31
|
tslib_1.__exportStar(require("./not-empty-assets"), exports);
|
|
31
32
|
tslib_1.__exportStar(require("./presentation"), exports);
|
|
32
|
-
tslib_1.__exportStar(require("./print-console"), exports);
|
|
33
33
|
tslib_1.__exportStar(require("./process-snippets"), exports);
|
|
34
34
|
tslib_1.__exportStar(require("./repo-link"), exports);
|
|
35
35
|
tslib_1.__exportStar(require("./slash"), exports);
|
package/helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,+DAAqC;AACrC,mEAAyC;AACzC,oEAA0C;AAC1C,8DAAoC;AACpC,wDAA8B;AAC9B,yDAA+B;AAC/B,gEAAsC;AACtC,8DAAoC;AACpC,mEAAyC;AACzC,8DAAoC;AACpC,wDAA8B;AAC9B,kEAAwC;AACxC,gEAAsC;AACtC,iEAAuC;AACvC,wEAA8C;AAC9C,mEAAyC;AACzC,yEAA+C;AAC/C,0DAAgC;AAChC,iEAAuC;AACvC,sEAA4C;AAC5C,iEAAuC;AACvC,qEAA2C;AAC3C,mDAAyB;AACzB,qDAA2B;AAC3B,2DAAiC;AACjC,6DAAmC;AACnC,yDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,+DAAqC;AACrC,mEAAyC;AACzC,oEAA0C;AAC1C,8DAAoC;AACpC,wDAA8B;AAC9B,yDAA+B;AAC/B,gEAAsC;AACtC,8DAAoC;AACpC,mEAAyC;AACzC,8DAAoC;AACpC,wDAA8B;AAC9B,kEAAwC;AACxC,gEAAsC;AACtC,iEAAuC;AACvC,wEAA8C;AAC9C,mEAAyC;AACzC,yEAA+C;AAC/C,0DAAgC;AAChC,iEAAuC;AACvC,sEAA4C;AAC5C,6DAAmC;AACnC,iEAAuC;AACvC,qEAA2C;AAC3C,mDAAyB;AACzB,qDAA2B;AAC3B,2DAAiC;AACjC,6DAAmC;AACnC,yDAA+B;AAC/B,6DAAmC;AACnC,sDAA4B;AAC5B,kDAAwB;AACxB,qEAA2C;AAC3C,uDAA6B;AAC7B,wDAA8B"}
|
package/helpers/marked.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { NgDocPageEntity } from '../engine';
|
|
1
2
|
/**
|
|
2
3
|
*
|
|
3
4
|
* @param this
|
|
4
5
|
* @param markdown
|
|
6
|
+
* @param contextFolder
|
|
7
|
+
* @param page
|
|
5
8
|
*/
|
|
6
|
-
export declare function marked(markdown: string): string;
|
|
9
|
+
export declare function marked(markdown: string, page?: NgDocPageEntity): string;
|
package/helpers/marked.js
CHANGED
|
@@ -1,20 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.marked = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@ng-doc/core");
|
|
6
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
5
7
|
const marked_1 = require("marked");
|
|
8
|
+
const node_os_1 = require("node:os");
|
|
9
|
+
const path = tslib_1.__importStar(require("path"));
|
|
6
10
|
const NOTE_ANCHOR = '<p><strong>Note</strong>';
|
|
7
11
|
const WARNING_ANCHOR = '<p><strong>Warning</strong>';
|
|
8
12
|
/**
|
|
9
13
|
*
|
|
10
14
|
* @param this
|
|
11
15
|
* @param markdown
|
|
16
|
+
* @param contextFolder
|
|
17
|
+
* @param page
|
|
12
18
|
*/
|
|
13
|
-
function marked(markdown) {
|
|
19
|
+
function marked(markdown, page) {
|
|
14
20
|
const renderer = {
|
|
15
21
|
code(code, language) {
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
var _a, _b, _c, _d, _e;
|
|
23
|
+
const parameters = (_a = language === null || language === void 0 ? void 0 : language.match(/(?:[^\s"]+|"[^"]*")+/g)) !== null && _a !== void 0 ? _a : [];
|
|
24
|
+
const fileParameter = parameters.find((parameter) => parameter.startsWith('file='));
|
|
25
|
+
const lang = (_b = parameters[0]) !== null && _b !== void 0 ? _b : 'typescript';
|
|
26
|
+
const fileName = (_e = (_d = (_c = parameters
|
|
27
|
+
.find((parameter) => parameter.startsWith('fileName='))) === null || _c === void 0 ? void 0 : _c.replace(/"/g, '')) === null || _d === void 0 ? void 0 : _d.replace(/^fileName=/, '')) !== null && _e !== void 0 ? _e : '';
|
|
28
|
+
if (fileParameter && page) {
|
|
29
|
+
const result = loadFile(fileParameter, page.mdFolder);
|
|
30
|
+
page.dependencies.add(result[0]);
|
|
31
|
+
code = result[1];
|
|
32
|
+
}
|
|
33
|
+
return `<pre><code class="language-${lang}" lang="${lang}" fileName="${fileName}">${(0, core_1.escapeHtml)(code)}</code></pre>`;
|
|
18
34
|
},
|
|
19
35
|
blockquote(quote) {
|
|
20
36
|
if (new RegExp(`^${NOTE_ANCHOR}`).test(quote)) {
|
|
@@ -30,4 +46,30 @@ function marked(markdown) {
|
|
|
30
46
|
return marked_1.marked.parse(markdown, { headerIds: false });
|
|
31
47
|
}
|
|
32
48
|
exports.marked = marked;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param str
|
|
52
|
+
* @param contextFolder
|
|
53
|
+
*/
|
|
54
|
+
function loadFile(str, contextFolder) {
|
|
55
|
+
var _a;
|
|
56
|
+
const res = /^file=(?<path>.+?)(?:(?:#(?:L(?<from>\d+)(?<dash>-)?)?)(?:L(?<to>\d+))?)?$/.exec(str);
|
|
57
|
+
if (!res || !res.groups || !res.groups['path']) {
|
|
58
|
+
throw new Error(`Unable to parse file path ${str}`);
|
|
59
|
+
}
|
|
60
|
+
const groupPath = res.groups['path'].replace(/"/g, '');
|
|
61
|
+
const relativeFilePath = path.join(contextFolder, groupPath);
|
|
62
|
+
const file = fs.readFileSync(relativeFilePath !== null && relativeFilePath !== void 0 ? relativeFilePath : '', 'utf8');
|
|
63
|
+
const fileLines = file.split(node_os_1.EOL);
|
|
64
|
+
const fromLine = res.groups['from'] ? parseInt(res.groups['from'], 10) : 1;
|
|
65
|
+
const hasDash = (_a = !!res.groups['dash']) !== null && _a !== void 0 ? _a : false;
|
|
66
|
+
let toLine = fileLines.length;
|
|
67
|
+
if (res.groups['to']) {
|
|
68
|
+
toLine = parseInt(res.groups['to'], 10);
|
|
69
|
+
}
|
|
70
|
+
if (!hasDash && res.groups['from']) {
|
|
71
|
+
toLine = fromLine;
|
|
72
|
+
}
|
|
73
|
+
return [relativeFilePath, fileLines.slice(fromLine - 1, toLine).join(node_os_1.EOL)];
|
|
74
|
+
}
|
|
33
75
|
//# sourceMappingURL=marked.js.map
|
package/helpers/marked.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marked.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/marked.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"marked.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/marked.ts"],"names":[],"mappings":";;;;AAAA,uCAAwC;AACxC,+CAAyB;AACzB,mCAA8C;AAC9C,qCAA4B;AAC5B,mDAA6B;AAI7B,MAAM,WAAW,GAAW,0BAA0B,CAAC;AACvD,MAAM,cAAc,GAAW,6BAA6B,CAAC;AAE7D;;;;;;GAMG;AACH,SAAgB,MAAM,CAAC,QAAgB,EAAE,IAAsB;IAC9D,MAAM,QAAQ,GAAgC;QAC7C,IAAI,CAAC,IAAY,EAAE,QAA4B;;YAC9C,MAAM,UAAU,GAAa,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAC,uBAAuB,CAAC,mCAAI,EAAE,CAAC;YAC5E,MAAM,aAAa,GAAuB,UAAU,CAAC,IAAI,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;YAChH,MAAM,IAAI,GAAW,MAAA,UAAU,CAAC,CAAC,CAAC,mCAAI,YAAY,CAAC;YACnD,MAAM,QAAQ,GACb,MAAA,MAAA,MAAA,UAAU;iBACR,IAAI,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,0CAC7D,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,0CACjB,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,mCAAI,EAAE,CAA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C,CAAC,CAAC;AAC5E,CAAC"}
|
package/helpers/presentation.js
CHANGED
|
@@ -32,7 +32,8 @@ function accessorPresentation(accessor) {
|
|
|
32
32
|
? `${accessor.getName()}():`
|
|
33
33
|
: `${accessor.getName()}(${parameters})`;
|
|
34
34
|
const returnType = ts_morph_1.Node.isGetAccessorDeclaration(accessor) ? (0, typescript_1.displayType)(accessor.getReturnType()) : '';
|
|
35
|
-
|
|
35
|
+
const presentation = [prefix, scopePresentation(accessor), header, returnType].filter(core_1.isPresent).join(' ') + ';';
|
|
36
|
+
return (0, format_code_1.formatCode)(presentation, 'TypeScript');
|
|
36
37
|
}
|
|
37
38
|
exports.accessorPresentation = accessorPresentation;
|
|
38
39
|
/**
|
|
@@ -41,9 +42,10 @@ exports.accessorPresentation = accessorPresentation;
|
|
|
41
42
|
*/
|
|
42
43
|
function methodPresentation(method) {
|
|
43
44
|
const parameters = method.getParameters().map(parameterPresentation).join(', ');
|
|
44
|
-
|
|
45
|
+
const presentation = [scopePresentation(method), `${method.getName()}(${parameters}):`, `${(0, typescript_1.displayType)(method.getReturnType())};`]
|
|
45
46
|
.filter(core_1.isPresent)
|
|
46
47
|
.join(' ');
|
|
48
|
+
return (0, format_code_1.formatCode)(presentation, 'TypeScript');
|
|
47
49
|
}
|
|
48
50
|
exports.methodPresentation = methodPresentation;
|
|
49
51
|
/**
|
|
@@ -52,9 +54,10 @@ exports.methodPresentation = methodPresentation;
|
|
|
52
54
|
*/
|
|
53
55
|
function functionPresentation(fnc) {
|
|
54
56
|
const parameters = fnc.getParameters().map(parameterPresentation).join(', ');
|
|
55
|
-
|
|
57
|
+
const presentation = ['function', `${fnc.getName()}(${parameters}):`, `${(0, typescript_1.displayType)(fnc.getReturnType())};`]
|
|
56
58
|
.filter(core_1.isPresent)
|
|
57
59
|
.join(' ');
|
|
60
|
+
return (0, format_code_1.formatCode)(presentation, 'TypeScript');
|
|
58
61
|
}
|
|
59
62
|
exports.functionPresentation = functionPresentation;
|
|
60
63
|
/**
|
|
@@ -62,7 +65,8 @@ exports.functionPresentation = functionPresentation;
|
|
|
62
65
|
* @param typeAlias
|
|
63
66
|
*/
|
|
64
67
|
function typeAliasPresentation(typeAlias) {
|
|
65
|
-
|
|
68
|
+
const presentation = `type ${typeAlias.getName()} = ${(0, typescript_1.displayType)(typeAlias.getType())};`;
|
|
69
|
+
return (0, format_code_1.formatCode)(presentation, "TypeScript");
|
|
66
70
|
}
|
|
67
71
|
exports.typeAliasPresentation = typeAliasPresentation;
|
|
68
72
|
/**
|
|
@@ -71,13 +75,14 @@ exports.typeAliasPresentation = typeAliasPresentation;
|
|
|
71
75
|
*/
|
|
72
76
|
function variablePresentation(variable) {
|
|
73
77
|
var _a, _b;
|
|
74
|
-
|
|
78
|
+
const presentation = [
|
|
75
79
|
(_b = (_a = variable.getVariableStatement()) === null || _a === void 0 ? void 0 : _a.getDeclarationKind()) !== null && _b !== void 0 ? _b : 'const',
|
|
76
80
|
`${variable.getName()}:`,
|
|
77
81
|
`${(0, typescript_1.displayType)(variable.getType())};`,
|
|
78
82
|
]
|
|
79
83
|
.filter(core_1.isPresent)
|
|
80
84
|
.join(' ');
|
|
85
|
+
return (0, format_code_1.formatCode)(presentation, 'TypeScript');
|
|
81
86
|
}
|
|
82
87
|
exports.variablePresentation = variablePresentation;
|
|
83
88
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/presentation.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,uCAckB;AAElB,+CAAyC;AACzC,6CAAyC;AAEzC;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,WAAmC;IAC1E,MAAM,UAAU,GAAW,WAAW,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEhG,MAAM,YAAY,GAAW;QAC5B,iBAAiB,CAAC,WAAW,CAAC;QAC9B,kBAAkB,U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IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,SAAS,sBAAsB,CAAC,IAAqB;IACpD,OAAO,IAAI;SACT,aAAa,EAAE;SACf,GAAG,CAAC,CAAC,CAAY,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;SAC1C,IAAI,CAAC,GAAG,CAAC,CAAC;AACb,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { Type } from 'ts-morph';
|
|
1
|
+
import { Type, TypeNode } from 'ts-morph';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param type
|
|
5
5
|
*/
|
|
6
6
|
export declare function displayType(type: Type): string;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param node
|
|
10
|
+
*/
|
|
11
|
+
export declare function displayTypeNode(node: TypeNode): string;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.displayType = void 0;
|
|
3
|
+
exports.displayTypeNode = exports.displayType = void 0;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
* @param type
|
|
8
8
|
*/
|
|
9
9
|
function displayType(type) {
|
|
10
|
-
return type.getText(undefined, ts_morph_1.TypeFormatFlags.
|
|
10
|
+
return type.getText(undefined, ts_morph_1.TypeFormatFlags.NoTruncation);
|
|
11
11
|
}
|
|
12
12
|
exports.displayType = displayType;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param node
|
|
16
|
+
*/
|
|
17
|
+
function displayTypeNode(node) {
|
|
18
|
+
return node.getText();
|
|
19
|
+
}
|
|
20
|
+
exports.displayTypeNode = displayTypeNode;
|
|
13
21
|
//# sourceMappingURL=display-type.js.map
|