Skip to content

Commit 6fff048

Browse files
fix misc tests
1 parent 7434838 commit 6fff048

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

src/gridfs/download.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,41 @@ export interface GridFSFile {
5656

5757
/** @internal */
5858
export interface GridFSBucketReadStreamPrivate {
59+
/**
60+
* The running total number of bytes read from the chunks collection.
61+
*/
5962
bytesRead: number;
63+
/**
64+
* The number of bytes to remove from the last chunk read in the file. This is non-zero
65+
* if `end` is not equal to the length of the document and `end` is not a multiple
66+
* of the chunkSize.
67+
*/
6068
bytesToTrim: number;
69+
70+
/**
71+
* The number of bytes to remove from the first chunk read in the file. This is non-zero
72+
* if `start` is not equal to the 0 and `start` is not a multiple
73+
* of the chunkSize.
74+
*/
6175
bytesToSkip: number;
76+
77+
files: Collection<GridFSFile>;
6278
chunks: Collection<GridFSChunk>;
6379
cursor?: FindCursor<GridFSChunk>;
80+
81+
/** The running total number of chunks read from the chunks collection. */
6482
expected: number;
65-
files: Collection<GridFSFile>;
83+
84+
/**
85+
* The filter used to search in the _files_ collection (i.e., `{ _id: <> }`)
86+
* This is not the same filter used when reading chunks from the chunks collection.
87+
*/
6688
filter: Document;
89+
90+
/** Indicates whether or not download has started. */
6791
init: boolean;
92+
93+
/** The expected number of chunks to read, calculated from start, end, chunkSize and file length. */
6894
expectedEnd: number;
6995
file?: GridFSFile;
7096
options: {

0 commit comments

Comments
 (0)