rescript-lang / rescript-lang/rescript-vscode

Added the command of overwriting interface files

Open
#647 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ReScript
Stars
354
Forks
63
Avg merge
11h 29m
Merged PRs (30d)
1

Description

Added the command of overwriting interface files

I need to update the .resi interface file from time to time while using the plugin. However, in each operation, I had to delete the old file before using the plug-in command to create a new .resi interface file, which was really uncomfortable. Therefore, I have the following improvement requirements.

  1. When a .resi file exists, the command can override the contents of the original file.
  2. If the file does not exist, the .resi file is created, and the behavior is the same as that of creating an interface file.

In terms of implementation

I looked at the source code, and adding a command doesn't add much complexity.

Other things

I am very sorry that I have not learned the TS code, so I cannot submit the relevant code implementation. Thank you very much for your earnest and dedication.

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 client/src/commands/create_interface.ts, the command source named in the issue. Trace how it handles an existing .resi file and a missing one, then verify that existing files are overwritten while missing files retain the current creation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.