mirror of
https://github.com/zrwusa/data-structure-typed.git
synced 2024-11-23 04:44:04 +00:00
Merge pull request #95 from philipplentzen/main
docs(queue): fix mismatch between typings and jsdoc
This commit is contained in:
commit
e5bdaec771
|
@ -142,9 +142,9 @@ export class Queue<E = any, R = any> extends IterableElementBase<E, R, Queue<E,
|
|||
* Time Complexity: O(1)
|
||||
* Space Complexity: O(1)
|
||||
*
|
||||
* The push function adds an element to the end of the queue and returns the updated queue.Adds an element at the back of the queue.
|
||||
* The push function adds an element to the end of the queue and returns true. Adds an element at the back of the queue.
|
||||
* @param {E} element - The `element` parameter represents the element that you want to add to the queue.
|
||||
* @returns The `add` method is returning a `Queue<E>` object.
|
||||
* @returns Always returns true, indicating the element was successfully added.
|
||||
*/
|
||||
push(element: E): boolean {
|
||||
this.elements.push(element);
|
||||
|
@ -176,7 +176,7 @@ export class Queue<E = any, R = any> extends IterableElementBase<E, R, Queue<E,
|
|||
|
||||
/**
|
||||
* The delete function removes an element from the list.
|
||||
* @param element: E Specify the element to be deleted
|
||||
* @param {E} element - Specify the element to be deleted
|
||||
* @return A boolean value indicating whether the element was successfully deleted or not
|
||||
*/
|
||||
delete(element: E): boolean {
|
||||
|
@ -186,7 +186,7 @@ export class Queue<E = any, R = any> extends IterableElementBase<E, R, Queue<E,
|
|||
|
||||
/**
|
||||
* The deleteAt function deletes the element at a given index.
|
||||
* @param index: number Determine the index of the element to be deleted
|
||||
* @param {number} index - Determine the index of the element to be deleted
|
||||
* @return A boolean value
|
||||
*/
|
||||
deleteAt(index: number): boolean {
|
||||
|
|
Loading…
Reference in a new issue