rescript-lang / rescript-core

A drop-in standard library for ReScript. Intended to be familiar for JavaScript developers, easy to use, and be rich enough (without being bloated) so that you don't need to reach for anything else for typical ReScript development.
MIT License
162 stars 28 forks source link

Gentype bindings for Core Library #242

Open PritishBudhiraja opened 2 months ago

PritishBudhiraja commented 2 months ago

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? Is there a way or any Screenshot 2024-08-20 at 1 59 28 PM

DZakh commented 2 months ago

In rescript-schema, I solved it by publishing the package with .gen.ts files, containing the core types. There's no need to include types for functions.

PritishBudhiraja commented 2 months ago

Sure @DZakh .

But this will solve temp fix. Can we get like a proper fix in RescriptCore library and it should create the own gen.tsx files and we should be able to use that. Is the under discussion or in roadmap?