Respect quoteProps in method signature (#18702)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-01-21 11:59:21 +08:00
1 parent 8b84f37de0
commit e4804b1439
6 files changed
+267 -3

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
#### Respect `quoteProps` in method signature (#18702 by @fisker)
<!-- prettier-ignore -->
```tsx
// Input
type T = {
method1(): string;
"method2"(): string;
"method-3"(): string;
};
// Prettier stable
type T = {
method1(): string;
"method2"(): string;
"method-3"(): string;
};
// Prettier main (--quote-props=as-needed)
type T = {
method1(): string;
method2(): string;
"method-3"(): string;
};
// Prettier main (--quote-props=consistent)
type T = {
"method1"(): string;
"method2"(): string;
"method-3"(): string;
};
```