Skip to content

Types mismatch between electricCollectionOptions and createCollection #392

@pawelblaszczyk5

Description

@pawelblaszczyk5

Hello!

I'm playing with TanStack DB - awesome job, really excellent experience. Happy to test the early release and report some issues I stumbled upon.

Currently electricCollection options return this:

Image

While createCollection accepts only:

Image

That results in cryptic errors for users with exactOptionalPropertyTypes in tsconfig enabled:

Image

I think it's related to the fact that electricCollectionOptions return type isn't explicit? It seems like most of the rest collection factories are explicitly typed so they get this type sync for free.

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