@@ -23,15 +23,15 @@ import ResultSummary from '../result-summary.ts'
23
23
interface StreamObserver {
24
24
/**
25
25
* Will be called on every record that comes in and transform a raw record
26
- * to a Object. If user-provided observer is present, pass transformed record
27
- * to it's onNext method, otherwise, push to record que.
26
+ * to an Object. If user-provided observer is present, pass transformed record
27
+ * to its onNext method; otherwise push to record que.
28
28
* @param {Array } rawRecord - An array with the raw record
29
29
*/
30
30
onNext ?: ( rawRecord : any [ ] ) => void
31
31
/**
32
32
* Will be called on errors.
33
33
* If user-provided observer is present, pass the error
34
- * to it's onError method, otherwise set instance variable _error.
34
+ * to its onError method, otherwise set instance variable _error.
35
35
* @param {Object } error - An error object
36
36
*/
37
37
onError : ( error : Error ) => void
@@ -40,7 +40,6 @@ interface StreamObserver {
40
40
41
41
/**
42
42
* Interface to observe updates on the Result which is being produced.
43
- *
44
43
*/
45
44
interface ResultObserver {
46
45
/**
@@ -51,7 +50,7 @@ interface ResultObserver {
51
50
onKeys ?: ( keys : string [ ] ) => void
52
51
53
52
/**
54
- * Receive the each record present on the {@link @Result }
53
+ * Receive each record present on the {@link @Result }
55
54
* @param {Record } record The {@link Record} produced
56
55
*/
57
56
onNext ?: ( record : Record ) => void
@@ -115,7 +114,7 @@ export interface ResultStreamObserver extends StreamObserver {
115
114
* @param {Object } observer - Observer object
116
115
* @param {function(keys: String[]) } observer.onKeys - Handle stream header, field keys.
117
116
* @param {function(record: Object) } observer.onNext - Handle records, one by one.
118
- * @param {function(metadata: Object) } observer.onCompleted - Handle stream tail, the metadata .
117
+ * @param {function(metadata: Object) } observer.onCompleted - Handle stream tail, the summary .
119
118
* @param {function(error: Object) } observer.onError - Handle errors, should always be provided.
120
119
*/
121
120
subscribe : ( observer : ResultObserver ) => void
0 commit comments