-
Notifications
You must be signed in to change notification settings - Fork 124
Fix type of utils in collection options #866
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
|
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: 85.8 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 3.34 kB ℹ️ View Unchanged
|
Trying to fix #792
I believe that we also broke
todosCollection.utilsbecause my VS Code IntelliSense indicates that it is alsoUtilsRecord.The problem is an intersection type once again!
The issue is that
utilsappears on both sides of the intersection type. On the left insideCollectionConfigit is typed asUtilsRecordbecause we don't actually pass it through:It's a hard one to solve though because of the optionality of
utilsin the base config but it being non-optional in the Electric collection options. Also for some reason my VS Code's IntelliSense gets confused all the time on this type which makes it hard to fix.