@ng-doc/builder 15.10.0 → 15.10.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/engine/template-filters.d.ts +1 -1
- package/engine/template-filters.js +2 -2
- package/engine/template-filters.js.map +1 -1
- package/helpers/get-playground-properties.js +2 -3
- package/helpers/get-playground-properties.js.map +1 -1
- package/helpers/presentation.js +7 -7
- package/helpers/presentation.js.map +1 -1
- package/helpers/typescript/display-type.d.ts +4 -3
- package/helpers/typescript/display-type.js +14 -6
- package/helpers/typescript/display-type.js.map +1 -1
- package/package.json +3 -3
- package/templates/api/class.html.nunj +2 -2
- package/templates/api/interface.html.nunj +1 -1
- package/templates/helpers/accessor.html.nunj +1 -1
- package/templates/helpers/method.html.nunj +1 -1
- package/templates/helpers/parameters.html.nunj +1 -1
- package/templates/helpers/properties.html.nunj +1 -1
- package/templates/helpers/type.html.nunj +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { accessorPresentation, constructorPresentation,
|
|
1
|
+
export { accessorPresentation, constructorPresentation, displayReturnType, 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';
|
|
2
2
|
export { buildPlaygroundDemoTemplate, objectKeys } from '@ng-doc/core';
|
|
@@ -1,12 +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.
|
|
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.displayReturnType = 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
|
+
Object.defineProperty(exports, "displayReturnType", { enumerable: true, get: function () { return helpers_1.displayReturnType; } });
|
|
8
9
|
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; } });
|
|
10
10
|
Object.defineProperty(exports, "extractDocs", { enumerable: true, get: function () { return helpers_1.extractDocs; } });
|
|
11
11
|
Object.defineProperty(exports, "extractParameterDocs", { enumerable: true, get: function () { return helpers_1.extractParameterDocs; } });
|
|
12
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,sCA0CoB;AAzCnB,+GAAA,oBAAoB,OAAA;AACpB,kHAAA,uBAAuB,OAAA;AACvB,
|
|
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,4GAAA,iBAAiB,OAAA;AACjB,sGAAA,WAAW,OAAA;AACX,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"}
|
|
@@ -95,10 +95,9 @@ 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();
|
|
99
98
|
properties[property.getName()] = {
|
|
100
99
|
name: inputName,
|
|
101
|
-
type:
|
|
100
|
+
type: (0, typescript_1.displayType)(property),
|
|
102
101
|
default: (_d = property.getInitializer()) === null || _d === void 0 ? void 0 : _d.getText(),
|
|
103
102
|
description: property
|
|
104
103
|
.getJsDocs()
|
|
@@ -106,7 +105,7 @@ function getPlaygroundClassProperties(declaration) {
|
|
|
106
105
|
options: property
|
|
107
106
|
.getType()
|
|
108
107
|
.getUnionTypes()
|
|
109
|
-
.map((type) => (
|
|
108
|
+
.map((type) => type.getText(undefined, ts_morph_1.TypeFormatFlags.NoTruncation)),
|
|
110
109
|
};
|
|
111
110
|
return properties;
|
|
112
111
|
}, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-playground-properties.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-playground-properties.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"get-playground-properties.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-playground-properties.ts"],"names":[],"mappings":";;;AACA,uCAUkB;AAElB,iEAAyD;AACzD,6CAAyC;AAEzC;;;;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;AAClB,CAAC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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,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,0BAAe,CAAC,YAAY,CAAC,CAAC;SAC5E,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AA3BD,oEA2BC"}
|
package/helpers/presentation.js
CHANGED
|
@@ -14,7 +14,7 @@ function constructorPresentation(constructor) {
|
|
|
14
14
|
const presentation = [
|
|
15
15
|
scopePresentation(constructor),
|
|
16
16
|
`constructor(\n ${parameters}\n):`,
|
|
17
|
-
(0, typescript_1.
|
|
17
|
+
(0, typescript_1.displayReturnType)(constructor),
|
|
18
18
|
]
|
|
19
19
|
.filter(core_1.isPresent)
|
|
20
20
|
.join(' ');
|
|
@@ -31,7 +31,7 @@ function accessorPresentation(accessor) {
|
|
|
31
31
|
const header = ts_morph_1.Node.isGetAccessorDeclaration(accessor)
|
|
32
32
|
? `${accessor.getName()}():`
|
|
33
33
|
: `${accessor.getName()}(${parameters})`;
|
|
34
|
-
const returnType = ts_morph_1.Node.isGetAccessorDeclaration(accessor) ? (0, typescript_1.
|
|
34
|
+
const returnType = ts_morph_1.Node.isGetAccessorDeclaration(accessor) ? (0, typescript_1.displayReturnType)(accessor) : '';
|
|
35
35
|
const presentation = [prefix, scopePresentation(accessor), header, returnType].filter(core_1.isPresent).join(' ') + ';';
|
|
36
36
|
return (0, format_code_1.formatCode)(presentation, 'TypeScript');
|
|
37
37
|
}
|
|
@@ -42,7 +42,7 @@ exports.accessorPresentation = accessorPresentation;
|
|
|
42
42
|
*/
|
|
43
43
|
function methodPresentation(method) {
|
|
44
44
|
const parameters = method.getParameters().map(parameterPresentation).join(', ');
|
|
45
|
-
const presentation = [scopePresentation(method), `${method.getName()}(${parameters}):`, `${(0, typescript_1.
|
|
45
|
+
const presentation = [scopePresentation(method), `${method.getName()}(${parameters}):`, `${(0, typescript_1.displayReturnType)(method)};`]
|
|
46
46
|
.filter(core_1.isPresent)
|
|
47
47
|
.join(' ');
|
|
48
48
|
return (0, format_code_1.formatCode)(presentation, 'TypeScript');
|
|
@@ -54,7 +54,7 @@ exports.methodPresentation = methodPresentation;
|
|
|
54
54
|
*/
|
|
55
55
|
function functionPresentation(fnc) {
|
|
56
56
|
const parameters = fnc.getParameters().map(parameterPresentation).join(', ');
|
|
57
|
-
const presentation = ['function', `${fnc.getName()}(${parameters}):`, `${(0, typescript_1.
|
|
57
|
+
const presentation = ['function', `${fnc.getName()}(${parameters}):`, `${(0, typescript_1.displayReturnType)(fnc)};`]
|
|
58
58
|
.filter(core_1.isPresent)
|
|
59
59
|
.join(' ');
|
|
60
60
|
return (0, format_code_1.formatCode)(presentation, 'TypeScript');
|
|
@@ -65,7 +65,7 @@ exports.functionPresentation = functionPresentation;
|
|
|
65
65
|
* @param typeAlias
|
|
66
66
|
*/
|
|
67
67
|
function typeAliasPresentation(typeAlias) {
|
|
68
|
-
const presentation = `type ${typeAlias.getName()} = ${(
|
|
68
|
+
const presentation = `type ${typeAlias.getName()} = ${typeAlias.getType().getText(undefined, ts_morph_1.TypeFormatFlags.NoTruncation)};`;
|
|
69
69
|
return (0, format_code_1.formatCode)(presentation, "TypeScript");
|
|
70
70
|
}
|
|
71
71
|
exports.typeAliasPresentation = typeAliasPresentation;
|
|
@@ -78,7 +78,7 @@ function variablePresentation(variable) {
|
|
|
78
78
|
const presentation = [
|
|
79
79
|
(_b = (_a = variable.getVariableStatement()) === null || _a === void 0 ? void 0 : _a.getDeclarationKind()) !== null && _b !== void 0 ? _b : 'const',
|
|
80
80
|
`${variable.getName()}:`,
|
|
81
|
-
`${(0, typescript_1.displayType)(variable
|
|
81
|
+
`${(0, typescript_1.displayType)(variable)};`,
|
|
82
82
|
]
|
|
83
83
|
.filter(core_1.isPresent)
|
|
84
84
|
.join(' ');
|
|
@@ -95,7 +95,7 @@ function parameterPresentation(parameter) {
|
|
|
95
95
|
scopePresentation(parameter),
|
|
96
96
|
modPresentation(parameter),
|
|
97
97
|
parameter.getName() + (parameter.hasQuestionToken() ? '?' : '') + ':',
|
|
98
|
-
(0, typescript_1.displayType)(parameter
|
|
98
|
+
(0, typescript_1.displayType)(parameter),
|
|
99
99
|
parameter.getInitializer() ? `= ${parameter.getInitializer()}` : '',
|
|
100
100
|
]
|
|
101
101
|
.filter(core_1.isPresent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/presentation.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/presentation.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,uCAekB;AAElB,+CAAyC;AACzC,6CAA4D;AAE5D;;;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,UAAU,MAAM;QAClC,IAAA,8BAAiB,EAAC,WAAW,CAAC;KAC9B;SACC,MAAM,CAAC,gBAAS,CAAC;SACjB,IAAI,CAAC,GAAG,CAAC,CAAC;IAEZ,OAAO,IAAA,wBAAU,EAAC,YAAY,EAAE,YAAY,CAAC,CAAC;AAC/C,CAAC;AAZD,0DAYC;AAED;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,QAA6B;IACj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morph';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param type
|
|
5
|
+
* @param node
|
|
5
6
|
*/
|
|
6
|
-
export declare function displayType(
|
|
7
|
+
export declare function displayType(node: Node): string;
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
9
10
|
* @param node
|
|
10
11
|
*/
|
|
11
|
-
export declare function
|
|
12
|
+
export declare function displayReturnType(node: Node): string;
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.displayReturnType = exports.displayType = void 0;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
* @param type
|
|
8
|
+
* @param node
|
|
8
9
|
*/
|
|
9
|
-
function displayType(
|
|
10
|
-
|
|
10
|
+
function displayType(node) {
|
|
11
|
+
var _a;
|
|
12
|
+
return ((ts_morph_1.Node.isTyped(node) && ((_a = node.getTypeNode()) === null || _a === void 0 ? void 0 : _a.getText())) ||
|
|
13
|
+
(ts_morph_1.Node.isTyped(node) && node.getType().getText(undefined, ts_morph_1.TypeFormatFlags.NoTruncation)) ||
|
|
14
|
+
'');
|
|
11
15
|
}
|
|
12
16
|
exports.displayType = displayType;
|
|
13
17
|
/**
|
|
14
18
|
*
|
|
15
19
|
* @param node
|
|
16
20
|
*/
|
|
17
|
-
function
|
|
18
|
-
|
|
21
|
+
function displayReturnType(node) {
|
|
22
|
+
var _a;
|
|
23
|
+
if (ts_morph_1.Node.isReturnTyped(node)) {
|
|
24
|
+
return ((_a = node.getReturnTypeNode()) === null || _a === void 0 ? void 0 : _a.getText()) || node.getReturnType().getText(undefined, ts_morph_1.TypeFormatFlags.NoTruncation);
|
|
25
|
+
}
|
|
26
|
+
return '';
|
|
19
27
|
}
|
|
20
|
-
exports.
|
|
28
|
+
exports.displayReturnType = displayReturnType;
|
|
21
29
|
//# sourceMappingURL=display-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-type.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/typescript/display-type.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"display-type.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/typescript/display-type.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAE/C;;;;GAIG;AACH,SAAgB,WAAW,CAAC,IAAU;;IACrC,OAAO,CACN,CAAC,eAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAI,MAAA,IAAI,CAAC,WAAW,EAAE,0CAAE,OAAO,EAAE,CAAA,CAAC;QACrD,CAAC,eAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,0BAAe,CAAC,YAAY,CAAC,CAAC;QACvF,EAAE,CACF,CAAC;AACH,CAAC;AAND,kCAMC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,IAAU;;IAC3C,IAAI,eAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE;QAC7B,OAAO,CAAA,MAAA,IAAI,CAAC,iBAAiB,EAAE,0CAAE,OAAO,EAAE,KAAI,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,0BAAe,CAAC,YAAY,CAAC,CAAC;KACpH;IACD,OAAO,EAAE,CAAC;AACX,CAAC;AALD,8CAKC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-doc/builder",
|
|
3
|
-
"version": "15.10.
|
|
3
|
+
"version": "15.10.2",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"builders": "./builders.json",
|
|
6
6
|
"schematics": "./schematics/collection.json",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@ng-doc/core": "15.10.
|
|
9
|
-
"@ng-doc/utils": "15.10.
|
|
8
|
+
"@ng-doc/core": "15.10.2",
|
|
9
|
+
"@ng-doc/utils": "15.10.2",
|
|
10
10
|
"@angular-devkit/architect": ">=0.1500.0",
|
|
11
11
|
"chokidar": "^3.5.3",
|
|
12
12
|
"minimatch": "^5.1.0",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
<div class="ng-doc-header-details" indexable="false">
|
|
20
20
|
{% if extends %}
|
|
21
21
|
<span class="ng-doc-header-details-label">Extends</span>
|
|
22
|
-
{{ typeMacro.
|
|
22
|
+
{{ typeMacro.type(extends) }}
|
|
23
23
|
{%- endif %}
|
|
24
24
|
{% if implements.length %}
|
|
25
25
|
<span class="ng-doc-header-details-label">Implements</span>
|
|
26
26
|
{%- for i in implements -%}
|
|
27
|
-
{{ typeMacro.
|
|
27
|
+
{{ typeMacro.type(i) }}
|
|
28
28
|
{%- endfor %}
|
|
29
29
|
{%- endif %}
|
|
30
30
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{% macro
|
|
2
|
-
<code indexable="false">{{
|
|
1
|
+
{% macro type(node) -%}
|
|
2
|
+
<code indexable="false">{{ node | displayType | escape }}</code>
|
|
3
3
|
{%- endmacro %}
|
|
4
4
|
|
|
5
|
-
{%- macro
|
|
6
|
-
<code indexable="false">{{
|
|
5
|
+
{%- macro returnType(node) -%}
|
|
6
|
+
<code indexable="false">{{ node | displayReturnType | escape }}</code>
|
|
7
7
|
{%- endmacro %}
|