You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(query): emit plain SolidMutationOptions for user-facing mutation param (#3365)
Solid Query's `Use*Options` / `Create*Options` aliases are
`Accessor<…>` wrappers, so typing `options.mutation` as
`UseMutationOptions<…>` made callers fail with "object literal may
only specify known properties, and 'onSuccess' does not exist". The
runtime then spreads it as a plain object, which only "worked"
because no caller could legally produce that shape.
The mutation now uses the adapter's plain options interface
(`SolidMutationOptions` < 5.100.6, `MutationOptions` ≥ 5.100.6 after
TanStack dropped the `Solid` prefix) for both the helper return type
and the user-facing `options.mutation` param. Detection lives in a
new `isSolidQueryWithRenamedOptionsTypes` helper, plumbed into the
solid adapter so generated imports stay in sync with the installed
package.
Queries keep their existing prefix-based `Use*Options` shape for the
user-facing `options.query` param: Solid's `useQuery` overloads only
discriminate against `Undefined/DefinedInitialDataOptions`, both of
which are Accessor types, so widening to the plain options here would
break `initialData` discrimination at the call site.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments