rescript-lang/rescript-vscode

Feature request: Code action to convert type to module

Aberta

#430 aberto em 27 de mai. de 2022

 (3 comentários) (2 reações) (0 responsável)ReScript (63 forks)github user discovery
enhancementgood first issuehelp wanted

Métricas do repositório

Stars
 (350 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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 | Unread | Read

to

module ReadState = {
  type t = New | Unread | Read
}

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

Guia do colaborador