React component Interface with 13.0.0-alpha.5

I’ve got an issue, I think related to the new breaking change introduced to make Jsx.component abstract.

Say I’ve got my module Bar.res

type t = {
  id: int,
  name: string,
}

@react.component
let make = (~foo) => foo.name->React.string

and its interface Bar.resi

type t = {
  id: int,
  name: string,
}

@react.component
let make: (~foo: t) => React.element

The new version of the compiler is still happy.

But if my type is a bit more generic, like
Bar.res

type t<'id> = {
  id: 'id,
  name: string,
}

@react.component
let make = (~foo) => foo.name->React.string

Bar.resi

type t<'id> = {
  id: 'id,
  name: string,
}

@react.component
let make: (~foo: t<'id>) => React.element

then the compiler complains:

  The implementation /Projects/test/Bar.res
  does not match the interface ../ocaml/Bar-xyz.cmi:
  Values do not match:
    let make: React.component<props<t<'_weak1>>>
  is not included in
    let make: React.component<props<t<'id>>>
  /Projects/test/Bar.resi:6:1-7:41:
    Expected declaration
  /Projects/test/Bar.res:7:5-8:
    Actual declaration

(I’ve tried to generate an interface file using the vscode plugin but it produces an empty file)

Does someone know what the “new” (post 13.0.0-alpha.5) interface should be?

1 Like