-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs_array.mli
67 lines (55 loc) · 1.88 KB
/
js_array.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
(* This file is released under the terms of an MIT-like license. *)
(* See the attached LICENSE file. *)
(* Copyright 2016 by LexiFi. *)
module Float32Array : sig
type t
val t_of_js: Ojs.t -> t
val t_to_js: t -> Ojs.t
val new_float32_array: ([`Data of float array | `Size of int | `Copy of t][@js.union]) -> t [@@js.new]
val length: t -> int
val get : t -> int -> float
[@@js.custom
external get : t -> int -> float = "caml_js_get" ]
val set : t -> int -> float -> unit
[@@js.custom
external set : t -> int -> float -> unit = "caml_js_set" ]
end
module Uint8Array : sig
type t
val t_of_js: Ojs.t -> t
val t_to_js: t -> Ojs.t
val new_uint8_array: ([`Data of int array | `Size of int | `Copy of t][@js.union]) -> t [@@js.new]
val length: t -> int
val get : t -> int -> int
[@@js.custom
external get : t -> int -> int = "caml_js_get" ]
val set : t -> int -> int -> unit
[@@js.custom
external set : t -> int -> int -> unit = "caml_js_set" ]
end
module Uint16Array : sig
type t
val t_of_js: Ojs.t -> t
val t_to_js: t -> Ojs.t
val new_uint16_array: ([`Data of int array | `Size of int | `Copy of t][@js.union]) -> t [@@js.new]
val length: t -> int
val get : t -> int -> int
[@@js.custom
external get : t -> int -> int = "caml_js_get" ]
val set : t -> int -> int -> unit
[@@js.custom
external set : t -> int -> int -> unit = "caml_js_set" ]
end
module Uint32Array : sig
type t
val t_of_js: Ojs.t -> t
val t_to_js: t -> Ojs.t
val new_uint32_array: ([`Data of int array | `Size of int | `Copy of t][@js.union]) -> t [@@js.new]
val length: t -> int
val get : t -> int -> int
[@@js.custom
external get : t -> int -> int = "caml_js_get" ]
val set : t -> int -> int -> unit
[@@js.custom
external set : t -> int -> int -> unit = "caml_js_set" ]
end