From fa2efa919dac20f9ad2b258654e4c2613a4e4799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 19 Aug 2024 13:24:34 +0200 Subject: [PATCH] jsdocs --- .../src/libs/class-api/class.interface.ts | 20 +++++++++---------- .../context-api/consume/context-consumer.ts | 12 +++++------ .../consume/context-request.event.ts | 2 -- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/libs/class-api/class.interface.ts b/src/Umbraco.Web.UI.Client/src/libs/class-api/class.interface.ts index 149ce9ecfb..4f9e79f923 100644 --- a/src/Umbraco.Web.UI.Client/src/libs/class-api/class.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/libs/class-api/class.interface.ts @@ -11,10 +11,10 @@ import type { Observable } from '@umbraco-cms/backoffice/external/rxjs'; export interface UmbClassInterface extends UmbControllerHost { /** * @description Observe an Observable. An Observable is a declared source of data that can be observed. An observables is declared from a UmbState. - * @param {Observable} source An Observable to observe from. - * @param {method} callback Callback method called when data is changed. + * @param {Observable} source An Observable to observe from. + * @param {ObserverCallback} callback Callback method called when data is changed. * @returns {UmbObserverController} Reference to the created Observer Controller instance. - * @memberof UmbClassMixin + * @memberof UmbClassInterface */ observe< ObservableType extends Observable | undefined, @@ -36,19 +36,19 @@ export interface UmbClassInterface extends UmbControllerHost { /** * @description Provide a context API for this or child elements. - * @param {string} contextAlias + * @param {string} alias * @param {instance} instance The API instance to be exposed. * @returns {UmbContextProviderController} Reference to the created Context Provider Controller instance - * @memberof UmbClassMixin + * @memberof UmbClassInterface */ provideContext(alias: string | UmbContextToken, instance: R): UmbContextProviderController; /** * @description Setup a subscription for a context. The callback is called when the context is resolved. - * @param {string} contextAlias - * @param {method} callback Callback method called when context is resolved. + * @param {string} alias + * @param {ObserverCallback} callback Callback method called when context is resolved. * @returns {UmbContextConsumerController} Reference to the created Context Consumer Controller instance - * @memberof UmbClassMixin + * @memberof UmbClassInterface */ consumeContext( alias: string | UmbContextToken, @@ -57,9 +57,9 @@ export interface UmbClassInterface extends UmbControllerHost { /** * @description Retrieve a context. Notice this is a one time retrieving of a context, meaning if you expect this to be up to date with reality you should instead use the consumeContext method. - * @param {string} contextAlias + * @param {string} alias * @returns {Promise} A Promise with the reference to the Context Api Instance - * @memberof UmbClassMixin + * @memberof UmbClassInterface */ getContext( alias: string | UmbContextToken, diff --git a/src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-consumer.ts b/src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-consumer.ts index 7e716a8ff1..f4eab04f67 100644 --- a/src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-consumer.ts +++ b/src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-consumer.ts @@ -27,9 +27,9 @@ export class UmbContextConsumer { return ( diff --git a/src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-request.event.ts b/src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-request.event.ts index b0b4e7b516..6371270e93 100644 --- a/src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-request.event.ts +++ b/src/Umbraco.Web.UI.Client/src/libs/context-api/consume/context-request.event.ts @@ -4,7 +4,6 @@ export const UMB_DEBUG_CONTEXT_EVENT_TYPE = 'umb:debug-contexts'; export type UmbContextCallback = (instance: T) => void; /** - * @interface UmbContextRequestEvent */ export interface UmbContextRequestEvent extends Event { @@ -16,7 +15,6 @@ export interface UmbContextRequestEvent extends Event { } /** - * @class UmbContextRequestEventImplementation * @augments {Event} * @implements {UmbContextRequestEvent}