-
Notifications
You must be signed in to change notification settings - Fork 152
test(vue-db): add type tests for findOne #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add type tests reproducing issue #1095 where useLiveQuery with findOne() returns `ComputedRef<Array<T>>` instead of `ComputedRef<T | undefined>`. This differs from the React implementation which correctly types findOne() queries to return a single object or undefined. The tests currently fail, demonstrating the bug.
|
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: 0 B Total Size: 90.5 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 3.47 kB ℹ️ View Unchanged
|
Add type tests reproducing issue #1095 where useLiveQuery with findOne() returns
ComputedRef<Array<T>>instead ofComputedRef<T | undefined>.This differs from the React implementation which correctly types findOne() queries to return a single object or undefined.
The tests currently fail, demonstrating the bug.
🎯 Changes
✅ Checklist
pnpm test:pr.🚀 Release Impact