microsoft / microsoft/TypeScript

Add preference for using native #private for extract method / extract property

Open
#52,550 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Domain: LS: Refactorings Suggestion
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

Suggestion

🔍 Search Terms

  • refactor / refactoring
  • extract method
  • extract property (extract to readonly field)
  • private
  • Ecmascript private

⭐ Suggestion

Add a new user setting that controls if refactorings like extract method use the typescript private keyword or native # privates

📃 Motivating Example

The vscode-markdown-languageservice codebase is all typescript but uses native privates exclusively. We have an eslint rule to ban the private keyword. Right now running extract method in this codebase always produces an error as it uses the private keyword

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the extract method and extract property refactoring entry points and trace where they choose the visibility syntax. Determine how a user setting should control TypeScript private versus native # private output; done means both refactorings honor the preference without changing the default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.