erikras / rescript-gentype-bug

Reproduction of a problem with Rescript's genType

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReScript GenType Bug

Installation

yarn

Build

yarn start

Problem

counter.gen.tsx never gets the mapping to convert the event to an int.

It should have a line that looks like:

const $$toJS914395812: { [key: string]: any } = {"0": "Increment", "1": "Decrement"};

If you put all of the contents of counter.res into Machine.res, it works. There's something about the deference to other modules that breaks genType.

About

Reproduction of a problem with Rescript's genType


Languages

Language:TypeScript 53.7%Language:ReScript 46.3%