jessep / reason-js

Reason + BuckleScript bindings to DOM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reason bindings to JavaScript, through BuckleScript

What Does This Even Mean?

Reason is a syntax on top of OCaml, a great language. BuckleScript compiles OCaml to clean JavaScript. This library provides common JavaScript functions, e.g. console and setInterval, through Reason (all type checked!); See the usage below!

Installation

npm install chenglou/reason-dom

(We'll release an official npm package soon!)

Usage

/* Looks almost identical to JavaScript! But fully typed, of course. */
let myInterval = Window.setInterval (fun () => Console.log "hello!") 1000;

About

Reason + BuckleScript bindings to DOM