@ng-doc/builder 15.0.0-beta.29 → 15.0.0-beta.30

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.
Files changed (98) hide show
  1. package/engine/.cache/libs/app/components/page-map/page-map.component.js +1 -0
  2. package/engine/.cache/libs/builder/engine/template-filters.js +8 -5
  3. package/engine/.cache/libs/builder/helpers/presentation.js +15 -1
  4. package/engine/.cache/libs/builder/helpers/typescript/accessor/accessor.js +2 -0
  5. package/engine/.cache/libs/builder/helpers/typescript/accessor/get-accessor-chain.js +49 -0
  6. package/engine/.cache/libs/builder/helpers/typescript/accessor/get-class-accessors.js +30 -0
  7. package/engine/.cache/libs/builder/helpers/typescript/accessor/get-interface-accessors.js +35 -0
  8. package/engine/.cache/libs/builder/helpers/typescript/accessor/group-accessors.js +22 -0
  9. package/engine/.cache/libs/builder/helpers/typescript/accessor/index.js +8 -0
  10. package/engine/.cache/libs/builder/helpers/typescript/index.js +2 -0
  11. package/engine/.cache/libs/builder/helpers/typescript/interface/get-interface-member.js +17 -0
  12. package/engine/.cache/libs/builder/helpers/typescript/member/find-member.js +26 -0
  13. package/engine/.cache/libs/builder/helpers/typescript/member/get-implemented-member.js +46 -0
  14. package/engine/.cache/libs/builder/helpers/typescript/member/get-overridden-member.js +29 -0
  15. package/engine/.cache/libs/builder/helpers/typescript/member/index.js +7 -0
  16. package/engine/.cache/libs/builder/helpers/typescript/member/member-type.js +2 -0
  17. package/engine/.cache/libs/builder/helpers/typescript/method/get-method-chain.js +1 -0
  18. package/engine/.cache/libs/builder/helpers/typescript/method/index.js +0 -2
  19. package/engine/.cache/libs/builder/helpers/typescript/property/get-property-chain.js +1 -0
  20. package/engine/.cache/libs/builder/helpers/typescript/property/index.js +0 -2
  21. package/engine/template-filters.d.ts +1 -1
  22. package/engine/template-filters.js +8 -5
  23. package/engine/template-filters.js.map +1 -1
  24. package/helpers/presentation.d.ts +6 -1
  25. package/helpers/presentation.js +15 -1
  26. package/helpers/presentation.js.map +1 -1
  27. package/helpers/typescript/accessor/accessor.d.ts +5 -0
  28. package/helpers/typescript/accessor/accessor.js +3 -0
  29. package/helpers/typescript/accessor/accessor.js.map +1 -0
  30. package/helpers/typescript/accessor/get-accessor-chain.d.ts +7 -0
  31. package/helpers/typescript/accessor/get-accessor-chain.js +50 -0
  32. package/helpers/typescript/accessor/get-accessor-chain.js.map +1 -0
  33. package/helpers/typescript/accessor/get-class-accessors.d.ts +6 -0
  34. package/helpers/typescript/accessor/get-class-accessors.js +31 -0
  35. package/helpers/typescript/accessor/get-class-accessors.js.map +1 -0
  36. package/helpers/typescript/accessor/get-interface-accessors.d.ts +6 -0
  37. package/helpers/typescript/accessor/get-interface-accessors.js +36 -0
  38. package/helpers/typescript/accessor/get-interface-accessors.js.map +1 -0
  39. package/helpers/typescript/accessor/group-accessors.d.ts +7 -0
  40. package/helpers/typescript/accessor/group-accessors.js +23 -0
  41. package/helpers/typescript/accessor/group-accessors.js.map +1 -0
  42. package/helpers/typescript/accessor/index.d.ts +5 -0
  43. package/helpers/typescript/accessor/index.js +9 -0
  44. package/helpers/typescript/accessor/index.js.map +1 -0
  45. package/helpers/typescript/index.d.ts +2 -0
  46. package/helpers/typescript/index.js +2 -0
  47. package/helpers/typescript/index.js.map +1 -1
  48. package/helpers/typescript/interface/get-interface-member.d.ts +8 -0
  49. package/helpers/typescript/interface/get-interface-member.js +18 -0
  50. package/helpers/typescript/interface/get-interface-member.js.map +1 -0
  51. package/helpers/typescript/member/find-member.d.ts +4 -0
  52. package/helpers/typescript/member/find-member.js +28 -0
  53. package/helpers/typescript/member/find-member.js.map +1 -0
  54. package/helpers/typescript/member/get-implemented-member.d.ts +7 -0
  55. package/helpers/typescript/member/get-implemented-member.js +47 -0
  56. package/helpers/typescript/member/get-implemented-member.js.map +1 -0
  57. package/helpers/typescript/member/get-overridden-member.d.ts +7 -0
  58. package/helpers/typescript/member/get-overridden-member.js +30 -0
  59. package/helpers/typescript/member/get-overridden-member.js.map +1 -0
  60. package/helpers/typescript/member/index.d.ts +4 -0
  61. package/helpers/typescript/member/index.js +8 -0
  62. package/helpers/typescript/member/index.js.map +1 -0
  63. package/helpers/typescript/member/member-type.d.ts +4 -0
  64. package/helpers/typescript/member/member-type.js +3 -0
  65. package/helpers/typescript/member/member-type.js.map +1 -0
  66. package/helpers/typescript/method/get-method-chain.js +1 -0
  67. package/helpers/typescript/method/get-method-chain.js.map +1 -1
  68. package/helpers/typescript/method/index.d.ts +0 -2
  69. package/helpers/typescript/method/index.js +0 -2
  70. package/helpers/typescript/method/index.js.map +1 -1
  71. package/helpers/typescript/property/get-property-chain.js +1 -0
  72. package/helpers/typescript/property/get-property-chain.js.map +1 -1
  73. package/helpers/typescript/property/index.d.ts +0 -2
  74. package/helpers/typescript/property/index.js +0 -2
  75. package/helpers/typescript/property/index.js.map +1 -1
  76. package/package.json +2 -2
  77. package/templates/api/class.html.nunj +19 -2
  78. package/templates/api/interface.html.nunj +9 -0
  79. package/templates/helpers/accessor.html.nunj +68 -0
  80. package/templates/helpers/accessors.html.nunj +7 -0
  81. package/templates/helpers/method.html.nunj +6 -6
  82. package/templates/helpers/properties.html.nunj +6 -8
  83. package/engine/.cache/libs/builder/helpers/typescript/method/get-implemented-method.js +0 -44
  84. package/engine/.cache/libs/builder/helpers/typescript/method/get-overridden-method.js +0 -26
  85. package/engine/.cache/libs/builder/helpers/typescript/property/get-implemented-property.js +0 -44
  86. package/engine/.cache/libs/builder/helpers/typescript/property/get-overridden-property.js +0 -26
  87. package/helpers/typescript/method/get-implemented-method.d.ts +0 -7
  88. package/helpers/typescript/method/get-implemented-method.js +0 -46
  89. package/helpers/typescript/method/get-implemented-method.js.map +0 -1
  90. package/helpers/typescript/method/get-overridden-method.d.ts +0 -7
  91. package/helpers/typescript/method/get-overridden-method.js +0 -28
  92. package/helpers/typescript/method/get-overridden-method.js.map +0 -1
  93. package/helpers/typescript/property/get-implemented-property.d.ts +0 -7
  94. package/helpers/typescript/property/get-implemented-property.js +0 -46
  95. package/helpers/typescript/property/get-implemented-property.js.map +0 -1
  96. package/helpers/typescript/property/get-overridden-property.d.ts +0 -7
  97. package/helpers/typescript/property/get-overridden-property.js +0 -28
  98. package/helpers/typescript/property/get-overridden-property.js.map +0 -1
