Skip to content

Commit 8b7cffb

Browse files
committed
chore: update jsdoc
1 parent a7b4182 commit 8b7cffb

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/lib/stream-list-diff/client/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,14 @@ async function getValidClientStream<T extends Record<string, unknown>>(
246246

247247
/**
248248
* Streams the diff of two object lists
249-
* @param {Record<string, unknown>[]} prevList - The original object list.
250-
* @param {Record<string, unknown>[]} nextList - The new object list.
251-
* @param {ReferenceProperty<T>} referenceProperty - A common property in all the objects of your lists (e.g. `id`)
249+
* @param {ReadableStream | File | Record<string, unknown>[]} prevList - The original object list.
250+
* @param {ReadableStream | File | Record<string, unknown>[]} nextList - The new object list.
251+
* @param {string} referenceProperty - A common property in all the objects of your lists (e.g. `id`)
252252
* @param {ListStreamOptions} options - Options to refine your output.
253253
- `chunksSize`: the number of object diffs returned by each streamed chunk. (e.g. `0` = 1 object diff by chunk, `10` = 10 object diffs by chunk).
254254
- `showOnly`: returns only the values whose status you are interested in. (e.g. `["added", "equal"]`)
255255
- `considerMoveAsUpdate`: if set to `true` a `moved` object will be considered as `updated`
256-
* @returns EventEmitter
256+
* @returns StreamListener
257257
*/
258258
export function streamListDiffClient<T extends Record<string, unknown>>(
259259
prevList: ReadableStream<T> | File | T[],

src/lib/stream-list-diff/server/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,17 @@ function getValidStream<T>(
232232
throw new Error(`Invalid ${listType}. Expected Readable, Array, or File.`);
233233
}
234234

235+
/**
236+
* Streams the diff of two object lists
237+
* @param {Readable | FilePath | Record<string, unknown>[]} prevList - The original object list.
238+
* @param {Readable | FilePath | Record<string, unknown>[]} nextList - The new object list.
239+
* @param {string} referenceProperty - A common property in all the objects of your lists (e.g. `id`)
240+
* @param {ListStreamOptions} options - Options to refine your output.
241+
- `chunksSize`: the number of object diffs returned by each streamed chunk. (e.g. `0` = 1 object diff by chunk, `10` = 10 object diffs by chunk).
242+
- `showOnly`: returns only the values whose status you are interested in. (e.g. `["added", "equal"]`)
243+
- `considerMoveAsUpdate`: if set to `true` a `moved` object will be considered as `updated`
244+
* @returns StreamListener
245+
*/
235246
export function streamListDiff<T extends Record<string, unknown>>(
236247
prevStream: Readable | FilePath | T[],
237248
nextStream: Readable | FilePath | T[],

0 commit comments

Comments
 (0)