@@ -62,7 +62,7 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
6262
6363 @returnType ( 'Cursor' )
6464 @serverVersions ( [ ServerVersions . earliest , '3.2.0' ] )
65- addOption ( optionFlagNumber : number ) : Cursor {
65+ addOption ( optionFlagNumber : number ) : this {
6666 if ( optionFlagNumber === 4 ) {
6767 throw new MongoshUnimplementedError (
6868 'the slaveOk option is not supported.' ,
@@ -86,27 +86,27 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
8686
8787 @returnType ( 'Cursor' )
8888 @serverVersions ( [ '4.4.0' , ServerVersions . latest ] )
89- allowDiskUse ( allow ?: boolean ) : Cursor {
89+ allowDiskUse ( allow ?: boolean ) : this {
9090 this . _cursor . allowDiskUse ( allow ) ;
9191 return this ;
9292 }
9393
9494 @returnType ( 'Cursor' )
95- allowPartialResults ( ) : Cursor {
95+ allowPartialResults ( ) : this {
9696 this . _addFlag ( 'partial' ) ;
9797 return this ;
9898 }
9999
100100 @returnType ( 'Cursor' )
101101 @serverVersions ( [ '3.4.0' , ServerVersions . latest ] )
102- collation ( spec : CollationOptions ) : Cursor {
102+ collation ( spec : CollationOptions ) : this {
103103 this . _cursor . collation ( spec ) ;
104104 return this ;
105105 }
106106
107107 @returnType ( 'Cursor' )
108108 @serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
109- comment ( cmt : string ) : Cursor {
109+ comment ( cmt : string ) : this {
110110 this . _cursor . comment ( cmt ) ;
111111 return this ;
112112 }
@@ -130,32 +130,32 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
130130 }
131131
132132 @returnType ( 'Cursor' )
133- hint ( index : string ) : Cursor {
133+ hint ( index : string ) : this {
134134 this . _cursor . hint ( index ) ;
135135 return this ;
136136 }
137137
138138 @returnType ( 'Cursor' )
139- limit ( value : number ) : Cursor {
139+ limit ( value : number ) : this {
140140 this . _cursor . limit ( value ) ;
141141 return this ;
142142 }
143143
144144 @returnType ( 'Cursor' )
145- max ( indexBounds : Document ) : Cursor {
145+ max ( indexBounds : Document ) : this {
146146 this . _cursor . max ( indexBounds ) ;
147147 return this ;
148148 }
149149
150150 @returnType ( 'Cursor' )
151151 @serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
152- maxAwaitTimeMS ( value : number ) : Cursor {
152+ maxAwaitTimeMS ( value : number ) : this {
153153 this . _cursor . maxAwaitTimeMS ( value ) ;
154154 return this ;
155155 }
156156
157157 @returnType ( 'Cursor' )
158- min ( indexBounds : Document ) : Cursor {
158+ min ( indexBounds : Document ) : this {
159159 this . _cursor . min ( indexBounds ) ;
160160 return this ;
161161 }
@@ -172,13 +172,13 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
172172 }
173173
174174 @returnType ( 'Cursor' )
175- noCursorTimeout ( ) : Cursor {
175+ noCursorTimeout ( ) : this {
176176 this . _addFlag ( 'noCursorTimeout' ) ;
177177 return this ;
178178 }
179179
180180 @returnType ( 'Cursor' )
181- oplogReplay ( ) : Cursor {
181+ oplogReplay ( ) : this {
182182 this . _addFlag ( 'oplogReplay' ) ;
183183 return this ;
184184 }
@@ -188,7 +188,7 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
188188 mode : ReadPreferenceLike ,
189189 tagSet ?: TagSet [ ] ,
190190 hedgeOptions ?: HedgeOptions
191- ) : Cursor {
191+ ) : this {
192192 let pref : ReadPreferenceLike ;
193193
194194 // Only conditionally use readPreferenceFromOptions, for java-shell compatibility.
@@ -207,7 +207,7 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
207207
208208 @returnType ( 'Cursor' )
209209 @serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
210- returnKey ( enabled : boolean ) : Cursor {
210+ returnKey ( enabled : boolean ) : this {
211211 this . _cursor . returnKey ( enabled ) ;
212212 return this ;
213213 }
@@ -220,7 +220,7 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
220220 @returnType ( 'Cursor' )
221221 @serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
222222 @apiVersions ( [ ] )
223- tailable ( opts = { awaitData : false } ) : Cursor {
223+ tailable ( opts = { awaitData : false } ) : this {
224224 this . _tailable = true ;
225225 this . _addFlag ( 'tailable' ) ;
226226 if ( opts . awaitData ) {
@@ -239,13 +239,13 @@ export default class Cursor extends AggregateOrFindCursor<ServiceProviderFindCur
239239
240240 @returnType ( 'Cursor' )
241241 @serverVersions ( [ '3.2.0' , ServerVersions . latest ] )
242- showRecordId ( ) : Cursor {
242+ showRecordId ( ) : this {
243243 this . _cursor . showRecordId ( true ) ;
244244 return this ;
245245 }
246246
247247 @returnType ( 'Cursor' )
248- readConcern ( level : ReadConcernLevel ) : Cursor {
248+ readConcern ( level : ReadConcernLevel ) : this {
249249 this . _cursor = this . _cursor . withReadConcern ( { level } ) ;
250250 return this ;
251251 }
0 commit comments