I’m following this guide:
I made a new Foo.re
file, pasted in:
[@bs.val] external setTimeout : (unit => unit, int) => float = "setTimeout";
I then added a test file, just so that the setTimeout
method is referenced and called.
open Jest;
open Expect;
open Foo;
describe("Binding", () =>
test("setTimeout", () =>
expect(() =>
setTimeout(() => (), 0)
) |> not_ |> toThrow
)
);
After compiling with bsb -make-world
, the generated Foo.bs.js
file is just:
// Generated by BUCKLESCRIPT VERSION 3.1.5, PLEASE EDIT WITH CARE
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
Do I need to do something special to make this work?