File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff 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 */
258258export function streamListDiffClient < T extends Record < string , unknown > > (
259259 prevList : ReadableStream < T > | File | T [ ] ,
Original file line number Diff line number Diff 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+ */
235246export function streamListDiff < T extends Record < string , unknown > > (
236247 prevStream : Readable | FilePath | T [ ] ,
237248 nextStream : Readable | FilePath | T [ ] ,
You can’t perform that action at this time.
0 commit comments