From: Jérôme Benoit Date: Tue, 22 Aug 2023 18:43:41 +0000 (+0200) Subject: docs: refine deque code comments X-Git-Tag: v2.6.32~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5e7eca0e665958972066bf77efece90345fe73d4;p=poolifier.git docs: refine deque code comments Signed-off-by: Jérôme Benoit --- diff --git a/src/deque.ts b/src/deque.ts index d02fd96f..109304a8 100644 --- a/src/deque.ts +++ b/src/deque.ts @@ -64,6 +64,8 @@ export class Deque { /** * Pops a value from the deque. + * + * @returns The popped value or `undefined` if the deque is empty. */ public pop (): T | undefined { if (this.head == null) { @@ -102,7 +104,7 @@ export class Deque { /** * Peeks at the first value. - * @returns The first value or `undefined` if the queue is empty. + * @returns The first value or `undefined` if the deque is empty. */ public peekFirst (): T | undefined { return this.head?.value @@ -110,7 +112,7 @@ export class Deque { /** * Peeks at the last value. - * @returns The last value or `undefined` if the queue is empty. + * @returns The last value or `undefined` if the deque is empty. */ public peekLast (): T | undefined { return this.tail?.value