From 4bffc0628edc126828fd7262740dc0f2ac94517c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 24 Aug 2023 12:33:53 +0200 Subject: [PATCH] docs: improve scope in code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/circular-array.ts | 2 ++ src/deque.ts | 4 ++++ src/utils.ts | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/circular-array.ts b/src/circular-array.ts index bb958d82..9cea08bc 100644 --- a/src/circular-array.ts +++ b/src/circular-array.ts @@ -4,6 +4,8 @@ const DEFAULT_CIRCULAR_ARRAY_SIZE = 1024 /** * Array with a maximum length and shifting items when full. + * + * @internal */ export class CircularArray extends Array { public size: number diff --git a/src/deque.ts b/src/deque.ts index 42f9953d..9be270ff 100644 --- a/src/deque.ts +++ b/src/deque.ts @@ -1,5 +1,8 @@ // Copyright Jerome Benoit. 2023. All Rights Reserved. +/** + * @internal + */ export class Node { public value: T public next?: Node @@ -15,6 +18,7 @@ export class Node { * Implemented with a doubly linked list. * * @typeParam T - Type of deque values. + * @internal */ export class Deque { private head?: Node diff --git a/src/utils.ts b/src/utils.ts index 6f9d1226..77f889c9 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -44,6 +44,7 @@ export const DEFAULT_MEASUREMENT_STATISTICS_REQUIREMENTS: MeasurementStatisticsR * Always returns a value greater than zero. * * @returns The host OS optimized maximum pool size. + * @internal */ export const availableParallelism = (): number => { let availableParallelism = 1 @@ -64,6 +65,7 @@ export const availableParallelism = (): number => { // * @param retryNumber - The number of retries that have already been attempted // * @param maxDelayRatio - The maximum ratio of the delay that can be randomized // * @returns Delay in milliseconds +// * @internal // */ // export const exponentialDelay = ( // retryNumber = 0, @@ -79,6 +81,7 @@ export const availableParallelism = (): number => { * * @param dataSet - Data set. * @returns The median of the given data set. + * @internal */ export const median = (dataSet: number[]): number => { if (Array.isArray(dataSet) && dataSet.length === 0) { @@ -127,6 +130,7 @@ export const isPlainObject = (obj: unknown): boolean => * @param killBehavior - Which kind of kill behavior to detect. * @param value - Any value. * @returns `true` if `value` was strictly equals to `killBehavior`, otherwise `false`. + * @internal */ export const isKillBehavior = ( killBehavior: KB, @@ -154,6 +158,7 @@ export const isAsyncFunction = ( * @param measurementRequirements - The measurement statistics requirements. * @param measurementValue - The measurement value. * @param numberOfMeasurements - The number of measurements. + * @internal */ export const updateMeasurementStatistics = ( measurementStatistics: MeasurementStatistics, -- 2.34.1