@@ -44,6 +44,7 @@ let NgDocPageMapComponent = class NgDocPageMapComponent {
44
44
  if (element) {
45
45
  this.renderer.setStyle(this.selection.nativeElement, 'top', `${element.offsetTop}px`);
46
46
  this.renderer.setStyle(this.selection.nativeElement, 'height', `${element.offsetHeight}px`);
47
+ element.scrollIntoView({ block: 'nearest' });
47
48
  }
48
49
  }
49
50
  this.activeItem = item;
@@ -1,8 +1,9 @@
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.humanizeDeclarationName = exports.variablePresentation = exports.typeAliasPresentation = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.getPropertyChain = exports.getOverriddenProperty = exports.getOverriddenMethod = exports.getMethodChain = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getImplementedProperty = exports.getImplementedMethod = exports.getClassProperties = exports.getClassMethods = exports.functionPresentation = exports.firstNodeWithComment = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = exports.constructorPresentation = void 0;
4
+ exports.humanizeDeclarationName = exports.variablePresentation = exports.typeAliasPresentation = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.groupAccessors = exports.getPropertyChain = exports.getOverriddenMember = exports.getMethodChain = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getInterfaceAccessors = exports.getImplementedMember = exports.getClassProperties = exports.getClassMethods = exports.getClassAccessors = exports.getAccessorChain = exports.functionPresentation = exports.firstNodeWithComment = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = exports.constructorPresentation = exports.accessorPresentation = void 0;
5
5
  var helpers_1 = require("../helpers");
6
+ Object.defineProperty(exports, "accessorPresentation", { enumerable: true, get: function () { return helpers_1.accessorPresentation; } });
6
7
  Object.defineProperty(exports, "constructorPresentation", { enumerable: true, get: function () { return helpers_1.constructorPresentation; } });
7
8
  Object.defineProperty(exports, "displayType", { enumerable: true, get: function () { return helpers_1.displayType; } });
8
9
  Object.defineProperty(exports, "extractDocs", { enumerable: true, get: function () { return helpers_1.extractDocs; } });
