diff --git a/src/Umbraco.Web.UI.Client/src/core/stores/store.ts b/src/Umbraco.Web.UI.Client/src/core/stores/store.ts index 6f7824a10d..8e3ddad2fc 100644 --- a/src/Umbraco.Web.UI.Client/src/core/stores/store.ts +++ b/src/Umbraco.Web.UI.Client/src/core/stores/store.ts @@ -23,23 +23,13 @@ export abstract class UmbDataStoreBase implem protected _items: BehaviorSubject> = new BehaviorSubject(>[]); public readonly items: Observable> = this._items.asObservable(); - /** - * @description - Request data by key. The data is added to the store and is returned as an Observable. - * @param {string} key - * @return {*} {(Observable)} - * @memberof UmbDataStoreBase - */ - abstract getByKey(key: string): Observable - /** * @description - Delete items from the store. * @param {Array} keys * @memberof UmbDataStoreBase */ public deleteItems(keys: Array): void { - const remainingItems = this._items - .getValue() - .filter((item) => item.key && keys.includes(item.key) === false); + const remainingItems = this._items.getValue().filter((item) => item.key && keys.includes(item.key) === false); this._items.next(remainingItems); } @@ -74,7 +64,6 @@ export abstract class UmbDataStoreBase implem } } - /** * @export * @class UmbNodeStoreBase @@ -83,13 +72,19 @@ export abstract class UmbDataStoreBase implem * @description - Base class for Data Stores */ export abstract class UmbNodeStoreBase extends UmbDataStoreBase { - + /** + * @description - Request data by key. The data is added to the store and is returned as an Observable. + * @param {string} key + * @return {*} {(Observable)} + * @memberof UmbDataStoreBase + */ + abstract getByKey(key: string): Observable; + /** * @description - Save data. * @param {object} data * @return {*} {(Promise)} * @memberof UmbNodeStoreBase */ - abstract save(data: T[]): Promise - + abstract save(data: T[]): Promise; }