Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1787

Using open but for just one type?

$
0
0

Right, it’s not really the equivalent of open but of include.

Another way to do it is to have type t in a submodule and only open that one.

module User = {
  module Type = { 
    type t = { ... }
  }
  ...
}

open User.Type.t

Viewing all articles
Browse latest Browse all 1787

Trending Articles