Skip to content

Commit

Permalink
fix(jsonapi): fix return type of getMenuItems() method
Browse files Browse the repository at this point in the history
  • Loading branch information
chfoidl committed Jul 10, 2023
1 parent a3d5096 commit 847aa7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/funny-pigs-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@drupal-kit/jsonapi": patch
---

Fix return type of getMenuItems() method
3 changes: 2 additions & 1 deletion packages/jsonapi/src/DrupalkitJsonApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
JsonApiIndex,
JsonApiResource,
JsonApiResources,
MenuLinkContentResource,
ReadManyParameters,
ReadSingleParameters,
ResourceType,
Expand Down Expand Up @@ -75,7 +76,7 @@ export const DrupalkitJsonApi = (
* @param menu - System name of the menu.
*/
const getMenuItems = async (menu: string) => {
return await getResourceCollection(
return await getResourceCollection<MenuLinkContentResource>(
"drupalkit_internal--menu_items",
{},
{
Expand Down

0 comments on commit 847aa7a

Please sign in to comment.