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

🐛 Incorrect formatting inside mapped keys #301

Closed
1 task done
ematipico opened this issue Sep 16, 2023 · 0 comments · Fixed by #614
Closed
1 task done

🐛 Incorrect formatting inside mapped keys #301

ematipico opened this issue Sep 16, 2023 · 0 comments · Fixed by #614
Labels
A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@ematipico
Copy link
Member

Environment information

main

What happened?

At the moment, we slightly differ when formatting mapped keys

Us

export type OmitIndexSignature<ObjectType> = {
  [KeyType in
    keyof ObjectType as {} extends Record<KeyType, unknown>
      ? never
      : KeyType]: ObjectType[KeyType];
};

Them

export type OmitIndexSignature<ObjectType> = {
  [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown>
    ? never
    : KeyType]: ObjectType[KeyType];
};

Expected result

It shouldn't differ

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant