package js_of_ocaml-compiler

  1. Overview
  2. Docs
type fragment = {
  1. provides : (Parse_info.t option * string * Primitive.kind * Primitive.kind_arg list option) option;
  2. requires : string list;
  3. version_constraint : ((int -> int -> bool) * string) list list;
  4. weakdef : bool;
  5. code : Javascript.program;
  6. ignore : [ `No | `Because of Primitive.condition ];
}
val parse_file : string -> fragment list
val parse_string : string -> fragment list
val parse_builtin : Builtins.File.t -> fragment list
val load_files : string list -> unit
val load_fragment : filename:string -> fragment -> unit
type state
type always_required = {
  1. filename : string;
  2. program : Javascript.program;
}
type output = {
  1. runtime_code : Javascript.program;
  2. always_required_codes : always_required list;
}
val init : unit -> state
val resolve_deps : ?linkall:bool -> state -> Stdlib.StringSet.t -> state * Stdlib.StringSet.t
val get_provided : unit -> Stdlib.StringSet.t
val all : state -> string list
val origin : name:string -> string option
OCaml

Innovation. Community. Security.