Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: type for documentation #666

Merged
merged 6 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/loud-poems-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@ui5-language-assistant/vscode-ui5-language-assistant-bas-ext": patch
"vscode-ui5-language-assistant": patch
"@ui5-language-assistant/binding": patch
---

Fix type in documentation
4 changes: 1 addition & 3 deletions packages/binding/src/utils/documentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ const getType = (type: UI5Type | undefined): string[] => {
result.push(data.join(" | "));
break;
case "ArrayType":
if (type.type?.kind === "UI5Typedef") {
result.push(...getType(type.type));
}
result.push(...getType(type.type));
break;
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3452,7 +3452,7 @@ Array [



**Type:**
**Type:** sap.ui.model.Filter

**Description:** An array of filters on which the logical conjunction is applied

Expand Down Expand Up @@ -3817,7 +3817,7 @@ Array [



**Type:**
**Type:** sap.ui.model.Filter

**Description:** An array of filters on which the logical conjunction is applied

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ Array [



**Type:**
**Type:** sap.ui.model.Filter

**Description:** An array of filters on which the logical conjunction is applied

Expand Down Expand Up @@ -679,7 +679,7 @@ Array [



**Type:**
**Type:** sap.ui.model.Filter

**Description:** An array of filters on which the logical conjunction is applied

Expand Down Expand Up @@ -904,7 +904,7 @@ Array [



**Type:**
**Type:** sap.ui.model.Filter

**Description:** An array of filters on which the logical conjunction is applied

Expand Down Expand Up @@ -1129,7 +1129,7 @@ Array [



**Type:**
**Type:** sap.ui.model.Filter

**Description:** An array of filters on which the logical conjunction is applied

Expand Down Expand Up @@ -1663,7 +1663,7 @@ Array [



**Type:**
**Type:** sap.ui.model.Filter

**Description:** An array of filters on which the logical conjunction is applied

Expand Down Expand Up @@ -1888,7 +1888,7 @@ Array [



**Type:**
**Type:** sap.ui.model.Filter

**Description:** An array of filters on which the logical conjunction is applied

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ Object {
}
`;

exports[`hover/index hover result on key - inside collection [ nested filters 02] 1`] = `
Object {
"contents": Object {
"kind": "markdown",
"value": "\`(class) sap.ui.model.Filter\`

---

**Type:** sap.ui.model.Filter

**Description:** An array of filters on which the logical conjunction is applied

**Optional:** true

[More information](https://ui5.sap.com/1.108.1/#/api/sap.ui.model.Filter)",
},
}
`;

exports[`hover/index hover result on key - inside collection [ nested filters] 1`] = `
Object {
"contents": Object {
Expand Down
15 changes: 15 additions & 0 deletions packages/binding/test/unit/services/hover/hover.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ describe("hover/index", () => {
const result = await getHover(snippet);
expect(result).toMatchSnapshot();
});
it("on key - inside collection [ nested filters 02]", async () => {
const snippet = `
<List
items="{
path: '',
filters: [{
filter${CURSOR_ANCHOR}s: [{
}]
}]
}"
/>
`;
const result = await getHover(snippet);
expect(result).toMatchSnapshot();
});
["null", `''`, "0", "false"].forEach((value) => {
it(`on key if ui5object has false value: ${value}`, async () => {
const snippet = `
Expand Down