genType
Auto generation of idiomatic bindings between Reason and JavaScript: either vanilla or typed with TypeScript/FlowType. (by reason-association)
bs-json
Compositional JSON encode/decode library for BuckleScript (by glennsl)
genType | bs-json | |
---|---|---|
5 | 2 | |
759 | 274 | |
- | - | |
0.0 | 0.0 | |
over 1 year ago | over 1 year ago | |
OCaml | OCaml | |
MIT License | GNU Lesser General Public License v3.0 only |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
genType
Posts with mentions or reviews of genType.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-04.
-
ts-belt - Fast, modern, and practical utility library for FP in TypeScript / Flow / JavaScript. (Faster than ramda, rambda, remeda and lodash/fp.)
I don't really use ts-belt to be certain, but by looking at the source, it seems that it's using genType, which can generate TS types from ReScript values, and that makes interop work really well.
-
ReScript 10.0
They discuss this in their docs.
https://rescript-lang.org/docs/manual/latest/introduction#di...
Seems like a type system for Javascript, built with a differing set of opinions than Typescript.
Looks like they also offer some form of TS interop:
https://rescript-lang.org/docs/gentype/latest/introduction
- From TypeScript to ReScript
-
TS Belt - fast, modern, and practical utility library for FP in TypeScript
TS Belt has been built with ReScript (and its Belt stdlib). ReScript generates highly performant JavaScript code, and with genType it also automatically generates TypeScript types. Moreover, I've added a few codemods to the building process to provide even more code optimizations and cleaner TypeScript signatures.
-
How I Switched from TypeScript to ReScript
To interoperate with TypeScript with proper type information you’ll use third-party genType. Add it as a devDependency and annotate the module export you want to generate with @genType (in previous versions you’d surround annotations with square brackets).
bs-json
Posts with mentions or reviews of bs-json.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-10-07.
-
Zod: TypeScript-first schema validation with static type inference
Coming from a ReasonML / OCaml codebase (frontend react), I'm seeing a lot to love with the pattern matching and sum types. Zod is already one of my favorites (coming from https://github.com/glennsl/bs-json).
Is 'retry / observability / error handling" something that comes from Effect?
-
ReScript JSON Typed Strongly
As I told already, you might use other tools to create the codecs layer. Take bs-json if it feels better. Or even force Js.Json.t to DTO conversion with Obj.magic if you know what you do.
What are some alternatives?
When comparing genType and bs-json you can also consider the following projects:
Idris2 - A purely functional programming language with first class types
bs-mocha
yojson - Low-level JSON parsing and pretty-printing library for OCaml
melange - A mixture of tooling combined to produce JavaScript from OCaml & Reason
rescript-apollo-client - ReScript bindings for the Apollo Client ecosystem