Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions GetBatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ class GetBatch {

/**
* Add a document to the retrive list
* @param {string} docPath The document to fetch
* @param {string|string[]} docPath One or multiple documents to fetch
* @returns This `WriteBatch` instance. Used for chaining method calls.
*/
add(docPath: string): GetBatch {
this.#documents.push(docPath);
add(docPath: string | string[]): GetBatch {
if (typeof docPath === 'string') this.#documents.push(docPath);
else docPath.forEach((docPath) => this.#documents.push(docPath));
return this;
}

Expand Down