File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,19 +211,22 @@ export function createLiveQueryCollection<
211211 * Bridge function that handles the type compatibility between query2's TResult
212212 * and core collection's output type without exposing ugly type assertions to users
213213 */
214- function bridgeToCreateCollection < TResult extends object > (
215- options : CollectionConfig < TResult > & { utils : LiveQueryBuiltInUtils } ,
216- ) : Collection < TResult , string | number , LiveQueryBuiltInUtils > {
214+ function bridgeToCreateCollection <
215+ TResult extends object ,
216+ TUtils extends UtilsRecord = { } ,
217+ > (
218+ options : CollectionConfig < TResult > & { utils : TUtils } ,
219+ ) : Collection < TResult , string | number , TUtils > {
217220 const builder = getBuilderFromConfig ( options )
218221 const collection = createCollection ( options as any ) as unknown as Collection <
219222 TResult ,
220223 string | number ,
221- LiveQueryBuiltInUtils
224+ LiveQueryCollectionUtils
222225 >
223226
224227 if ( builder ) {
225228 registerCollectionBuilder ( collection , builder )
226229 }
227230
228- return collection
231+ return collection as unknown as Collection < TResult , string | number , TUtils >
229232}
You can’t perform that action at this time.
0 commit comments