4

https://rescript-lang.org/docs/manual/v11.0.0/typescript-integration says

The ReScript compiler includes a code generation tool that lets you export ReScript values and types to use in TypeScript, and import TypeScript values and types into ReScript. It is called "genType".

but after re-reading the page several times I don't see any documentation for the import part, only for the export. That is, I'd expect a way to generate the correct external declarations from TypeScript types (and maybe also to check ReScript and TypeScript declarations are consistent).

Is it not implemented, not documented, or documented elsewhere?

2
  • 1
    Seems like you can import TypeScript types as opaque types via @genType.import. The documentation page you linked mentions that this is deprecated, but it still works, and judging by issue tracker commentary it seems likely to stick around. Commented Aug 13 at 16:04
  • 1
    If you need a non-opaque type I think you're out of luck. Commented Aug 13 at 16:05

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.