@@ -13,16 +14,18 @@ Object.defineProperty(exports, "filterByScope", { enumerable: true, get: functio
13
14
  Object.defineProperty(exports, "filterByStatic", { enumerable: true, get: function () { return helpers_1.filterByStatic; } });
14
15
  Object.defineProperty(exports, "firstNodeWithComment", { enumerable: true, get: function () { return helpers_1.firstNodeWithComment; } });
15
16
  Object.defineProperty(exports, "functionPresentation", { enumerable: true, get: function () { return helpers_1.functionPresentation; } });
17
+ Object.defineProperty(exports, "getAccessorChain", { enumerable: true, get: function () { return helpers_1.getAccessorChain; } });
18
+ Object.defineProperty(exports, "getClassAccessors", { enumerable: true, get: function () { return helpers_1.getClassAccessors; } });
16
19
  Object.defineProperty(exports, "getClassMethods", { enumerable: true, get: function () { return helpers_1.getClassMethods; } });
17
20
  Object.defineProperty(exports, "getClassProperties", { enumerable: true, get: function () { return helpers_1.getClassProperties; } });
18
- Object.defineProperty(exports, "getImplementedMethod", { enumerable: true, get: function () { return helpers_1.getImplementedMethod; } });
19
- Object.defineProperty(exports, "getImplementedProperty", { enumerable: true, get: function () { return helpers_1.getImplementedProperty; } });
21
+ Object.defineProperty(exports, "getImplementedMember", { enumerable: true, get: function () { return helpers_1.getImplementedMember; } });
22
+ Object.defineProperty(exports, "getInterfaceAccessors", { enumerable: true, get: function () { return helpers_1.getInterfaceAccessors; } });
20
23
  Object.defineProperty(exports, "getInterfaceMethods", { enumerable: true, get: function () { return helpers_1.getInterfaceMethods; } });
21
24
  Object.defineProperty(exports, "getInterfaceProperties", { enumerable: true, get: function () { return helpers_1.getInterfaceProperties; } });
22
25
  Object.defineProperty(exports, "getMethodChain", { enumerable: true, get: function () { return helpers_1.getMethodChain; } });
23
- Object.defineProperty(exports, "getOverriddenMethod", { enumerable: true, get: function () { return helpers_1.getOverriddenMethod; } });
24
- Object.defineProperty(exports, "getOverriddenProperty", { enumerable: true, get: function () { return helpers_1.getOverriddenProperty; } });
26
+ Object.defineProperty(exports, "getOverriddenMember", { enumerable: true, get: function () { return helpers_1.getOverriddenMember; } });
25
27
  Object.defineProperty(exports, "getPropertyChain", { enumerable: true, get: function () { return helpers_1.getPropertyChain; } });
28
+ Object.defineProperty(exports, "groupAccessors", { enumerable: true, get: function () { return helpers_1.groupAccessors; } });
26
29
  Object.defineProperty(exports, "marked", { enumerable: true, get: function () { return helpers_1.marked; } });
27
30
  Object.defineProperty(exports, "methodPresentation", { enumerable: true, get: function () { return helpers_1.methodPresentation; } });
28
31
  Object.defineProperty(exports, "noEmpty", { enumerable: true, get: function () { return helpers_1.noEmpty; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.variablePresentation = exports.typeAliasPresentation = exports.functionPresentation = exports.methodPresentation = exports.constructorPresentation = void 0;
3
+ exports.variablePresentation = exports.typeAliasPresentation = exports.functionPresentation = exports.methodPresentation = exports.accessorPresentation = exports.constructorPresentation = void 0;
4
4
  const core_1 = require("@ng-doc/core");
5
5
  const ts_morph_1 = require("ts-morph");
6
6
  const format_code_1 = require("./format-code");
@@ -21,6 +21,20 @@ function constructorPresentation(constructor) {
21
21
  return (0, format_code_1.formatCode)(presentation, 'TypeScript');
22
22
  }
23
23
  exports.constructorPresentation = constructorPresentation;
24
+ /**
25
+ *
26
+ * @param accessor
27
+ */
28
+ function accessorPresentation(accessor) {
29
+ const parameters = accessor.getParameters().map(parameterPresentation).join(', ');
30
+ const prefix = ts_morph_1.Node.isGetAccessorDeclaration(accessor) ? 'get' : 'set';
31
+ const header = ts_morph_1.Node.isGetAccessorDeclaration(accessor)
32
+ ? `${accessor.getName()}():`
33
+ : `${accessor.getName()}(${parameters})`;
34
+ const returnType = ts_morph_1.Node.isGetAccessorDeclaration(accessor) ? (0, typescript_1.displayType)(accessor.getReturnType()) : '';
35
+ return [prefix, scopePresentation(accessor), header, returnType].filter(core_1.isPresent).join(' ') + ';';
36
+ }
37
+ exports.accessorPresentation = accessorPresentation;
24
38
  /**
25
39
  *
26
40
  * @param method
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAccessorChain = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ const class_1 = require("../class");
6
+ const for_all_interfaces_1 = require("../interface/for-all-interfaces");
7
+ const get_interface_accessors_1 = require("./get-interface-accessors");
8
+ /**
9
+ *
10
+ * @param accessor
11
+ */
12
+ function getAccessorChain(accessor) {
13
+ const parent = accessor.getParent();
14
+ const accessors = [];
15
+ const name = accessor.getName();
16
+ if (ts_morph_1.Node.isClassDeclaration(parent)) {
17
+ (0, class_1.forAllClasses)(parent, (cls) => {
18
+ if (ts_morph_1.Node.isGetAccessorDeclaration(accessor)) {
19
+ const getter = cls.getGetAccessor(name);
20
+ if (getter) {
21
+ accessors.push(getter);
22
+ }
23
+ }
24
+ if (ts_morph_1.Node.isSetAccessorDeclaration(accessor)) {
25
+ const setter = cls.getSetAccessor(name);
26
+ if (setter) {
27
+ accessors.push(setter);
28
+ }
29
+ }
30
+ });
31
+ // TODO: Add interfaces
32
+ }
33
+ if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
34
+ (0, for_all_interfaces_1.forAllInterfaces)(parent, (int) => {
35
+ (0, get_interface_accessors_1.getInterfaceAccessors)(int)
36
+ .filter((acc) => acc.getName() === name)
37
+ .forEach((acc) => {
38
+ if (ts_morph_1.Node.isGetAccessorDeclaration(accessor) && ts_morph_1.Node.isGetAccessorDeclaration(acc)) {
39
+ accessors.push(acc);
40
+ }
41
+ if (ts_morph_1.Node.isSetAccessorDeclaration(accessor) && ts_morph_1.Node.isSetAccessorDeclaration(acc)) {
42
+ accessors.push(acc);
43
+ }
44
+ });
45
+ });
46
+ }
47
+ return accessors;
48
+ }
49
+ exports.getAccessorChain = getAccessorChain;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getClassAccessors = void 0;
4
+ const core_1 = require("@ng-doc/core");
5
+ const class_1 = require("../class");
6
+ /**
7
+ *
8
+ * @param cls
9
+ */
10
+ function getClassAccessors(cls) {
11
+ const accessors = new Map();
12
+ (0, class_1.forAllClasses)(cls, (baseClass) => {
13
+ baseClass.getGetAccessors().forEach((accessor) => {
14
+ const name = accessor.getName();
15
+ if (!accessors.get(`get${name}`) &&
16
+ (!accessor.isAbstract() || (accessor.isAbstract() && cls === baseClass))) {
17
+ accessors.set(`get${name}`, accessor);
18
+ }
19
+ });
20
+ baseClass.getSetAccessors().forEach((accessor) => {
21
+ const name = accessor.getName();
22
+ if (!accessors.get(`set${name}`) &&
23
+ (!accessor.isAbstract() || (accessor.isAbstract() && cls === baseClass))) {
24
+ accessors.set(`set${name}`, accessor);
25
+ }
26
+ });
27
+ });
28
+ return (0, core_1.asArray)(accessors.values());
29
+ }
30
+ exports.getClassAccessors = getClassAccessors;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getInterfaceAccessors = void 0;
4
+ const core_1 = require("@ng-doc/core");
5
+ const ts_morph_1 = require("ts-morph");
6
+ const interface_1 = require("../interface");
7
+ /**
8
+ *
9
+ * @param int
10
+ */
11
+ function getInterfaceAccessors(int) {
12
+ const accessors = new Map();
13
+ (0, interface_1.forAllInterfaces)(int, (i) => {
14
+ const getters = i
15
+ .getMembers()
16
+ .filter(ts_morph_1.Node.isGetAccessorDeclaration);
17
+ const setters = i
18
+ .getMembers()
19
+ .filter(ts_morph_1.Node.isSetAccessorDeclaration);
20
+ getters.forEach((getter) => {
21
+ const name = getter.getName();
22
+ if (!accessors.get(`get${name}`)) {
23
+ accessors.set(`get${name}`, getter);
24
+ }
25
+ });
26
+ setters.forEach((setter) => {
27
+ const name = setter.getName();
28
+ if (!accessors.get(`set${name}`)) {
29
+ accessors.set(`set${name}`, setter);
30
+ }
31
+ });
32
+ });
33
+ return (0, core_1.asArray)(accessors.values());
34
+ }
35
+ exports.getInterfaceAccessors = getInterfaceAccessors;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.groupAccessors = void 0;
4
+ const core_1 = require("@ng-doc/core");
5
+ const ts_morph_1 = require("ts-morph");
6
+ /**
7
+ *
8
+ * @param accessors
9
+ */
10
+ function groupAccessors(accessors) {
11
+ const map = new Map();
12
+ accessors.forEach((accessor) => {
13
+ if (ts_morph_1.Node.isGetAccessorDeclaration(accessor)) {
14
+ map.set(accessor.getName(), { ...map.get(accessor.getName()), get: accessor });
15
+ }
16
+ if (ts_morph_1.Node.isSetAccessorDeclaration(accessor)) {
17
+ map.set(accessor.getName(), { ...map.get(accessor.getName()), set: accessor });
18
+ }
19
+ });
20
+ return (0, core_1.asArray)(map.values());
21
+ }
22
+ exports.groupAccessors = groupAccessors;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./accessor"), exports);
5
+ tslib_1.__exportStar(require("./get-accessor-chain"), exports);
6
+ tslib_1.__exportStar(require("./get-class-accessors"), exports);
7
+ tslib_1.__exportStar(require("./get-interface-accessors"), exports);
8
+ tslib_1.__exportStar(require("./group-accessors"), exports);
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./accessor"), exports);
4
5
  tslib_1.__exportStar(require("./class"), exports);
5
6
  tslib_1.__exportStar(require("./create-project"), exports);
6
7
  tslib_1.__exportStar(require("./display-type"), exports);
@@ -9,6 +10,7 @@ tslib_1.__exportStar(require("./filter-by-static"), exports);
9
10
  tslib_1.__exportStar(require("./find-declaration"), exports);
10
11
  tslib_1.__exportStar(require("./first-node-with-comment"), exports);
11
12
  tslib_1.__exportStar(require("./interface"), exports);
13
+ tslib_1.__exportStar(require("./member"), exports);
12
14
  tslib_1.__exportStar(require("./method"), exports);
13
15
  tslib_1.__exportStar(require("./node"), exports);
14
16
  tslib_1.__exportStar(require("./property"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getInterfaceMember = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ /**
6
+ *
7
+ * @param int
8
+ * @param name
9
+ */
10
+ function getInterfaceMember(int, name) {
11
+ return int
12
+ .getMembers()
13
+ .filter((m) => !ts_morph_1.Node.isConstructSignatureDeclaration(m) &&
14
+ !ts_morph_1.Node.isCallSignatureDeclaration(m) &&
15
+ !ts_morph_1.Node.isIndexSignatureDeclaration(m)).find((m) => m.getName() === name);
16
+ }
17
+ exports.getInterfaceMember = getInterfaceMember;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findMember = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ const class_1 = require("../class");
6
+ const interface_1 = require("../interface");
7
+ const get_interface_member_1 = require("../interface/get-interface-member");
8
+ /**
9
+ *
10
+ * @param node
11
+ * @param name
12
+ */
13
+ function findMember(node, name) {
14
+ if (ts_morph_1.Node.isClassDeclaration(node)) {
15
+ const member = (0, class_1.findClass)(node, (cls) => !!cls.getMember(name))?.getMember(name);
16
+ return member;
17
+ }
18
+ if (ts_morph_1.Node.isInterfaceDeclaration(node)) {
19
+ if (ts_morph_1.Node.isInterfaceDeclaration(node)) {
20
+ const baseInterface = (0, interface_1.findInterface)(node, (int) => !!(0, get_interface_member_1.getInterfaceMember)(int, name));
21
+ return baseInterface && (0, get_interface_member_1.getInterfaceMember)(baseInterface, name);
22
+ }
23
+ }
24
+ return undefined;
25
+ }
26
+ exports.findMember = findMember;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getImplementedMember = void 0;
4
+ const core_1 = require("@ng-doc/core");
5
+ const ts_morph_1 = require("ts-morph");
6
+ const find_member_1 = require("./find-member");
7
+ /**
8
+ * Returns member that was implemented by the provided one
9
+ *
10
+ * @param member - Target member
11
+ */
12
+ function getImplementedMember(member) {
13
+ const parent = member.getParent();
14
+ const name = member.getName();
15
+ if (ts_morph_1.Node.isClassDeclaration(parent)) {
16
+ const baseClass = parent.getBaseClass();
17
+ if (baseClass) {
18
+ const member = (0, find_member_1.findMember)(baseClass, name);
19
+ if (member?.isAbstract()) {
20
+ return member;
21
+ }
22
+ }
23
+ const nodes = parent
24
+ .getImplements()
25
+ .map((expr) => expr.getType().getSymbol()?.getDeclarations()[0])
26
+ .filter(core_1.isPresent)
27
+ // Reverse implements because the latest one overrides previous one
28
+ .reverse();
29
+ for (const node of nodes) {
30
+ if (ts_morph_1.Node.isClassDeclaration(node)) {
31
+ const member = (0, find_member_1.findMember)(node, name);
32
+ if (member?.isAbstract()) {
33
+ return member;
34
+ }
35
+ }
36
+ if (ts_morph_1.Node.isInterfaceDeclaration(node)) {
37
+ const member = (0, find_member_1.findMember)(node, name);
38
+ if (member) {
39
+ return member;
40
+ }
41
+ }
42
+ }
43
+ }
44
+ return undefined;
45
+ }
46
+ exports.getImplementedMember = getImplementedMember;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOverriddenMember = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ const class_1 = require("../class");
6
+ const interface_1 = require("../interface");
7
+ const find_member_1 = require("./find-member");
8
+ /**
9
+ * Returns member that was overridden by the provided one
10
+ *
11
+ * @param member - Target member
12
+ */
13
+ function getOverriddenMember(member) {
14
+ const parent = member.getParent();
15
+ const name = member.getName();
16
+ if (ts_morph_1.Node.isClassDeclaration(parent)) {
17
+ const baseClass = (0, class_1.findBaseClass)(parent, (cls) => {
18
+ const member = (0, find_member_1.findMember)(cls, name);
19
+ return !!member && !member.isAbstract();
20
+ });
21
+ return baseClass && (0, find_member_1.findMember)(baseClass, name);
22
+ }
23
+ if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
24
+ const baseInterface = (0, interface_1.findInterface)(parent, (int) => int !== parent && !!(0, find_member_1.findMember)(int, name));
25
+ return baseInterface && (0, find_member_1.findMember)(baseInterface, name);
26
+ }
27
+ return undefined;
28
+ }
29
+ exports.getOverriddenMember = getOverriddenMember;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./find-member"), exports);
5
+ tslib_1.__exportStar(require("./get-implemented-member"), exports);
6
+ tslib_1.__exportStar(require("./get-overridden-member"), exports);
7
+ tslib_1.__exportStar(require("./member-type"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -18,6 +18,7 @@ function getMethodChain(method) {
18
18
  methods.push(mtd);
19
19
  }
20
20
  });
21
+ // TODO: Add interfaces
21
22
  }
22
23
  if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
23
24
  (0, for_all_interfaces_1.forAllInterfaces)(parent, (int) => {
@@ -2,7 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./get-class-methods"), exports);
5
- tslib_1.__exportStar(require("./get-implemented-method"), exports);
6
5
  tslib_1.__exportStar(require("./get-interface-methods"), exports);
7
6
  tslib_1.__exportStar(require("./get-method-chain"), exports);
8
- tslib_1.__exportStar(require("./get-overridden-method"), exports);
@@ -19,6 +19,7 @@ function getPropertyChain(property) {
19
19
  properties.push(prop);
20
20
  }
21
21
  });
22
+ // TODO: Add interfaces
22
23
  }
23
24
  if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
24
25
  (0, interface_1.forAllInterfaces)(parent, (int) => {
@@ -2,7 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./get-class-properties"), exports);
5
- tslib_1.__exportStar(require("./get-implemented-property"), exports);
6
5
  tslib_1.__exportStar(require("./get-interface-properties"), exports);
7
- tslib_1.__exportStar(require("./get-overridden-property"), exports);
8
6
  tslib_1.__exportStar(require("./get-property-chain"), exports);
@@ -1,2 +1,2 @@
1
- export { constructorPresentation, displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, firstNodeWithComment, functionPresentation, getClassMethods, getClassProperties, getImplementedMethod, getImplementedProperty, getInterfaceMethods, getInterfaceProperties, getMethodChain, getOverriddenMethod, getOverriddenProperty, getPropertyChain, marked, methodPresentation, noEmpty, noLineBreaks, notEmptyAssets, sortByNodesName, typeAliasPresentation, variablePresentation, } from '../helpers';
1
+ export { accessorPresentation, constructorPresentation, displayType, extractDocs, extractParameterDocs, extractSeeDocs, extractSelectors, filterByScope, filterByStatic, firstNodeWithComment, functionPresentation, getAccessorChain, getClassAccessors, getClassMethods, getClassProperties, getImplementedMember, getInterfaceAccessors, getInterfaceMethods, getInterfaceProperties, getMethodChain, getOverriddenMember, getPropertyChain, groupAccessors, marked, methodPresentation, noEmpty, noLineBreaks, notEmptyAssets, sortByNodesName, typeAliasPresentation, variablePresentation, } from '../helpers';
2
2
  export { humanizeDeclarationName } from '@ng-doc/core';
@@ -1,8 +1,9 @@
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.humanizeDeclarationName = exports.variablePresentation = exports.typeAliasPresentation = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.getPropertyChain = exports.getOverriddenProperty = exports.getOverriddenMethod = exports.getMethodChain = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getImplementedProperty = exports.getImplementedMethod = exports.getClassProperties = exports.getClassMethods = exports.functionPresentation = exports.firstNodeWithComment = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = exports.constructorPresentation = void 0;
4
+ exports.humanizeDeclarationName = exports.variablePresentation = exports.typeAliasPresentation = exports.sortByNodesName = exports.notEmptyAssets = exports.noLineBreaks = exports.noEmpty = exports.methodPresentation = exports.marked = exports.groupAccessors = exports.getPropertyChain = exports.getOverriddenMember = exports.getMethodChain = exports.getInterfaceProperties = exports.getInterfaceMethods = exports.getInterfaceAccessors = exports.getImplementedMember = exports.getClassProperties = exports.getClassMethods = exports.getClassAccessors = exports.getAccessorChain = exports.functionPresentation = exports.firstNodeWithComment = exports.filterByStatic = exports.filterByScope = exports.extractSelectors = exports.extractSeeDocs = exports.extractParameterDocs = exports.extractDocs = exports.displayType = exports.constructorPresentation = exports.accessorPresentation = void 0;
5
5
  var helpers_1 = require("../helpers");
6
+ Object.defineProperty(exports, "accessorPresentation", { enumerable: true, get: function () { return helpers_1.accessorPresentation; } });
6
7
  Object.defineProperty(exports, "constructorPresentation", { enumerable: true, get: function () { return helpers_1.constructorPresentation; } });
7
8
  Object.defineProperty(exports, "displayType", { enumerable: true, get: function () { return helpers_1.displayType; } });
8
9
  Object.defineProperty(exports, "extractDocs", { enumerable: true, get: function () { return helpers_1.extractDocs; } });
@@ -13,16 +14,18 @@ Object.defineProperty(exports, "filterByScope", { enumerable: true, get: functio
13
14
  Object.defineProperty(exports, "filterByStatic", { enumerable: true, get: function () { return helpers_1.filterByStatic; } });
14
15
  Object.defineProperty(exports, "firstNodeWithComment", { enumerable: true, get: function () { return helpers_1.firstNodeWithComment; } });
15
16
  Object.defineProperty(exports, "functionPresentation", { enumerable: true, get: function () { return helpers_1.functionPresentation; } });
17
+ Object.defineProperty(exports, "getAccessorChain", { enumerable: true, get: function () { return helpers_1.getAccessorChain; } });
18
+ Object.defineProperty(exports, "getClassAccessors", { enumerable: true, get: function () { return helpers_1.getClassAccessors; } });
16
19
  Object.defineProperty(exports, "getClassMethods", { enumerable: true, get: function () { return helpers_1.getClassMethods; } });
17
20
  Object.defineProperty(exports, "getClassProperties", { enumerable: true, get: function () { return helpers_1.getClassProperties; } });
18
- Object.defineProperty(exports, "getImplementedMethod", { enumerable: true, get: function () { return helpers_1.getImplementedMethod; } });
19
- Object.defineProperty(exports, "getImplementedProperty", { enumerable: true, get: function () { return helpers_1.getImplementedProperty; } });
21
+ Object.defineProperty(exports, "getImplementedMember", { enumerable: true, get: function () { return helpers_1.getImplementedMember; } });
22
+ Object.defineProperty(exports, "getInterfaceAccessors", { enumerable: true, get: function () { return helpers_1.getInterfaceAccessors; } });
20
23
  Object.defineProperty(exports, "getInterfaceMethods", { enumerable: true, get: function () { return helpers_1.getInterfaceMethods; } });
21
24
  Object.defineProperty(exports, "getInterfaceProperties", { enumerable: true, get: function () { return helpers_1.getInterfaceProperties; } });
22
25
  Object.defineProperty(exports, "getMethodChain", { enumerable: true, get: function () { return helpers_1.getMethodChain; } });
23
- Object.defineProperty(exports, "getOverriddenMethod", { enumerable: true, get: function () { return helpers_1.getOverriddenMethod; } });
24
- Object.defineProperty(exports, "getOverriddenProperty", { enumerable: true, get: function () { return helpers_1.getOverriddenProperty; } });
26
+ Object.defineProperty(exports, "getOverriddenMember", { enumerable: true, get: function () { return helpers_1.getOverriddenMember; } });
25
27
  Object.defineProperty(exports, "getPropertyChain", { enumerable: true, get: function () { return helpers_1.getPropertyChain; } });
28
+ Object.defineProperty(exports, "groupAccessors", { enumerable: true, get: function () { return helpers_1.groupAccessors; } });
26
29
  Object.defineProperty(exports, "marked", { enumerable: true, get: function () { return helpers_1.marked; } });
27
30
  Object.defineProperty(exports, "methodPresentation", { enumerable: true, get: function () { return helpers_1.methodPresentation; } });
28
31
  Object.defineProperty(exports, "noEmpty", { enumerable: true, get: function () { return helpers_1.noEmpty; } });
@@ -1 +1 @@
1
- {"version":3,"file":"template-filters.js","sourceRoot":"","sources":["../../../../libs/builder/engine/template-filters.ts"],"names":[],"mappings":";AAAA,sGAAsG;;;AAEtG,sCA6BoB;AA5BnB,kHAAA,uBAAuB,OAAA;AACvB,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,0GAAA,eAAe,OAAA;AACf,6GAAA,kBAAkB,OAAA;AAClB,+GAAA,oBAAoB,OAAA;AACpB,iHAAA,sBAAsB,OAAA;AACtB,8GAAA,mBAAmB,OAAA;AACnB,iHAAA,sBAAsB,OAAA;AACtB,yGAAA,cAAc,OAAA;AACd,8GAAA,mBAAmB,OAAA;AACnB,gHAAA,qBAAqB,OAAA;AACrB,2GAAA,gBAAgB,OAAA;AAChB,iGAAA,MAAM,OAAA;AACN,6GAAA,kBAAkB,OAAA;AAClB,kGAAA,OAAO,OAAA;AACP,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,gHAAA,qBAAqB,OAAA;AACrB,+GAAA,oBAAoB,OAAA;AAErB,qCAAqD;AAA7C,+GAAA,uBAAuB,OAAA"}
1
+ {"version":3,"file":"template-filters.js","sourceRoot":"","sources":["../../../../libs/builder/engine/template-filters.ts"],"names":[],"mappings":";AAAA,sGAAsG;;;AAEtG,sCAgCoB;AA/BnB,+GAAA,oBAAoB,OAAA;AACpB,kHAAA,uBAAuB,OAAA;AACvB,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,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,6GAAA,kBAAkB,OAAA;AAClB,+GAAA,oBAAoB,OAAA;AACpB,gHAAA,qBAAqB,OAAA;AACrB,8GAAA,mBAAmB,OAAA;AACnB,iHAAA,sBAAsB,OAAA;AACtB,yGAAA,cAAc,OAAA;AACd,8GAAA,mBAAmB,OAAA;AACnB,2GAAA,gBAAgB,OAAA;AAChB,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,gHAAA,qBAAqB,OAAA;AACrB,+GAAA,oBAAoB,OAAA;AAErB,qCAAqD;AAA7C,+GAAA,uBAAuB,OAAA"}
@@ -1,9 +1,14 @@
1
- import { ConstructorDeclaration, FunctionDeclaration, MethodDeclaration, TypeAliasDeclaration, VariableDeclaration } from 'ts-morph';
1
+ import { AccessorDeclaration, ConstructorDeclaration, FunctionDeclaration, MethodDeclaration, TypeAliasDeclaration, VariableDeclaration } from 'ts-morph';
2
2
  /**
3
3
  *
4
4
  * @param constructor
5
5
  */
6
6
  export declare function constructorPresentation(constructor: ConstructorDeclaration): string;
7
+ /**
8
+ *
9
+ * @param accessor
10
+ */
11
+ export declare function accessorPresentation(accessor: AccessorDeclaration): string;
7
12
  /**
8
13
  *
9
14
  * @param method
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.variablePresentation = exports.typeAliasPresentation = exports.functionPresentation = exports.methodPresentation = exports.constructorPresentation = void 0;
3
+ exports.variablePresentation = exports.typeAliasPresentation = exports.functionPresentation = exports.methodPresentation = exports.accessorPresentation = exports.constructorPresentation = void 0;
4
4
  const core_1 = require("@ng-doc/core");
5
5
  const ts_morph_1 = require("ts-morph");
6
6
  const format_code_1 = require("./format-code");
@@ -21,6 +21,20 @@ function constructorPresentation(constructor) {
21
21
  return (0, format_code_1.formatCode)(presentation, 'TypeScript');
22
22
  }
23
23
  exports.constructorPresentation = constructorPresentation;
24
+ /**
25
+ *
26
+ * @param accessor
27
+ */
28
+ function accessorPresentation(accessor) {
29
+ const parameters = accessor.getParameters().map(parameterPresentation).join(', ');
30
+ const prefix = ts_morph_1.Node.isGetAccessorDeclaration(accessor) ? 'get' : 'set';
31
+ const header = ts_morph_1.Node.isGetAccessorDeclaration(accessor)
32
+ ? `${accessor.getName()}():`
33
+ : `${accessor.getName()}(${parameters})`;
34
+ const returnType = ts_morph_1.Node.isGetAccessorDeclaration(accessor) ? (0, typescript_1.displayType)(accessor.getReturnType()) : '';
35
+ return [prefix, scopePresentation(accessor), header, returnType].filter(core_1.isPresent).join(' ') + ';';
36
+ }
37
+ exports.accessorPresentation = accessorPresentation;
24
38
  /**
25
39
  *
26
40
  * @param method
@@ -1 +1 @@
1
- {"version":3,"file":"presentation.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/presentation.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,uCAYkB;AAElB,+CAAyC;AACzC,6CAAyC;AAEzC;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,WAAmC;IAC1E,MAAM,UAAU,GAAW,WAAW,CAAC,aAAa,EAAE,CAAC,GA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,EAAE,CAAC;QAChC,SAAS,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE;KACnE;SACC,MAAM,CAAC,gBAAS,CAAC;SACjB,IAAI,CAAC,GAAG,CAAC,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,IAAmB;;IAC7C,OAAO,MAAA,CAAC,IAAI,CAAC,QAAQ,KAAI,MAAA,IAAI,CAAC,QAAQ,EAAE,0CAAE,OAAO,CAAC,gBAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA,CAAC,mCAAI,EAAE,CAAC;AAC5E,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,IAAsB;IAC9C,OAAO,CAAC,IAAI,CAAC,UAAU,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"}
@@ -0,0 +1,5 @@
1
+ import { GetAccessorDeclaration, SetAccessorDeclaration } from 'ts-morph';
2
+ export interface NgDocAccessor {
3
+ get?: GetAccessorDeclaration;
4
+ set?: SetAccessorDeclaration;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=accessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessor.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/accessor/accessor.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { GetAccessorDeclaration, SetAccessorDeclaration } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param accessor
5
+ */
6
+ export declare function getAccessorChain(accessor: GetAccessorDeclaration): GetAccessorDeclaration[];
7
+ export declare function getAccessorChain(accessor: SetAccessorDeclaration): SetAccessorDeclaration[];
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAccessorChain = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ const class_1 = require("../class");
6
+ const for_all_interfaces_1 = require("../interface/for-all-interfaces");
7
+ const get_interface_accessors_1 = require("./get-interface-accessors");
8
+ /**
9
+ *
10
+ * @param accessor
11
+ */
12
+ function getAccessorChain(accessor) {
13
+ const parent = accessor.getParent();
14
+ const accessors = [];
15
+ const name = accessor.getName();
16
+ if (ts_morph_1.Node.isClassDeclaration(parent)) {
17
+ (0, class_1.forAllClasses)(parent, (cls) => {
18
+ if (ts_morph_1.Node.isGetAccessorDeclaration(accessor)) {
19
+ const getter = cls.getGetAccessor(name);
20
+ if (getter) {
21
+ accessors.push(getter);
22
+ }
23
+ }
24
+ if (ts_morph_1.Node.isSetAccessorDeclaration(accessor)) {
25
+ const setter = cls.getSetAccessor(name);
26
+ if (setter) {
27
+ accessors.push(setter);
28
+ }
29
+ }
30
+ });
31
+ // TODO: Add interfaces
32
+ }
33
+ if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
34
+ (0, for_all_interfaces_1.forAllInterfaces)(parent, (int) => {
35
+ (0, get_interface_accessors_1.getInterfaceAccessors)(int)
36
+ .filter((acc) => acc.getName() === name)
37
+ .forEach((acc) => {
38
+ if (ts_morph_1.Node.isGetAccessorDeclaration(accessor) && ts_morph_1.Node.isGetAccessorDeclaration(acc)) {
39
+ accessors.push(acc);
40
+ }
41
+ if (ts_morph_1.Node.isSetAccessorDeclaration(accessor) && ts_morph_1.Node.isSetAccessorDeclaration(acc)) {
42
+ accessors.push(acc);
43
+ }
44
+ });
45
+ });
46
+ }
47
+ return accessors;
48
+ }
49
+ exports.getAccessorChain = getAccessorChain;
50
+ //# sourceMappingURL=get-accessor-chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-accessor-chain.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/accessor/get-accessor-chain.ts"],"names":[],"mappings":";;;AAAA,uCAOkB;AAElB,oCAAuC;AACvC,wEAAiE;AAEjE,uEAAgE;AAQhE;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,QAA6B;IAC7D,MAAM,MAAM,GAAqB,QAAQ,CAAC,SAAS,EAAE,CAAC;IACtD,MAAM,SAAS,GAA0B,EAAE,CAAC;IAC5C,MAAM,IAAI,GAAW,QAAQ,CAAC,OAAO,EAAE,CAAC;IAExC,IAAI,eAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;QACpC,IAAA,qBAAa,EAAC,MAAM,EAAE,CAAC,GAAqB,EAAE,EAAE;YAC/C,IAAI,eAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE;gBAC5C,MAAM,MAAM,GAAuC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;gBAE5E,IAAI,MAAM,EAAE;oBACX,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACvB;aACD;YAED,IAAI,eAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE;gBAC5C,MAAM,MAAM,GAAuC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;gBAE5E,IAAI,MAAM,EAAE;oBACX,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACvB;aACD;QACF,CAAC,CAAC,CAAC;QAEH,uBAAuB;KACvB;IAED,IAAI,eAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,EAAE;QACxC,IAAA,qCAAgB,EAAC,MAAM,EAAE,CAAC,GAAyB,EAAE,EAAE;YACtD,IAAA,+CAAqB,EAAC,GAAG,CAAC;iBACxB,MAAM,CAAC,CAAC,GAAwB,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC;iBAC5D,OAAO,CAAC,CAAC,GAAwB,EAAE,EAAE;gBACrC,IAAI,eAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,eAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE;oBAClF,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACpB;gBAED,IAAI,eAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,eAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE;oBAClF,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACpB;YACF,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACH;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AA5CD,4CA4CC"}
@@ -0,0 +1,6 @@
1
+ import { AccessorDeclaration, ClassDeclaration } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param cls
5
+ */
6
+ export declare function getClassAccessors(cls: ClassDeclaration): AccessorDeclaration[];