Skip to content

Commit 7a4b0cf

Browse files
committed
docs: add changesets
1 parent 8d91bd5 commit 7a4b0cf

6 files changed

Lines changed: 26 additions & 5 deletions

File tree

‎.changeset/floppy-jokes-march.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hey-api/openapi-ts": patch
3+
---
4+
5+
**plugin(@tanstack/preact-query)**: fix: strip `initialData` from the inferred result types for infinite query options

‎.changeset/great-cups-play.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hey-api/openapi-ts": patch
3+
---
4+
5+
**plugin(@tanstack/solid-query)**: fix: strip `initialData` from the inferred result types for infinite query options

‎.changeset/petite-mugs-cut.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hey-api/openapi-ts": patch
3+
---
4+
5+
**plugin(@tanstack/react-query)**: fix: strip `initialData` from the inferred result types for infinite query options

‎.changeset/salty-hats-cry.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hey-api/openapi-ts": patch
3+
---
4+
5+
**plugin(@tanstack/svelte-query)**: fix: strip `initialData` from the inferred result types for infinite query options

‎.changeset/shaky-yaks-wish.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hey-api/openapi-ts": patch
3+
---
4+
5+
**plugin(@tanstack/angular-query-experimental)**: fix: strip `initialData` from the inferred result types for infinite query options

‎.changeset/tanstack-infinite-options-result-types.md‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@
22
"@hey-api/openapi-ts": patch
33
---
44

5-
**fix(tanstack-query)**: correct result types for generated infinite query options
6-
7-
The generated `*InfiniteOptions()` helpers intentionally omit `initialPageParam` and `getNextPageParam` (consumers supply them), so the `infiniteQueryOptions()` call doesn't match any overload and the error is suppressed with `@ts-ignore`. TypeScript then resolves the call against the first (defined-initial-data) overload, and the inferred return type carries a phantom required `initialData`. Spreading the result into `useInfiniteQuery()` therefore selects the defined-initial-data overload and mistypes the result: `data` is never `undefined` and `isPending` narrows to `false`, even though both are inaccurate at runtime during the first fetch.
8-
9-
The generated functions now strip `initialData` from the inferred type (`Omit<typeof opts, 'initialData'>`, a runtime no-op), so `useInfiniteQuery()` consumers get honest result types.
5+
**plugin(@tanstack/vue-query)**: fix: strip `initialData` from the inferred result types for infinite query options

0 commit comments

Comments
 (0)