rescript-core
rescript-core copied to clipboard
Gentype bindings 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? Is there a way or any
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.
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?
I think that genType got fixed with rescript-lang/rescript/pull/7285, can you confirm @cknitt @zth ?
@tsnobip At least partially - there is a test for Promise.t here, but not for JSON.t: https://github.com/rescript-lang/rescript/blob/40c51a59c1cb04bdebfb4c302b1ede2a9101ebb0/tests/gentype_tests/typescript-react-example/src/Core.res#L29