Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
185d545 to
8663c5e
Compare
|
Refreshed this against current |
🦋 Changeset detectedLatest commit: ba15beb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected --targets=test:sherif,test:knip,tes... |
❌ Failed | 1m 4s | View ↗ |
nx run-many --target=build --exclude=examples/*... |
✅ Succeeded | 37s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-10-17 16:56:01 UTC
| import { LitElement } from 'lit' | ||
| import { describe, expectTypeOf, it } from 'vitest' | ||
| import { useMutationState } from '../useMutationState.js' | ||
| import { generateElementName } from './test-utils.js' |
There was a problem hiding this comment.
this file doesn’t exist
| import { generateElementName } from './test-utils.js' | |
| import { generateElementName } from './utils.js' |
| import type { Mutation, MutationState } from '@tanstack/query-core' | ||
|
|
||
| describe('useMutationState types', () => { | ||
| it('propagates typed mutation state generics to the select callback', () => { |
There was a problem hiding this comment.
we need more tests please. This seems to fail now but worked before:
useMutationState(host, {
select: (mutation) => mutation.state.error?.message,
})
please add at least the same test as the react adapter has, and construct the types in the same way because this works in the react version.
|
Addressed both review points in ba15beb: the type test now imports |

🎯 Changes
@tanstack/lit-querydid not receive theuseMutationStategeneric inference added to the other framework adapters in #10373. As a result, a selector with an explicitly typedMutationState<TData, TError, TVariables>still sawMutation<unknown, Error, unknown, unknown>.This PR:
Mutationtype from the selectedMutationStateresultThe regression test fails on current
mainand passes with this change.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit
useMutationStateso theselectcallback receives the mutation’s specific data, error, and variables types.