From e9b9ad07147227cabfdede6d38fd2af68b906241 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Tue, 12 Sep 2023 18:24:24 +0200 Subject: [PATCH] remove optional because it's still used in too many places --- .../sources/document-recycle-bin.tree.server.data.ts | 5 +++++ .../repository/data-source/tree-data-source.interface.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/repository/sources/document-recycle-bin.tree.server.data.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/repository/sources/document-recycle-bin.tree.server.data.ts index 9c6090bac5..4473c95e2a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/repository/sources/document-recycle-bin.tree.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/repository/sources/document-recycle-bin.tree.server.data.ts @@ -50,4 +50,9 @@ export class UmbDocumentRecycleBinTreeServerDataSource implements UmbTreeDataSou ); } } + + // TODO: remove when interface is cleaned up + async getItems(unique: Array): Promise { + throw new Error('Dot not use this method. Use the item source instead'); + } } diff --git a/src/Umbraco.Web.UI.Client/src/shared/repository/data-source/tree-data-source.interface.ts b/src/Umbraco.Web.UI.Client/src/shared/repository/data-source/tree-data-source.interface.ts index 8c604a705d..c089256cb9 100644 --- a/src/Umbraco.Web.UI.Client/src/shared/repository/data-source/tree-data-source.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/shared/repository/data-source/tree-data-source.interface.ts @@ -5,5 +5,5 @@ export interface UmbTreeDataSource>; getChildrenOf(parentUnique: string | null): Promise>; // TODO: remove this when all repositories are migrated to the new items interface - getItems?(unique: Array): Promise>>; + getItems(unique: Array): Promise>>; }