c5967a9616
* Rename to saveBatch * forgot a file * first pass of cacheReader * OL2 tests have infinite timeout * OL2 refactor works * fix for tests * moved/removed types to make a more logical structure * fixed imports * rework loop to be in async generator for the expected count * get rid of pumps and fix test * lint fix * redo mermaid diagrams * add readme section on deferment * always return root first * fix linting * revert the counting * merge fixes * remove unused var
16 lines
283 B
TypeScript
16 lines
283 B
TypeScript
import Queue from './queue.js'
|
|
|
|
export default class BufferQueue<T> implements Queue<T> {
|
|
#buffer: T[] = []
|
|
add(value: T): void {
|
|
this.#buffer.push(value)
|
|
}
|
|
|
|
values(): T[] {
|
|
return this.#buffer
|
|
}
|
|
disposeAsync(): Promise<void> {
|
|
return Promise.resolve()
|
|
}
|
|
}
|