From af83aabe6dcb5343be5d2805b0748c19c6f51dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 10 Jan 2023 15:51:27 +0100 Subject: [PATCH] JSDocs --- .../workspace-content/workspace-content.context.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/workspace-content.context.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/workspace-content.context.ts index 0aad0a639b..8febc888ab 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/workspace-content.context.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-content/workspace-content.context.ts @@ -8,11 +8,12 @@ import { UmbContextConsumerController } from 'src/core/context-api/consume/conte import { UmbObserverController } from '@umbraco-cms/observable-api'; import { UmbContextProviderController } from 'src/core/context-api/provide/context-provider.controller'; import { EntityTreeItem } from '@umbraco-cms/backend-api'; +import { ContentDetails } from '@umbraco-cms/models'; // TODO: Consider if its right to have this many class-inheritance of WorkspaceContext // TODO: Could we extract this code into a 'Manager' of its own, which will be instantiated by the concrete Workspace Context. This will be more transparent and 'reuseable' export abstract class UmbWorkspaceContentContext< - ContentTypeType extends EntityTreeItem = EntityTreeItem, + ContentTypeType extends ContentDetails = ContentDetails, StoreType extends UmbNodeStoreBase = UmbNodeStoreBase > { @@ -96,7 +97,7 @@ export abstract class UmbWorkspaceContentContext< if(!this.#isNew) { this._storeSubscription?.destroy(); - this._storeSubscription = new UmbObserverController(this._host, this._store.getByKey(this.entityKey), + this._storeSubscription = new UmbObserverController(this._host, this._store.getByKey(this.entityKey), (content) => { if (!content) return; // TODO: Handle nicely if there is no content data. this.update(content as any); @@ -134,4 +135,4 @@ export abstract class UmbWorkspaceContentContext< public destroy(): void { this._data.unsubscribe(); } -} \ No newline at end of file +}