Skip to main content

Usage in JavaScript

Written in ReScript isn't mean that only available for ReScript.

Packages are available for plain JavaScript & TypeScript projects.

Pipe operator

ReScript is a functional language. Most of operations is provided through functions rather than objects or class.

You might need a pipe operator to compose operations.

const pipe = (x) => (...fns) => fns.reduce((v, f) => f(v), x);

Or, You can use library like Remeda

TypeScript

Packages provide TypeScript type definitions generated by genType