package vue-jsoo

  1. Overview
  2. Docs
type js_type =
  1. | JString of string
  2. | JObject of Mjs.any
  3. | JNumber of float
  4. | JInt of int
  5. | JBool of bool
  6. | JArray of Mjs.any list
  7. | JOther of (Mjs.js_string Mjs.t -> Mjs.any) Mjs.callback * Mjs.any

JS constructors

type prop_object = {
  1. pr_default : js_type;
  2. pr_required : bool option;
  3. pr_validator : (string -> bool) option;
}

generic prop object

type prop_options =
  1. | PrType of js_type
  2. | PrTypeArray of js_type list
  3. | PrObj of prop_object

possible types for prop

val prop : ?required:bool -> js_type -> prop_options

constructor of prop object

type props_options =
  1. | PrsArray of string list
  2. | PrsObj of (string * prop_options) list

possible types for props argument

type 'all component_element =
  1. | CTemplate of string
  2. | CRender of ('all Mjs.t, Mjs.any -> Mjs.any) Mjs.meth_callback * ('all Mjs.t, Mjs.any -> Mjs.any) Mjs.meth_callback Mjs.js_array Mjs.t

possible types for component rendering : template or render functions

module Internal : sig ... end

Internal JS module

type ('data, 'all) component_args = ('data, 'all) Internal.component_args = {
  1. template : string option;
  2. props : props_options option;
  3. data : ('all Mjs.t -> 'data Mjs.t) option;
  4. render : ('all Mjs.t, Mjs.any -> Mjs.any) Mjs.meth_callback option;
  5. static_renders : ('all Mjs.t, Mjs.any -> Mjs.any) Mjs.meth_callback Mjs.js_array Mjs.t option;
  6. computed : ('all Mjs.t -> Mjs.any Mjs.optdef) Mjs.table_cons option;
  7. watch : ('all Mjs.t -> Mjs.any -> Mjs.any -> Mjs.any) Mjs.table_cons option;
  8. methods : Mjs.any Mjs.table_cons option;
  9. lifecycle : (string * ('all Mjs.t -> unit)) list;
  10. error_captured : (Mjs.any -> Mjs.any -> string -> bool option) option;
  11. directives : (string * (string * (Js_of_ocaml.Dom.element Mjs.t -> Internal.binding Mjs.t -> Internal.vnode -> Internal.vnode -> unit)) list) list option;
  12. filters : (string * (Mjs.any -> Mjs.any)) list option;
  13. components : (Mjs.top, Mjs.top) Internal.component_arg Mjs.t Mjs.table_cons;
  14. mixins : Mjs.any list option;
  15. extends : Mjs.any option;
  16. name : string option;
  17. delimiters : (string * string) option;
  18. functional : bool option;
  19. model : (string option * string option) option;
  20. inherit_attrs : bool option;
  21. comments : bool option;
  22. hook_enter : (Vue_nav.push_obj -> Vue_nav.push_obj -> 'all Vue_nav.next) option;
  23. hook_update : ('all Mjs.t -> Vue_nav.push_obj -> Vue_nav.push_obj -> 'all Vue_nav.next) option;
  24. hook_leave : ('all Mjs.t -> Vue_nav.push_obj -> Vue_nav.push_obj -> 'all Vue_nav.next) option;
}

component arguments object

val empty : ('data, 'all) component_args

empty component arguments object

type 'a component = 'a Internal.vue_instance

generic component js type

val make : ?template:string -> ?render:('all Mjs.t, Mjs.any -> Mjs.any) Mjs.meth_callback -> ?static_renders: ('all Mjs.t, Mjs.any -> Mjs.any) Mjs.meth_callback Mjs.js_array Mjs.t -> ?props:props_options -> ?data:('all Mjs.t -> 'data Mjs.t) -> ?computed:('all Mjs.t -> Mjs.any Mjs.optdef) Mjs.table_cons -> ?methods:Mjs.any Mjs.table_cons -> ?watch:('all Mjs.t -> Mjs.any -> Mjs.any -> Mjs.any) Mjs.table_cons -> ?lifecycle:(string * ('all Mjs.t -> unit)) list -> ?error_captured:(Mjs.any -> Mjs.any -> string -> bool option) -> ?directives: (string * (string * (Js_of_ocaml.Dom.element Mjs.t -> Internal.binding Mjs.t -> Internal.vnode -> Internal.vnode -> unit)) list) list -> ?filters:(string * (Mjs.any -> Mjs.any)) list -> ?components:(Mjs.top, Mjs.top) Internal.component_arg Mjs.t Mjs.table_cons -> ?mixins:Mjs.any list -> ?extends:Mjs.any -> ?delimiters:(string * string) -> ?functional:bool -> ?model:(string option * string option) -> ?inherit_attrs:bool -> ?comments:bool -> ?enter:(Vue_nav.push_obj -> Vue_nav.push_obj -> 'all Vue_nav.next) -> ?update: ('all Mjs.t -> Vue_nav.push_obj -> Vue_nav.push_obj -> 'all Vue_nav.next) -> ?leave: ('all Mjs.t -> Vue_nav.push_obj -> Vue_nav.push_obj -> 'all Vue_nav.next) -> ?app:_ Mjs.t -> ?version:Version.t -> string -> 'all component

generic component maker Vue.component

module type Tables_S = sig ... end
module Tables (S : sig ... end) : Tables_S with type all = S.all

Functor to fill methods/watch/computed/components objects

module Make (S : sig ... end) : sig ... end

functor to create a component with typecheck of input data