Skip to content

Commit a2e4889

Browse files
authored
Merge pull request #351 from OpenAPI-Qraft/fix/request-info-types
fix(tanstack-query-react-types): add missing readonly modifiers in RequestFnInfo type
2 parents 949b8ac + 4618a66 commit a2e4889

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.changeset/calm-facts-swim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openapi-qraft/tanstack-query-react-types': patch
3+
---
4+
5+
Clarify `RequestFnInfo` type by adding missing `readonly` modifiers for consistency and correctness.

packages/tanstack-query-react-types/src/shared/RequestFn.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export interface RequestFnInfo
6060
* Base URL to use for the request
6161
* @example 'https://api.example.com'
6262
*/
63-
baseUrl?: string;
63+
readonly baseUrl?: string;
6464

6565
/**
6666
* OpenAPI parameters
@@ -84,10 +84,10 @@ export interface RequestFnInfo
8484
/**
8585
* TanStack Query Meta
8686
*/
87-
meta?: Record<string, unknown>;
87+
readonly meta?: Record<string, unknown>;
8888

8989
/** An AbortSignal to set request's signal. */
90-
signal?: AbortSignal | null;
90+
readonly signal?: AbortSignal | null;
9191
}
9292

9393
/**

0 commit comments

Comments
 (0)