From: Jérôme Benoit Date: Sun, 9 Jul 2023 19:46:40 +0000 (+0200) Subject: docs: fix typedoc warnings X-Git-Tag: v2.6.13~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=13a332e67a8a208b09c673d8a4a132df657ff4e6;p=poolifier.git docs: fix typedoc warnings Signed-off-by: Jérôme Benoit --- 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') {