Skip to content

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

@fhammerschmidt

Description

@fhammerschmidt
Member

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).

Activity

zth

zth commented on Jul 8, 2022

@zth
Collaborator

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.

linked a pull request that will close this issue on Jul 29, 2022
srikanthkyatham

srikanthkyatham commented on Sep 28, 2022

@srikanthkyatham

Hi @zth

I would like to try it.

srikanthkyatham

srikanthkyatham commented on Sep 28, 2022

@srikanthkyatham

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @zth@srikanthkyatham@fhammerschmidt

      Issue actions

        Feature request: Code action to convert type to module · Issue #430 · rescript-lang/rescript-vscode