rescript-association/genType
Auto generation of idiomatic bindings between Reason and JavaScript: either vanilla or typed with TypeScript/FlowType.
30 Releases
Latest: 3y ago
v4.5.0Latest
📋 Changes
- Drop support for "bs-platform".
v4.4.0
📋 Changes
- Flow: use explicit suppression codes.
- Fix issue with object key needing quotes in JS when it is not a valid JS id.
v4.3.0
📋 Changes
- TypeScript: type children of imported components as `React.ReactNode` instead of `JSX.Element`.
v4.2.0
📋 Changes
- Add basic support for inherited type definitions in polymorphic variants e.g. `type color = [red | blue]`. No support for conversion at the moment.
v4.1.0
📋 Changes
- Add support for `external-stdlib` in `bsconfig.json`.
- Fix issue with `exportInterfaces` and labeled arguments (see https://github.com/rescript-association/genType/issues/561).
v4.0.0
📋 Changes
- Remove support for legacy components.
v3.50.0
📋 Changes
- Flow: use `SyntheticMouseEvent` type for onClick.
v3.49.0
📋 Changes
- Make ReactEvent.Mouse.t be a builtin type corresponding to `MouseEvent`.
- When loading a type defined in another file, treat it as if it were annotated with @genType. So if it's needed for an export from the current file, the annotation is already automatically propagated.
- Use `import type` syntax for TypeScript.
v3.48.0
📋 Changes
- Remove workaround in Flow that turns components into functions when exported.
v3.46.0
📋 Changes
- Add support for different file extensions using the `"suffix"` configuration from `bsconfig.json`.
- Fix issue where `let x:t = ...` is treated differently in `.res` syntax. (See https://github.com/rescript-association/genType/pull/524).
v3.45.0
📋 Changes
- Only support bs-platform `8.2.0` or newer.
- Give a warning when attempting to export a GADT type (unless it's already an opaque export), and export it as an opaque type.
- When not specified in `gentypeconfig`, read the `module` type from `package-specs`.
- Translate object types directly, whether or not they are wrapped in `Js.t`, in preparation for a compiler upgrade. Preserve a couple of existing uses which still map to the empty object: `type t1<'a> = Js.t<'a>`, `type t2 = Js.t<Obj.t>`.
- Use `import` instead of `require` in TS back-end, unless there are circular dependencies. In both TS and Flow, circular dependencies can be avoided by not exporting anything in a file that imports a value/component.
- Support future npm package `rescript` version `9.1.0` and above.
- Add support for the upcoming numeric poly variants (see https://github.com/rescript-lang/syntax/issues/340).
v3.44.0
📋 Changes
- Fix issue with non-recursive types inside modules when the type name is already in scope (See https://github.com/reason-association/genType/issues/492).
- Support `bs-platform` version `9.0.1` (es6 library modules reverted to `.js` extension)
v3.43.0
📋 Changes
- Add `:` before location in warnings, so the correct line is picked up by vscocde terminal.
- Allow `'` in the name of an exported type without generating invalid JS code.
- Support `bs-platform` version `9.0.0` (es6 library modules now use `.mjs` extension).
- [experimental] Extend experimental option to specify the full extension of generated files (see https://github.com/reason-association/genType/pull/497).
v3.42.0
📋 Changes
- Fix type of references which should be a record type since the runtime representation switched to records.
v3.41.0
📋 Changes
- Internal (Support multiple arguments on the command line for -cmt-rm).
v3.40.0
📋 Changes
- Add support for flexible file names introduced in bs-platform 8.3 (see https://github.com/reason-association/genType/issues/477).
v3.39.0
📋 Changes
- Fix conversion for nested variants from bs-platform 8 onwards (see https://github.com/reason-association/genType/issues/472).
- Fix name of functions emitted when an inner signature is annotated (see https://github.com/reason-association/genType/issues/474).
v3.38.0
📋 Changes
- Add missing support for annotations in inner module signatures (e.g. `module M : { ... } = { ... }`). See https://github.com/reason-association/genType/issues/469.
v3.37.0
📋 Changes
- Fix issue where a conversion was not applied to optional arguments due to mistaken covariance. (https://github.com/reason-association/genType/issues/466)
v3.36.0
📋 Changes
- Add support for bs-platform 8.3: abbreviated annotations (e.g. `@as` instead of `@bs.as`).
v3.35.0
📋 Changes
- Functions `React.ref(-) => React.element` are not considered function components anymore.
- Make `React.ref(-)` types open objects, to align with how they are modeled by Flow.
v3.34.0
📋 Changes
- Add support for `bs.int` and `bs.as` to `@genType.import`.
v3.33.0
v3.32.0
📋 Changes
- Fix issue with conversion checking where inner modules without conversion were not exported.
v3.31.0
📋 Changes
- Fix conversion for ordinary variants without payload (conversion tables were missing) in bucklescript 8.2.
- Support `@genType.as` for polymorphic variants in bucklescript 8.2.
v3.30.0
📋 Changes
- Fix conversion of ordinary variants with >1 payloads, in bucklescript >= 8.
v3.29.0
📋 Changes
- More support for polymorphic variants in Bucklescript 8.2: no special case for a single payload case, and no renaming via `@genType.as`.
v3.28.0
📋 Changes
- Add missing support for `React.ref` (previously `React.Ref.t`).
- Add ahead-of-time support for the new runtime representatiion of polymorphic variants in the upcoming Bucklescript 8.2.
v3.27.0
📋 Changes
- Add support for `.res[i]` files from the new Bucklescript Syntax.
v3.26.0
📋 Changes
- Support for bucklescript 8.0.0 (some minor changes wrt bs 8 beta).
