Capacity Context Modify Command (#35)

* add: modify capacity command

* update: version increment
This commit is contained in:
Kevin Dang
2024-04-03 15:22:34 -07:00
committed by GitHub
parent 727731695e
commit 2bdc7b8583
8 changed files with 66 additions and 27 deletions

View File

@@ -17,7 +17,7 @@ export class Queue<T> implements IQueue<T> {
* Set up Queue
* @param capacity max length of queue
*/
constructor(private capacity: number = 5) {}
constructor(public capacity: number = 5) {}
/**
* Put item in front of queue
@@ -59,12 +59,4 @@ export class Queue<T> implements IQueue<T> {
getItems(): T[] {
return this.storage
}
/**
* Get capacity of the queue
* @returns capacity of queue
*/
getCapacity(): number {
return this.capacity
}
}