rescript-association / genType

Auto generation of idiomatic bindings between Reason and JavaScript: either vanilla or typed with TypeScript/FlowType.

Home Page:https://rescript-lang.org/docs/gentype/latest/introduction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-recursive types are treated as recursive

johnridesabike opened this issue · comments

ReScript syntax, so types are non-recursive by default:

@gentype
type t = int

module M = {
  @gentype
  type t = array<t>
}

Outputs:

// tslint:disable-next-line:interface-over-type-literal
export type t = number;

// tslint:disable-next-line:interface-over-type-literal
export type M_t = M_t[]