Skip to content

[solid-query] queryOptions() erases error type #8460

@grobitto

Description

@grobitto

Describe the bug

When I am using queryOptions helper type of error erased and becomes unknown

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-query-shfzdsbz?file=src%2Findex.tsx

Steps to reproduce

see example above

Expected behavior

query.error type does not get erased

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

all

Tanstack Query adapter

solid-query

TanStack Query version

5.62.8

TypeScript version

Version 5.6.3

Additional context

Looks like an easy fix: just change TError=unknown to TError = DefaultError in /solid-query/src/queryOptions.ts, but I am no TS expert and maybe the problem is deeper

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions