Repository navigation
fix(prettier): preserve generic type declarations and modifiers - #139
Merged
Merged
Conversation
|
@crutchcorn is attempting to deploy a commit to the Ripple Team Team on Vercel. A member of the Team first needs to authorize it. |
leonidaz
approved these changes
Sep 20, 2026
Merged
crutchcorn
added a commit
to TanStack/form
that referenced
this pull request
Sep 22, 2026
Can add back once tsrx-org/tsrx#139 is merged
This was referenced Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While working on TanStack TSRX code, I noticed the Prettier plugin removed many relevant type arguments. This PR fixes that.
Note
Low Risk
Formatter-only output changes in the Prettier plugin; no runtime, auth, or data-path impact.
Overview
Fixes the TSRX Prettier plugin dropping TypeScript generic syntax when formatting type positions that were previously printed without their angle-bracket lists.
Function and constructor types now emit
typeParametersbefore the parameter list (e.g.<K extends keyof T>(...) => ...andnew <T>(...) => ..., includingabstract new).Individual type parameters now retain
const,in, andoutmodifiers inprintTSTypeParameter, alongside existingextends/ default handling.Regression tests assert byte-stable formatting for generic callables, generic constructors, variance annotations, and
consttype parameters.Reviewed by Cursor Bugbot for commit 0e57133. Bugbot is set up for automated code reviews on this repo. Configure here.