Skip to content

@tanstack/query-core interface pollution #1061

@Nick-Motion

Description

@Nick-Motion

When using Tanstack Query alongside DB, the extension of Register here affects all Query uses, leading to widespread type failures due to missing loadSubsetOptions:


error TS2741: Property 'loadSubsetOptions' is missing in type '{ ...: string; }' but required in type 'QueryCollectionMeta'.

138     meta: { source: '...' },
        ~~~~

  ../../node_modules/@tanstack/query-db-collection/dist/esm/global.d.ts:18:5 - 'loadSubsetOptions' is declared here.
    18     loadSubsetOptions: LoadSubsetOptions;

Extending the shared interface with a required DB-only field seems like the wrong solution.

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