Module Js_types

module Js_types: sig .. end

type symbol 
Js symbol type only available in ES6
type obj_val 
type undefined_val 
This type has only one value undefined
type null_val 
This type has only one value null
type function_val 
type '_ t = 
| Undefined:undefined_val t
| Null:null_val t
| Boolean:Js.boolean t
| Number:float t
| String:string t
| Function:function_val t
| Object:obj_val t
| Symbol:symbol t
val reify_type : 'a -> 'b t * 'b
Given any value it returns its type and the same value. Note that since 'b t is GADT, the type system will reify its type automatically,
 
    match reify_type "3" with
    | String, v -> v  ^ " this type safe control flow analysis will infer v as string"
    | _ -> assert false
    
val test : 'a -> 'b t -> bool
 
  test "x" String = true