Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`Collection.currentStateAsChanges` JSDoc examples don’t match `CurrentStateAsChangesOptions`

Open Beginner friendly
#2,261 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
documentation

Research direction

Read the JSDoc for Collection.currentStateAsChanges in packages/db/src/collection/index.ts and compare its examples with CurrentStateAsChangesOptions in packages/db/src/types.ts. Update the examples to match the accepted options and types; done when both examples type-check against the documented options.

Written by the indexing model from the issue text.

Description

  • I've validated the bug against the latest version of DB packages

Describe the bug

The JSDoc on Collection.currentStateAsChanges documents options that the method's type doesn't accept:

  1. whereExpression: eq(row.status, 'active'): CurrentStateAsChangesOptions has no whereExpression field.
  2. where: (row) => row.status === 'active': where is typed BasicExpression<boolean>, not a callback, so this example doesn't type-check either.

To Reproduce

  1. Create a collection
  2. Try JSDoc examples from currentStateAsChanges
Dominant language
TypeScript
Stars
4k
Forks
277
Avg merge
21h 21m
Merged PRs (30d)
218

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TanStack/db

All issues in TanStack/db

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.