genType
ts-belt
Our great sponsors
genType | ts-belt | |
---|---|---|
5 | 10 | |
759 | 1,032 | |
- | - | |
0.0 | 0.0 | |
5 months ago | about 1 month ago | |
OCaml | TypeScript | |
MIT License | MIT License |
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
-
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:
- 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).
ts-belt
- [AskJS] I've often read a lot of "if" statements can quickly turn into an anti pattern and convolute code. What are some strategies to avoid unnecessary "if" statements and ways to notice when you start to introduce this anti pattern?
-
libraries you are happy that you discovered them
check ts-belt, if you want really good TS support (it contains much more functions than remeda and it has awesome performance) https://github.com/mobily/ts-belt benchmarks: https://mobily.github.io/ts-belt/benchmarks/v3.12.0/macbook-pro-2021
- ts-belt - Fast, modern, and practical utility library for FP in TypeScript / Flow / JavaScript. (Faster than ramda, rambda, remeda and lodash/fp.)
- Fast, modern, and practical utility library for FP in TypeScript. (Faster than ramda, rambda, remeda and lodash/fp.)
- Ts-belt – Fast, modern, and practical utility library for FP in TypeScript
-
Features of a dream programming language: 2nd draft.
Piping, or some form of it. But always top-to-bottom or left-to-right. Inspired by Bash, and functional programming with pipes (Elixir, BuckleScript, and ts-belt). Data-first instead of data-last.
-
[AskJS] Is anyone using Monads (or other advanced functional programming techniques) in production code? If so, what are you using them for?
try ts-belt https://mobily.github.io/ts-belt/ which has pragmatic approach and is easier to learn than fp-ts
-
ts-belt → fast, modern, and practical utility library for FP in TypeScript/Flow/JavaScript
Repo: https://github.com/mobily/ts-belt Documentation: https://mobily.github.io/ts-belt/
-
TS Belt - fast, modern, and practical utility library for FP in TypeScript
Let me know if you're willing to use ts-belt in your project! Also, don't forget to give a star to ts-belt on Github. Any feedback or suggestions are appreciated as well.
What are some alternatives?
zod - TypeScript-first schema validation with static type inference
io-ts - Runtime type system for IO decoding/encoding
melange - A mixture of tooling combined to produce JavaScript from OCaml & Reason
pratica - 🥃 Functional Algebraic Data Types
Idris2 - A purely functional programming language with first class types
Immer - Create the next immutable state by mutating the current one
lwt - OCaml promises and concurrent I/O
common - A minimal library that defines primitive building blocks of PHP code.
bolt - Bolt is a language with in-built data-race freedom!
monads - Option, Result, and Either types for TypeScript - Inspired by Rust 🦀
rescript-sublime - Official Sublime Text plugin for ReScript.
tool-conventions - Conventions supporting interoperatibility between tools working with WebAssembly.