@@ -62,7 +62,7 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
62
62
63
63
@returnType ( 'Cursor' )
64
64
@serverVersions ( [ ServerVersions . earliest , '3.2.0' ] )
65
- addOption ( optionFlagNumber : number ) : Cursor {
65
+ addOption ( optionFlagNumber : number ) : this {
66
66
if ( optionFlagNumber === 4 ) {
67
67
throw new MongoshUnimplementedError (
68
68
'the slaveOk option is not supported.' ,
@@ -86,27 +86,27 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
86
86
87
87
@returnType ( 'Cursor' )
88
88
@serverVersions ( [ '4.4.0' , ServerVersions . latest ] )
89
- allowDiskUse ( allow ?: boolean ) : Cursor {
89
+ allowDiskUse ( allow ?: boolean ) : this {
90
90
this . _cursor . allowDiskUse ( allow ) ;
91
91
return this ;
92
92
}
93
93
94
94
@returnType ( 'Cursor' )
95
- allowPartialResults ( ) : Cursor {
95
+ allowPartialResults ( ) : this {
96
96
this . _addFlag ( 'partial' ) ;
97
97
return this ;
98
98
}
99
99
100
100
@returnType ( 'Cursor' )
101
101
@serverVersions ( [ '3.4.0' , ServerVersions . latest ] )
102
- collation ( spec : CollationOptions ) : Cursor {
102
+ collation ( spec : CollationOptions ) : this {
103
103
this . _cursor . collation ( spec ) ;
104
104
return this ;
105
105
}
106
106
107
107
@returnType ( 'Cursor' )
108
108
@serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
109
- comment ( cmt : string ) : Cursor {
109
+ comment ( cmt : string ) : this {
110
110
this . _cursor . comment ( cmt ) ;
111
111
return this ;
112
112
}
@@ -130,32 +130,32 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
130
130
}
131
131
132
132
@returnType ( 'Cursor' )
133
- hint ( index : string ) : Cursor {
133
+ hint ( index : string ) : this {
134
134
this . _cursor . hint ( index ) ;
135
135
return this ;
136
136
}
137
137
138
138
@returnType ( 'Cursor' )
139
- limit ( value : number ) : Cursor {
139
+ limit ( value : number ) : this {
140
140
this . _cursor . limit ( value ) ;
141
141
return this ;
142
142
}
143
143
144
144
@returnType ( 'Cursor' )
145
- max ( indexBounds : Document ) : Cursor {
145
+ max ( indexBounds : Document ) : this {
146
146
this . _cursor . max ( indexBounds ) ;
147
147
return this ;
148
148
}
149
149
150
150
@returnType ( 'Cursor' )
151
151
@serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
152
- maxAwaitTimeMS ( value : number ) : Cursor {
152
+ maxAwaitTimeMS ( value : number ) : this {
153
153
this . _cursor . maxAwaitTimeMS ( value ) ;
154
154
return this ;
155
155
}
156
156
157
157
@returnType ( 'Cursor' )
158
- min ( indexBounds : Document ) : Cursor {
158
+ min ( indexBounds : Document ) : this {
159
159
this . _cursor . min ( indexBounds ) ;
160
160
return this ;
161
161
}
@@ -172,13 +172,13 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
172
172
}
173
173
174
174
@returnType ( 'Cursor' )
175
- noCursorTimeout ( ) : Cursor {
175
+ noCursorTimeout ( ) : this {
176
176
this . _addFlag ( 'noCursorTimeout' ) ;
177
177
return this ;
178
178
}
179
179
180
180
@returnType ( 'Cursor' )
181
- oplogReplay ( ) : Cursor {
181
+ oplogReplay ( ) : this {
182
182
this . _addFlag ( 'oplogReplay' ) ;
183
183
return this ;
184
184
}
@@ -188,7 +188,7 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
188
188
mode : ReadPreferenceLike ,
189
189
tagSet ?: TagSet [ ] ,
190
190
hedgeOptions ?: HedgeOptions
191
- ) : Cursor {
191
+ ) : this {
192
192
let pref : ReadPreferenceLike ;
193
193
194
194
// Only conditionally use readPreferenceFromOptions, for java-shell compatibility.
@@ -207,7 +207,7 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
207
207
208
208
@returnType ( 'Cursor' )
209
209
@serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
210
- returnKey ( enabled : boolean ) : Cursor {
210
+ returnKey ( enabled : boolean ) : this {
211
211
this . _cursor . returnKey ( enabled ) ;
212
212
return this ;
213
213
}
@@ -220,7 +220,7 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
220
220
@returnType ( 'Cursor' )
221
221
@serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
222
222
@apiVersions ( [ ] )
223
- tailable ( opts = { awaitData : false } ) : Cursor {
223
+ tailable ( opts = { awaitData : false } ) : this {
224
224
this . _tailable = true ;
225
225
this . _addFlag ( 'tailable' ) ;
226
226
if ( opts . awaitData ) {
@@ -239,13 +239,13 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
239
239
240
240
@returnType ( 'Cursor' )
241
241
@serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
242
- showRecordId ( ) : Cursor {
242
+ showRecordId ( ) : this {
243
243
this . _cursor . showRecordId ( true ) ;
244
244
return this ;
245
245
}
246
246
247
247
@returnType ( 'Cursor' )
248
- readConcern ( level : ReadConcernLevel ) : Cursor {
248
+ readConcern ( level : ReadConcernLevel ) : this {
249
249
this . _cursor = this . _cursor . withReadConcern ( { level } ) ;
250
250
return this ;
251
251
}
0 commit comments