Skip to content

Preserve quotes for TSMethodSignature nodes named new - #19621

Merged
fisker merged 2 commits into
prettier:mainfrom
kovsu:fix-#19618
Jul 14, 2026
Merged

Preserve quotes for TSMethodSignature nodes named new#19621
fisker merged 2 commits into
prettier:mainfrom
kovsu:fix-#19618

Conversation

@kovsu

@kovsu kovsu commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix #19618
Ref: https://github.com/microsoft/TypeScript/pull/55750/changes#diff-1516c8349f7a625a2e4a2aa60f6bbe84e4b1a499128e8705d3087d893e01d367

interface Container {
  "new"(id: string): number; //  ----> TSMethodSignature
  new(id: string): number;    //  ----> TSConstructSignatureDeclaration
}

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.
  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

@pkg-pr-new

pkg-pr-new Bot commented Jul 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

yarn add https://pkg.pr.new/@prettier/[email protected]
yarn add https://pkg.pr.new/@prettier/[email protected]
yarn add https://pkg.pr.new/[email protected]

commit: b47cbe5

@netlify

netlify Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploy Preview for prettier ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b47cbe5
🔍 Latest deploy log https://app.netlify.com/projects/prettier/deploys/6a5443e4ad9b1200082289c9
😎 Deploy Preview https://deploy-preview-19621--prettier.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@fisker

This comment was marked as outdated.

@kovsu

This comment was marked as outdated.

@fisker

This comment was marked as outdated.

@fisker
fisker merged commit 5f2c401 into prettier:main Jul 14, 2026
36 checks passed
@kovsu
kovsu deleted the fix-#19618 branch July 14, 2026 09:34
sys-support pushed a commit to 3caravelle/renovate that referenced this pull request Jul 21, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | [`3.9.5` → `3.9.6`](https://renovatebot.com/diffs/npm/prettier/3.9.5/3.9.6) | ![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.9.6?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.9.5/3.9.6?slim=true) |

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.9.6`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#396)

[Compare Source](prettier/prettier@3.9.5...3.9.6)

[diff](prettier/prettier@3.9.5...3.9.6)

##### TypeScript: Preserve quotes for methods named `new` ([#&#8203;19621](prettier/prettier#19621) by [@&#8203;kovsu](https://github.com/kovsu))

<!-- prettier-ignore -->

```tsx
// Input
interface Container {
  "new"(id: string): number;
}

// Prettier 3.9.5
interface Container {
  new(id: string): number;
}

// Prettier 3.9.6
interface Container {
  "new"(id: string): number;
}
```

##### TypeScript: Support `import defer` ([#&#8203;19624](prettier/prettier#19624), [#&#8203;19675](prettier/prettier#19675) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
import defer * as foo from "foo";

// Prettier 3.9.5
import * as foo from "foo";

// Prettier 3.9.6
import defer * as foo from "foo";
```

##### JavaScript: Added a new official plugin `@prettier/plugin-yuku` ([#&#8203;19628](prettier/prettier#19628), [#&#8203;19629](prettier/prettier#19629) by [@&#8203;fisker](https://github.com/fisker))

`@prettier/plugin-yuku` is powered by [Yuku](https://yuku.fyi/) (A high-performance JavaScript/TypeScript compiler toolchain written in Zig).

This plugin includes two new parsers: `yuku` (JavaScript syntax) and `yuku-ts` (TypeScript syntax).

**To use this plugin:**

1. Install the plugin:

   ```bash
   yarn add --dev prettier @&#8203;prettier/plugin-yuku
   ```

2. Add it to your `.prettierrc`:

   ```yaml
   plugins:
     - "@&#8203;prettier/plugin-yuku"
   ```

Due to package size limitations, this plugin is not bundled with the main prettier package and must be installed separately.

For more information, check [the package homepage](https://github.com/prettier/prettier/tree/main/packages/plugin-yuku).

Big thanks to [@&#8203;arshad-yaseen](https://github.com/arshad-yaseen) for his excellent work.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44MS4zIiwidXBkYXRlZEluVmVyIjoiNDIuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://git.3caravelle.net/3Caravelle/renovate/pulls/48
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Jul 27, 2026
…fleeting-plugin-hetzner!393)

This MR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | `3.9.5` → `3.9.6` | ![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.9.6?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.9.5/3.9.6?slim=true) |

Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://github.com/renovatebot/renovate/discussions/new) if you have any questions.

---

### Release Notes

<details>
<summary>prettier/prettier (prettier)</summary>

### [`v3.9.6`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#396)

[Compare Source](prettier/prettier@3.9.5...3.9.6)

[diff](prettier/prettier@3.9.5...3.9.6)

##### TypeScript: Preserve quotes for methods named `new` ([#&#8203;19621](prettier/prettier#19621) by [@&#8203;kovsu](https://github.com/kovsu))

<!-- prettier-ignore -->

```tsx
// Input
interface Container {
  "new"(id: string): number;
}

// Prettier 3.9.5
interface Container {
  new(id: string): number;
}

// Prettier 3.9.6
interface Container {
  "new"(id: string): number;
}
```

##### TypeScript: Support `import defer` ([#&#8203;19624](prettier/prettier#19624), [#&#8203;19675](prettier/prettier#19675) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```tsx
// Input
import defer * as foo from "foo";

// Prettier 3.9.5
import * as foo from "foo";

// Prettier 3.9.6
import defer * as foo from "foo";
```

##### JavaScript: Added a new official plugin `@prettier/plugin-yuku` ([#&#8203;19628](prettier/prettier#19628), [#&#8203;19629](prettier/prettier#19629) by [@&#8203;fisker](https://github.com/fisker))

`@prettier/plugin-yuku` is powered by [Yuku](https://yuku.fyi/) (A high-performance JavaScript/TypeScript compiler toolchain written in Zig).

This plugin includes two new parsers: `yuku` (JavaScript syntax) and `yuku-ts` (TypeScript syntax).

**To use this plugin:**

1. Install the plugin:

   ```bash
   yarn add --dev prettier @&#8203;prettier/plugin-yuku
   ```

2. Add it to your `.prettierrc`:

   ```yaml
   plugins:
     - "@&#8203;prettier/plugin-yuku"
   ```

Due to package size limitations, this plugin is not bundled with the main prettier package and must be installed separately.

For more information, check [the package homepage](https://github.com/prettier/prettier/tree/main/packages/plugin-yuku).

Big thanks to [@&#8203;arshad-yaseen](https://github.com/arshad-yaseen) for his excellent work.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODMuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
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

Successfully merging this pull request may close these issues.

quoteProps: "as-needed" strips quotes from 'new' method signature, changing it into a construct signature

2 participants