Commit 36cf381
authored
fix(tanstack-query): narrow live options defaults type (#1568)
## Summary
- Narrow experimental_liveOptions defaults to QueryOptionsIn instead of
StreamedOptionsIn
- Add a type test ensuring streamed-only queryFnOptions is rejected for
live defaults
## Tests
- pnpm --filter @orpc/tanstack-query type:check
- pnpm vitest run packages/tanstack-query/src/procedure-utils.test.ts
- pnpm run type:check
- pnpm exec eslint --max-warnings=0
packages/tanstack-query/src/procedure-utils.ts
packages/tanstack-query/src/procedure-utils.test-d.ts
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed type validation for the experimental live query feature to use
correct type definitions and enforce requirements properly.
* **Tests**
* Added type assertions to ensure the experimental live query options
correctly validate input and reject incompatible configurations.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/middleapi/orpc/pull/1568?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 1378fd2 commit 36cf381
2 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
855 | | - | |
| 855 | + | |
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
870 | 877 | | |
871 | 878 | | |
872 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
0 commit comments