microsoft / microsoft/TypeScript

Migration refactorings after renaming from `.js` to `.ts` files

Open
#24,713 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Domain: LS: Refactorings Needs Proposal Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

At least week's design meeting, @sheetalkamat had the idea that we should consider applying refactorings for when you rename a .js file to a .ts file.

I think this is definitely worth experimenting with. From the refactoring pipeline, I could imagine things like

  • moving from CommonJS to ES Modules
  • lifting JSDoc annotations
  • moving to classes
  • inferring from usages

Then there's project configuration. I could see

  • Generating a tsconfig.json
  • Installing @types dependencies for packages that need them.

@mjbvz @amcasey

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

The issue points to the refactoring pipeline and project configuration, but names no files, tests, or entry points. Start by locating that pipeline and the configuration handling, then determine which migration scenario is in scope. Done would require a defined, tested approach for one or more of the proposed refactorings or configuration changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
compilers, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.