Module External_ffi_types

type module_bind_name =
  1. | Phint_name(string)
  2. | Phint_nothing
;
type external_module_name = {
  1. bundle: string,
  2. module_bind_name: module_bind_name,
};
type pipe = bool;
type arg_type = External_arg_spec.attr;
type arg_label = External_arg_spec.label;
type external_spec =
  1. | Js_var of {
    1. name: string,
    2. external_module_name: option(external_module_name),
    3. scopes: list(string),
    }
  2. | Js_module_as_var(external_module_name)
  3. | Js_module_as_fn of {
    1. external_module_name: external_module_name,
    2. splice: bool,
    }
  4. | Js_module_as_class(external_module_name)
  5. | Js_call of {
    1. name: string,
    2. external_module_name: option(external_module_name),
    3. splice: bool,
    4. scopes: list(string),
    }
  6. | Js_send of {
    1. name: string,
    2. splice: bool,
    3. pipe: pipe,
    4. js_send_scopes: list(string),
    }
  7. | Js_new of {
    1. name: string,
    2. external_module_name: option(external_module_name),
    3. splice: bool,
    4. scopes: list(string),
    }
  8. | Js_set of {
    1. js_set_name: string,
    2. js_set_scopes: list(string),
    }
  9. | Js_get of {
    1. js_get_name: string,
    2. js_get_scopes: list(string),
    }
  10. | Js_get_index of {
    1. js_get_index_scopes: list(string),
    }
  11. | Js_set_index of {
    1. js_set_index_scopes: list(string),
    }
;
type return_wrapper =
  1. | Return_unset
  2. | Return_identity
  3. | Return_undefined_to_opt
  4. | Return_null_to_opt
  5. | Return_null_undefined_to_opt
  6. | Return_replaced_with_unit
;
type params =
  1. | Params(External_arg_spec.params)
  2. | Param_number(int)
;
type t = pri
  1. | Ffi_bs(params, return_wrapper, external_spec)
  2. | Ffi_obj_create(External_arg_spec.obj_params)
  3. | Ffi_inline_const(Lam_constant.t)
  4. | Ffi_normal
;
let check_ffi: ?loc:Melange_compiler_libs.Location.t => external_spec => bool;
let to_string: t => string;
let from_string: string => t;

Note

let inline_string_primitive: string => option(string) => list(string);
let inline_bool_primitive: bool => list(string);
let inline_int_primitive: int32 => list(string);
let inline_int64_primitive: int64 => list(string);
let inline_float_primitive: string => list(string);
let ffi_bs_as_prims: External_arg_spec.params => return_wrapper => external_spec => list(string);
let ffi_obj_create: External_arg_spec.obj_params => t;
let ffi_obj_as_prims: External_arg_spec.obj_params => list(string);