Skip to content

Conversation

@oliverlaz
Copy link
Member

@oliverlaz oliverlaz commented Dec 10, 2025

Changelog

Improves the type inference for the $in operator in queryChannels() filters.
Fixes: #1661.

Array types weren't properly unpacked, so TS types required nested arrays:

const channels = await this.streamChat.queryChannels({
   filter_tags: { $in: [`my_tag`] }, // errors
   filter_tags: { $in: [[`my_tag`]]` }, // doesn't error on TS but our API expects a flat array
});

@github-actions
Copy link
Contributor

github-actions bot commented Dec 10, 2025

Size Change: 0 B

Total Size: 356 kB

ℹ️ View Unchanged
Filename Size
dist/cjs/index.browser.js 118 kB
dist/cjs/index.node.js 120 kB
dist/esm/index.mjs 118 kB

compressed-size-action

@oliverlaz oliverlaz merged commit 640d5da into master Dec 11, 2025
4 checks passed
@oliverlaz oliverlaz deleted the query-filter-types branch December 11, 2025 09:59
github-actions bot pushed a commit that referenced this pull request Dec 11, 2025
## [9.27.1](v9.27.0...v9.27.1) (2025-12-11)

### Bug Fixes

* improve type inference for $in filter in queryChannels ([#1663](#1663)) ([640d5da](640d5da)), closes [#1661](#1661)
@stream-ci-bot
Copy link

🎉 This PR is included in version 9.27.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Query Channels by filter_tags TypeScript type error

4 participants