genType not working for Belt.List.t

Hey
I get this ts error in gen.ts file:
Cannot find module './RescriptPervasives.gen' or its corresponding type declarations.
when I’m trying to use genType like this:

@genType
type loadItems = list<loadItem>

here is my bsconfig:

  "gentypeconfig": {
    "language": "typescript",
    "generatedFileExtension": ".gen.ts",
    "module": "commonjs",
    "shims": {
      "Js": "Js"
    },
    "debug": {
      "all": false,
      "basic": false
    }
  }

so if I try to getType for array then I get

Cannot find module './Belt.gen' or its corresponding type declarations.ts(2307)

I figured out that I should use array<t> instead of Belt.Array.t<t> for my needs. Additionally, I came across this example (rescript-compiler/RescriptPervasives.shim.ts at master · rescript-lang/rescript-compiler · GitHub) of shims, as well as this helpful conversation (Cannot find module './Belt.gen' or its corresponding type declarations. · Issue #489 · rescript-association/genType · GitHub), but it feels like a rough edge of interoperability to me.

It will get better when using Core.
The internal libraries are under revision.
No shims should ever be necessary for arrays. Just a matter of time.

1 Like