Skip to content

Commit 9778983

Browse files
committed
Remove an unnecessary type casting
1 parent deeb40d commit 9778983

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

src/collections/todoItems.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import {
2-
createCollection,
3-
type IR,
4-
parseLoadSubsetOptions,
5-
} from "@tanstack/db";
1+
import { createCollection, parseLoadSubsetOptions } from "@tanstack/db";
62
import { queryCollectionOptions } from "@tanstack/query-db-collection";
73
import { toast } from "sonner";
84
import type { TodoItemRecord } from "@/db/schema";
@@ -58,12 +54,7 @@ export const todoItemsCollection = createCollection<TodoItemRecord>(
5854
const params = new URLSearchParams();
5955

6056
if (meta) {
61-
const { limit, offset, where, orderBy } = meta.loadSubsetOptions as {
62-
where?: IR.BasicExpression<boolean>;
63-
orderBy?: IR.OrderBy;
64-
offset?: IR.Offset;
65-
limit?: number;
66-
};
57+
const { limit, offset, where, orderBy } = meta.loadSubsetOptions;
6758

6859
// Parse the expressions into simple format
6960
const parsed = parseLoadSubsetOptions({ where, orderBy, limit });

0 commit comments

Comments
 (0)