File tree Expand file tree Collapse file tree
crates/bindings-typescript/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export interface ReadonlyRangedIndex<
108108> {
109109 filter (
110110 range : IndexScanRangeBounds < TableDef , I >
111- ) : IteratorObject < Prettify < RowType < TableDef > > > ;
111+ ) : IteratorObject < Prettify < RowType < TableDef > > , undefined > ;
112112}
113113
114114/**
Original file line number Diff line number Diff line change @@ -166,8 +166,8 @@ export interface ReadonlyTableMethods<TableDef extends UntypedTableDef> {
166166 count ( ) : bigint ;
167167
168168 /** Iterate over all rows in the TX state. Rust Iterator<Item=Row> → TS IterableIterator<Row>. */
169- iter ( ) : IteratorObject < Prettify < RowType < TableDef > > > ;
170- [ Symbol . iterator ] ( ) : IteratorObject < Prettify < RowType < TableDef > > > ;
169+ iter ( ) : IteratorObject < Prettify < RowType < TableDef > > , undefined > ;
170+ [ Symbol . iterator ] ( ) : IteratorObject < Prettify < RowType < TableDef > > , undefined > ;
171171}
172172
173173/**
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ export class TableCacheImpl<
201201 return impl as ReadonlyIndex < TableDef , I > ;
202202 } else {
203203 const impl : ReadonlyRangedIndex < TableDef , I > = {
204- * filter ( range : any ) : IteratorObject < Row , void > {
204+ * filter ( range : any ) : IteratorObject < Row , undefined > {
205205 for ( const row of self . iter ( ) ) {
206206 if ( matchRange ( row , range ) ) yield row ;
207207 }
@@ -223,7 +223,7 @@ export class TableCacheImpl<
223223 */
224224 iter ( ) : IteratorObject <
225225 Prettify < RowType < TableDefForTableName < RemoteModule , TableName > > > ,
226- void
226+ undefined
227227 > {
228228 function * generator (
229229 rows : Map <
@@ -232,7 +232,7 @@ export class TableCacheImpl<
232232 >
233233 ) : IteratorObject <
234234 Prettify < RowType < TableDefForTableName < RemoteModule , TableName > > > ,
235- void
235+ undefined
236236 > {
237237 for ( const [ row ] of rows . values ( ) ) {
238238 yield row as Prettify <
@@ -249,7 +249,7 @@ export class TableCacheImpl<
249249 */
250250 [ Symbol . iterator ] ( ) : IteratorObject <
251251 Prettify < RowType < TableDefForTableName < RemoteModule , TableName > > > ,
252- void
252+ undefined
253253 > {
254254 return this . iter ( ) ;
255255 }
Original file line number Diff line number Diff line change @@ -649,7 +649,7 @@ function hasOwn<K extends PropertyKey>(
649649 return Object . hasOwn ( o , k ) ;
650650}
651651
652- function * tableIterator ( id : u32 , ty : AlgebraicType ) : Generator < any , void > {
652+ function * tableIterator ( id : u32 , ty : AlgebraicType ) : Generator < any , undefined > {
653653 using iter = new IteratorHandle ( id ) ;
654654 const { typespace } = MODULE_DEF ;
655655
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ spacetime.anonymousView(
8787spacetime . anonymousView (
8888 { name : 'optionalPersonWrong' , public : true } ,
8989 optionalPerson ,
90+ // @ts -expect-error returns a value of the wrong type.
9091 ctx => {
9192 return ctx . db . order . iter ( ) . next ( ) . value ;
9293 }
You can’t perform that action at this time.
0 commit comments