From 13a332e67a8a208b09c673d8a4a132df657ff4e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 9 Jul 2023 21:46:40 +0200 Subject: [PATCH] docs: fix typedoc warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../worker-choice-strategy-context.ts | 2 +- src/worker/abstract-worker.ts | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pools/selection-strategies/worker-choice-strategy-context.ts b/src/pools/selection-strategies/worker-choice-strategy-context.ts index 7729f4f7..2bc99a7b 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -162,7 +162,7 @@ export class WorkerChoiceStrategyContext< * Executes the worker choice strategy algorithm in the context. * * @returns The key of the worker node. - * @throws {@link Error} If the worker node key is null or undefined. + * @throws {@link https://nodejs.org/api/errors.html#class-error} If the worker node key is null or undefined. */ public execute (): number { const workerNodeKey = ( diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index fcdd1bf2..5e714487 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -148,7 +148,7 @@ export abstract class AbstractWorker< * * @param name - The name of the task function to check. * @returns Whether the worker has a task function with the given name or not. - * @throws {@link TypeError} If the `name` parameter is not a string. + * @throws {@link https://nodejs.org/api/errors.html#class-typeerror} If the `name` parameter is not a string. */ public hasTaskFunction (name: string): boolean { if (typeof name !== 'string') { @@ -164,9 +164,9 @@ export abstract class AbstractWorker< * @param name - The name of the task function to add. * @param fn - The task function to add. * @returns Whether the task function was added or not. - * @throws {@link TypeError} If the `name` parameter is not a string. - * @throws {@link Error} If the `name` parameter is the default task function reserved name. - * @throws {@link TypeError} If the `fn` parameter is not a function. + * @throws {@link https://nodejs.org/api/errors.html#class-typeerror} If the `name` parameter is not a string. + * @throws {@link https://nodejs.org/api/errors.html#class-error} If the `name` parameter is the default task function reserved name. + * @throws {@link https://nodejs.org/api/errors.html#class-typeerror} If the `fn` parameter is not a function. */ public addTaskFunction ( name: string, @@ -202,9 +202,9 @@ export abstract class AbstractWorker< * * @param name - The name of the task function to remove. * @returns Whether the task function existed and was removed or not. - * @throws {@link TypeError} If the `name` parameter is not a string. - * @throws {@link Error} If the `name` parameter is the default task function reserved name. - * @throws {@link Error} If the `name` parameter is the task function used as default task function. + * @throws {@link https://nodejs.org/api/errors.html#class-typeerror} If the `name` parameter is not a string. + * @throws {@link https://nodejs.org/api/errors.html#class-error} If the `name` parameter is the default task function reserved name. + * @throws {@link https://nodejs.org/api/errors.html#class-error} If the `name` parameter is the task function used as default task function. */ public removeTaskFunction (name: string): boolean { if (typeof name !== 'string') { @@ -230,9 +230,9 @@ export abstract class AbstractWorker< * * @param name - The name of the task function to use as default task function. * @returns Whether the default task function was set or not. - * @throws {@link TypeError} If the `name` parameter is not a string. - * @throws {@link Error} If the `name` parameter is the default task function reserved name. - * @throws {@link Error} If the `name` parameter is a non-existing task function. + * @throws {@link https://nodejs.org/api/errors.html#class-typeerror} If the `name` parameter is not a string. + * @throws {@link https://nodejs.org/api/errors.html#class-error} If the `name` parameter is the default task function reserved name. + * @throws {@link https://nodejs.org/api/errors.html#class-error} If the `name` parameter is a non-existing task function. */ public setDefaultTaskFunction (name: string): boolean { if (typeof name !== 'string') { -- 2.34.1