Skip to content

Issue with genType Importing Modules in ReScript v11.1 with ReScript Core #6968

Open
@PritishBudhiraja

Description

@PritishBudhiraja

I'm using ReScript v11.1 and ReScript Core in my project, and I'm having trouble with genType. Specifically, I have a type that looks like this:

@genType
type hyperInstance = {
  ...,
  confirmOneClickPayment: (JSON.t, bool) => Promise.t<JSON.t>,
}

The compiler generates a file Types.gen.tsx for me, but I'm encountering the following issue:

import type {t as JSON_t} from './JSON.gen.tsx';

import type {t as Promise_t} from './Promise.gen.tsx';

I'm facing this issue in the rescript -

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

I've followed the setup guide from the ReScript documentation here but can't seem to resolve this issue.

Steps I've Taken:

  • Ensured my gentypeconfig is correctly set up.
  • Checked paths and shim configurations.
  • Tried manual shimming but still facing issues.

My Environment:

  • ReScript v11.1
  • ReScript Core
  • TypeScript

Is there something I'm missing, or is this potentially a bug? Any help or guidance would be greatly appreciated.

  • Is it a bug? Usage questions should often be asked in the forum instead.
  • Concise, focused, friendly issue title & description.
  • A minimal, reproducible example.
  • OS and browser versions, if relevant.
  • Is it already fixed in master? Instructions

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions