From 5e7eca0e665958972066bf77efece90345fe73d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 22 Aug 2023 20:43:41 +0200 Subject: [PATCH] docs: refine deque code comments MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/deque.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.34.1