genType for core library

Hey,

I was trying to add @genTypes in my project and I’m encountering this issue in my project.

So it’s trying to look for the *.gen.tsx file for the core libraries types.

Attaching screenshot for the same. This should have by default created the ./JSON.gen or ./Promise.gen files.

How to overcome this issue?

Screenshot 2024-08-20 at 1.59.28 PM

1 Like
{
  "$schema": "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json",
  "name": "----------",
  "jsx": {
    "version": 4,
    "mode": "classic"
  },
  "bsc-flags": ["-bs-super-errors", "-open RescriptCore"],
  "sources": {
    "dir": "src",
    "subdirs": true
  },
  "suffix": ".bs.js",
  "namespace": true,
  "ppx-flags": [],
  "package-specs": {
    "module": "es6",
    "in-source": true
  },
  "bs-dependencies": [
    "@rescript/react",
    "@rescript/core",
    "@glennsl/rescript-fetch"
  ],
  "gentypeconfig": {
    "module": "esmodule",
    "moduleResolution": "node",
    "generatedFileExtension": ".gen.tsx"
  }
}

This is my rescript.json file looks like. Am I missing something in configuration?