-
-
Notifications
You must be signed in to change notification settings - Fork 57
playground: use js_of_ocaml library #654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
You might want to use |
Thanks for the tip @hhugo. I tried to use that approach, but then the type of Should I just replace |
It depends on what you want to do. Jsoo_runtime was created so that gen_js_api and brr can use it without the "jsoo typing" layer. |
Hm, I see, thx. We rely on values like
But this fails to build when using Jsoo_runtime:
|
let t = Js.(obj [| ("js_error_msg", Js.string "foo"); ("row", Obj.magic 2) |]) or let t = Js.(obj [| ("js_error_msg", Js.string "foo"); ("row", Js.number_of_float 2.) |]) |
undefined would be |
d367597
to
8df733b
Compare
Thanks, I applied the suggested changes. I am not fond of the 5 appearances of |
playground: use js_of_ocaml-compiler.runtime wip
596c4a2
to
6ef37bf
Compare
* main: (22 commits) playground: fix warning errors playground: add test for bad error msg playground: use js_of_ocaml library (#654) chore: update nix flakes (#652) playground: bring back cmijs hack (#648) Update CONTRIBUTING.md to include an installation step for melange.opam and a link to the Pull Request instructions (#651) playground: specify ppx dep (#646) playground: package + es6 + direct reason compilation (#632) feat: add `-rectypes` (#644) fix changelog fix: spurious warning 61 in externals test: show spurious warning 61 in externals test: show how to disable ppx alerts (#642) fix: disable warning 61 (`unboxable-type-in-prim-decl`) for deriving abstract externals test: show spurious warning on single field records with [@@deriving abstract] chore: format runtime / belt / node libraries (#640) chore: test on OCaml 5.1 (#639) chore: require dune 3.8, format, cleanup (#638) refactor: Don't use `(stdlib ...)` for the `Js.*` runtime (#637) chore: snapshot JS test files (#636) ...
I think the "vendored" definitions of
Unsafe
,number_of_float
etc. were there for historical reasons, as it was hard to consume jsoo as a library. But that's not the case anymore.