Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Code action to convert type to module #430

Open
fhammerschmidt opened this issue May 27, 2022 · 3 comments · May be fixed by #532
Open

Feature request: Code action to convert type to module #430

fhammerschmidt opened this issue May 27, 2022 · 3 comments · May be fixed by #532
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@fhammerschmidt
Copy link
Member

fhammerschmidt commented May 27, 2022

It's pretty common in ReScript that you want to add some method to a type and thus want to restructure it into its own submodule.

E.g.

type readState = New | UnreadRead

to

module ReadState = {
  type t = New | UnreadRead
}

I am not sure though, if we should deliberately not allow this action on types named t (which are supposedly already in their own module).

@zth
Copy link
Collaborator

zth commented Jul 8, 2022

This is pretty interesting imo. Good first issue for someone looking to get into the code action part of the code base. Please ping me if anyone is interested taking a stab at this.

@zth zth added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 8, 2022
@aspeddro aspeddro linked a pull request Jul 29, 2022 that will close this issue
1 task
@srikanthkyatham
Copy link

Hi @zth

I would like to try it.

@srikanthkyatham
Copy link

I didn't notice there's an active PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants