Skip to content
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

Space around union and/or intersection type when in a single line #676

Open
rozpuszczalny opened this issue Oct 7, 2024 · 0 comments
Open

Comments

@rozpuszczalny
Copy link

I'm looking for an option to configure space around union/intersection when it's in a single line. I think it's not possible with current version of the dprint typescript plugin.

Example:

Configuration (proposal)

{
  "typescript": {
    "unionAndIntersectionType.preferSingleLine": true,
    "unionAndIntersectionType.spaceAround": true // <- new
  }
}

Input code:

type MyType = OtherType | BetterType;
let a: OtherType | BetterType | undefined;

Output code

type MyType = OtherType|BetterType;
let a: OtherType|BetterType|undefined;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant