Commit 640d5da
authored
fix: improve type inference for $in filter in queryChannels (#1663)
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:
```ts
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
});
```1 parent a606c29 commit 640d5da
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2029 | 2029 | | |
2030 | 2030 | | |
2031 | 2031 | | |
2032 | | - | |
| 2032 | + | |
2033 | 2033 | | |
2034 | 2034 | | |
2035 | 2035 | | |
| |||
0 commit comments