Skip to content

Commit ed15081

Browse files
committed
refactor: rename .options to .queryOptions
1 parent 57f00f3 commit ed15081

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.changeset/hot-pigs-fall.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"typed-openapi": minor
3+
---
4+
5+
Rename .options to .queryOptions

packages/typed-openapi/src/tanstack-query.generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const generateTanstackQueryFile = async (ctx: GeneratorContext & { relati
7878
/** type-only property if you need easy access to the endpoint params */
7979
"~endpoint": {} as TEndpoint,
8080
queryKey,
81-
options: queryOptions({
81+
queryOptions: queryOptions({
8282
queryFn: async ({ queryKey, signal, }) => {
8383
const res = await this.client.${method}(path, {
8484
...params,

packages/typed-openapi/tests/tanstack-query.generator.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ describe("generator", () => {
8282
/** type-only property if you need easy access to the endpoint params */
8383
"~endpoint": {} as TEndpoint,
8484
queryKey,
85-
options: queryOptions({
85+
queryOptions: queryOptions({
8686
queryFn: async ({ queryKey, signal }) => {
8787
const res = await this.client.put(path, {
8888
...params,
@@ -120,7 +120,7 @@ describe("generator", () => {
120120
/** type-only property if you need easy access to the endpoint params */
121121
"~endpoint": {} as TEndpoint,
122122
queryKey,
123-
options: queryOptions({
123+
queryOptions: queryOptions({
124124
queryFn: async ({ queryKey, signal }) => {
125125
const res = await this.client.post(path, {
126126
...params,
@@ -158,7 +158,7 @@ describe("generator", () => {
158158
/** type-only property if you need easy access to the endpoint params */
159159
"~endpoint": {} as TEndpoint,
160160
queryKey,
161-
options: queryOptions({
161+
queryOptions: queryOptions({
162162
queryFn: async ({ queryKey, signal }) => {
163163
const res = await this.client.get(path, {
164164
...params,
@@ -196,7 +196,7 @@ describe("generator", () => {
196196
/** type-only property if you need easy access to the endpoint params */
197197
"~endpoint": {} as TEndpoint,
198198
queryKey,
199-
options: queryOptions({
199+
queryOptions: queryOptions({
200200
queryFn: async ({ queryKey, signal }) => {
201201
const res = await this.client.delete(path, {
202202
...params,

0 commit comments

Comments
 (0)