Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

Releases: rescript-association/genType

v2.20.0

18 Apr 09:08

Choose a tag to compare

  • Add support for default export like in bucklescript: call the value "default".
  • Hooks: generate names analogous to those from ppx for the React developer tools.
  • Apply bucklescript's marshaling rules for Js object field names:
    Remove trailing __ if present.
    Otherwise remove leading _ when followed by an uppercase letter, or keyword.

v2.19.0

03 Apr 18:10

Choose a tag to compare

  • Add first-class support for Js.Promise.t, and conversion when required.
  • Emit the variant conversion tables in a stable order to limit changes when the source is modified.

v2.18.0

02 Apr 15:46

Choose a tag to compare

  • Fix: enable conversion for types defined inside a module in another file.
  • Fix conversion for types involving multiple type definitions in another file.
  • Add support for module aliases such as module X = A.B.
    Extra type definitions are added so that all the aliases of @genType-annotated
    type declarations are also exported.
    In case of local aliases to types from other files, these are always inlined.

v2.17.0

21 Mar 13:40

Choose a tag to compare

  • Add support for bucklescript version 5 (AST for bs.module has changed).
  • Support file names starting with lower case letter.

If using bucklescript >= 5.0.0:

  • It is not necessary anymore to set up BS_CMT_POST_PROCESS_CMD.
  • The line [@bs.module "./ThisFileName.gen"] in value imports can be omitted, and will be added internally by bucklescript.

v2.16.0

15 Mar 13:30

Choose a tag to compare

  • Avoid underscore when emitting conversion function for wrapJsForReason.
  • Support inner modules with shadowed values (e.g. multiple definition of the same value).
  • Fix: support transitive reachability of type definitions of arbitrary length.
    Before this, only paths of level 2 were available to generate conversion functions.
    E.g. this was not supported: A uses a type defined in B which uses a type defined in C.

v2.15.0

06 Mar 09:27

Choose a tag to compare

  • Omit underscore as function name when emitting conversions.

v2.14.0

05 Mar 13:38

Choose a tag to compare

  • Import Curry early, so it's available if needed for an import conversion.
  • Automatically export types referenced by an imported value.
  • Import CreateBuckescriptBlock early, so it's available if needed for an import conversion.

v2.13.0

04 Mar 14:47

Choose a tag to compare

  • Fix missing cases (records and variants): Don't import referenced types with genType.opaque.
  • In flow, annotate function parameters with type any, just as for TypeScript.
    This helps typing conversion functions with nested null checks.

v2.12.2

28 Feb 18:32

Choose a tag to compare

  • Fix issue where importing a type which has no definition from other files could reset the type enironment.
    Resetting the type environment causes failures depending on the order of type arguments in #158.

v2.12.1

28 Feb 14:13

Choose a tag to compare

  • Emit type parametes when generating polymorphic conversion functions.