-
Notifications
You must be signed in to change notification settings - Fork 0
Update errorBoundaryUtils.ts #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,8 +18,8 @@ export const ensurePreventErrorBoundaryRetry = < | |||||||||||||||||
| TQueryKey extends QueryKey, | ||||||||||||||||||
| >( | ||||||||||||||||||
| options: DefaultedQueryObserverOptions< | ||||||||||||||||||
| TQueryFnData, | ||||||||||||||||||
| TError, | ||||||||||||||||||
| TQueryFnData | ||||||||||||||||||
| TError | ||||||||||||||||||
|
Comment on lines
+21
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Add missing commas between the generic type arguments in the DefaultedQueryObserverOptions type argument list so the type parameters are correctly separated. [possible bug] Severity Level: Critical 🚨
Suggested change
Why it matters? ⭐The DefaultedQueryObserverOptions generic argument list in this file currently has the two type identifiers on separate lines without commas: options: DefaultedQueryObserverOptions< That is invalid TypeScript generic syntax and will cause a compile error. Adding commas after TQueryFnData and TError fixes the syntax and restores the intended type argument list. I inspected packages/react-query/src/errorBoundaryUtils.ts and confirmed these exact lines are present in the PR. Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** packages/react-query/src/errorBoundaryUtils.ts
**Line:** 21:22
**Comment:**
*Possible Bug: Add missing commas between the generic type arguments in the DefaultedQueryObserverOptions type argument list so the type parameters are correctly separated.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Comment on lines
+21
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical syntax error: Missing comma between generic type parameters. The comma separating Apply this diff to restore the required comma: options: DefaultedQueryObserverOptions<
- TQueryFnData
- TError
+ TQueryFnData,
+ TError,
TData,
TQueryData,
TQueryKey📝 Committable suggestion
Suggested change
🧰 Tools🪛 Biome (2.1.2)[error] 22-22: expected Remove TError (parse) 🤖 Prompt for AI Agents |
||||||||||||||||||
| TData, | ||||||||||||||||||
| TQueryData, | ||||||||||||||||||
| TQueryKey | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change introduces a syntax error. Generic type arguments in TypeScript must be separated by commas. The commas after
TQueryFnDataandTErrorare missing, which will cause the code to fail to compile.