@progress/kendo-typescript-api-tasks 1.1.2-dev.32 → 1.1.2-dev.36
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/lib/generator.js +16 -12
- package/lib/source.js +8 -2
- package/package.json +2 -2
package/lib/generator.js
CHANGED
|
@@ -91,18 +91,7 @@ const normalizeUnionReferences = (element, members) => {
|
|
|
91
91
|
const normalizeMembers = (members) => {
|
|
92
92
|
traverseElements(members, (element) => {
|
|
93
93
|
normalizeUnionReferences(element, members);
|
|
94
|
-
|
|
95
|
-
if (!element.comment && element.implementationOf) {
|
|
96
|
-
const interfaceName = element.implementationOf.name.split('.')[0];
|
|
97
|
-
const interfaceOptions = members.find((child) => child.name === interfaceName);
|
|
98
|
-
|
|
99
|
-
if (interfaceOptions) {
|
|
100
|
-
const baseOption = interfaceOptions.children.find(child => child.name === element.name);
|
|
101
|
-
if (baseOption) {
|
|
102
|
-
mergeComments(element, baseOption);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
94
|
+
mergeBaseOptions(element, members);
|
|
106
95
|
|
|
107
96
|
if (!element.comment && element.kind === ReflectionKind.Accessor) {
|
|
108
97
|
element.comment = (element.setSignature || {}).comment || (element.getSignature || {}).comment || [];
|
|
@@ -110,6 +99,21 @@ const normalizeMembers = (members) => {
|
|
|
110
99
|
});
|
|
111
100
|
};
|
|
112
101
|
|
|
102
|
+
const mergeBaseOptions = (element, members) => {
|
|
103
|
+
if (!element.comment && (element.implementationOf || element.inheritedFrom)) {
|
|
104
|
+
const interfaceName = (element.implementationOf || element.inheritedFrom).name.split('.')[0];
|
|
105
|
+
const interfaceOptions = members.find((child) => child.name === interfaceName);
|
|
106
|
+
|
|
107
|
+
if (interfaceOptions) {
|
|
108
|
+
const baseOption = interfaceOptions.children.find(child => child.name === element.name);
|
|
109
|
+
if (baseOption) {
|
|
110
|
+
mergeBaseOptions(baseOption, members);
|
|
111
|
+
mergeComments(element, baseOption);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
113
117
|
const mergeComments = (root, src) => {
|
|
114
118
|
if (!root.comment && src.comment) {
|
|
115
119
|
root.comment = src.comment;
|
package/lib/source.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
const source = (member, parent) => {
|
|
2
|
-
const source =
|
|
3
|
-
|
|
2
|
+
const source = member.sources[0];
|
|
3
|
+
let sourceFile = `${source.fileName}:${source.line}`;
|
|
4
|
+
if (parent) {
|
|
5
|
+
const parentSource = parent.sources[0];
|
|
6
|
+
if (parentSource.fileName !== source.fileName) {
|
|
7
|
+
sourceFile = `${parentSource.fileName}:${parentSource.line} -> ` + sourceFile;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
4
10
|
return `'${member.name}' ${sourceFile}`;
|
|
5
11
|
};
|
|
6
12
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-typescript-api-tasks",
|
|
3
3
|
"description": "Kendo UI API docs package gulp tasks",
|
|
4
|
-
"version": "1.1.2-dev.
|
|
4
|
+
"version": "1.1.2-dev.36+629ea4d",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "index.js",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"jest-cli": "^29.2.2",
|
|
41
41
|
"typescript": "5.2.2"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "629ea4d6fb4f9562435f8a8be485f31a87174f69"
|
|
44
44
|
}
|