Skip to content

Commit 6dac4f6

Browse files
authored
fix: type for documentation (#666)
* fix: type for documentation * fix: add change set * fix: adapt snapshots
1 parent 5b5bcdb commit 6dac4f6

File tree

6 files changed

+50
-11
lines changed

6 files changed

+50
-11
lines changed

.changeset/loud-poems-tickle.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@ui5-language-assistant/vscode-ui5-language-assistant-bas-ext": patch
3+
"vscode-ui5-language-assistant": patch
4+
"@ui5-language-assistant/binding": patch
5+
---
6+
7+
Fix type in documentation

packages/binding/src/utils/documentation.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ const getType = (type: UI5Type | undefined): string[] => {
5353
result.push(data.join(" | "));
5454
break;
5555
case "ArrayType":
56-
if (type.type?.kind === "UI5Typedef") {
57-
result.push(...getType(type.type));
58-
}
56+
result.push(...getType(type.type));
5957
break;
6058
}
6159
return result;

packages/binding/test/unit/definition/__snapshots__/definition.test.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -3452,7 +3452,7 @@ Array [
34523452
34533453
34543454
3455-
**Type:**
3455+
**Type:** sap.ui.model.Filter
34563456
34573457
**Description:** An array of filters on which the logical conjunction is applied
34583458
@@ -3817,7 +3817,7 @@ Array [
38173817
38183818
38193819
3820-
**Type:**
3820+
**Type:** sap.ui.model.Filter
38213821
38223822
**Description:** An array of filters on which the logical conjunction is applied
38233823

packages/binding/test/unit/services/completion/__snapshots__/aggregation-binding.test.ts.snap

+6-6
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ Array [
454454
455455
456456
457-
**Type:**
457+
**Type:** sap.ui.model.Filter
458458
459459
**Description:** An array of filters on which the logical conjunction is applied
460460
@@ -679,7 +679,7 @@ Array [
679679
680680
681681
682-
**Type:**
682+
**Type:** sap.ui.model.Filter
683683
684684
**Description:** An array of filters on which the logical conjunction is applied
685685
@@ -904,7 +904,7 @@ Array [
904904
905905
906906
907-
**Type:**
907+
**Type:** sap.ui.model.Filter
908908
909909
**Description:** An array of filters on which the logical conjunction is applied
910910
@@ -1129,7 +1129,7 @@ Array [
11291129
11301130
11311131
1132-
**Type:**
1132+
**Type:** sap.ui.model.Filter
11331133
11341134
**Description:** An array of filters on which the logical conjunction is applied
11351135
@@ -1663,7 +1663,7 @@ Array [
16631663
16641664
16651665
1666-
**Type:**
1666+
**Type:** sap.ui.model.Filter
16671667
16681668
**Description:** An array of filters on which the logical conjunction is applied
16691669
@@ -1888,7 +1888,7 @@ Array [
18881888
18891889
18901890
1891-
**Type:**
1891+
**Type:** sap.ui.model.Filter
18921892
18931893
**Description:** An array of filters on which the logical conjunction is applied
18941894

packages/binding/test/unit/services/hover/__snapshots__/hover.test.ts.snap

+19
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ Object {
1919
}
2020
`;
2121
22+
exports[`hover/index hover result on key - inside collection [ nested filters 02] 1`] = `
23+
Object {
24+
"contents": Object {
25+
"kind": "markdown",
26+
"value": "\`(class) sap.ui.model.Filter\`
27+
28+
---
29+
30+
**Type:** sap.ui.model.Filter
31+
32+
**Description:** An array of filters on which the logical conjunction is applied
33+
34+
**Optional:** true
35+
36+
[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)",
37+
},
38+
}
39+
`;
40+
2241
exports[`hover/index hover result on key - inside collection [ nested filters] 1`] = `
2342
Object {
2443
"contents": Object {

packages/binding/test/unit/services/hover/hover.test.ts

+15
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,21 @@ describe("hover/index", () => {
126126
const result = await getHover(snippet);
127127
expect(result).toMatchSnapshot();
128128
});
129+
it("on key - inside collection [ nested filters 02]", async () => {
130+
const snippet = `
131+
<List
132+
items="{
133+
path: '',
134+
filters: [{
135+
filter${CURSOR_ANCHOR}s: [{
136+
}]
137+
}]
138+
}"
139+
/>
140+
`;
141+
const result = await getHover(snippet);
142+
expect(result).toMatchSnapshot();
143+
});
129144
["null", `''`, "0", "false"].forEach((value) => {
130145
it(`on key if ui5object has false value: ${value}`, async () => {
131146
const snippet = `

0 commit comments

Comments
 (0)