diff --git a/CHANGELOG.md b/CHANGELOG.md index 71a3f1d955..c7644a9101 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - Remove ml parsing tests and conversion from `.ml` to `.res` via format. https://github.com/rescript-lang/rescript-compiler/pull/6848 - Remove support for compiling `.ml` files, and general cleanup. https://github.com/rescript-lang/rescript-compiler/pull/6852 - Remove `rescript convert` subcommand. https://github.com/rescript-lang/rescript-compiler/pull/6860 +- Remove support for `@bs.send.pipe`. https://github.com/rescript-lang/rescript-compiler/pull/6858 #### :bug: Bug Fix diff --git a/jscomp/frontend/ast_attributes.ml b/jscomp/frontend/ast_attributes.ml index a609a60655..1c77b3a5f0 100644 --- a/jscomp/frontend/ast_attributes.ml +++ b/jscomp/frontend/ast_attributes.ml @@ -176,34 +176,6 @@ let process_derive_type (attrs : t) : derive_attr * t = | Some _ -> Bs_syntaxerr.err loc Duplicated_bs_deriving) | _ -> (st, attr :: acc)) -let process_send_pipe (attrs : t) : (Parsetree.core_type * t) option = - match attrs with - | [] -> None - | _ -> ( - if not (Ext_list.exists_fst attrs (fun {txt} -> txt = "bs.send.pipe")) then - (* fast path *) - None - else - let ty = ref None in - let attrs = - Ext_list.fold_left attrs [] (fun acc (({txt; loc}, payload) as attr) -> - match txt with - | "bs.send.pipe" -> ( - match !ty with - | None -> - Location.prerr_warning loc - (Warnings.Bs_ffi_warning - "This attribute is deprecated, use @send instead."); - - ty := Some (Ast_payload.as_core_type loc payload); - ({Asttypes.txt = "send"; loc}, Parsetree.PStr []) :: acc - | Some _ -> Location.raise_errorf ~loc "Duplicated bs.send.pipe") - | _ -> attr :: acc) - in - match !ty with - | None -> assert false - | Some ty -> Some (ty, attrs)) - (* duplicated @uncurry @string not allowed, it is worse in @uncurry since it will introduce inconsistency in arity diff --git a/jscomp/frontend/ast_attributes.mli b/jscomp/frontend/ast_attributes.mli index 46127b2efd..9b7b15318d 100644 --- a/jscomp/frontend/ast_attributes.mli +++ b/jscomp/frontend/ast_attributes.mli @@ -87,8 +87,6 @@ val internal_expansive : attr val rs_externals : t -> string list -> bool -val process_send_pipe : t -> (Parsetree.core_type * t) option - val is_gentype : attr -> bool val gentype : attr diff --git a/jscomp/frontend/ast_core_type.ml b/jscomp/frontend/ast_core_type.ml index 5cc6469f13..af9021f644 100644 --- a/jscomp/frontend/ast_core_type.ml +++ b/jscomp/frontend/ast_core_type.ml @@ -129,14 +129,6 @@ let get_curry_arity (ty : t) = let arity, _ = Ast_uncurried.core_type_extract_uncurried_fun ty in arity else get_uncurry_arity_aux ty 0 - -(* add hoc for bs.send.pipe *) -let rec get_curry_labels (ty : t) acc = - match ty.ptyp_desc with - | Ptyp_arrow (label, _, rest) -> get_curry_labels rest (label :: acc) - | _ -> acc - -let get_curry_labels ty = List.rev (get_curry_labels ty []) let is_arity_one ty = get_curry_arity ty = 1 type param_type = { diff --git a/jscomp/frontend/ast_core_type.mli b/jscomp/frontend/ast_core_type.mli index 5cdbecb8c1..15dc6aed32 100644 --- a/jscomp/frontend/ast_core_type.mli +++ b/jscomp/frontend/ast_core_type.mli @@ -47,8 +47,6 @@ val get_uncurry_arity : t -> int option None -- means not a function *) -val get_curry_labels : t -> Asttypes.arg_label list - type param_type = { label: Asttypes.arg_label; ty: t; diff --git a/jscomp/frontend/ast_external.ml b/jscomp/frontend/ast_external.ml index 479227d3dc..f145999f25 100644 --- a/jscomp/frontend/ast_external.ml +++ b/jscomp/frontend/ast_external.ml @@ -28,43 +28,28 @@ let handle_external_in_sig (self : Bs_ast_mapper.mapper) let loc = prim.pval_loc in let pval_type = self.typ self prim.pval_type in let pval_attributes = self.attributes self prim.pval_attributes in - match Ast_attributes.process_send_pipe pval_attributes with - | Some (obj, _) -> - (*has bs.send.pipe: best effort *) - { - sigi with - psig_desc = - Psig_value - { - prim with - pval_type = Ast_core_type.add_last_obj pval_type obj; - pval_prim = []; - pval_attributes = []; - }; - } - | None -> ( - match prim.pval_prim with - | [] -> Location.raise_errorf ~loc "empty primitive string" - | a :: b :: _ -> - Location.raise_errorf ~loc - "only a single string is allowed in bs external %S %S" a b - | [v] -> ( - match - Ast_external_process.encode_attributes_as_string loc pval_type - pval_attributes v - with - | {pval_type; pval_prim; pval_attributes; no_inline_cross_module} -> - { - sigi with - psig_desc = - Psig_value - { - prim with - pval_type; - pval_prim = (if no_inline_cross_module then [] else pval_prim); - pval_attributes; - }; - })) + match prim.pval_prim with + | [] -> Location.raise_errorf ~loc "empty primitive string" + | a :: b :: _ -> + Location.raise_errorf ~loc + "only a single string is allowed in bs external %S %S" a b + | [v] -> ( + match + Ast_external_process.encode_attributes_as_string loc pval_type + pval_attributes v + with + | {pval_type; pval_prim; pval_attributes; no_inline_cross_module} -> + { + sigi with + psig_desc = + Psig_value + { + prim with + pval_type; + pval_prim = (if no_inline_cross_module then [] else pval_prim); + pval_attributes; + }; + }) let handle_external_in_stru (self : Bs_ast_mapper.mapper) (prim : Parsetree.value_description) (str : Parsetree.structure_item) : @@ -72,14 +57,6 @@ let handle_external_in_stru (self : Bs_ast_mapper.mapper) let loc = prim.pval_loc in let pval_type = self.typ self prim.pval_type in let pval_attributes = self.attributes self prim.pval_attributes in - let send_pipe = ref false in - let pval_type, pval_attributes = - match Ast_attributes.process_send_pipe pval_attributes with - | Some (obj, attrs) -> - send_pipe := true; - (Ast_helper.Typ.arrow ~loc Nolabel obj pval_type, attrs) - | None -> (pval_type, pval_attributes) - in match prim.pval_prim with | [] -> Location.raise_errorf ~loc "empty primitive string" | a :: b :: _ -> @@ -98,86 +75,24 @@ let handle_external_in_stru (self : Bs_ast_mapper.mapper) Pstr_primitive {prim with pval_type; pval_prim; pval_attributes}; } in - let normal () = - if not no_inline_cross_module then external_result - else - let open Ast_helper in - Str.include_ ~loc - (Incl.mk ~loc - (Mod.constraint_ ~loc - (Mod.structure ~loc [external_result]) - (Mty.signature ~loc - [ - { - psig_desc = - Psig_value - { - prim with - pval_type; - pval_prim = []; - pval_attributes; - }; - psig_loc = loc; - }; - ]))) - in - if !send_pipe then - let[@warning "-8"] (_ :: params as args) = - Ast_core_type.get_curry_labels pval_type - in - let arity = List.length args in - if arity = 1 then normal () - else - let open Ast_helper in - Str.include_ ~loc - (Incl.mk ~loc - (Mod.structure ~loc - [ - external_result; - Str.value ~loc Nonrecursive - [ - Vb.mk ~loc - (Pat.var ~loc prim.pval_name) - (let body = - Exp.apply ~loc - (Exp.ident ~loc - {txt = Lident prim.pval_name.txt; loc}) - (( Asttypes.Nolabel, - Exp.ident ~loc {txt = Lident "obj"; loc} ) - :: Ext_list.mapi params (fun i x -> - ( x, - match x with - | Asttypes.Nolabel -> - Exp.ident - { - txt = - Lident - ("arg" ^ string_of_int (i + 1)); - loc; - } - | Labelled s | Optional s -> - Exp.ident {txt = Lident s; loc} ))) - in - snd - @@ Ext_list.fold_right params - ( 0, - Exp.fun_ Nolabel None - (Pat.var ~loc {txt = "obj"; loc}) - body ) - (fun arg (i, obj) -> - ( i + 1, - Exp.fun_ arg None - (Pat.var ~loc - { - txt = - (match arg with - | Labelled s | Optional s -> s - | Nolabel -> - "arg" - ^ string_of_int (arity - i - 1)); - loc; - }) - obj ))); - ]; - ])) - else normal ()) + if not no_inline_cross_module then external_result + else + let open Ast_helper in + Str.include_ ~loc + (Incl.mk ~loc + (Mod.constraint_ ~loc + (Mod.structure ~loc [external_result]) + (Mty.signature ~loc + [ + { + psig_desc = + Psig_value + { + prim with + pval_type; + pval_prim = []; + pval_attributes; + }; + psig_loc = loc; + }; + ])))) diff --git a/jscomp/frontend/ast_external_process.ml b/jscomp/frontend/ast_external_process.ml index 39dac1c36a..de2919b609 100644 --- a/jscomp/frontend/ast_external_process.ml +++ b/jscomp/frontend/ast_external_process.ml @@ -222,7 +222,6 @@ let parse_external_attributes (no_arguments : bool) (prim_name_check : string) (prim_attributes : Ast_attributes.t) : Ast_attributes.t * external_desc = (* shared by `[@@val]`, `[@@send]`, `[@@set]`, `[@@get]` , `[@@new]` - `[@@bs.send.pipe]` does not use it *) let name_from_payload_or_prim ~loc (payload : Parsetree.payload) : bundle_source = diff --git a/jscomp/others/js_array.res b/jscomp/others/js_array.res index caf332fdc4..f2702a6125 100644 --- a/jscomp/others/js_array.res +++ b/jscomp/others/js_array.res @@ -127,7 +127,6 @@ external length: array<'a> => int = "length" /* Mutator functions */ -@bs.send.pipe(: t<'a> as 'this) /** Copies from the first element in the given array to the designated `~to_` position, returning the resulting array. *This function modifies the original array.* See [`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin) on MDN. @@ -139,11 +138,12 @@ Js.Array.copyWithin(~to_=2, arr) == [100, 101, 100, 101, 102] arr == [100, 101, 100, 101, 102] ``` */ -external copyWithin: (~to_: int) => 'this = "copyWithin" +@send +external copyWithin: (t<'a>, ~to_: int) => 'this = "copyWithin" +let copyWithin = (~to_, obj) => copyWithin(obj, ~to_) /* ES2015 */ -@bs.send.pipe(: t<'a> as 'this) /** Copies starting at element `~from` in the given array to the designated `~to_` position, returning the resulting array. *This function modifies the original array.* See [`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin) on MDN. @@ -155,11 +155,12 @@ Js.Array.copyWithinFrom(~from=2, ~to_=0, arr) == [102, 103, 104, 103, 104] arr == [102, 103, 104, 103, 104] ``` */ -external copyWithinFrom: (~to_: int, ~from: int) => 'this = "copyWithin" +@send +external copyWithinFrom: (t<'a>, ~to_: int, ~from: int) => 'this = "copyWithin" +let copyWithinFrom = (~to_, ~from, obj) => copyWithinFrom(obj, ~to_, ~from) /* ES2015 */ -@bs.send.pipe(: t<'a> as 'this) /** Copies starting at element `~start` in the given array up to but not including `~end_` to the designated `~to_` position, returning the resulting array. *This function modifies the original array.* See [`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin) on MDN. @@ -171,11 +172,12 @@ Js.Array.copyWithinFromRange(~start=2, ~end_=5, ~to_=1, arr) == [100, 102, 103, arr == [100, 102, 103, 104, 104, 105] ``` */ -external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => 'this = "copyWithin" +@send +external copyWithinFromRange: (t<'a>, ~to_: int, ~start: int, ~end_: int) => 'this = "copyWithin" +let copyWithinFromRange = (~to_, ~start, ~end_, obj) => copyWithinFromRange(obj, ~to_, ~start, ~end_) /* ES2015 */ -@bs.send.pipe(: t<'a> as 'this) /** Sets all elements of the given array (the second arumgent) to the designated value (the first argument), returning the resulting array. *This function modifies the original array.* See [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN. @@ -187,11 +189,12 @@ Js.Array.fillInPlace(99, arr) == [99, 99, 99, 99, 99] arr == [99, 99, 99, 99, 99] ``` */ -external fillInPlace: 'a => 'this = "fill" +@send +external fillInPlace: (t<'a>, 'a) => 'this = "fill" +let fillInPlace = (arg1, obj) => fillInPlace(obj, arg1) /* ES2015 */ -@bs.send.pipe(: t<'a> as 'this) /** Sets all elements of the given array (the last arumgent) from position `~from` to the end to the designated value (the first argument), returning the resulting array. *This function modifies the original array.* See [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN. @@ -203,11 +206,12 @@ Js.Array.fillFromInPlace(99, ~from=2, arr) == [100, 101, 99, 99, 99] arr == [100, 101, 99, 99, 99] ``` */ -external fillFromInPlace: ('a, ~from: int) => 'this = "fill" +@send +external fillFromInPlace: (t<'a>, 'a, ~from: int) => 'this = "fill" +let fillFromInPlace = (arg1, ~from, obj) => fillFromInPlace(obj, arg1, ~from) /* ES2015 */ -@bs.send.pipe(: t<'a> as 'this) /** Sets the elements of the given array (the last arumgent) from position `~start` up to but not including position `~end_` to the designated value (the first argument), returning the resulting array. *This function modifies the original array.* See [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN. @@ -219,12 +223,12 @@ Js.Array.fillRangeInPlace(99, ~start=1, ~end_=4, arr) == [100, 99, 99, 99, 104] arr == [100, 99, 99, 99, 104] ``` */ -external fillRangeInPlace: ('a, ~start: int, ~end_: int) => 'this = "fill" +@send +external fillRangeInPlace: (t<'a>, 'a, ~start: int, ~end_: int) => 'this = "fill" +let fillRangeInPlace = (arg1, ~start, ~end_, obj) => fillRangeInPlace(obj, arg1, ~start, ~end_) /* ES2015 */ -@bs.send.pipe(: t<'a> as 'this) -@return(undefined_to_opt) /** If the array is not empty, removes the last element and returns it as `Some(value)`; returns `None` if the array is empty. *This function modifies the original array.* See [`Array.pop`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop) on MDN. @@ -239,9 +243,10 @@ let empty: array = [] Js.Array.pop(empty) == None ``` */ -external pop: option<'a> = "pop" +@send +@return(undefined_to_opt) +external pop: t<'a> => option<'a> = "pop" -@bs.send.pipe(: t<'a> as 'this) /** Appends the given value to the array, returning the number of elements in the updated array. *This function modifies the original array.* See [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) on MDN. @@ -253,10 +258,10 @@ Js.Array.push("dog", arr) == 4 arr == ["ant", "bee", "cat", "dog"] ``` */ -external push: 'a => int = "push" +@send +external push: (t<'a>, 'a) => int = "push" +let push = (arg1, obj) => push(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) -@variadic /** Appends the values from one array (the first argument) to another (the second argument), returning the number of elements in the updated array. *This function modifies the original array.* See [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) on MDN. @@ -268,9 +273,11 @@ Js.Array.pushMany(["dog", "elk"], arr) == 5 arr == ["ant", "bee", "cat", "dog", "elk"] ``` */ -external pushMany: array<'a> => int = "push" +@send +@variadic +external pushMany: (t<'a>, array<'a>) => int = "push" +let pushMany = (arg1, obj) => pushMany(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Returns an array with the elements of the input array in reverse order. *This function modifies the original array.* See [`Array.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse) on MDN. @@ -282,10 +289,9 @@ Js.Array.reverseInPlace(arr) == ["cat", "bee", "ant"] arr == ["cat", "bee", "ant"] ``` */ -external reverseInPlace: 'this = "reverse" +@send +external reverseInPlace: t<'a> => 'this = "reverse" -@bs.send.pipe(: t<'a> as 'this) -@return({undefined_to_opt: undefined_to_opt}) /** If the array is not empty, removes the first element and returns it as `Some(value)`; returns `None` if the array is empty. *This function modifies the original array.* See [`Array.shift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift) on MDN. @@ -300,9 +306,10 @@ let empty: array = [] Js.Array.shift(empty) == None ``` */ -external shift: option<'a> = "shift" +@send +@return(undefined_to_opt) +external shift: t<'a> => option<'a> = "shift" -@bs.send.pipe(: t<'a> as 'this) /** Sorts the given array in place and returns the sorted array. JavaScript sorts the array by converting the arguments to UTF-16 strings and sorting them. See the second example with sorting numbers, which does not do a numeric sort. *This function modifies the original array.* See [`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) on MDN. @@ -318,9 +325,9 @@ Js.Array.sortInPlace(numbers) == [1, 10, 2, 20, 3, 30] numbers == [1, 10, 2, 20, 3, 30] ``` */ -external sortInPlace: 'this = "sort" +@send +external sortInPlace: t<'a> => 'this = "sort" -@bs.send.pipe(: t<'a> as 'this) /** Sorts the given array in place and returns the sorted array. *This function modifies the original array.* @@ -347,10 +354,10 @@ let reverseNumeric = (n1, n2) => n2 - n1 Js.Array.sortInPlaceWith(reverseNumeric, numbers) == [30, 20, 10, 3, 2, 1] ``` */ -external sortInPlaceWith: (@uncurry ('a, 'a) => int) => 'this = "sort" +@send +external sortInPlaceWith: (t<'a>, @uncurry ('a, 'a) => int) => 'this = "sort" +let sortInPlaceWith = (arg1, obj) => sortInPlaceWith(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) -@variadic /** Starting at position `~pos`, remove `~remove` elements and then add the elements from the `~add` array. Returns an array consisting of the removed @@ -374,9 +381,11 @@ Js.Array.spliceInPlace(~pos=9, ~remove=2, ~add=["x", "y", "z"], arr3) == [] arr3 == ["a", "b", "c", "d", "e", "f", "x", "y", "z"] ``` */ -external spliceInPlace: (~pos: int, ~remove: int, ~add: array<'a>) => 'this = "splice" +@send +@variadic +external spliceInPlace: (t<'a>, ~pos: int, ~remove: int, ~add: array<'a>) => 'this = "splice" +let spliceInPlace = (~pos, ~remove, ~add, obj) => spliceInPlace(obj, ~pos, ~remove, ~add) -@bs.send.pipe(: t<'a> as 'this) /** Removes elements from the given array starting at position `~pos` to the end of the array, returning the removed elements. *This function modifies the @@ -392,9 +401,10 @@ Js.Array.removeFromInPlace(~pos=4, arr) == ["e", "f"] arr == ["a", "b", "c", "d"] ``` */ -external removeFromInPlace: (~pos: int) => 'this = "splice" +@send +external removeFromInPlace: (t<'a>, ~pos: int) => 'this = "splice" +let removeFromInPlace = (~pos, obj) => removeFromInPlace(obj, ~pos) -@bs.send.pipe(: t<'a> as 'this) /** Removes `~count` elements from the given array starting at position `~pos`, returning the removed elements. *This function modifies the original array.* @@ -410,9 +420,10 @@ Js.Array.removeCountInPlace(~pos=2, ~count=3, arr) == ["c", "d", "e"] arr == ["a", "b", "f"] ``` */ -external removeCountInPlace: (~pos: int, ~count: int) => 'this = "splice" +@send +external removeCountInPlace: (t<'a>, ~pos: int, ~count: int) => 'this = "splice" +let removeCountInPlace = (~pos, ~count, obj) => removeCountInPlace(obj, ~pos, ~count) -@bs.send.pipe(: t<'a> as 'this) /** Adds the given element to the array, returning the new number of elements in the array. *This function modifies the original array.* See @@ -427,10 +438,10 @@ Js.Array.unshift("a", arr) == 4 arr == ["a", "b", "c", "d"] ``` */ -external unshift: 'a => int = "unshift" +@send +external unshift: (t<'a>, 'a) => int = "unshift" +let unshift = (arg1, obj) => unshift(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) -@variadic /** Adds the elements in the first array argument at the beginning of the second array argument, returning the new number of elements in the array. *This @@ -446,11 +457,13 @@ Js.Array.unshiftMany(["a", "b", "c"], arr) == 5 arr == ["a", "b", "c", "d", "e"] ``` */ -external unshiftMany: array<'a> => int = "unshift" +@send +@variadic +external unshiftMany: (t<'a>, array<'a>) => int = "unshift" +let unshiftMany = (arg1, obj) => unshiftMany(obj, arg1) /* Accessor functions */ -@bs.send.pipe(: t<'a> as 'this) /** Concatenates the first array argument to the second array argument, returning a new array. The original arrays are not modified. See @@ -463,10 +476,10 @@ on MDN. Js.Array.concat(["c", "d", "e"], ["a", "b"]) == ["a", "b", "c", "d", "e"] ``` */ -external concat: 'this => 'this = "concat" +@send +external concat: (t<'a>, 'this) => 'this = "concat" +let concat = (arg1, obj) => concat(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) -@variadic /** The first argument to `concatMany()` is an array of arrays; these are added at the end of the second argument, returning a new array. See @@ -488,10 +501,12 @@ Js.Array.concatMany([["d", "e"], ["f", "g", "h"]], ["a", "b", "c"]) == [ ] ``` */ -external concatMany: array<'this> => 'this = "concat" +@send +@variadic +external concatMany: (t<'a>, array<'this>) => 'this = "concat" +let concatMany = (arg1, obj) => concatMany(obj, arg1) /* ES2016 */ -@bs.send.pipe(: t<'a> as 'this) /** Returns true if the given value is in the array, `false` otherwise. See [`Array.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes) @@ -504,9 +519,10 @@ Js.Array.includes("b", ["a", "b", "c"]) == true Js.Array.includes("x", ["a", "b", "c"]) == false ``` */ -external includes: 'a => bool = "includes" +@send +external includes: (t<'a>, 'a) => bool = "includes" +let includes = (arg1, obj) => includes(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Returns the index of the first element in the array that has the given value. If the value is not in the array, returns -1. See @@ -520,9 +536,10 @@ Js.Array.indexOf(102, [100, 101, 102, 103]) == 2 Js.Array.indexOf(999, [100, 101, 102, 103]) == -1 ``` */ -external indexOf: 'a => int = "indexOf" +@send +external indexOf: (t<'a>, 'a) => int = "indexOf" +let indexOf = (arg1, obj) => indexOf(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Returns the index of the first element in the array with the given value. The search starts at position `~from`. See @@ -537,12 +554,13 @@ Js.Array.indexOfFrom("a", ~from=3, ["a", "b", "a", "c", "a"]) == 4 Js.Array.indexOfFrom("b", ~from=2, ["a", "b", "a", "c", "a"]) == -1 ``` */ -external indexOfFrom: ('a, ~from: int) => int = "indexOf" +@send +external indexOfFrom: (t<'a>, 'a, ~from: int) => int = "indexOf" +let indexOfFrom = (arg1, ~from, obj) => indexOfFrom(obj, arg1, ~from) @send @deprecated("please use joinWith instead") external join: t<'a> => string = "join" -@bs.send.pipe(: t<'a> as 'this) /** This function converts each element of the array to a string (via JavaScript) and concatenates them, separated by the string given in the first argument, @@ -559,9 +577,10 @@ Js.Array.joinWith("/", [2020, 9, 4]) == "2020/9/4" Js.Array.joinWith(";", [2.5, 3.6, 3e-2]) == "2.5;3.6;0.03" ``` */ -external joinWith: string => string = "join" +@send +external joinWith: (t<'a>, string) => string = "join" +let joinWith = (arg1, obj) => joinWith(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Returns the index of the last element in the array that has the given value. If the value is not in the array, returns -1. See @@ -575,9 +594,10 @@ Js.Array.lastIndexOf("a", ["a", "b", "a", "c"]) == 2 Js.Array.lastIndexOf("x", ["a", "b", "a", "c"]) == -1 ``` */ -external lastIndexOf: 'a => int = "lastIndexOf" +@send +external lastIndexOf: (t<'a>, 'a) => int = "lastIndexOf" +let lastIndexOf = (arg1, obj) => lastIndexOf(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Returns the index of the last element in the array that has the given value, searching from position `~from` down to the start of the array. If the value @@ -592,9 +612,10 @@ Js.Array.lastIndexOfFrom("a", ~from=3, ["a", "b", "a", "c", "a", "d"]) == 2 Js.Array.lastIndexOfFrom("c", ~from=2, ["a", "b", "a", "c", "a", "d"]) == -1 ``` */ -external lastIndexOfFrom: ('a, ~from: int) => int = "lastIndexOf" +@send +external lastIndexOfFrom: (t<'a>, 'a, ~from: int) => int = "lastIndexOf" +let lastIndexOfFrom = (arg1, ~from, obj) => lastIndexOfFrom(obj, arg1, ~from) -@bs.send.pipe(: t<'a> as 'this) /** Returns a shallow copy of the given array from the `~start` index up to but not including the `~end_` position. Negative numbers indicate an offset from @@ -611,18 +632,19 @@ Js.Array.slice(~start=-3, ~end_=-1, arr) == [104, 105] Js.Array.slice(~start=9, ~end_=10, arr) == [] ``` */ -external slice: (~start: int, ~end_: int) => 'this = "slice" +@send +external slice: (t<'a>, ~start: int, ~end_: int) => 'this = "slice" +let slice = (start, ~end_, ~obj) => slice(obj, ~start, ~end_) -@bs.send.pipe(: t<'a> as 'this) /** Returns a copy of the entire array. Same as `Js.Array.Slice(~start=0, ~end_=Js.Array.length(arr), arr)`. See [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) on MDN. */ -external copy: 'this = "slice" +@send +external copy: t<'a> => 'this = "slice" -@bs.send.pipe(: t<'a> as 'this) /** Returns a shallow copy of the given array from the given index to the end. See [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) on MDN. @@ -633,9 +655,10 @@ See [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe Js.Array.sliceFrom(2, [100, 101, 102, 103, 104]) == [102, 103, 104] ``` */ -external sliceFrom: int => 'this = "slice" +@send +external sliceFrom: (t<'a>, int) => 'this = "slice" +let sliceFrom = (arg1, obj) => sliceFrom(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Converts the array to a string. Each element is converted to a string using JavaScript. Unlike the JavaScript `Array.toString()`, all elements in a @@ -650,9 +673,9 @@ Js.Array.toString([3.5, 4.6, 7.8]) == "3.5,4.6,7.8" Js.Array.toString(["a", "b", "c"]) == "a,b,c" ``` */ -external toString: string = "toString" +@send +external toString: t<'a> => string = "toString" -@bs.send.pipe(: t<'a> as 'this) /** Converts the array to a string using the conventions of the current locale. Each element is converted to a string using JavaScript. Unlike the JavaScript @@ -669,15 +692,12 @@ Js.Array.toLocaleString([Js.Date.make()]) // returns "2020-3-19 10:52:11" for locale de_DE.utf8 ``` */ -external toLocaleString: string = "toLocaleString" +@send +external toLocaleString: t<'a> => string = "toLocaleString" /* Iteration functions */ -/* commented out until bs has a plan for iterators - external entries : (int * 'a) array_iter = "" [@@bs.send.pipe: 'a t as 'this] (* ES2015 *) -*/ -@bs.send.pipe(: t<'a> as 'this) /** The first argument to `every()` is a predicate function that returns a boolean. The `every()` function returns `true` if the predicate function is true for all items in the given array. If given an empty array, returns `true`. See [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN. @@ -689,9 +709,10 @@ Js.Array.every(isEven, [6, 22, 8, 4]) == true Js.Array.every(isEven, [6, 22, 7, 4]) == false ``` */ -external every: (@uncurry ('a => bool)) => bool = "every" +@send +external every: (t<'a>, @uncurry ('a => bool)) => bool = "every" +let every = (arg1, obj) => every(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** The first argument to `everyi()` is a predicate function with two arguments: an array element and that element’s index; it returns a boolean. The `everyi()` function returns `true` if the predicate function is true for all items in the given array. If given an empty array, returns `true`. See [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN. @@ -705,9 +726,10 @@ Js.Array.everyi(evenIndexPositive, [6, -3, 5, 8]) == true Js.Array.everyi(evenIndexPositive, [6, 3, -5, 8]) == false ``` */ -external everyi: (@uncurry ('a, int) => bool) => bool = "every" +@send +external everyi: (t<'a>, @uncurry ('a, int) => bool) => bool = "every" +let everyi = (arg1, obj) => everyi(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Applies the given predicate function to each element in the array; the result is an array of those elements for which the predicate function returned `true`. See [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN. @@ -718,9 +740,10 @@ let nonEmpty = s => s != "" Js.Array.filter(nonEmpty, ["abc", "", "", "def", "ghi"]) == ["abc", "def", "ghi"] ``` */ -external filter: (@uncurry ('a => bool)) => 'this = "filter" +@send +external filter: (t<'a>, @uncurry ('a => bool)) => 'this = "filter" +let filter = (arg1, obj) => filter(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Each element of the given array are passed to the predicate function. The return value is an array of all those elements for which the predicate @@ -737,10 +760,10 @@ let positiveOddElement = (item, index) => mod(index, 2) == 1 && item > 0 Js.Array.filteri(positiveOddElement, [6, 3, 5, 8, 7, -4, 1]) == [3, 8] ``` */ -external filteri: (@uncurry ('a, int) => bool) => 'this = "filter" +@send +external filteri: (t<'a>, @uncurry ('a, int) => bool) => 'this = "filter" +let filteri = (arg1, obj) => filteri(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) -@return({undefined_to_opt: undefined_to_opt}) /** Returns `Some(value)` for the first element in the array that satisifies the given predicate function, or `None` if no element satisifies the predicate. @@ -756,10 +779,11 @@ Js.Array.find(x => x < 0, [33, 22, -55, 77, -44]) == Some(-55) Js.Array.find(x => x < 0, [33, 22, 55, 77, 44]) == None ``` */ -external find: (@uncurry ('a => bool)) => option<'a> = "find" +@send +@return(undefined_to_opt) +external find: (t<'a>, @uncurry ('a => bool)) => option<'a> = "find" +let find = (arg1, obj) => find(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) -@return({undefined_to_opt: undefined_to_opt}) /** Returns `Some(value)` for the first element in the array that satisifies the given predicate function, or `None` if no element satisifies the predicate. The predicate function takes an array element and an index as its parameters. See [`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) on MDN. @@ -773,9 +797,11 @@ Js.Array.findi(positiveOddElement, [66, -33, 55, 88, 22]) == Some(88) Js.Array.findi(positiveOddElement, [66, -33, 55, -88, 22]) == None ``` */ -external findi: (@uncurry ('a, int) => bool) => option<'a> = "find" +@send +@return(undefined_to_opt) +external findi: (t<'a>, @uncurry ('a, int) => bool) => option<'a> = "find" +let findi = (arg1, obj) => findi(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Returns the index of the first element in the array that satisifies the given predicate function, or -1 if no element satisifies the predicate. See [`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) on MDN. @@ -786,9 +812,10 @@ Js.Array.findIndex(x => x < 0, [33, 22, -55, 77, -44]) == 2 Js.Array.findIndex(x => x < 0, [33, 22, 55, 77, 44]) == -1 ``` */ -external findIndex: (@uncurry ('a => bool)) => int = "findIndex" +@send +external findIndex: (t<'a>, @uncurry ('a => bool)) => int = "findIndex" +let findIndex = (arg1, obj) => findIndex(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Returns `Some(value)` for the first element in the array that satisifies the given predicate function, or `None` if no element satisifies the predicate. The predicate function takes an array element and an index as its parameters. See [`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) on MDN. @@ -802,9 +829,10 @@ Js.Array.findIndexi(positiveOddElement, [66, -33, 55, 88, 22]) == 3 Js.Array.findIndexi(positiveOddElement, [66, -33, 55, -88, 22]) == -1 ``` */ -external findIndexi: (@uncurry ('a, int) => bool) => int = "findIndex" +@send +external findIndexi: (t<'a>, @uncurry ('a, int) => bool) => int = "findIndex" +let findIndexi = (arg1, obj) => findIndexi(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** The `forEach()` function applies the function given as the first argument to each element in the array. The function you provide returns `unit`, and the `forEach()` function also returns `unit`. You use `forEach()` when you need to process each element in the array but not return any new array or value; for example, to print the items in an array. See [`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) on MDN. @@ -815,9 +843,10 @@ The `forEach()` function applies the function given as the first argument to eac Js.Array.forEach(x => Js.log(x), ["a", "b", "c"]) == () ``` */ -external forEach: (@uncurry ('a => unit)) => unit = "forEach" +@send +external forEach: (t<'a>, @uncurry ('a => unit)) => unit = "forEach" +let forEach = (arg1, obj) => forEach(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** The `forEachi()` function applies the function given as the first argument to each element in the array. The function you provide takes an item in the array and its index number, and returns `unit`. The `forEachi()` function also returns `unit`. You use `forEachi()` when you need to process each element in the array but not return any new array or value; for example, to print the items in an array. See [`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) on MDN. @@ -828,13 +857,10 @@ The `forEachi()` function applies the function given as the first argument to ea Js.Array.forEachi((item, index) => Js.log2(index + 1, item), ["a", "b", "c"]) == () ``` */ -external forEachi: (@uncurry ('a, int) => unit) => unit = "forEach" +@send +external forEachi: (t<'a>, @uncurry ('a, int) => unit) => unit = "forEach" +let forEachi = (arg1, obj) => forEachi(obj, arg1) -/* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: 'a t as 'this] (* ES2015 *) -*/ - -@bs.send.pipe(: t<'a> as 'this) /** Applies the function (given as the first argument) to each item in the array, returning a new array. The result array does not have to have elements of the @@ -849,9 +875,10 @@ Js.Array.map(x => x * x, [12, 4, 8]) == [144, 16, 64] Js.Array.map(Js.String.length, ["animal", "vegetable", "mineral"]) == [6, 9, 7] ``` */ -external map: (@uncurry ('a => 'b)) => t<'b> = "map" +@send +external map: (t<'a>, @uncurry ('a => 'b)) => t<'b> = "map" +let map = (arg1, obj) => map(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Applies the function (given as the first argument) to each item in the array, returning a new array. The function acceps two arguments: an item from the @@ -868,9 +895,10 @@ let product = (item, index) => item * index Js.Array.mapi(product, [10, 11, 12]) == [0, 11, 24] ``` */ -external mapi: (@uncurry ('a, int) => 'b) => t<'b> = "map" +@send +external mapi: (t<'a>, @uncurry ('a, int) => 'b) => t<'b> = "map" +let mapi = (arg1, obj) => mapi(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** The `reduce()` function takes three parameters: a *reducer function*, a beginning accumulator value, and an array. The reducer function has two @@ -902,9 +930,10 @@ Js.Array.reduce( Js.Array.reduce((acc, item) => item /. acc, 1.0, [2.0, 4.0]) == 2.0 // 4.0 / (2.0 / 1.0) ``` */ -external reduce: (@uncurry ('b, 'a) => 'b, 'b) => 'b = "reduce" +@send +external reduce: (t<'a>, @uncurry ('b, 'a) => 'b, 'b) => 'b = "reduce" +let reduce = (arg1, arg2, obj) => reduce(obj, arg1, arg2) -@bs.send.pipe(: t<'a> as 'this) /** The `reducei()` function takes three parameters: a *reducer function*, a beginning accumulator value, and an array. The reducer function has three @@ -937,9 +966,10 @@ let sumOfEvens = (accumulator, item, index) => Js.Array.reducei(sumOfEvens, 0, [2, 5, 1, 4, 3]) == 6 ``` */ -external reducei: (@uncurry ('b, 'a, int) => 'b, 'b) => 'b = "reduce" +@send +external reducei: (t<'a>, @uncurry ('b, 'a, int) => 'b, 'b) => 'b = "reduce" +let reducei = (arg1, arg2, obj) => reducei(obj, arg1, arg2) -@bs.send.pipe(: t<'a> as 'this) /** The `reduceRight()` function takes three parameters: a *reducer function*, a beginning accumulator value, and an array. The reducer function has two @@ -967,9 +997,10 @@ Js.Array.reduceRight(sumOfSquares, 0, [10, 2, 4]) == 120 Js.Array.reduceRight((acc, item) => item /. acc, 1.0, [2.0, 4.0]) == 0.5 // 2.0 / (4.0 / 1.0) ``` */ -external reduceRight: (@uncurry ('b, 'a) => 'b, 'b) => 'b = "reduceRight" +@send +external reduceRight: (t<'a>, @uncurry ('b, 'a) => 'b, 'b) => 'b = "reduceRight" +let reduceRight = (arg1, arg2, obj) => reduceRight(obj, arg1, arg2) -@bs.send.pipe(: t<'a> as 'this) /** The `reduceRighti()` function takes three parameters: a *reducer function*, a beginning accumulator value, and an array. The reducer function has three @@ -1004,9 +1035,10 @@ let sumOfEvens = (accumulator, item, index) => Js.Array.reduceRighti(sumOfEvens, 0, [2, 5, 1, 4, 3]) == 6 ``` */ -external reduceRighti: (@uncurry ('b, 'a, int) => 'b, 'b) => 'b = "reduceRight" +@send +external reduceRighti: (t<'a>, @uncurry ('b, 'a, int) => 'b, 'b) => 'b = "reduceRight" +let reduceRighti = (arg1, arg2, obj) => reduceRighti(obj, arg1, arg2) -@bs.send.pipe(: t<'a> as 'this) /** Returns `true` if the predicate function given as the first argument to `some()` returns `true` for any element in the array; `false` otherwise. @@ -1020,9 +1052,10 @@ Js.Array.some(isEven, [3, 7, 5, 2, 9]) == true Js.Array.some(isEven, [3, 7, 5, 1, 9]) == false ``` */ -external some: (@uncurry ('a => bool)) => bool = "some" +@send +external some: (t<'a>, @uncurry ('a => bool)) => bool = "some" +let some = (arg1, obj) => some(obj, arg1) -@bs.send.pipe(: t<'a> as 'this) /** Returns `true` if the predicate function given as the first argument to `somei()` returns `true` for any element in the array; `false` otherwise. The @@ -1043,11 +1076,10 @@ Js.Array.somei(sameLength, ["ab", "cd", "ef", "gh"]) == true Js.Array.somei(sameLength, ["a", "bc", "def", "gh"]) == false ``` */ -external somei: (@uncurry ('a, int) => bool) => bool = "some" +@send +external somei: (t<'a>, @uncurry ('a, int) => bool) => bool = "some" +let somei = (arg1, obj) => somei(obj, arg1) -/* commented out until bs has a plan for iterators - external values : 'a array_iter = "" [@@bs.send.pipe: 'a t as 'this] (* ES2015 *) -*/ /** Returns the value at the given position in the array if the position is in bounds; returns the JavaScript value `undefined` otherwise. diff --git a/jscomp/others/js_promise.res b/jscomp/others/js_promise.res index fa37dbe496..cbe663caef 100644 --- a/jscomp/others/js_promise.res +++ b/jscomp/others/js_promise.res @@ -83,10 +83,13 @@ external all6: ( @val @scope("Promise") external race: array> => promise<'a> = "race" -@bs.send.pipe(: promise<'a>) external then_: (@uncurry ('a => promise<'b>)) => promise<'b> = "then" +@send external then_: (promise<'a>, @uncurry ('a => promise<'b>)) => promise<'b> = "then" +let then_ = (arg1, obj) => then_(obj, arg1) -@bs.send.pipe(: promise<'a>) -external catch: (@uncurry (error => promise<'a>)) => promise<'a> = "catch" + +@send +external catch: (promise<'a>, @uncurry (error => promise<'a>)) => promise<'a> = "catch" +let catch = (arg1, obj) => catch(obj, arg1) /* ` p|> catch handler` Note in JS the returned promise type is actually runtime dependent, if promise is rejected, it will pick the `handler` otherwise the original promise, diff --git a/jscomp/others/js_string.res b/jscomp/others/js_string.res index 938c962d55..70f1385166 100644 --- a/jscomp/others/js_string.res +++ b/jscomp/others/js_string.res @@ -139,7 +139,6 @@ Js.String2.get(`Rẽasöń`, 5) == `ń` */ external get: (t, int) => t = "" -@bs.send.pipe(: t) /** `charAt(n, s)` gets the character at index `n` within string `s`. If `n` is negative or greater than the length of `s`, it returns the empty string. If the @@ -157,9 +156,10 @@ Js.String.charAt(12, "Reason") == "" Js.String.charAt(5, `Rẽasöń`) == `ń` ``` */ -external charAt: int => t = "charAt" +@send +external charAt: (t, int) => t = "charAt" +let charAt = (arg1, obj) => charAt(obj, arg1) -@bs.send.pipe(: t) /** `charCodeAt(n, s)` returns the character code at position `n` in string `s`; the result is in the range 0-65535, unlke `codePointAt`, so it will not work @@ -177,9 +177,10 @@ Js.String.charCodeAt(0, `😺`) == 0xd83d->Belt.Int.toFloat Js.String.codePointAt(0, `😺`) == Some(0x1f63a) ``` */ -external charCodeAt: int => float = "charCodeAt" +@send +external charCodeAt: (t, int) => float = "charCodeAt" +let charCodeAt = (arg1, obj) => charCodeAt(obj, arg1) -@bs.send.pipe(: t) /** `codePointAt(n, s)` returns the code point at position `n` within string `s` as a `Some(value)`. The return value handles code points greater than or equal to @@ -196,9 +197,10 @@ Js.String.codePointAt(1, `¿😺?`) == Some(0x1f63a) Js.String.codePointAt(5, "abc") == None ``` */ -external codePointAt: int => option = "codePointAt" +@send +external codePointAt: (t, int) => option = "codePointAt" +let codePointAt = (arg1, obj) => codePointAt(obj, arg1) -@bs.send.pipe(: t) /** `concat(append, original)` returns a new `string` with `append` added after `original`. @@ -212,10 +214,10 @@ on MDN. Js.String.concat("bell", "cow") == "cowbell" ``` */ -external concat: t => t = "concat" +@send +external concat: (t, t) => t = "concat" +let concat = (arg1, obj) => concat(obj, arg1) -@bs.send.pipe(: t) -@variadic /** `concat(arr, original)` returns a new `string` consisting of each item of an array of strings added to the `original` string. @@ -229,9 +231,11 @@ on MDN. Js.String.concatMany(["2nd", "3rd", "4th"], "1st") == "1st2nd3rd4th" ``` */ -external concatMany: array => t = "concat" +@send +@variadic +external concatMany: (t, array) => t = "concat" +let concatMany = (arg1, obj) => concatMany(obj, arg1) -@bs.send.pipe(: t) /** ES2015: `endsWith(substr, str)` returns `true` if the `str` ends with `substr`, `false` otherwise. @@ -246,9 +250,10 @@ Js.String.endsWith("Script", "ReScript") == true Js.String.endsWith("Script", "C++") == false ``` */ -external endsWith: t => bool = "endsWith" +@send +external endsWith: (t, t) => bool = "endsWith" +let endsWith = (arg1, obj) => endsWith(obj, arg1) -@bs.send.pipe(: t) /** `endsWithFrom(ending, len, str)` returns `true` if the first len characters of `str` end with `ending`, `false` otherwise. If `len` is greater than or equal @@ -267,9 +272,10 @@ Js.String.endsWithFrom("cde", 99, "abcde") == true Js.String.endsWithFrom("ple", 7, "example.dat") == true ``` */ -external endsWithFrom: (t, int) => bool = "endsWith" +@send +external endsWithFrom: (t, t, int) => bool = "endsWith" +let endsWithFrom = (arg1, arg2, obj) => endsWithFrom(obj, arg1, arg2) -@bs.send.pipe(: t) /** ES2015: `includes(searchValue, str)` returns `true` if `searchValue` is found anywhere within `str`, false otherwise. @@ -286,9 +292,10 @@ Js.String.includes("pro", "programmer") == true Js.String.includes("xyz", "programmer.dat") == false ``` */ -external includes: t => bool = "includes" +@send +external includes: (t, t) => bool = "includes" +let includes = (arg1, obj) => includes(obj, arg1) -@bs.send.pipe(: t) /** ES2015: `includes(searchValue start, str)` returns `true` if `searchValue` is found anywhere within `str` starting at character number `start` (where 0 is @@ -305,9 +312,10 @@ Js.String.includesFrom("gram", 4, "programmer") == false Js.String.includesFrom(`한`, 1, `대한민국`) == true ``` */ -external includesFrom: (t, int) => bool = "includes" +@send +external includesFrom: (t, t, int) => bool = "includes" +let includesFrom = (arg1, arg2, obj) => includesFrom(obj, arg1, arg2) -@bs.send.pipe(: t) /** ES2015: `indexOf(searchValue, str)` returns the position at which `searchValue` was first found within `str`, or -1 if `searchValue` is not in `str`. @@ -324,9 +332,10 @@ Js.String.indexOf("ee", "beekeeper") == 1 Js.String.indexOf("xyz", "bookseller") == -1 ``` */ -external indexOf: t => int = "indexOf" +@send +external indexOf: (t, t) => int = "indexOf" +let indexOf = (arg1, obj) => indexOf(obj, arg1) -@bs.send.pipe(: t) /** `indexOfFrom(searchValue, start, str)` returns the position at which `searchValue` was found within `str` starting at character position `start`, or @@ -345,9 +354,10 @@ Js.String.indexOfFrom("sell", 2, "bookseller") == 4 Js.String.indexOfFrom("sell", 5, "bookseller") == -1 ``` */ -external indexOfFrom: (t, int) => int = "indexOf" +@send +external indexOfFrom: (t, t, int) => int = "indexOf" +let indexOfFrom = (arg1, arg2, obj) => indexOfFrom(obj, arg1, arg2) -@bs.send.pipe(: t) /** `lastIndexOf(searchValue, str)` returns the position of the last occurrence of `searchValue` within `str`, searching backwards from the end of the string. @@ -365,9 +375,10 @@ Js.String.lastIndexOf("ee", "beekeeper") == 4 Js.String.lastIndexOf("xyz", "abcdefg") == -1 ``` */ -external lastIndexOf: t => int = "lastIndexOf" +@send +external lastIndexOf: (t, t) => int = "lastIndexOf" +let lastIndexOf = (arg1, obj) => lastIndexOf(obj, arg1) -@bs.send.pipe(: t) /** `lastIndexOfFrom(searchValue, start, str)` returns the position of the last occurrence of `searchValue` within `str`, searching backwards from the given @@ -386,11 +397,12 @@ Js.String.lastIndexOfFrom("ee", 3, "beekeeper") == 1 Js.String.lastIndexOfFrom("xyz", 4, "abcdefg") == -1 ``` */ -external lastIndexOfFrom: (t, int) => int = "lastIndexOf" +@send +external lastIndexOfFrom: (t, t, int) => int = "lastIndexOf" +let lastIndexOfFrom = (arg1, arg2, obj) => lastIndexOfFrom(obj, arg1, arg2) /* extended by ECMA-402 */ -@bs.send.pipe(: t) /** `localeCompare(comparison, reference)` returns - a negative value if reference comes before comparison in sort order @@ -408,10 +420,10 @@ Js.String.localeCompare("cat", "cat") == 0.0 Js.String.localeCompare("cat", "CAT") > 0.0 ``` */ -external localeCompare: t => float = "localeCompare" +@send +external localeCompare: (t, t) => float = "localeCompare" +let localeCompare = (arg1, obj) => localeCompare(obj, arg1) -@bs.send.pipe(: t) -@return({null_to_opt: null_to_opt}) /** `match(regexp, str)` matches a `string` against the given `regexp`. If there is no match, it returns `None`. For regular expressions without the g modifier, if @@ -435,9 +447,11 @@ Js.String.match_(%re("/(\d+)-(\d+)-(\d+)/"), "Today is 2018-04-05.") == Js.String.match_(%re("/b[aeiou]g/"), "The large container.") == None ``` */ -external match_: Js_re.t => option>> = "match" +@send +@return(null_to_opt) +external match_: (t, Js_re.t) => option>> = "match" +let match_ = (arg1, obj) => match_(obj, arg1) -@bs.send.pipe(: t) /** `normalize(str)` returns the normalized Unicode string using Normalization Form Canonical (NFC) Composition. Consider the character ã, which can be represented @@ -451,9 +465,9 @@ on MDN. See also [Unicode technical report #15](https://unicode.org/reports/tr15/) for details. */ -external normalize: t = "normalize" +@send +external normalize: t => t = "normalize" -@bs.send.pipe(: t) /** ES2015: `normalize(form, str)` returns the normalized Unicode string using the specified form of normalization, which may be one of: - "NFC" — Normalization Form Canonical Composition. @@ -465,9 +479,10 @@ See [`String.normalize`](https://developer.mozilla.org/en-US/docs/Web/JavaScript See also [Unicode technical report #15](https://unicode.org/reports/tr15/) for details. */ -external normalizeByForm: t => t = "normalize" +@send +external normalizeByForm: (t, t) => t = "normalize" +let normalizeByForm = (arg1, obj) => normalizeByForm(obj, arg1) -@bs.send.pipe(: t) /** `repeat(n, str)` returns a `string` that consists of `n` repetitions of `str`. Raises `RangeError` if `n` is negative. @@ -482,9 +497,10 @@ Js.String.repeat(3, "ha") == "hahaha" Js.String.repeat(0, "empty") == "" ``` */ -external repeat: int => t = "repeat" +@send +external repeat: (t, int) => t = "repeat" +let repeat = (arg1, obj) => repeat(obj, arg1) -@bs.send.pipe(: t) /** ES2015: `replace(substr, newSubstr, str)` returns a new `string` which is identical to `str` except with the first matching instance of `substr` replaced @@ -501,9 +517,10 @@ Js.String.replace("old", "new", "old string") == "new string" Js.String.replace("the", "this", "the cat and the dog") == "this cat and the dog" ``` */ -external replace: (t, t) => t = "replace" +@send +external replace: (t, t, t) => t = "replace" +let replace = (arg1, arg2, obj) => replace(obj, arg1, arg2) -@bs.send.pipe(: t) /** `replaceByRe(regex, replacement, str)` returns a new `string` where occurrences matching regex have been replaced by `replacement`. @@ -518,9 +535,10 @@ Js.String.replaceByRe(%re("/[aeiou]/g"), "x", "vowels be gone") == "vxwxls bx gx Js.String.replaceByRe(%re("/(\w+) (\w+)/"), "$2, $1", "Juan Fulano") == "Fulano, Juan" ``` */ -external replaceByRe: (Js_re.t, t) => t = "replace" +@send +external replaceByRe: (t, Js_re.t, t) => t = "replace" +let replaceByRe = (arg1, arg2, obj) => replaceByRe(obj, arg1, arg2) -@bs.send.pipe(: t) /** Returns a new `string` with some or all matches of a pattern with no capturing parentheses replaced by the value returned from the given function. The @@ -540,9 +558,10 @@ let matchFn = (matchPart, _offset, _wholeString) => Js.String.toUpperCase(matchP Js.String.unsafeReplaceBy0(re, matchFn, str) == "bEAUtIfUl vOwEls" ``` */ -external unsafeReplaceBy0: (Js_re.t, @uncurry (t, int, t) => t) => t = "replace" +@send +external unsafeReplaceBy0: (t, Js_re.t, @uncurry (t, int, t) => t) => t = "replace" +let unsafeReplaceBy0 = (arg1, arg2, obj) => unsafeReplaceBy0(obj, arg1, arg2) -@bs.send.pipe(: t) /** Returns a new `string` with some or all matches of a pattern with one set of capturing parentheses replaced by the value returned from the given function. @@ -565,9 +584,10 @@ let matchFn = (_match, part1, _offset, _wholeString) => { Js.String.unsafeReplaceBy1(re, matchFn, str) == "Jony is 41" ``` */ -external unsafeReplaceBy1: (Js_re.t, @uncurry (t, t, int, t) => t) => t = "replace" +@send +external unsafeReplaceBy1: (t, Js_re.t, @uncurry (t, t, int, t) => t) => t = "replace" +let unsafeReplaceBy1 = (arg1, arg2, obj) => unsafeReplaceBy1(obj, arg1, arg2) -@bs.send.pipe(: t) /** Returns a new `string` with some or all matches of a pattern with two sets of capturing parentheses replaced by the value returned from the given function. @@ -593,9 +613,10 @@ let matchFn = (_match, p1, p2, _offset, _wholeString) => { Js.String.unsafeReplaceBy2(re, matchFn, str) == "42" ``` */ -external unsafeReplaceBy2: (Js_re.t, @uncurry (t, t, t, int, t) => t) => t = "replace" +@send +external unsafeReplaceBy2: (t, Js_re.t, @uncurry (t, t, t, int, t) => t) => t = "replace" +let unsafeReplaceBy2 = (arg1, arg2, obj) => unsafeReplaceBy2(obj, arg1, arg2) -@bs.send.pipe(: t) /** Returns a new `string` with some or all matches of a pattern with three sets of capturing parentheses replaced by the value returned from the given function. @@ -606,9 +627,10 @@ matched. See [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) on MDN. */ -external unsafeReplaceBy3: (Js_re.t, @uncurry (t, t, t, t, int, t) => t) => t = "replace" +@send +external unsafeReplaceBy3: (t, Js_re.t, @uncurry (t, t, t, t, int, t) => t) => t = "replace" +let unsafeReplaceBy3 = (arg1, arg2, obj) => unsafeReplaceBy3(obj, arg1, arg2) -@bs.send.pipe(: t) /** `search(regexp, str)` returns the starting position of the first match of `regexp` in the given `str`, or -1 if there is no match. @@ -623,9 +645,10 @@ Js.String.search(%re("/\d+/"), "testing 1 2 3") == 8 Js.String.search(%re("/\d+/"), "no numbers") == -1 ``` */ -external search: Js_re.t => int = "search" +@send +external search: (t, Js_re.t) => int = "search" +let search = (arg1, obj) => search(obj, arg1) -@bs.send.pipe(: t) /** `slice(from:n1, to_:n2, str)` returns the substring of `str` starting at character `n1` up to but not including `n2`. @@ -644,9 +667,10 @@ Js.String.slice(~from=-4, ~to_=-2, "abcdefg") == "de" Js.String.slice(~from=5, ~to_=1, "abcdefg") == "" ``` */ -external slice: (~from: int, ~to_: int) => t = "slice" +@send +external slice: (t, ~from: int, ~to_: int) => t = "slice" +let slice = (~from, ~to_, obj) => slice(obj, ~from, ~to_) -@bs.send.pipe(: t) /** `sliceToEnd(str, from:n)` returns the substring of `str` starting at character `n` to the end of the string. @@ -663,9 +687,10 @@ Js.String.sliceToEnd(~from=-2, "abcdefg") == "fg" Js.String.sliceToEnd(~from=7, "abcdefg") == "" ``` */ -external sliceToEnd: (~from: int) => t = "slice" +@send +external sliceToEnd: (t, ~from: int) => t = "slice" +let sliceToEnd = (~from, obj) => sliceToEnd(obj, ~from) -@bs.send.pipe(: t) /** `split(delimiter, str)` splits the given `str` at every occurrence of `delimiter` and returns an array of the resulting substrings. @@ -682,9 +707,10 @@ Js.String.split("::", "good::bad as great::awful") == ["good", "bad as great", " Js.String.split(";", "has-no-delimiter") == ["has-no-delimiter"] ``` */ -external split: t => array = "split" +@send +external split: (t, t) => array = "split" +let split = (arg1, obj) => split(obj, arg1) -@bs.send.pipe(: t) /** `splitAtMost(delimiter, ~limit:n, str)` splits the given `str` at every occurrence of `delimiter` and returns an array of the first `n` resulting @@ -702,9 +728,10 @@ Js.String.splitAtMost("/", ~limit=0, "ant/bee/cat/dog/elk") == [] Js.String.splitAtMost("/", ~limit=9, "ant/bee/cat/dog/elk") == ["ant", "bee", "cat", "dog", "elk"] ``` */ -external splitAtMost: (t, ~limit: int) => array = "split" +@send +external splitAtMost: (t, t, ~limit: int) => array = "split" +let splitAtMost = (arg1, ~limit, obj) => splitAtMost(obj, ~limit, arg1) -@bs.send.pipe(: t) /** `splitByRe(regex, str)` splits the given `str` at every occurrence of `regex` and returns an array of the resulting substrings. @@ -723,9 +750,10 @@ Js.String.splitByRe(%re("/\s*[,;]\s*TODO/"), "art; bed , cog ;dad") == [ ] ``` */ -external splitByRe: Js_re.t => array> = "split" +@send +external splitByRe: (t, Js_re.t) => array> = "split" +let splitByRe = (arg1, obj) => splitByRe(obj, arg1) -@bs.send.pipe(: t) /** `splitByReAtMost(regex, ~limit:n, str)` splits the given `str` at every occurrence of `regex` and returns an array of the first `n` resulting @@ -754,9 +782,10 @@ Js.String.splitByReAtMost(%re("/\s*[,;]\s*TODO/"), ~limit=8, "one: two: three: f ] ``` */ -external splitByReAtMost: (Js_re.t, ~limit: int) => array> = "split" +@send +external splitByReAtMost: (t, Js_re.t, ~limit: int) => array> = "split" +let splitByReAtMost = (arg1, ~limit, obj) => splitByReAtMost(obj, arg1, ~limit) -@bs.send.pipe(: t) /** ES2015: `startsWith(substr, str)` returns `true` if the `str` starts with `substr`, `false` otherwise. @@ -772,9 +801,10 @@ Js.String.startsWith("", "ReScript") == true Js.String.startsWith("Re", "JavaScript") == false ``` */ -external startsWith: t => bool = "startsWith" +@send +external startsWith: (t, t) => bool = "startsWith" +let startsWith = (arg1, obj) => startsWith(obj, arg1) -@bs.send.pipe(: t) /** ES2015: `startsWithFrom(substr, n, str)` returns `true` if the `str` starts with `substr` starting at position `n`, false otherwise. If `n` is negative, @@ -791,9 +821,10 @@ Js.String.startsWithFrom("", 2, "ReScript") == true Js.String.startsWithFrom("Scri", 2, "JavaScript") == false ``` */ -external startsWithFrom: (t, int) => bool = "startsWith" +@send +external startsWithFrom: (t, t, int) => bool = "startsWith" +let startsWithFrom = (arg1, arg2, obj) => startsWithFrom(obj, arg1, arg2) -@bs.send.pipe(: t) /** `substr(~from:n, str)` returns the substring of `str` from position `n` to the end of the string. @@ -814,9 +845,10 @@ Js.String.substr(~from=-3, "abcdefghij") == "hij" Js.String.substr(~from=12, "abcdefghij") == "" ``` */ -external substr: (~from: int) => t = "substr" +@send +external substr: (t, ~from: int) => t = "substr" +let substr = (~from, obj) => substr(obj, ~from) -@bs.send.pipe(: t) /** `substrAtMost(~from: pos, ~length: n, str)` returns the substring of `str` of length `n` starting at position `pos`. @@ -838,9 +870,10 @@ Js.String.substrAtMost(~from=-3, ~length=4, "abcdefghij") == "hij" Js.String.substrAtMost(~from=12, ~length=2, "abcdefghij") == "" ``` */ -external substrAtMost: (~from: int, ~length: int) => t = "substr" +@send +external substrAtMost: (t, ~from: int, ~length: int) => t = "substr" +let substrAtMost = (~from, ~length, obj) => substrAtMost(obj, ~from, ~length) -@bs.send.pipe(: t) /** `substring(~from: start, ~to_: finish, str)` returns characters `start` up to but not including finish from `str`. @@ -858,9 +891,10 @@ Js.String.substring(~from=6, ~to_=3, "playground") == "ygr" Js.String.substring(~from=4, ~to_=12, "playground") == "ground" ``` */ -external substring: (~from: int, ~to_: int) => t = "substring" +@send +external substring: (t, ~from: int, ~to_: int) => t = "substring" +let substring = (~from, ~to_, obj) => substring(obj, ~from, ~to_) -@bs.send.pipe(: t) /** `substringToEnd(~from: start, str)` returns the substring of `str` from position `start` to the end. @@ -877,9 +911,10 @@ Js.String.substringToEnd(~from=-3, "playground") == "playground" Js.String.substringToEnd(~from=12, "playground") == "" ``` */ -external substringToEnd: (~from: int) => t = "substring" +@send +external substringToEnd: (t, ~from: int) => t = "substring" +let substringToEnd = (~from, obj) => substringToEnd(obj, ~from) -@bs.send.pipe(: t) /** `toLowerCase(str)` converts `str` to lower case using the locale-insensitive case mappings in the Unicode Character Database. Notice that the conversion can @@ -898,18 +933,18 @@ Js.String.toLowerCase(`ΣΠ`) == `σπ` Js.String.toLowerCase(`ΠΣ`) == `πς` ``` */ -external toLowerCase: t = "toLowerCase" +@send +external toLowerCase: t => t = "toLowerCase" -@bs.send.pipe(: t) /** `toLocaleLowerCase(str)` converts `str` to lower case using the current locale. See [`String.toLocaleLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase) on MDN. */ -external toLocaleLowerCase: t = "toLocaleLowerCase" +@send +external toLocaleLowerCase: t => t = "toLocaleLowerCase" -@bs.send.pipe(: t) /** `toUpperCase(str)` converts `str` to upper case using the locale-insensitive case mappings in the Unicode Character Database. Notice that the conversion can @@ -927,18 +962,18 @@ Js.String.toUpperCase(`Straße`) == `STRASSE` Js.String.toUpperCase(`πς`) == `ΠΣ` ``` */ -external toUpperCase: t = "toUpperCase" +@send +external toUpperCase: t => t = "toUpperCase" -@bs.send.pipe(: t) /** `toLocaleUpperCase(str)` converts `str` to upper case using the current locale. See [`String.to:LocaleUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase) on MDN. */ -external toLocaleUpperCase: t = "toLocaleUpperCase" +@send +external toLocaleUpperCase: t => t = "toLocaleUpperCase" -@bs.send.pipe(: t) /** `trim(str)` returns a string that is `str` with whitespace stripped from both ends. Internal whitespace is not removed. @@ -953,11 +988,11 @@ Js.String.trim(" abc def ") == "abc def" Js.String.trim("\n\r\t abc def \n\n\t\r ") == "abc def" ``` */ -external trim: t = "trim" +@send +external trim: t => t = "trim" /* HTML wrappers */ -@bs.send.pipe(: t) /** `anchor(anchorName, anchorText)` creates a string with an HTML `` element with name attribute of `anchorName` and `anchorText` as its content. Please do @@ -972,9 +1007,10 @@ on MDN. Js.String.anchor("page1", "Page One") == "Page One" ``` */ -external anchor: t => t = "anchor" +@send +external anchor: (t, t) => t = "anchor" +let anchor = (arg1, obj) => anchor(obj, arg1) -@bs.send.pipe(: t) /** ES2015: `link(urlText, linkText)` creates a string with an HTML `` element with href attribute of `urlText` and `linkText` as its content. Please do not @@ -989,7 +1025,9 @@ on MDN. Js.String.link("page2.html", "Go to page two") == "Go to page two" ``` */ -external link: t => t = "link" +@send +external link: (t, t) => t = "link" +let link = (arg1, obj) => link(obj, arg1) /** Casts its argument to an `array_like` entity that can be processed by functions diff --git a/jscomp/others/js_typed_array.res b/jscomp/others/js_typed_array.res deleted file mode 100644 index bd0728fb68..0000000000 --- a/jscomp/others/js_typed_array.res +++ /dev/null @@ -1,1353 +0,0 @@ -/* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/*** -JavaScript Typed Array API - -**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) -*/ - -@@warning("-103") - -type array_buffer = Js_typed_array2.array_buffer -type array_like<'a> = Js_typed_array2.array_like<'a> - -module type Type = { - type t -} -module ArrayBuffer = { - /*** - The underlying buffer that the typed arrays provide views of - - **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) - */ - - type t = array_buffer - - @new /** takes length. initializes elements to 0 */ - external make: int => t = "ArrayBuffer" - - /* ArrayBuffer.isView: seems pointless with a type system */ - /* experimental - external transfer : array_buffer -> t = "ArrayBuffer.transfer" [@@val] - external transferWithLength : array_buffer -> int -> t = "ArrayBuffer.transfer" [@@val] - */ - - @get external byteLength: t => int = "byteLength" - - @bs.send.pipe(: t) external slice: (~start: int, ~end_: int) => array_buffer = "slice" /* FIXME */ - @bs.send.pipe(: t) external sliceFrom: int => array_buffer = "slice" -} -module type S = { - /*** Implements functionality common to all the typed arrays */ - - type elt - type typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) - * --- - */ - @get external length: t => int = "length" - - /* Mutator functions - */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions - */ - @bs.send.pipe(: t) /** ES2016 */ - external includes: elt => bool = "includes" - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) external slice: (~start: int, ~end_: int) => t = "slice" - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) external subarray: (~start: int, ~end_: int) => t = "subarray" - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions - */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - /** should we use `bool` or `boolean` seems they are intechangeable here */ - @bs.send.pipe(: t) - external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - /* commented out until bs has a plan for iterators - external values : elt array_iter = "" [@@bs.send.pipe: t] - */ -} - -/* commented out until bs has a plan for iterators - external values : elt array_iter = "" [@@bs.send.pipe: t] - */ - -module Int8Array = { - /** */ - type elt = int - type typed_array<'a> = Js_typed_array2.Int8Array.typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) */ - @get external length: t => int = "length" - - /* Mutator functions */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions */ - @bs.send.pipe(: t) external includes: elt => bool = "includes" /* ES2016 */ - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external slice: (~start: int, ~end_: int) => t = "slice" - - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external subarray: (~start: int, ~end_: int) => t = "subarray" - - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - @bs.send.pipe(: t) external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - @val external _BYTES_PER_ELEMENT: int = "Int8Array.BYTES_PER_ELEMENT" - - @new external make: array => t = "Int8Array" - @new /** can throw */ - external fromBuffer: array_buffer => t = "Int8Array" - - /** - raise Js.Exn.Error raise Js exception - - param offset is in bytes - */ - @new - external fromBufferOffset: (array_buffer, int) => t = "Int8Array" - - @new - /** - raise Js.Exn.Error raises Js exception - - param offset is in bytes, length in elements - */ - external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "Int8Array" - - @new external fromLength: int => t = "Int8Array" - @val external from: array_like => t = "Int8Array.from" - /* *Array.of is redundant, use make */ -} - -module Uint8Array = { - /** */ - type elt = int - type typed_array<'a> = Js_typed_array2.Uint8Array.typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) */ - @get external length: t => int = "length" - - /* Mutator functions */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions */ - @bs.send.pipe(: t) external includes: elt => bool = "includes" /* ES2016 */ - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external slice: (~start: int, ~end_: int) => t = "slice" - - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external subarray: (~start: int, ~end_: int) => t = "subarray" - - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - @bs.send.pipe(: t) external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - @val external _BYTES_PER_ELEMENT: int = "Uint8Array.BYTES_PER_ELEMENT" - - @new external make: array => t = "Uint8Array" - @new /** can throw */ - external fromBuffer: array_buffer => t = "Uint8Array" - - @new - /** - **raise** Js.Exn.Error raise Js exception - - **param** offset is in bytes - */ - external fromBufferOffset: (array_buffer, int) => t = "Uint8Array" - - @new - /** - **raise** Js.Exn.Error raises Js exception - - **param** offset is in bytes, length in elements - */ - external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "Uint8Array" - - @new external fromLength: int => t = "Uint8Array" - @val external from: array_like => t = "Uint8Array.from" - /* *Array.of is redundant, use make */ -} - -module Uint8ClampedArray = { - /** */ - type elt = int - type typed_array<'a> = Js_typed_array2.Uint8ClampedArray.typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) */ - @get external length: t => int = "length" - - /* Mutator functions */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions */ - @bs.send.pipe(: t) external includes: elt => bool = "includes" /* ES2016 */ - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external slice: (~start: int, ~end_: int) => t = "slice" - - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external subarray: (~start: int, ~end_: int) => t = "subarray" - - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - @bs.send.pipe(: t) external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - @val external _BYTES_PER_ELEMENT: int = "Uint8ClampedArray.BYTES_PER_ELEMENT" - - @new external make: array => t = "Uint8ClampedArray" - @new /** can throw */ - external fromBuffer: array_buffer => t = "Uint8ClampedArray" - - /** - **raise** Js.Exn.Error raise Js exception - - **param** offset is in bytes - */ - @new - external fromBufferOffset: (array_buffer, int) => t = "Uint8ClampedArray" - - @new - /** - **raise** Js.Exn.Error raises Js exception - - **param** offset is in bytes, length in elements - */ - external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "Uint8ClampedArray" - - @new external fromLength: int => t = "Uint8ClampedArray" - @val external from: array_like => t = "Uint8ClampedArray.from" - /* *Array.of is redundant, use make */ -} - -module Int16Array = { - /** */ - type elt = int - type typed_array<'a> = Js_typed_array2.Int16Array.typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) */ - @get external length: t => int = "length" - - /* Mutator functions */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions */ - @bs.send.pipe(: t) external includes: elt => bool = "includes" /* ES2016 */ - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external slice: (~start: int, ~end_: int) => t = "slice" - - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external subarray: (~start: int, ~end_: int) => t = "subarray" - - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - @bs.send.pipe(: t) external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - @val external _BYTES_PER_ELEMENT: int = "Int16Array.BYTES_PER_ELEMENT" - - @new external make: array => t = "Int16Array" - @new /** can throw */ - external fromBuffer: array_buffer => t = "Int16Array" - - @new - /** - **raise** Js.Exn.Error raise Js exception - - **param** offset is in bytes - */ - external fromBufferOffset: (array_buffer, int) => t = "Int16Array" - - @new - /** - **raise** Js.Exn.Error raises Js exception - - **param** offset is in bytes, length in elements - */ - external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "Int16Array" - - @new external fromLength: int => t = "Int16Array" - @val external from: array_like => t = "Int16Array.from" - /* *Array.of is redundant, use make */ -} - -module Uint16Array = { - /** */ - type elt = int - type typed_array<'a> = Js_typed_array2.Uint16Array.typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) */ - @get external length: t => int = "length" - - /* Mutator functions */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions */ - @bs.send.pipe(: t) external includes: elt => bool = "includes" /* ES2016 */ - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external slice: (~start: int, ~end_: int) => t = "slice" - - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external subarray: (~start: int, ~end_: int) => t = "subarray" - - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - @bs.send.pipe(: t) external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - @val external _BYTES_PER_ELEMENT: int = "Uint16Array.BYTES_PER_ELEMENT" - - @new external make: array => t = "Uint16Array" - @new /** can throw */ - external fromBuffer: array_buffer => t = "Uint16Array" - - @new - /** - **raise** Js.Exn.Error raise Js exception - - **param** offset is in bytes - */ - external fromBufferOffset: (array_buffer, int) => t = "Uint16Array" - - @new - /** - **raise** Js.Exn.Error raises Js exception - - **param** offset is in bytes, length in elements - */ - external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "Uint16Array" - - @new external fromLength: int => t = "Uint16Array" - @val external from: array_like => t = "Uint16Array.from" - /* *Array.of is redundant, use make */ -} - -module Int32Array = { - /** */ - type elt = int - type typed_array<'a> = Js_typed_array2.Int32Array.typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) */ - @get external length: t => int = "length" - - /* Mutator functions */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions */ - @bs.send.pipe(: t) external includes: elt => bool = "includes" /* ES2016 */ - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external slice: (~start: int, ~end_: int) => t = "slice" - - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external subarray: (~start: int, ~end_: int) => t = "subarray" - - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - @bs.send.pipe(: t) external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - @val external _BYTES_PER_ELEMENT: int = "Int32Array.BYTES_PER_ELEMENT" - - @new external make: array => t = "Int32Array" - @new /** can throw */ - external fromBuffer: array_buffer => t = "Int32Array" - - @new - /** - **raise** Js.Exn.Error raise Js exception - - **param** offset is in bytes - */ - external fromBufferOffset: (array_buffer, int) => t = "Int32Array" - - @new - /** - **raise** Js.Exn.Error raises Js exception - - **param** offset is in bytes, length in elements - */ - external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "Int32Array" - - @new external fromLength: int => t = "Int32Array" - @val external from: array_like => t = "Int32Array.from" - /* *Array.of is redundant, use make */ - @new @deprecated("use `make` instead") external create: array => t = "Int32Array" - @new @deprecated("use `fromBuffer` instead") external of_buffer: array_buffer => t = "Int32Array" -} -module Int32_array = Int32Array - -module Uint32Array = { - /** */ - type elt = int - type typed_array<'a> = Js_typed_array2.Uint32Array.typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) */ - @get external length: t => int = "length" - - /* Mutator functions */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions */ - @bs.send.pipe(: t) external includes: elt => bool = "includes" /* ES2016 */ - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external slice: (~start: int, ~end_: int) => t = "slice" - - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external subarray: (~start: int, ~end_: int) => t = "subarray" - - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - @bs.send.pipe(: t) external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - @val external _BYTES_PER_ELEMENT: int = "Uint32Array.BYTES_PER_ELEMENT" - - @new external make: array => t = "Uint32Array" - @new /** can throw */ - external fromBuffer: array_buffer => t = "Uint32Array" - - @new - /** - **raise** Js.Exn.Error raise Js exception - - **param** offset is in bytes - */ - external fromBufferOffset: (array_buffer, int) => t = "Uint32Array" - - @new - /** - **raise** Js.Exn.Error raises Js exception - - **param** offset is in bytes, length in elements - */ - external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "Uint32Array" - - @new external fromLength: int => t = "Uint32Array" - @val external from: array_like => t = "Uint32Array.from" - /* *Array.of is redundant, use make */ -} - -/* - it still return number, `float` in this case -*/ -module Float32Array = { - /** */ - type elt = float - type typed_array<'a> = Js_typed_array2.Float32Array.typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) */ - @get external length: t => int = "length" - - /* Mutator functions */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions */ - @bs.send.pipe(: t) external includes: elt => bool = "includes" /* ES2016 */ - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external slice: (~start: int, ~end_: int) => t = "slice" - - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external subarray: (~start: int, ~end_: int) => t = "subarray" - - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - @bs.send.pipe(: t) external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - @val external _BYTES_PER_ELEMENT: int = "Float32Array.BYTES_PER_ELEMENT" - - @new external make: array => t = "Float32Array" - @new /** can throw */ - external fromBuffer: array_buffer => t = "Float32Array" - - @new - /** - **raise** Js.Exn.Error raise Js exception - - **param** offset is in bytes - */ - external fromBufferOffset: (array_buffer, int) => t = "Float32Array" - - @new - /** - **raise** Js.Exn.Error raises Js exception - - **param** offset is in bytes, length in elements - */ - external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "Float32Array" - - @new external fromLength: int => t = "Float32Array" - @val external from: array_like => t = "Float32Array.from" - /* *Array.of is redundant, use make */ - @new @deprecated("use `make` instead") external create: array => t = "Float32Array" - @new @deprecated("use `fromBuffer` instead") - external of_buffer: array_buffer => t = "Float32Array" -} -module Float32_array = Float32Array - -module Float64Array = { - /** */ - type elt = float - type typed_array<'a> = Js_typed_array2.Float64Array.typed_array<'a> - type t = typed_array - - @get_index external unsafe_get: (t, int) => elt = "" - @set_index external unsafe_set: (t, int, elt) => unit = "" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @bs.send.pipe(: t) external setArray: array => unit = "set" - @bs.send.pipe(: t) external setArrayOffset: (array, int) => unit = "set" - /* There's also an overload for typed arrays, but don't know how to model that without subtyping */ - - /* Array interface(-ish) */ - @get external length: t => int = "length" - - /* Mutator functions */ - @bs.send.pipe(: t) external copyWithin: (~to_: int) => t = "copyWithin" - @bs.send.pipe(: t) external copyWithinFrom: (~to_: int, ~from: int) => t = "copyWithin" - @bs.send.pipe(: t) - external copyWithinFromRange: (~to_: int, ~start: int, ~end_: int) => t = "copyWithin" - - @bs.send.pipe(: t) external fillInPlace: elt => t = "fill" - @bs.send.pipe(: t) external fillFromInPlace: (elt, ~from: int) => t = "fill" - @bs.send.pipe(: t) external fillRangeInPlace: (elt, ~start: int, ~end_: int) => t = "fill" - - @bs.send.pipe(: t) external reverseInPlace: t = "reverse" - - @bs.send.pipe(: t) external sortInPlace: t = "sort" - @bs.send.pipe(: t) external sortInPlaceWith: ((. elt, elt) => int) => t = "sort" - - /* Accessor functions */ - @bs.send.pipe(: t) external includes: elt => bool = "includes" /* ES2016 */ - - @bs.send.pipe(: t) external indexOf: elt => int = "indexOf" - @bs.send.pipe(: t) external indexOfFrom: (elt, ~from: int) => int = "indexOf" - - @bs.send.pipe(: t) external join: string = "join" - @bs.send.pipe(: t) external joinWith: string => string = "join" - - @bs.send.pipe(: t) external lastIndexOf: elt => int = "lastIndexOf" - @bs.send.pipe(: t) external lastIndexOfFrom: (elt, ~from: int) => int = "lastIndexOf" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external slice: (~start: int, ~end_: int) => t = "slice" - - @bs.send.pipe(: t) external copy: t = "slice" - @bs.send.pipe(: t) external sliceFrom: int => t = "slice" - - @bs.send.pipe(: t) /** `start` is inclusive, `end_` exclusive */ - external subarray: (~start: int, ~end_: int) => t = "subarray" - - @bs.send.pipe(: t) external subarrayFrom: int => t = "subarray" - - @bs.send.pipe(: t) external toString: string = "toString" - @bs.send.pipe(: t) external toLocaleString: string = "toLocaleString" - - /* Iteration functions */ - /* commented out until bs has a plan for iterators - external entries : (int * elt) array_iter = "" [@@bs.send.pipe: t] - */ - @bs.send.pipe(: t) external every: ((. elt) => bool) => bool = "every" - @bs.send.pipe(: t) external everyi: ((. elt, int) => bool) => bool = "every" - - @bs.send.pipe(: t) external filter: ((. elt) => bool) => t = "filter" - @bs.send.pipe(: t) external filteri: ((. elt, int) => bool) => t = "filter" - - @bs.send.pipe(: t) external find: ((. elt) => bool) => Js.undefined = "find" - @bs.send.pipe(: t) external findi: ((. elt, int) => bool) => Js.undefined = "find" - - @bs.send.pipe(: t) external findIndex: ((. elt) => bool) => int = "findIndex" - @bs.send.pipe(: t) external findIndexi: ((. elt, int) => bool) => int = "findIndex" - - @bs.send.pipe(: t) external forEach: ((. elt) => unit) => unit = "forEach" - @bs.send.pipe(: t) external forEachi: ((. elt, int) => unit) => unit = "forEach" - - /* commented out until bs has a plan for iterators - external keys : int array_iter = "" [@@bs.send.pipe: t] - */ - - @bs.send.pipe(: t) external map: ((. elt) => 'b) => typed_array<'b> = "map" - @bs.send.pipe(: t) external mapi: ((. elt, int) => 'b) => typed_array<'b> = "map" - - @bs.send.pipe(: t) external reduce: ((. 'b, elt) => 'b, 'b) => 'b = "reduce" - @bs.send.pipe(: t) external reducei: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduce" - - @bs.send.pipe(: t) external reduceRight: ((. 'b, elt) => 'b, 'b) => 'b = "reduceRight" - @bs.send.pipe(: t) external reduceRighti: ((. 'b, elt, int) => 'b, 'b) => 'b = "reduceRight" - - @bs.send.pipe(: t) external some: ((. elt) => bool) => bool = "some" - @bs.send.pipe(: t) external somei: ((. elt, int) => bool) => bool = "some" - - @val external _BYTES_PER_ELEMENT: int = "Float64Array.BYTES_PER_ELEMENT" - - @new external make: array => t = "Float64Array" - @new /** can throw */ - external fromBuffer: array_buffer => t = "Float64Array" - - @new - /** - **raise** Js.Exn.Error raise Js exception - - **param** offset is in bytes - */ - external fromBufferOffset: (array_buffer, int) => t = "Float64Array" - - @new - /** - **raise** Js.Exn.Error raises Js exception - - **param** offset is in bytes, length in elements - */ - external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "Float64Array" - - @new external fromLength: int => t = "Float64Array" - @val external from: array_like => t = "Float64Array.from" - /* *Array.of is redundant, use make */ - @new @deprecated("use `make` instead") external create: array => t = "Float64Array" - @new @deprecated("use `fromBuffer` instead") - external of_buffer: array_buffer => t = "Float64Array" -} -module Float64_array = Float64Array - -/** -The DataView view provides a low-level interface for reading and writing -multiple number types in an ArrayBuffer irrespective of the platform's endianness. - -**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) -*/ -module DataView = { - type t = Js_typed_array2.DataView.t - - @new external make: array_buffer => t = "DataView" - @new external fromBuffer: array_buffer => t = "DataView" - @new external fromBufferOffset: (array_buffer, int) => t = "DataView" - @new external fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t = "DataView" - - @get external buffer: t => array_buffer = "buffer" - @get external byteLength: t => int = "byteLength" - @get external byteOffset: t => int = "byteOffset" - - @send external getInt8: (t, int) => int = "getInt8" - @send external getUint8: (t, int) => int = "getUint8" - - @send external getInt16: (t, int) => int = "getInt16" - @send external getInt16LittleEndian: (t, int, @as(1) _) => int = "getInt16" - - @send external getUint16: (t, int) => int = "getUint16" - @send external getUint16LittleEndian: (t, int, @as(1) _) => int = "getUint16" - - @send external getInt32: (t, int) => int = "getInt32" - @send external getInt32LittleEndian: (t, int, @as(1) _) => int = "getInt32" - - @send external getUint32: (t, int) => int = "getUint32" - @send external getUint32LittleEndian: (t, int, @as(1) _) => int = "getUint32" - - @send external getFloat32: (t, int) => float = "getFloat32" - @send external getFloat32LittleEndian: (t, int, @as(1) _) => float = "getFloat32" - - @send external getFloat64: (t, int) => float = "getFloat64" - @send external getFloat64LittleEndian: (t, int, @as(1) _) => float = "getFloat64" - - @send external setInt8: (t, int, int) => unit = "setInt8" - @send external setUint8: (t, int, int) => unit = "setUint8" - - @send external setInt16: (t, int, int) => unit = "setInt16" - @send external setInt16LittleEndian: (t, int, int, @as(1) _) => unit = "setInt16" - - @send external setUint16: (t, int, int) => unit = "setUint16" - @send external setUint16LittleEndian: (t, int, int, @as(1) _) => unit = "setUint16" - - @send external setInt32: (t, int, int) => unit = "setInt32" - @send external setInt32LittleEndian: (t, int, int, @as(1) _) => unit = "setInt32" - - @send external setUint32: (t, int, int) => unit = "setUint32" - @send external setUint32LittleEndian: (t, int, int, @as(1) _) => unit = "setUint32" - - @send external setFloat32: (t, int, float) => unit = "setFloat32" - @send external setFloat32LittleEndian: (t, int, float, @as(1) _) => unit = "setFloat32" - - @send external setFloat64: (t, int, float) => unit = "setFloat64" - @send external setFloat64LittleEndian: (t, int, float, @as(1) _) => unit = "setFloat64" -} diff --git a/jscomp/others/release.ninja b/jscomp/others/release.ninja index 3d50070551..bc8c3d95b0 100644 --- a/jscomp/others/release.ninja +++ b/jscomp/others/release.ninja @@ -53,7 +53,6 @@ o others/js_result.cmi : cc others/js_result.resi | others/belt_internals.cmi ot o others/js_set.cmi others/js_set.cmj : cc others/js_set.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_string.cmi others/js_string.cmj : cc others/js_string.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_re.cmj $bsc o others/js_string2.cmi others/js_string2.cmj : cc others/js_string2.res | others/belt_internals.cmi others/js.cmi others/js_array2.cmj others/js_re.cmj $bsc -o others/js_typed_array.cmi others/js_typed_array.cmj : cc others/js_typed_array.res | others/belt_internals.cmi others/js.cmi others/js_typed_array2.cmj $bsc o others/js_typed_array2.cmi others/js_typed_array2.cmj : cc others/js_typed_array2.res | others/belt_internals.cmi others/js.cmi $bsc o others/js_types.cmj : cc_cmi others/js_types.res | others/belt_internals.cmi others/js.cmi others/js_null.cmj others/js_types.cmi $bsc o others/js_types.cmi : cc others/js_types.resi | others/belt_internals.cmi others/js.cmi $bsc @@ -72,7 +71,7 @@ o others/jsxEventU.cmi others/jsxEventU.cmj : cc others/jsxEventU.res | others/b o others/jsxPPXReactSupportC.cmi others/jsxPPXReactSupportC.cmj : cc others/jsxPPXReactSupportC.res | others/belt_internals.cmi others/js.cmi others/jsxC.cmj $bsc o others/jsxPPXReactSupportU.cmi others/jsxPPXReactSupportU.cmj : cc others/jsxPPXReactSupportU.res | others/belt_internals.cmi others/js.cmi others/jsxU.cmj $bsc o others/jsxU.cmi others/jsxU.cmj : cc others/jsxU.res | others/belt_internals.cmi others/js.cmi $bsc -o js_pkg : phony others/js_OO.cmi others/js_OO.cmj others/js_array.cmi others/js_array.cmj others/js_array2.cmi others/js_array2.cmj others/js_bigint.cmi others/js_bigint.cmj others/js_blob.cmi others/js_blob.cmj others/js_cast.cmi others/js_cast.cmj others/js_console.cmi others/js_console.cmj others/js_date.cmi others/js_date.cmj others/js_dict.cmi others/js_dict.cmj others/js_exn.cmi others/js_exn.cmj others/js_file.cmi others/js_file.cmj others/js_float.cmi others/js_float.cmj others/js_global.cmi others/js_global.cmj others/js_int.cmi others/js_int.cmj others/js_json.cmi others/js_json.cmj others/js_list.cmi others/js_list.cmj others/js_map.cmi others/js_map.cmj others/js_math.cmi others/js_math.cmj others/js_null.cmi others/js_null.cmj others/js_null_undefined.cmi others/js_null_undefined.cmj others/js_obj.cmi others/js_obj.cmj others/js_option.cmi others/js_option.cmj others/js_promise.cmi others/js_promise.cmj others/js_promise2.cmi others/js_promise2.cmj others/js_re.cmi others/js_re.cmj others/js_result.cmi others/js_result.cmj others/js_set.cmi others/js_set.cmj others/js_string.cmi others/js_string.cmj others/js_string2.cmi others/js_string2.cmj others/js_typed_array.cmi others/js_typed_array.cmj others/js_typed_array2.cmi others/js_typed_array2.cmj others/js_types.cmi others/js_types.cmj others/js_undefined.cmi others/js_undefined.cmj others/js_vector.cmi others/js_vector.cmj others/js_weakmap.cmi others/js_weakmap.cmj others/js_weakset.cmi others/js_weakset.cmj others/jsxC.cmi others/jsxC.cmj others/jsxDOMC.cmi others/jsxDOMC.cmj others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj others/jsxDOMU.cmi others/jsxDOMU.cmj others/jsxEventC.cmi others/jsxEventC.cmj others/jsxEventU.cmi others/jsxEventU.cmj others/jsxPPXReactSupportC.cmi others/jsxPPXReactSupportC.cmj others/jsxPPXReactSupportU.cmi others/jsxPPXReactSupportU.cmj others/jsxU.cmi others/jsxU.cmj +o js_pkg : phony others/js_OO.cmi others/js_OO.cmj others/js_array.cmi others/js_array.cmj others/js_array2.cmi others/js_array2.cmj others/js_bigint.cmi others/js_bigint.cmj others/js_blob.cmi others/js_blob.cmj others/js_cast.cmi others/js_cast.cmj others/js_console.cmi others/js_console.cmj others/js_date.cmi others/js_date.cmj others/js_dict.cmi others/js_dict.cmj others/js_exn.cmi others/js_exn.cmj others/js_file.cmi others/js_file.cmj others/js_float.cmi others/js_float.cmj others/js_global.cmi others/js_global.cmj others/js_int.cmi others/js_int.cmj others/js_json.cmi others/js_json.cmj others/js_list.cmi others/js_list.cmj others/js_map.cmi others/js_map.cmj others/js_math.cmi others/js_math.cmj others/js_null.cmi others/js_null.cmj others/js_null_undefined.cmi others/js_null_undefined.cmj others/js_obj.cmi others/js_obj.cmj others/js_option.cmi others/js_option.cmj others/js_promise.cmi others/js_promise.cmj others/js_promise2.cmi others/js_promise2.cmj others/js_re.cmi others/js_re.cmj others/js_result.cmi others/js_result.cmj others/js_set.cmi others/js_set.cmj others/js_string.cmi others/js_string.cmj others/js_string2.cmi others/js_string2.cmj others/js_typed_array2.cmi others/js_typed_array2.cmj others/js_types.cmi others/js_types.cmj others/js_undefined.cmi others/js_undefined.cmj others/js_vector.cmi others/js_vector.cmj others/js_weakmap.cmi others/js_weakmap.cmj others/js_weakset.cmi others/js_weakset.cmj others/jsxC.cmi others/jsxC.cmj others/jsxDOMC.cmi others/jsxDOMC.cmj others/jsxDOMStyle.cmi others/jsxDOMStyle.cmj others/jsxDOMU.cmi others/jsxDOMU.cmj others/jsxEventC.cmi others/jsxEventC.cmj others/jsxEventU.cmi others/jsxEventU.cmj others/jsxPPXReactSupportC.cmi others/jsxPPXReactSupportC.cmj others/jsxPPXReactSupportU.cmi others/jsxPPXReactSupportU.cmj others/jsxU.cmi others/jsxU.cmj o others/belt_Array.cmj : cc_cmi others/belt_Array.res | others/belt.cmi others/belt_Array.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg o others/belt_Array.cmi : cc others/belt_Array.resi | others/belt_internals.cmi others/js.cmi $bsc o others/belt_Float.cmj : cc_cmi others/belt_Float.res | others/belt.cmi others/belt_Float.cmi others/belt_internals.cmi others/js.cmi $bsc js_pkg diff --git a/jscomp/syntax/tests/conversion/reason/attributes.res b/jscomp/syntax/tests/conversion/reason/attributes.res index ff549e3e6d..d7f62c9132 100644 --- a/jscomp/syntax/tests/conversion/reason/attributes.res +++ b/jscomp/syntax/tests/conversion/reason/attributes.res @@ -16,7 +16,5 @@ list{1, 2, 3}->map(a => a + 1)->filter(a => modulo(a, 2) == 0)->Js.log type t @new external make: unit => t = "DOMParser" -@bs.send.pipe(: t) -external parseHtmlFromString: (string, @as("text/html") _) => Dom.htmlDocument = "parseFromString" Js.log(make() |> parseHtmlFromString("sdsd")) diff --git a/jscomp/syntax/tests/conversion/reason/expected/attributes.res.txt b/jscomp/syntax/tests/conversion/reason/expected/attributes.res.txt index ff549e3e6d..d7f62c9132 100644 --- a/jscomp/syntax/tests/conversion/reason/expected/attributes.res.txt +++ b/jscomp/syntax/tests/conversion/reason/expected/attributes.res.txt @@ -16,7 +16,5 @@ list{1, 2, 3}->map(a => a + 1)->filter(a => modulo(a, 2) == 0)->Js.log type t @new external make: unit => t = "DOMParser" -@bs.send.pipe(: t) -external parseHtmlFromString: (string, @as("text/html") _) => Dom.htmlDocument = "parseFromString" Js.log(make() |> parseHtmlFromString("sdsd")) diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Canvas/Webapi__Canvas__Canvas2d.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Canvas/Webapi__Canvas__Canvas2d.res index cbb980f6e6..305e03d06c 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Canvas/Webapi__Canvas__Canvas2d.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Canvas/Webapi__Canvas__Canvas2d.res @@ -77,15 +77,8 @@ type rec style<_> = | Gradient: style | Pattern: style -/* 2d Canvas API, following https://simon.html5.org/dump/html5-canvas-cheat-sheet.html */ -@bs.send.pipe(: t) external save: unit = "" -@bs.send.pipe(: t) external restore: unit = "" /* Transformation */ -@bs.send.pipe(: t) external scale: (~x: float, ~y: float) => unit = "" -@bs.send.pipe(: t) external rotate: float => unit = "" -@bs.send.pipe(: t) external translate: (~x: float, ~y: float) => unit = "" -@bs.send.pipe(: t) external transform: ( ~m11: float, ~m12: float, @@ -94,15 +87,6 @@ external transform: ( ~dx: float, ~dy: float, ) => unit = "" -@bs.send.pipe(: t) -external setTransform: ( - ~m11: float, - ~m12: float, - ~m21: float, - ~m22: float, - ~dx: float, - ~dy: float, -) => unit = "" /* Compositing */ @set external globalAlpha: (t, float) => unit = "" @@ -167,79 +151,14 @@ let strokeStyle = (ctx: t) => ctx |> strokeStyle |> reifyStyle @set external shadowColor: (t, string) => unit = "" /* Gradients */ -@bs.send.pipe(: t) -external createLinearGradient: (~x0: float, ~y0: float, ~x1: float, ~y1: float) => gradient = "" -@bs.send.pipe(: t) -external createRadialGradient: ( - ~x0: float, - ~y0: float, - ~x1: float, - ~y1: float, - ~r0: float, - ~r1: float, -) => gradient = "" -@bs.send.pipe(: gradient) external addColorStop: (float, string) => unit = "" -@val -external createPattern: ( - t, - Dom.element, - @string - [ - | #repeat - | @as("repeat-x") #repeatX - | @as("repeat-y") #repeatY - | @as("no-repeat") #noRepeat - ], -) => pattern = "" - -/* Paths */ -@bs.send.pipe(: t) external beginPath: unit = "" -@bs.send.pipe(: t) external closePath: unit = "" -@bs.send.pipe(: t) external fill: unit = "" -@bs.send.pipe(: t) external stroke: unit = "" -@bs.send.pipe(: t) external clip: unit = "" -@bs.send.pipe(: t) external moveTo: (~x: float, ~y: float) => unit = "" -@bs.send.pipe(: t) external lineTo: (~x: float, ~y: float) => unit = "" -@bs.send.pipe(: t) -external quadraticCurveTo: (~cp1x: float, ~cp1y: float, ~x: float, ~y: float) => unit = "" -@bs.send.pipe(: t) -external bezierCurveTo: ( - ~cp1x: float, - ~cp1y: float, - ~cp2x: float, - ~cp2y: float, - ~x: float, - ~y: float, -) => unit = "" -@bs.send.pipe(: t) -external arcTo: (~x1: float, ~y1: float, ~x2: float, ~y2: float, ~r: float) => unit = "" -@bs.send.pipe(: t) -external arc: ( - ~x: float, - ~y: float, - ~r: float, - ~startAngle: float, - ~endAngle: float, - ~anticw: bool, -) => unit = "" -@bs.send.pipe(: t) external rect: (~x: float, ~y: float, ~w: float, ~h: float) => unit = "" -@bs.send.pipe(: t) external isPointInPath: (~x: float, ~y: float) => bool = "" /* Text */ @set external font: (t, string) => unit = "" @set external textAlign: (t, string) => unit = "" @set external textBaseline: (t, string) => unit = "" -@bs.send.pipe(: t) -external fillText: (string, ~x: float, ~y: float, ~maxWidth: float=?) => unit = "" -@bs.send.pipe(: t) -external strokeText: (string, ~x: float, ~y: float, ~maxWidth: float=?) => unit = "" -@bs.send.pipe(: t) external measureText: string => measureText = "" @get external width: measureText => float = "" /* Rectangles */ -@bs.send.pipe(: t) external fillRect: (~x: float, ~y: float, ~w: float, ~h: float) => unit = "" -@bs.send.pipe(: t) external strokeRect: (~x: float, ~y: float, ~w: float, ~h: float) => unit = "" -@bs.send.pipe(: t) external clearRect: (~x: float, ~y: float, ~w: float, ~h: float) => unit = "" @send external createImageDataCoords: (t, ~width: float, ~height: float) => Webapi__Dom__Image.t = diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__CharacterData.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__CharacterData.res index 0b1ee6e6a1..395d5e2a3d 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__CharacterData.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__CharacterData.res @@ -6,11 +6,6 @@ module Impl = ( @get external data: T.t => string = "" @get external length: T.t => int = "" - @bs.send.pipe(: T.t) external substringData: (~offset: int, ~count: int) => string = "" - @bs.send.pipe(: T.t) external appendData: string => unit = "" - @bs.send.pipe(: T.t) external insertData: (~offset: int, string) => unit = "" - @bs.send.pipe(: T.t) external deleteData: (~offset: int, ~count: int) => unit = "" - @bs.send.pipe(: T.t) external replaceData: (~offset: int, ~count: int, string) => unit = "" } type t = Dom.characterData diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__ChildNode.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__ChildNode.res index 8b49e602cd..5bdaa7a53a 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__ChildNode.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__ChildNode.res @@ -4,5 +4,5 @@ module Impl = ( type t }, ) => { - @bs.send.pipe(: T.t) external remove: unit = "" + external remove: unit = "" } diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__CssStyleDeclaration.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__CssStyleDeclaration.res index f0be084a99..1d132aceeb 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__CssStyleDeclaration.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__CssStyleDeclaration.res @@ -6,12 +6,6 @@ type cssRule /* TODO: Move to Webapi__Dom */ @get external length: t => int = "" @get external parentRule: t => cssRule = "" -@bs.send.pipe(: t) external getPropertyPriority: string => string = "" -@bs.send.pipe(: t) external getPropertyValue: string => string = "" -@bs.send.pipe(: t) external item: int => string = "" -@bs.send.pipe(: t) external removeProperty: string => string = "" -@bs.send.pipe(: t) external setProperty: (string, string, string) => unit = "" -/* [@@bs.send.pipe : t] external setPropertyValue : (string, string) => unit = ""; */ /* not mentioned by MDN and not implemented by chrome, but in the CSSOM spec: https://drafts.csswg.org/cssom/#the-cssstyledeclaration-interface */ /* CSS2Properties */ @get external azimuth: t => string = "" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Document.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Document.res index 1e02ec4907..4e2093c7fb 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Document.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Document.res @@ -43,68 +43,6 @@ module Impl = ( let visibilityState: T.t => Webapi__Dom__Types.visibilityState = self => Webapi__Dom__Types.decodeVisibilityState(visibilityState(self)) - @bs.send.pipe(: T.t) external adoptNode: Dom.element_like<'a> => Dom.element_like<'a> = "" - @bs.send.pipe(: T.t) external createAttribute: string => Dom.attr = "" - @bs.send.pipe(: T.t) external createAttributeNS: (string, string) => Dom.attr = "" - @bs.send.pipe(: T.t) external createComment: string => Dom.comment = "" - @bs.send.pipe(: T.t) external createDocumentFragment: Dom.documentFragment = "" - @bs.send.pipe(: T.t) external createElement: string => Dom.element = "" - @bs.send.pipe(: T.t) - external createElementWithOptions: (string, {..}) => Dom.element = - "createElement" /* not widely supported */ - @bs.send.pipe(: T.t) external createElementNS: (string, string) => Dom.element = "" - @bs.send.pipe(: T.t) - external createElementNSWithOptions: (string, string, {..}) => Dom.element = - "createElementNS" /* not widely supported */ - @bs.send.pipe(: T.t) - external createEvent: string /* large enum */ => Dom.event = - "" /* discouraged (but not deprecated) in favor of Event constructors */ - @bs.send.pipe(: T.t) external createNodeIterator: Dom.node_like<'a> => Dom.nodeIterator = "" - @bs.send.pipe(: T.t) - external createNodeIteratorWithWhatToShow: ( - Dom.node_like<'a>, - Webapi__Dom__Types.WhatToShow.t, - ) => Dom.nodeIterator = "createNodeIterator" - @bs.send.pipe(: T.t) - external createNodeIteratorWithWhatToShowFilter: ( - Dom.node_like<'a>, - Webapi__Dom__Types.WhatToShow.t, - Dom.nodeFilter, - ) => Dom.nodeIterator = "createNodeIterator" /* createProcessingInstruction */ - @bs.send.pipe(: T.t) external createRange: Dom.range = "" - @bs.send.pipe(: T.t) external createTextNode: string => Dom.text = "" - @bs.send.pipe(: T.t) external createTreeWalker: Dom.element_like<'a> => Dom.treeWalker = "" - @bs.send.pipe(: T.t) - external createTreeWalkerWithWhatToShow: ( - Dom.element_like<'a>, - Webapi__Dom__Types.WhatToShow.t, - ) => Dom.treeWalker = "createTreeWalker" - @bs.send.pipe(: T.t) - external createTreeWalkerWithWhatToShowFilter: ( - Dom.element_like<'a>, - Webapi__Dom__Types.WhatToShow.t, - Dom.nodeFilter, - ) => Dom.treeWalker = "createTreeWalker" - @bs.send.pipe(: T.t) - external elementFromPoint: (int, int) => Dom.element = "" /* experimental, but widely supported */ - @bs.send.pipe(: T.t) - external elementsFromPoint: (int, int) => array = "" /* experimental */ - @bs.send.pipe(: T.t) external enableStyleSheetsForSet: string => unit = "" - @bs.send.pipe(: T.t) external exitPointerLock: unit = "" /* experimental */ - @bs.send.pipe(: T.t) external getAnimations: array = "" /* experimental */ - @bs.send.pipe(: T.t) external getElementsByClassName: string => Dom.htmlCollection = "" - @bs.send.pipe(: T.t) external getElementsByTagName: string => Dom.htmlCollection = "" - @bs.send.pipe(: T.t) external getElementsByTagNameNS: (string, string) => Dom.htmlCollection = "" - @bs.send.pipe(: T.t) external importNode: Dom.element_like<'a> => Dom.element_like<'a> = "" - @bs.send.pipe(: T.t) - external importNodeDeep: (Dom.element_like<'a>, @as(json`true`) _) => Dom.element_like<'a> = - "importNode" - @bs.send.pipe(: T.t) - external registerElement: (string, unit) => Dom.element = - "" /* experimental and deprecated in favor of customElements.define() */ - @bs.send.pipe(: T.t) - external registerElementWithOptions: (string, {..}, unit) => Dom.element = - "registerElement" /* experimental and deprecated in favor of customElements.define() */ @@ocaml.doc( " XPath stuff " diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__DomImplementation.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__DomImplementation.res index b355686263..3254f9906f 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__DomImplementation.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__DomImplementation.res @@ -1,22 +1,4 @@ type t = Dom.domImplementation -@bs.send.pipe(: t) -external createDocumentType: ( - ~qualifiedName: string, - ~publicId: string, - ~systemId: string, -) => Dom.documentType = "" -@bs.send.pipe(: t) -external createDocument: (Js.null, string, Js.null) => Dom.xmlDocument = - "" -let createDocument = ( - ~namespace: option=?, - ~qualifiedName: string, - ~docType: option=?, -) => createDocument(Js.Null.fromOption(namespace), qualifiedName, Js.Null.fromOption(docType)) -@bs.send.pipe(: t) external createHTMLDocument: Dom.htmlDocument = "" -@bs.send.pipe(: t) -external createHTMLDocumentWithTitle: string => Dom.htmlDocument = "createHTMLDocument" -@bs.send.pipe(: t) external hasFeature: bool = "" /* useless; always returns true (this is exact wording from the actual spec) */ diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__DomTokenList.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__DomTokenList.res index 64f51111b1..edf9c64eea 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__DomTokenList.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__DomTokenList.res @@ -2,23 +2,6 @@ type t = Dom.domTokenList @get external length: t => int = "" -@bs.send.pipe(: t) @return(nullable) external item: int => option = "" -@bs.send.pipe(: t) external add: string => unit = "" -@bs.send.pipe(: t) @variadic external addMany: array => unit = "add" -@bs.send.pipe(: t) external contains: string => bool = "contains" -/* entries: iterator API, should have language support */ -@bs.send.pipe(: t) external forEach: ((string, int) => unit) => unit = "" -/* keys: iterator API, should have language support */ -@bs.send.pipe(: t) external remove: string => unit = "" -@bs.send.pipe(: t) @variadic external removeMany: array => unit = "remove" -@bs.send.pipe(: t) external replace: (string, string) => unit = "" /* experimental */ -@bs.send.pipe(: t) -external supports: string => bool = "" /* experimental, Content Management Level 1 */ -@bs.send.pipe(: t) external toggle: string => bool = "" -@bs.send.pipe(: t) external toggleForced: (string, @as(json`true`) _) => bool = "toggle" -@bs.send.pipe(: t) external toString: string = "" -/* values: iterator API, should have language support */ - @get external value: t => string = "" /* experimental, from being merged with domSettableTokenList */ @set diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Element.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Element.res index d2566e515a..86d4e1cf1f 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Element.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Element.res @@ -50,81 +50,22 @@ module Impl = ( @set external setSlot: (T.t, string) => unit = "slot" /* experimental */ @get external tagName: T.t => string = "" - @bs.send.pipe(: T.t) - external attachShadow: {"mode": string} => Dom.shadowRoot = "" /* experimental */ - @bs.send.pipe(: T.t) - external attachShadowOpen: @as(json`{ "mode": "open" }`) _ => Dom.shadowRoot = - "attachShadow" /* experimental */ - @bs.send.pipe(: T.t) - external attachShadowClosed: @as(json`{ "mode": "closed" }`) _ => Dom.shadowRoot = - "attachShadow" /* experimental */ - @bs.send.pipe(: T.t) external animate: ({..}, {..}) => Dom.animation = "" /* experimental */ - @bs.send.pipe(: T.t) @return(nullable) - external closest: string => option = "" /* experimental */ - @bs.send.pipe(: T.t) - external createShadowRoot: Dom.shadowRoot = "" /* experimental AND deprecated (?!) */ - @bs.send.pipe(: T.t) @return(nullable) external getAttribute: string => option = "" - @bs.send.pipe(: T.t) @return(nullable) - external getAttributeNS: (string, string) => option = "" - @bs.send.pipe(: T.t) external getBoundingClientRect: Dom.domRect = "" - @bs.send.pipe(: T.t) external getClientRects: array = "" - @bs.send.pipe(: T.t) external getElementsByClassName: string => Dom.htmlCollection = "" - @bs.send.pipe(: T.t) external getElementsByTagName: string => Dom.htmlCollection = "" - @bs.send.pipe(: T.t) external getElementsByTagNameNS: (string, string) => Dom.htmlCollection = "" - @bs.send.pipe(: T.t) external hasAttribute: string => bool = "" - @bs.send.pipe(: T.t) external hasAttributeNS: (string, string) => bool = "" - @bs.send.pipe(: T.t) external hasAttributes: bool = "" - @bs.send.pipe(: T.t) - external insertAdjacentElement: (string /* insertPosition enum */, Dom.element_like<'a>) => unit = - "" /* experimental, but widely supported */ let insertAdjacentElement: ( Webapi__Dom__Types.insertPosition, Dom.element_like<'a>, T.t, ) => unit = (position, element, self) => insertAdjacentElement(Webapi__Dom__Types.encodeInsertPosition(position), element, self) - @bs.send.pipe(: T.t) - external insertAdjacentHTML: (string /* insertPosition enum */, string) => unit = - "" /* experimental, but widely supported */ let insertAdjacentHTML: (Webapi__Dom__Types.insertPosition, string, T.t) => unit = ( position, text, self, ) => insertAdjacentHTML(Webapi__Dom__Types.encodeInsertPosition(position), text, self) - @bs.send.pipe(: T.t) - external insertAdjacentText: (string /* insertPosition enum */, string) => unit = - "" /* experimental, but widely supported */ let insertAdjacentText: (Webapi__Dom__Types.insertPosition, string, T.t) => unit = ( position, text, self, ) => insertAdjacentText(Webapi__Dom__Types.encodeInsertPosition(position), text, self) - @bs.send.pipe(: T.t) - external matches: string => bool = "" /* experimental, but widely supported */ - @bs.send.pipe(: T.t) external releasePointerCapture: Dom.eventPointerId => unit = "" - @bs.send.pipe(: T.t) external removeAttribute: string => unit = "" - @bs.send.pipe(: T.t) external removeAttributeNS: (string, string) => unit = "" - @bs.send.pipe(: T.t) external requestFullscreen: unit = "" /* experimental */ - @bs.send.pipe(: T.t) external requestPointerLock: unit = "" /* experimental */ - @bs.send.pipe(: T.t) external scrollIntoView: unit = "" /* experimental, but widely supported */ - @bs.send.pipe(: T.t) - external scrollIntoViewNoAlignToTop: @as(json`true`) _ => unit = - "scrollIntoView" /* experimental, but widely supported */ - @bs.send.pipe(: T.t) - external scrollIntoViewWithOptions: {"behavior": string, "block": string} => unit = - "scrollIntoView" /* experimental */ - @bs.send.pipe(: T.t) external scrollBy: (float, float) => unit = "" - @bs.send.pipe(: T.t) - external scrollByWithOptions: {"top": float, "left": float, "behavior": string} => unit = - "scrollBy" - @bs.send.pipe(: T.t) external scrollTo: (float, float) => unit = "" - @bs.send.pipe(: T.t) - external scrollToWithOptions: {"top": float, "left": float, "behavior": string} => unit = - "scrollTo" - @bs.send.pipe(: T.t) external setAttribute: (string, string) => unit = "" - @bs.send.pipe(: T.t) external setAttributeNS: (string, string, string) => unit = "" - @bs.send.pipe(: T.t) external setPointerCapture: Dom.eventPointerId => unit = "" - /* GlobalEventHandlers interface */ /* Not sure this should be exposed, since EventTarget seems like a better API */ diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Event.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Event.res index bf7d32fd25..dd8c89a460 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Event.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Event.res @@ -16,9 +16,6 @@ module Impl = ( @get external type_: T.t => string = "type" @get external isTrusted: T.t => bool = "" - @bs.send.pipe(: T.t) external preventDefault: unit = "" - @bs.send.pipe(: T.t) external stopImmediatePropagation: unit = "" - @bs.send.pipe(: T.t) external stopPropagation: unit = "" } type t = Dom.event diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__EventTarget.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__EventTarget.res index 6bed97a4ff..60496a5c02 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__EventTarget.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__EventTarget.res @@ -4,1374 +4,6 @@ module Impl = ( }, ) => { external asEventTarget: T.t => Dom.eventTarget = "%identity" - - @bs.send.pipe(: T.t) external addEventListener: (string, Dom.event => unit) => unit = "" - @bs.send.pipe(: T.t) - external addEventListenerWithOptions: ( - string, - Dom.event => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addEventListenerUseCapture: (string, Dom.event => unit, @as(json`true`) _) => unit = - "addEventListener" - @bs.send.pipe(: T.t) external removeEventListener: (string, Dom.event => unit) => unit = "" - @bs.send.pipe(: T.t) - external removeEventListenerWithOptions: ( - string, - Dom.event => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeEventListenerUseCapture: (string, Dom.event => unit, @as(json`true`) _) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) external dispatchEvent: Dom.event_like<'a> => bool = "" - - @ocaml.doc(" - * non-standard event-specific functions - ") - @bs.send.pipe(: T.t) - external /* UI */ - - addLoadEventListener: (@as("load") _, Dom.event => unit) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addLoadEventListenerWithOptions: ( - @as("load") _, - Dom.event => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addLoadEventListenerUseCapture: ( - @as("load") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeLoadEventListener: (@as("load") _, Dom.event => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeLoadEventListenerWithOptions: ( - @as("load") _, - Dom.event => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeLoadEventListenerUseCapture: ( - @as("load") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addUnloadEventListener: (@as("unload") _, Dom.event => unit) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addUnloadEventListenerWithOptions: ( - @as("unload") _, - Dom.event => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addUnloadEventListenerUseCapture: ( - @as("unload") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeUnloadEventListener: (@as("unload") _, Dom.event => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeUnloadEventListenerWithOptions: ( - @as("unload") _, - Dom.event => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeUnloadEventListenerUseCapture: ( - @as("unload") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addAbortEventListener: (@as("abort") _, Dom.event => unit) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addAbortEventListenerWithOptions: ( - @as("abort") _, - Dom.event => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addAbortEventListenerUseCapture: ( - @as("abort") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeAbortEventListener: (@as("abort") _, Dom.event => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeAbortEventListenerWithOptions: ( - @as("abort") _, - Dom.event => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeAbortEventListenerUseCapture: ( - @as("abort") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addErrorEventListener: (@as("error") _, Dom.event => unit) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addErrorEventListenerWithOptions: ( - @as("error") _, - Dom.event => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addErrorEventListenerUseCapture: ( - @as("error") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeErrorEventListener: (@as("error") _, Dom.event => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeErrorEventListenerWithOptions: ( - @as("error") _, - Dom.event => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeErrorEventListenerUseCapture: ( - @as("error") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addSelectEventListener: (@as("select") _, Dom.event => unit) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addSelectEventListenerWithOptions: ( - @as("select") _, - Dom.event => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addSelectEventListenerUseCapture: ( - @as("select") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeSelectEventListener: (@as("select") _, Dom.event => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeSelectEventListenerWithOptions: ( - @as("select") _, - Dom.event => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeSelectEventListenerUseCapture: ( - @as("select") _, - Dom.event => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - /* Focus */ - - @bs.send.pipe(: T.t) - external addBlurEventListener: (@as("blur") _, Dom.focusEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addBlurEventListenerWithOptions: ( - @as("blur") _, - Dom.focusEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addBlurEventListenerUseCapture: ( - @as("blur") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeBlurEventListener: (@as("blur") _, Dom.focusEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeBlurEventListenerWithOptions: ( - @as("blur") _, - Dom.focusEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeBlurEventListenerUseCapture: ( - @as("blur") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addFocusEventListener: (@as("focus") _, Dom.focusEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addFocusEventListenerWithOptions: ( - @as("focus") _, - Dom.focusEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addFocusEventListenerUseCapture: ( - @as("focus") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeFocusEventListener: (@as("focus") _, Dom.focusEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeFocusEventListenerWithOptions: ( - @as("focus") _, - Dom.focusEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeFocusEventListenerUseCapture: ( - @as("focus") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addFocusInEventListener: (@as("focusin") _, Dom.focusEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addFocusInEventListenerWithOptions: ( - @as("focusin") _, - Dom.focusEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addFocusInEventListenerUseCapture: ( - @as("focusin") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeFocusInEventListener: (@as("focusin") _, Dom.focusEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeFocusInEventListenerWithOptions: ( - @as("focusin") _, - Dom.focusEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeFocusInEventListenerUseCapture: ( - @as("focusin") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addFocusOutEventListener: (@as("focusout") _, Dom.focusEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addFocusOutEventListenerWithOptions: ( - @as("focusout") _, - Dom.focusEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addFocusOutEventListenerUseCapture: ( - @as("focusout") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeFocusOutEventListener: (@as("focusout") _, Dom.focusEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeFocusOutEventListenerWithOptions: ( - @as("focusout") _, - Dom.focusEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeFocusOutEventListenerUseCapture: ( - @as("focusout") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - /* Mouse */ - - @bs.send.pipe(: T.t) - external addClickEventListener: (@as("click") _, Dom.mouseEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addClickEventListenerWithOptions: ( - @as("click") _, - Dom.mouseEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addClickEventListenerUseCapture: ( - @as("click") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeClickEventListener: (@as("click") _, Dom.mouseEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeClickEventListenerWithOptions: ( - @as("click") _, - Dom.mouseEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeClickEventListenerUseCapture: ( - @as("click") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addDblClickEventListener: (@as("dblclick") _, Dom.mouseEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addDblClickEventListenerWithOptions: ( - @as("dblclick") _, - Dom.mouseEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addDblClickEventListenerUseCapture: ( - @as("dblclick") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeDblClickEventListener: (@as("dblclick") _, Dom.mouseEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeDblClickEventListenerWithOptions: ( - @as("dblclick") _, - Dom.mouseEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeDblClickEventListenerUseCapture: ( - @as("dblclick") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addMouseDownEventListener: (@as("mousedown") _, Dom.mouseEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addMouseDownEventListenerWithOptions: ( - @as("mousedown") _, - Dom.mouseEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addMouseDownEventListenerUseCapture: ( - @as("mousedown") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeMouseDownEventListener: (@as("mousedown") _, Dom.mouseEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeMouseDownEventListenerWithOptions: ( - @as("mousedown") _, - Dom.mouseEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeMouseDownEventListenerUseCapture: ( - @as("mousedown") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addMouseEnterEventListener: (@as("mouseenter") _, Dom.mouseEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addMouseEnterEventListenerWithOptions: ( - @as("mouseenter") _, - Dom.mouseEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addMouseEnterEventListenerUseCapture: ( - @as("mouseenter") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeMouseEnterEventListener: (@as("mouseenter") _, Dom.mouseEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeMouseEnterEventListenerWithOptions: ( - @as("mouseenter") _, - Dom.mouseEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeMouseEnterEventListenerUseCapture: ( - @as("mouseenter") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addMouseMoveEventListener: (@as("mousemove") _, Dom.mouseEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addMouseMoveEventListenerWithOptions: ( - @as("mousemove") _, - Dom.mouseEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addMouseMoveEventListenerUseCapture: ( - @as("mousemove") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeMouseMoveEventListener: (@as("mousemove") _, Dom.mouseEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeMouseMoveEventListenerWithOptions: ( - @as("mousemove") _, - Dom.mouseEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeMouseMoveEventListenerUseCapture: ( - @as("mousemove") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addMouseOutEventListener: (@as("mouseout") _, Dom.mouseEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addMouseOutEventListenerWithOptions: ( - @as("mouseout") _, - Dom.mouseEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addMouseOutEventListenerUseCapture: ( - @as("mouseout") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeMouseOutEventListener: (@as("mouseout") _, Dom.mouseEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeMouseOutEventListenerWithOptions: ( - @as("mouseout") _, - Dom.mouseEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeMouseOutEventListenerUseCapture: ( - @as("mouseout") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addMouseOverEventListener: (@as("mouseover") _, Dom.mouseEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addMouseOverEventListenerWithOptions: ( - @as("mouseover") _, - Dom.mouseEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addMouseOverEventListenerUseCapture: ( - @as("mouseover") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeMouseOverEventListener: (@as("mouseover") _, Dom.mouseEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeMouseOverEventListenerWithOptions: ( - @as("mouseover") _, - Dom.mouseEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeMouseOverEventListenerUseCapture: ( - @as("mouseover") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addMouseUpEventListener: (@as("mouseup") _, Dom.mouseEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addMouseUpEventListenerWithOptions: ( - @as("mouseup") _, - Dom.mouseEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addMouseUpEventListenerUseCapture: ( - @as("mouseup") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeMouseUpEventListener: (@as("mouseup") _, Dom.mouseEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeMouseUpEventListenerWithOptions: ( - @as("mouseup") _, - Dom.mouseEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeMouseUpEventListenerUseCapture: ( - @as("mouseup") _, - Dom.mouseEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - /* Wheel */ - - @bs.send.pipe(: T.t) - external addWheelEventListener: (@as("wheel") _, Dom.wheelEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addWheelEventListenerWithOptions: ( - @as("wheel") _, - Dom.wheelEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addWheelEventListenerUseCapture: ( - @as("wheel") _, - Dom.wheelEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeWheelEventListener: (@as("wheel") _, Dom.wheelEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeWheelEventListenerWithOptions: ( - @as("wheel") _, - Dom.wheelEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeWheelEventListenerUseCapture: ( - @as("wheel") _, - Dom.wheelEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - /* Input */ - - @bs.send.pipe(: T.t) - external addBeforeInputEventListener: (@as("beforeinput") _, Dom.inputEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addBeforeInputEventListenerWithOptions: ( - @as("beforeinput") _, - Dom.inputEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addBeforeInputEventListenerUseCapture: ( - @as("beforeinput") _, - Dom.inputEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeBeforeInputEventListener: (@as("beforeinput") _, Dom.inputEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeBeforeInputEventListenerWithOptions: ( - @as("beforeinput") _, - Dom.inputEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeBeforeInputEventListenerUseCapture: ( - @as("beforeinput") _, - Dom.inputEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addInputEventListener: (@as("input") _, Dom.inputEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addInputEventListenerWithOptions: ( - @as("input") _, - Dom.inputEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addInputEventListenerUseCapture: ( - @as("input") _, - Dom.inputEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeInputEventListener: (@as("input") _, Dom.inputEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeInputEventListenerWithOptions: ( - @as("input") _, - Dom.inputEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeInputEventListenerUseCapture: ( - @as("input") _, - Dom.inputEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - /* Keyboard */ - - @bs.send.pipe(: T.t) - external addKeyDownEventListener: (@as("keydown") _, Dom.keyboardEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addKeyDownEventListenerWithOptions: ( - @as("keydown") _, - Dom.keyboardEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addKeyDownEventListenerUseCapture: ( - @as("keydown") _, - Dom.keyboardEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeKeyDownEventListener: (@as("keydown") _, Dom.keyboardEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeKeyDownEventListenerWithOptions: ( - @as("keydown") _, - Dom.keyboardEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeKeyDownEventListenerUseCapture: ( - @as("keydown") _, - Dom.keyboardEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addKeyUpEventListener: (@as("keyup") _, Dom.keyboardEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addKeyUpEventListenerWithOptions: ( - @as("keyup") _, - Dom.keyboardEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addKeyUpEventListenerUseCapture: ( - @as("keyup") _, - Dom.keyboardEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeKeyUpEventListener: (@as("keyup") _, Dom.keyboardEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeKeyUpEventListenerWithOptions: ( - @as("keyup") _, - Dom.keyboardEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeKeyUpEventListenerUseCapture: ( - @as("keyup") _, - Dom.keyboardEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addKeyPressEventListener: (@as("keypress") _, Dom.keyboardEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addKeyPressEventListenerWithOptions: ( - @as("keypress") _, - Dom.keyboardEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addKeyPressEventListenerUseCapture: ( - @as("keypress") _, - Dom.keyboardEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeKeyPressEventListener: (@as("keypress") _, Dom.keyboardEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeKeyPressEventListenerWithOptions: ( - @as("keypress") _, - Dom.keyboardEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeKeyPressEventListenerUseCapture: ( - @as("keypress") _, - Dom.keyboardEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - /* Composition */ - - @bs.send.pipe(: T.t) - external addCompositionStartEventListener: ( - @as("compositionstart") _, - Dom.compositionEvent => unit, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addCompositionStartEventListenerWithOptions: ( - @as("compositionstart") _, - Dom.compositionEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addCompositionStartEventListenerUseCapture: ( - @as("compositionstart") _, - Dom.compositionEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeCompositionStartEventListener: ( - @as("compositionstart") _, - Dom.compositionEvent => unit, - ) => unit = "removeEventListener" - @bs.send.pipe(: T.t) - external removeCompositionStartEventListenerWithOptions: ( - @as("compositionstart") _, - Dom.compositionEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeCompositionStartEventListenerUseCapture: ( - @as("compositionstart") _, - Dom.compositionEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addCompositionUpdateEventListener: ( - @as("compositionupdate") _, - Dom.compositionEvent => unit, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addCompositionUpdateEventListenerWithOptions: ( - @as("compositionupdate") _, - Dom.compositionEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addCompositionUpdateEventListenerUseCapture: ( - @as("compositionupdate") _, - Dom.compositionEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeCompositionUpdateEventListener: ( - @as("compositionupdate") _, - Dom.compositionEvent => unit, - ) => unit = "removeEventListener" - @bs.send.pipe(: T.t) - external removeCompositionUpdateEventListenerWithOptions: ( - @as("compositionupdate") _, - Dom.compositionEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeCompositionUpdateEventListenerUseCapture: ( - @as("compositionupdate") _, - Dom.compositionEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addCompositionEndEventListener: ( - @as("compositionend") _, - Dom.compositionEvent => unit, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addCompositionEndEventListenerWithOptions: ( - @as("compositionend") _, - Dom.compositionEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addCompositionEndEventListenerUseCapture: ( - @as("compositionend") _, - Dom.compositionEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeCompositionEndEventListener: ( - @as("compositionend") _, - Dom.compositionEvent => unit, - ) => unit = "removeEventListener" - @bs.send.pipe(: T.t) - external removeCompositionEndEventListenerWithOptions: ( - @as("compositionend") _, - Dom.compositionEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeCompositionEndEventListenerUseCapture: ( - @as("compositionend") _, - Dom.compositionEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - /* Drag */ - - @bs.send.pipe(: T.t) - external addDragEventListener: (@as("drag") _, Dom.dragEvent => unit) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addDragEventListenerWithOptions: ( - @as("drag") _, - Dom.dragEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addDragEventListenerUseCapture: ( - @as("drag") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeDragEventListener: (@as("drag") _, Dom.dragEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeDragEventListenerWithOptions: ( - @as("drag") _, - Dom.dragEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeDragEventListenerUseCapture: ( - @as("drag") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addDragEndEventListener: (@as("dragend") _, Dom.dragEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addDragEndEventListenerWithOptions: ( - @as("dragend") _, - Dom.dragEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addDragEndEventListenerUseCapture: ( - @as("dragend") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeDragEndEventListener: (@as("dragend") _, Dom.dragEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeDragEndEventListenerWithOptions: ( - @as("dragend") _, - Dom.dragEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeDragEndEventListenerUseCapture: ( - @as("dragend") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addDragEnterEventListener: (@as("dragenter") _, Dom.dragEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addDragEnterEventListenerWithOptions: ( - @as("dragenter") _, - Dom.dragEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addDragEnterEventListenerUseCapture: ( - @as("dragenter") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeDragEnterEventListener: (@as("dragenter") _, Dom.dragEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeDragEnterEventListenerWithOptions: ( - @as("dragenter") _, - Dom.dragEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeDragEnterEventListenerUseCapture: ( - @as("dragenter") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addDragExitEventListener: (@as("dragexit") _, Dom.dragEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addDragExitEventListenerWithOptions: ( - @as("dragexit") _, - Dom.dragEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addDragExitEventListenerUseCapture: ( - @as("dragexit") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeDragExitEventListener: (@as("dragexit") _, Dom.dragEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeDragExitEventListenerWithOptions: ( - @as("dragexit") _, - Dom.dragEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeDragExitEventListenerUseCapture: ( - @as("dragexit") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addDragLeaveEventListener: (@as("dragleave") _, Dom.dragEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addDragLeaveEventListenerWithOptions: ( - @as("dragleave") _, - Dom.dragEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addDragLeaveEventListenerUseCapture: ( - @as("dragleave") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeDragLeaveEventListener: (@as("dragleave") _, Dom.dragEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeDragLeaveEventListenerWithOptions: ( - @as("dragleave") _, - Dom.dragEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeDragLeaveEventListenerUseCapture: ( - @as("dragleave") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addDragOverEventListener: (@as("dragover") _, Dom.dragEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addDragOverEventListenerWithOptions: ( - @as("dragover") _, - Dom.dragEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addDragOverEventListenerUseCapture: ( - @as("dragover") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeDragOverEventListener: (@as("dragover") _, Dom.dragEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeDragOverEventListenerWithOptions: ( - @as("dragover") _, - Dom.dragEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeDragOverEventListenerUseCapture: ( - @as("dragover") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addDragStartEventListener: (@as("dragstart") _, Dom.dragEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addDragStartEventListenerWithOptions: ( - @as("dragstart") _, - Dom.dragEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addDragStartEventListenerUseCapture: ( - @as("dragstart") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeDragStartEventListener: (@as("dragstart") _, Dom.dragEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeDragStartEventListenerWithOptions: ( - @as("dragstart") _, - Dom.dragEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeDragStartEventListenerUseCapture: ( - @as("dragstart") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addDropEventListener: (@as("drop") _, Dom.dragEvent => unit) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addDropEventListenerWithOptions: ( - @as("drop") _, - Dom.dragEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addDropEventListenerUseCapture: ( - @as("drop") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeDropEventListener: (@as("drop") _, Dom.dragEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeDropEventListenerWithOptions: ( - @as("drop") _, - Dom.dragEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeDropEventListenerUseCapture: ( - @as("drop") _, - Dom.dragEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - /* Touch */ - - @bs.send.pipe(: T.t) - external addTouchCancelEventListener: (@as("touchcancel") _, Dom.touchEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addTouchCancelEventListenerWithOptions: ( - @as("touchcancel") _, - Dom.touchEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addTouchCancelEventListenerUseCapture: ( - @as("touchcancel") _, - Dom.touchEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeTouchCancelEventListener: (@as("touchcancel") _, Dom.touchEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeTouchCancelEventListenerWithOptions: ( - @as("touchcancel") _, - Dom.touchEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeTouchCancelEventListenerUseCapture: ( - @as("touchcancel") _, - Dom.touchEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addTouchEndEventListener: (@as("touchend") _, Dom.touchEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addTouchEndEventListenerWithOptions: ( - @as("touchend") _, - Dom.touchEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addTouchEndEventListenerUseCapture: ( - @as("touchend") _, - Dom.touchEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeTouchEndEventListener: (@as("touchend") _, Dom.touchEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeTouchEndEventListenerWithOptions: ( - @as("touchend") _, - Dom.touchEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeTouchEndEventListenerUseCapture: ( - @as("touchend") _, - Dom.touchEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addTouchMoveEventListener: (@as("touchmove") _, Dom.touchEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addTouchMoveEventListenerWithOptions: ( - @as("touchmove") _, - Dom.touchEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addTouchMoveEventListenerUseCapture: ( - @as("touchmove") _, - Dom.touchEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeTouchMoveEventListener: (@as("touchmove") _, Dom.touchEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeTouchMoveEventListenerWithOptions: ( - @as("touchmove") _, - Dom.touchEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeTouchMoveEventListenerUseCapture: ( - @as("touchmove") _, - Dom.touchEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addTouchStartEventListener: (@as("touchstart") _, Dom.touchEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: T.t) - external addTouchStartEventListenerWithOptions: ( - @as("touchstart") _, - Dom.touchEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addTouchStartEventListenerUseCapture: ( - @as("touchstart") _, - Dom.touchEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeTouchStartEventListener: (@as("touchstart") _, Dom.touchEvent => unit) => unit = - "removeEventListener" - @bs.send.pipe(: T.t) - external removeTouchStartEventListenerWithOptions: ( - @as("touchstart") _, - Dom.touchEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeTouchStartEventListenerUseCapture: ( - @as("touchstart") _, - Dom.touchEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - /* Animation */ - - @bs.send.pipe(: T.t) - external addAnimationCancelEventListener: ( - @as("animationcancel") _, - Dom.animationEvent => unit, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addAnimationCancelEventListenerWithOptions: ( - @as("animationcancel") _, - Dom.animationEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addAnimationCancelEventListenerUseCapture: ( - @as("animationcancel") _, - Dom.animationEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeAnimationCancelEventListener: ( - @as("animationcancel") _, - Dom.animationEvent => unit, - ) => unit = "removeEventListener" - @bs.send.pipe(: T.t) - external removeAnimationCancelEventListenerWithOptions: ( - @as("animationcancel") _, - Dom.animationEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeAnimationCancelEventListenerUseCapture: ( - @as("animationcancel") _, - Dom.animationEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addAnimationEndEventListener: ( - @as("animationend") _, - Dom.animationEvent => unit, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addAnimationEndEventListenerWithOptions: ( - @as("animationend") _, - Dom.animationEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addAnimationEndEventListenerUseCapture: ( - @as("animationend") _, - Dom.animationEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeAnimationEndEventListener: ( - @as("animationend") _, - Dom.animationEvent => unit, - ) => unit = "removeEventListener" - @bs.send.pipe(: T.t) - external removeAnimationEndEventListenerWithOptions: ( - @as("animationend") _, - Dom.animationEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeAnimationEndEventListenerUseCapture: ( - @as("animationend") _, - Dom.animationEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addAnimationIterationEventListener: ( - @as("animationiteration") _, - Dom.animationEvent => unit, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addAnimationIterationEventListenerWithOptions: ( - @as("animationiteration") _, - Dom.animationEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addAnimationIterationEventListenerUseCapture: ( - @as("animationiteration") _, - Dom.animationEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeAnimationIterationEventListener: ( - @as("animationiteration") _, - Dom.animationEvent => unit, - ) => unit = "removeEventListener" - @bs.send.pipe(: T.t) - external removeAnimationIterationEventListenerWithOptions: ( - @as("animationiteration") _, - Dom.animationEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeAnimationIterationEventListenerUseCapture: ( - @as("animationiteration") _, - Dom.animationEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" - - @bs.send.pipe(: T.t) - external addAnimationStartEventListener: ( - @as("animationstart") _, - Dom.animationEvent => unit, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addAnimationStartEventListenerWithOptions: ( - @as("animationstart") _, - Dom.animationEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addAnimationStartEventListenerUseCapture: ( - @as("animationstart") _, - Dom.animationEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeAnimationStartEventListener: ( - @as("animationstart") _, - Dom.animationEvent => unit, - ) => unit = "removeEventListener" - @bs.send.pipe(: T.t) - external removeAnimationStartEventListenerWithOptions: ( - @as("animationstart") _, - Dom.animationEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeAnimationStartEventListenerUseCapture: ( - @as("animationstart") _, - Dom.animationEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" } include Impl({ diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__GlobalEventHandlers.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__GlobalEventHandlers.res index 9f1fdab020..9953bbb627 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__GlobalEventHandlers.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__GlobalEventHandlers.res @@ -4,38 +4,4 @@ module Impl = ( type t }, ) => { - @bs.send.pipe(: T.t) - external addSelectionChangeEventListener: ( - @as("selectionchange") _, - Dom.focusEvent => unit, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external addSelectionChangeEventListenerWithOptions: ( - @as("selectionchange") _, - Dom.focusEvent => unit, - {"capture": bool, "once": bool, "passive": bool}, - ) => unit = "addEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external addSelectionChangeEventListenerUseCapture: ( - @as("selectionchange") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "addEventListener" - @bs.send.pipe(: T.t) - external removeSelectionChangeEventListener: ( - @as("selectionchange") _, - Dom.focusEvent => unit, - ) => unit = "removeEventListener" - @bs.send.pipe(: T.t) - external removeSelectionChangeEventListenerWithOptions: ( - @as("selectionchange") _, - Dom.focusEvent => unit, - {"capture": bool, "passive": bool}, - ) => unit = "removeEventListener" /* not widely supported */ - @bs.send.pipe(: T.t) - external removeSelectionChangeEventListenerUseCapture: ( - @as("selectionchange") _, - Dom.focusEvent => unit, - @as(json`true`) _, - ) => unit = "removeEventListener" } diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__History.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__History.res index d054fe7130..6f27894b20 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__History.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__History.res @@ -5,9 +5,3 @@ type state /* TODO: should be "anything that can be serializable" apparently */ @get external scrollRestoration: t => bool = "" /* experimental */ @set external setScrollRestoration: (t, bool) => unit = "scrollRestoration" /* experimental */ @get external state: t => state = "" - -@bs.send.pipe(: t) external back: unit = "" -@bs.send.pipe(: t) external forward: unit = "" -@bs.send.pipe(: t) external go: int => unit = "" -@bs.send.pipe(: t) external pushState: (state, string, string) => unit = "" -@bs.send.pipe(: t) external replaceState: (state, string, string) => unit = "" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlCollection.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlCollection.res index 81bbe25bab..1dc07ee933 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlCollection.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlCollection.res @@ -3,5 +3,3 @@ type t = Dom.htmlCollection @val @scope(("Array", "prototype", "slice")) external toArray: t => array = "call" @get external length: t => int = "" -@bs.send.pipe(: t) @return(nullable) external item: int => option = "" -@bs.send.pipe(: t) @return(nullable) external namedItem: string => option = "" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlDocument.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlDocument.res index a73853699e..e96f3b9c8e 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlDocument.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlDocument.res @@ -45,24 +45,6 @@ module Impl = ( @set external setTitle: (t_htmlDocument, string) => unit = "title" @get external url: t_htmlDocument => string = "URL" - @bs.send.pipe(: t_htmlDocument) external close: unit = "" - @bs.send.pipe(: t_htmlDocument) external execCommand: (string, bool, Js.null) => bool = "" - let execCommand: (string, bool, option, t_htmlDocument) => bool = ( - command, - show, - value, - self, - ) => execCommand(command, show, Js.Null.fromOption(value), self) - @bs.send.pipe(: t_htmlDocument) external getElementsByName: string => Dom.nodeList = "" - @bs.send.pipe(: t_htmlDocument) external getSelection: Dom.selection = "" - @bs.send.pipe(: t_htmlDocument) external hasFocus: bool = "" - @bs.send.pipe(: t_htmlDocument) external open_: unit = "open" - @bs.send.pipe(: t_htmlDocument) external queryCommandEnabled: string => bool = "" - @bs.send.pipe(: t_htmlDocument) external queryCommandIndeterm: string => bool = "" - @bs.send.pipe(: t_htmlDocument) external queryCommandSupported: string => bool = "" - @bs.send.pipe(: t_htmlDocument) external queryCommandValue: string => string = "" - @bs.send.pipe(: t_htmlDocument) external write: string => unit = "" - @bs.send.pipe(: t_htmlDocument) external writeln: string => unit = "" } type t = Dom.htmlDocument diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlElement.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlElement.res index ca2a40c26c..0313ed643c 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlElement.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlElement.res @@ -75,12 +75,6 @@ module Impl = ( @set external setTranslate: (t_htmlElement, bool) => unit = "translate" /* experimental */ /* let setTranslate : t_htmlElement => bool => unit = fun self value => setTranslate self (Js.Boolean.to_js_boolean value); */ /* temproarily removed to reduce codegen size */ - @bs.send.pipe(: t_htmlElement) external blur: unit = "" - @bs.send.pipe(: t_htmlElement) external click: unit = "" - @bs.send.pipe(: t_htmlElement) external focus: unit = "" - @bs.send.pipe(: t_htmlElement) - external focusPreventScroll: @as(json`{ "preventScroll": true }`) _ => unit = "focus" - @bs.send.pipe(: t_htmlElement) external forceSpellCheck: unit = "" /* experimental */ /* TODO: element-spcific, should be pulled out */ @get external value: t_htmlElement => string = "" /* HTMLInputElement */ diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlFormElement.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlFormElement.res index 56d75a4ea2..68c82a694e 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlFormElement.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlFormElement.res @@ -31,10 +31,6 @@ module Impl = ( @get external encoding: t_htmlFormElement => string = "" @set external setEncoding: (t_htmlFormElement, string) => unit = "encoding" - @bs.send.pipe(: t_htmlFormElement) external submit: unit = "" - @bs.send.pipe(: t_htmlFormElement) external reset: unit = "" - @bs.send.pipe(: t_htmlFormElement) external checkValidity: bool = "" - @bs.send.pipe(: t_htmlFormElement) external reportValidity: bool = "" } type t = Dom.htmlFormElement diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlImageElement.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlImageElement.res index 3e8d2b9274..7f3e21fd38 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlImageElement.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlImageElement.res @@ -31,8 +31,6 @@ let setCrossOrigin = (self, value) => setCrossOrigin(self, Js.Null.fromOption(va @get external decoding: t => string = "" @set external setDecoding: (t, string) => unit = "decoding" -@bs.send.pipe(: t) external decode: Js.Promise.t = "" - include Webapi__Dom__Node.Impl({ type t = t }) diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlInputElement.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlInputElement.res index 6342bd2493..896fd20e99 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlInputElement.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__HtmlInputElement.res @@ -106,8 +106,7 @@ module Impl = ( @set external setValueAsDate: (t_htmlInputElement, Js.Date.t) => unit = "valueAsDate" @get external valueAsNumber: t_htmlInputElement => float = "" - @bs.send.pipe(: t_htmlInputElement) external select: unit = "" - + module SelectionDirection = { type t = | Forward @@ -122,9 +121,6 @@ module Impl = ( } } - @bs.send.pipe(: t_htmlInputElement) external setSelectionRange: (int, int) => unit = "" - @bs.send.pipe(: t_htmlInputElement) - external setSelectionRangeWithDirection_: (int, int, string) => unit = "setSelectionRange" let setSelectionRangeWithDirection = ( selectionStart, selectionEnd, @@ -153,13 +149,6 @@ module Impl = ( } } - @bs.send.pipe(: t_htmlInputElement) - external setRangeTextWithinSelection: string => unit = "setRangeText" - @bs.send.pipe(: t_htmlInputElement) - external setRangeTextWithinInterval: (string, int, int) => unit = "setRangeText" - @bs.send.pipe(: t_htmlInputElement) - external setRangeTextWithinIntervalWithSelectionMode_: (string, int, int, string) => unit = - "setRangeText" let setRangeTextWithinIntervalWithSelectionMode = ( text, selectionStart, @@ -174,13 +163,6 @@ module Impl = ( selectionMode |> SelectionMode.toString, ) - @bs.send.pipe(: t_htmlInputElement) external setCustomValidity: string => unit = "" - @bs.send.pipe(: t_htmlInputElement) external checkValidity: bool = "" - @bs.send.pipe(: t_htmlInputElement) external reportValidity: bool = "" - @bs.send.pipe(: t_htmlInputElement) external stepDownBy: int => unit = "stepDown" - @bs.send.pipe(: t_htmlInputElement) external stepDownByOne: unit = "stepDown" - @bs.send.pipe(: t_htmlInputElement) external stepUpBy: int => unit = "stepUp" - @bs.send.pipe(: t_htmlInputElement) external stepUpByOne: unit = "stepUp" } type t = Dom.htmlInputElement diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__KeyboardEvent.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__KeyboardEvent.res index 4b37f62e70..b42f6c79c2 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__KeyboardEvent.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__KeyboardEvent.res @@ -21,6 +21,5 @@ include Webapi__Dom__UiEvent.Impl({ @get external repeat: t => bool = "" @get external shiftKey: t => bool = "" -@bs.send.pipe(: t) external getModifierState: string /* modifierKey enum */ => bool = "" let getModifierState: (Webapi__Dom__Types.modifierKey, t) => bool = (key, self) => getModifierState(Webapi__Dom__Types.encodeModifierKey(key), self) diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Location.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Location.res index 2c030a4c2a..60e8494fd7 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Location.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Location.res @@ -22,9 +22,3 @@ type t = Dom.location @get external password: t => string = "" @set external setPassword: (t, string) => unit = "password" @get external origin: t => string = "" - -@bs.send.pipe(: t) external assign: string => unit = "" -@bs.send.pipe(: t) external reload: unit = "" -@bs.send.pipe(: t) external reloadWithForce: @as(json`true`) _ => unit = "reload" -@bs.send.pipe(: t) external replace: string => unit = "" -@bs.send.pipe(: t) external toString: string = "" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__MouseEvent.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__MouseEvent.res index 758d4fa164..47dfbe5fa6 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__MouseEvent.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__MouseEvent.res @@ -23,7 +23,6 @@ module Impl = ( @get external shiftKey: T.t => bool = "" @get external x: T.t => int = "" /* experimental */ @get external y: T.t => int = "" /* experimental */ - @bs.send.pipe(: T.t) external getModifierState: string /* modifierKey enum */ => bool = "" let getModifierState: (Webapi__Dom__Types.modifierKey, T.t) => bool = (key, self) => getModifierState(Webapi__Dom__Types.encodeModifierKey(key), self) } diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__MutationObserver.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__MutationObserver.res index a7014609ac..8ba851c36b 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__MutationObserver.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__MutationObserver.res @@ -1,7 +1,3 @@ type t = Dom.mutationObserver @new external make: ((array, t) => unit) => t = "MutationObserver" - -@bs.send.pipe(: t) external observe: (Dom.node_like<'a>, {..}) => unit = "" -@bs.send.pipe(: t) external disconnect: unit = "" -@bs.send.pipe(: t) external takeRecords: array = "" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NamedNodeMap.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NamedNodeMap.res index ffe1897989..0eeabba002 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NamedNodeMap.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NamedNodeMap.res @@ -2,13 +2,4 @@ type t = Dom.namedNodeMap @get external length: t => int = "" -@bs.send.pipe(: t) @return(nullable) external item: int => option = "" -@bs.send.pipe(: t) @return(nullable) external getNamedItem: string => option = "" -@bs.send.pipe(: t) @return(nullable) -external getNamedItemNS: (string, string) => option = "" -@bs.send.pipe(: t) external setNamedItem: Dom.attr => unit = "" -@bs.send.pipe(: t) external setNamedItemNS: Dom.attr => unit = "" -@bs.send.pipe(: t) external removeNamedItem: string => Dom.attr = "" -@bs.send.pipe(: t) external removeNamedItemNS: (string, string) => Dom.attr = "" - @val @scope(("Array", "prototype", "slice")) external toArray: t => array = "call" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Node.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Node.res index cdc3e5a558..a256898b7d 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Node.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Node.res @@ -32,33 +32,6 @@ module Impl = ( @get external textContent: T.t => string = "" @set external setTextContent: (T.t, string) => unit = "textContent" - @bs.send.pipe(: T.t) external appendChild: Dom.node_like<'a> => unit = "" - @bs.send.pipe(: T.t) external cloneNode: T.t = "" - @bs.send.pipe(: T.t) external cloneNodeDeep: @as(json`true`) _ => T.t = "cloneNode" - @bs.send.pipe(: T.t) - external compareDocumentPosition: Dom.node_like<'a> => int = - "" /* returns a bitmask which could also be represeneted as an enum, see https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition */ - @bs.send.pipe(: T.t) external contains: Dom.node_like<'a> => bool = "" - @bs.send.pipe(: T.t) external getRootNode: Dom.node = "" - @bs.send.pipe(: T.t) - external getRootNodeComposed: @as(json`{ "composed": true }`) _ => Dom.node = "getRootNode" - @bs.send.pipe(: T.t) external hasChildNodes: bool = "" - @bs.send.pipe(: T.t) - external insertBefore: (Dom.node_like<'a>, Dom.node_like<'b>) => Dom.node_like<'a> = "" - /* (temporarily?) removed to reduce codegen size. This variant is just for convenience, `appendChild` can be used in place of passing `null` to `insertBefore` - external insertBefore : Dom.node_like 'a => Js.null (Dom.node_like 'b) => Dom.node_like 'a = "" [@@bs.send.pipe: T.t]; - let insertBefore : Dom.node_like 'a => option (Dom.node_like 'b) => T.t => Dom.node_like 'a = fun node reference self => insertBefore node (Js.Null.fromOption reference) self; - */ - @bs.send.pipe(: T.t) external isDefaultNamespace: string => bool = "" - @bs.send.pipe(: T.t) external isEqualNode: Dom.node_like<'a> => bool = "" - @bs.send.pipe(: T.t) external isSameNode: Dom.node_like<'a> => bool = "" - @bs.send.pipe(: T.t) @return(nullable) external lookupNamespaceURI: string => option = "" - @bs.send.pipe(: T.t) @return(nullable) - external lookupDefaultNamespaceURI: @as(json`null`) _ => option = "lookupNamespaceURI" - @bs.send.pipe(: T.t) external lookupPrefix: string = "lookupPrefix" - @bs.send.pipe(: T.t) external normalize: unit = "" - @bs.send.pipe(: T.t) external removeChild: Dom.node_like<'a> => Dom.node_like<'a> = "" - /* replacChild */ } type t = Dom.node diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NodeIterator.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NodeIterator.res index 7fd49892dd..a43cd240ee 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NodeIterator.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NodeIterator.res @@ -6,6 +6,3 @@ type t = Dom.nodeIterator @get external whatToShow: t => Webapi__Dom__Types.WhatToShow.t = "" @get @return(nullable) external filter: t => option = "" -@bs.send.pipe(: t) @return(nullable) external nextNode: option = "" -@bs.send.pipe(: t) @return(nullable) external previousNode: option = "" -@bs.send.pipe(: t) external detach: unit = "" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NodeList.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NodeList.res index 9b8888b0a8..e819ab36fe 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NodeList.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NodeList.res @@ -2,8 +2,4 @@ type t = Dom.nodeList @val external toArray: t => array = "Array.prototype.slice.call" -@bs.send.pipe(: t) external forEach: ((Dom.node, int) => unit) => unit = "" - @get external length: t => int = "" - -@bs.send.pipe(: t) @return(nullable) external item: int => option = "" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NonElementParentNode.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NonElementParentNode.res index 00f64b0586..9953bbb627 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NonElementParentNode.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__NonElementParentNode.res @@ -4,5 +4,4 @@ module Impl = ( type t }, ) => { - @bs.send.pipe(: T.t) @return(nullable) external getElementById: string => option = "" } diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__ParentNode.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__ParentNode.res index f645124bd5..26790c5f85 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__ParentNode.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__ParentNode.res @@ -8,6 +8,4 @@ module Impl = ( @get @return(nullable) external firstElementChild: T.t => option = "" @get @return(nullable) external lastElementChild: T.t => option = "" @get external childElementCount: T.t => int = "" - @bs.send.pipe(: T.t) @return(nullable) external querySelector: string => option = "" - @bs.send.pipe(: T.t) external querySelectorAll: string => Dom.nodeList = "" } diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Range.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Range.res index 1b39b1b5bb..08be78bf98 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Range.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Range.res @@ -9,47 +9,8 @@ type t = Dom.range @get external startContainer: t => Dom.node = "" @get external startOffset: t => int = "" -@bs.send.pipe(: t) external setStart: (Dom.node_like<'a>, int) => unit = "" -@bs.send.pipe(: t) external setEnd: (Dom.node_like<'a>, int) => unit = "" -@bs.send.pipe(: t) external setStartBefore: Dom.node_like<'a> => unit = "" -@bs.send.pipe(: t) external setStartAfter: Dom.node_like<'a> => unit = "" -@bs.send.pipe(: t) external setEndBefore: Dom.node_like<'a> => unit = "" -@bs.send.pipe(: t) external setEndAfter: Dom.node_like<'a> => unit = "" -@bs.send.pipe(: t) external selectNode: Dom.node_like<'a> => unit = "" -@bs.send.pipe(: t) external selectNodeContents: Dom.node_like<'a> => unit = "" -@bs.send.pipe(: t) external collapse: unit = "" -@bs.send.pipe(: t) external collapseToStart: @as(json`true`) _ => unit = "collapse" -@bs.send.pipe(: t) external cloneContents: Dom.documentFragment = "" -@bs.send.pipe(: t) external deleteContents: unit = "" -@bs.send.pipe(: t) external extractContents: Dom.documentFragment = "" -@bs.send.pipe(: t) external insertNode: Dom.node_like<'a> => unit = "" -@bs.send.pipe(: t) external surroundContents: Dom.node_like<'a> => unit = "" -@bs.send.pipe(: t) -external compareBoundaryPoints: (int /* compareHow enum */, t) => int /* compareResult enum */ = "" -let compareBoundaryPoint: ( - Webapi__Dom__Types.compareHow, - t, - t, -) => Webapi__Dom__Types.compareResult = (how, range, self) => - Webapi__Dom__Types.decodeCompareResult( - compareBoundaryPoints(Webapi__Dom__Types.encodeCompareHow(how), range, self), - ) -@bs.send.pipe(: t) external cloneRange: t = "" -@bs.send.pipe(: t) external detach: unit = "" -@bs.send.pipe(: t) external toString: string = "" -@bs.send.pipe(: t) -external comparePoint: (Dom.node_like<'a>, int) => int /* compareRsult enum */ = "" let comparePoint: (Dom.node_like<'a>, int, t) => Webapi__Dom__Types.compareResult = ( node, offset, self, ) => Webapi__Dom__Types.decodeCompareResult(comparePoint(node, offset, self)) -@bs.send.pipe(: t) -external createContextualFragment: string => Dom.documentFragment = - "" /* experimental, but widely supported */ -@bs.send.pipe(: t) -external getBoundingClientRect: Dom.domRect = "" /* experimental, but widely supported */ -@bs.send.pipe(: t) -external getClientRects: array = "" /* experimental, but widely supported */ -@bs.send.pipe(: t) external intersectsNode: Dom.node_like<'a> => bool = "" -@bs.send.pipe(: t) external isPointInRange: (Dom.node_like<'a>, int) => bool = "" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Selection.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Selection.res index 868ca25459..909d6c2485 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Selection.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Selection.res @@ -6,20 +6,3 @@ type t = Dom.selection @get external focusOffset: t => int = "" @get external isCollapsed: t => bool = "" @get external rangeCount: t => int = "" - -@bs.send.pipe(: t) external getRangeAt: int => Dom.range = "" -@bs.send.pipe(: t) external collapse: (Dom.node_like<_>, int) => unit = "" -@bs.send.pipe(: t) external extend: (Dom.node_like<_>, int) => unit = "" -@bs.send.pipe(: t) external collapseToStart: unit = "" -@bs.send.pipe(: t) external collapseToEnd: unit = "" -@bs.send.pipe(: t) external selectAllChildren: Dom.node_like<_> => unit = "" -@bs.send.pipe(: t) -external setBaseAndExtent: (Dom.node_like<_>, int, Dom.node_like<_>, int) => unit = "" -@bs.send.pipe(: t) external addRange: Dom.range => unit = "" -@bs.send.pipe(: t) external removeRange: Dom.range => unit = "" -@bs.send.pipe(: t) external removeAllRanges: unit = "" -@bs.send.pipe(: t) external deleteFromDocument: unit = "" -@bs.send.pipe(: t) external toString: string = "" -@bs.send.pipe(: t) external containsNode: (Dom.node_like<_>, @as(json`false`) _) => bool = "" -@bs.send.pipe(: t) -external containsNodePartly: (Dom.node_like<_>, @as(json`true`) _) => bool = "containsNode" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Text.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Text.res index 91e06a1a5e..1ad2c2e9e3 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Text.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Text.res @@ -8,7 +8,6 @@ module Impl = ( ) => { let ofNode: Dom.node => option = ofNode - @bs.send.pipe(: T.t) external splitText: (~offset: int, unit) => Dom.text = "" @get external wholeText: T.t => string = "" } diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__TreeWalker.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__TreeWalker.res index 39671380a4..2323ba65d2 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__TreeWalker.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__TreeWalker.res @@ -5,11 +5,3 @@ type t = Dom.treeWalker @get @return(nullable) external filter: t => option = "" @get external currentNode: t => Dom.node = "" @set external setCurrentNode: (t, Dom.node) => unit = "" - -@bs.send.pipe(: t) @return(nullable) external parentNode: option = "" -@bs.send.pipe(: t) @return(nullable) external firstChild: option = "" -@bs.send.pipe(: t) @return(nullable) external lastChild: option = "" -@bs.send.pipe(: t) @return(nullable) external previousSibling: option = "" -@bs.send.pipe(: t) @return(nullable) external nextSibling: option = "" -@bs.send.pipe(: t) @return(nullable) external previousNode: option = "" -@bs.send.pipe(: t) @return(nullable) external nextNode: option = "" diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Window.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Window.res index 50d68dd502..0024082171 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Window.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Dom/Webapi__Dom__Window.res @@ -73,64 +73,6 @@ module Impl = ( external window: t_window => t_window = "" /* This is pointless I think, it's just here because window is the implicit global scope, and it's needed to be able to get a reference to it */ - @bs.send.pipe(: t_window) external alert: string => unit = "" - @bs.send.pipe(: t_window) external blur: unit = "" - @bs.send.pipe(: t_window) - external cancelIdleCallback: idleCallbackId => unit = - "" /* experimental, Cooperative Scheduling of Background Tasks */ - @bs.send.pipe(: t_window) external close: unit = "" - @bs.send.pipe(: t_window) external confirm: string => bool = "" - @bs.send.pipe(: t_window) external focus: unit = "" - @bs.send.pipe(: t_window) external getComputedStyle: Dom.element => Dom.cssStyleDeclaration = "" - @bs.send.pipe(: t_window) - external getComputedStyleWithPseudoElement: (Dom.element, string) => Dom.cssStyleDeclaration = - "getComputedStyle" - @bs.send.pipe(: t_window) external getSelection: Dom.selection = "" - @bs.send.pipe(: t_window) - external matchMedia: string => mediaQueryList = "" /* experimental, CSSOM View module */ - @bs.send.pipe(: t_window) - external moveBy: (int, int) => unit = "" /* experimental, CSSOM View module */ - @bs.send.pipe(: t_window) - external moveTo: (int, int) => unit = "" /* experimental, CSSOM View module */ - @bs.send.pipe(: t_window) @return(nullable) - external open_: (~url: string, ~name: string, ~features: string=?) => option = - "open" /* yes, features is a stringly typed list of key value pairs, sigh */ - @bs.send.pipe(: t_window) - external postMessage: ('a, string) => unit = "" /* experimental-ish?, Web Messaging */ - @bs.send.pipe(: t_window) - external postMessageWithTransfers: ('a, string, array) => unit = - "postMessage" /* experimental-ish?, Web Messaging */ - @bs.send.pipe(: t_window) external print: unit = "" - @bs.send.pipe(: t_window) external prompt: string => string = "" - @bs.send.pipe(: t_window) external promptWithDefault: (string, string) => string = "prompt" - /* requestAnimationFrame: accessed directly via Webapi */ - @bs.send.pipe(: t_window) - external requestIdleCallback: (idleDeadline => unit) => idleCallbackId = - "" /* experimental, Cooperative Scheduling of Background Tasks */ - @bs.send.pipe(: t_window) - external requestIdleCallbackWithOptions: ( - idleDeadline => unit, - {"timeout": int}, - ) => idleCallbackId = - "requestIdleCallback" /* experimental, Cooperative Scheduling of Background Tasks */ - @bs.send.pipe(: t_window) - external resizeBy: (int, int) => unit = "" /* experimental, CSSOM View module */ - @bs.send.pipe(: t_window) - external resizeTo: (int, int) => unit = "" /* experimental, CSSOM View module */ - @bs.send.pipe(: t_window) - external scroll: (float, float) => unit = "" /* experimental, CSSOM View module */ - @bs.send.pipe(: t_window) - external scrollBy: (float, float) => unit = "" /* experimental, CSSOM View module */ - @bs.send.pipe(: t_window) - external scrollTo: (float, float) => unit = "" /* experimental, CSSOM View module */ - @bs.send.pipe(: t_window) external stop: unit = "" - - @bs.send.pipe(: t_window) - external addPopStateEventListener: (@as("popstate") _, Dom.popStateEvent => unit) => unit = - "addEventListener" - @bs.send.pipe(: t_window) - external removePopStateEventListener: (@as("popstate") _, Dom.popStateEvent => unit) => unit = - "removeEventListener" @set external setOnLoad: (t_window, unit => unit) => unit = diff --git a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Url.res b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Url.res index 8c158d4584..1af44c7a6c 100644 --- a/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Url.res +++ b/jscomp/syntax/tests/idempotency/bs-webapi/src/Webapi/Webapi__Url.res @@ -4,18 +4,6 @@ module URLSearchParams = { @new external make: string => t = "URLSearchParams" @new external makeWithDict: Js.Dict.t => t = "URLSearchParams" @new external makeWithArray: array<(string, string)> => t = "URLSearchParams" - @bs.send.pipe(: t) external append: (string, string) => unit = "" - @bs.send.pipe(: t) external delete: string => unit = "" - @bs.send.pipe(: t) external entries: Js.Array.array_like = "" - @bs.send.pipe(: t) external forEach: (@uncurry (string, string) => unit) => unit = "" - @return(nullable) @bs.send.pipe(: t) external get: string => option = "" - @bs.send.pipe(: t) external getAll: string => array = "" - @bs.send.pipe(: t) external has: string => bool = "" - @bs.send.pipe(: t) external keys: Js.Array.array_like = "" - @bs.send.pipe(: t) external set: (string, string) => unit = "" - @bs.send.pipe(: t) external sort: unit = "" - @bs.send.pipe(: t) external toString: string = "" - @bs.send.pipe(: t) external values: Js.Array.array_like = "" } type t diff --git a/jscomp/syntax/tests/idempotency/reason-react/src/ReactEventRe.res b/jscomp/syntax/tests/idempotency/reason-react/src/ReactEventRe.res index ac179643fd..382b424ef7 100644 --- a/jscomp/syntax/tests/idempotency/reason-react/src/ReactEventRe.res +++ b/jscomp/syntax/tests/idempotency/reason-react/src/ReactEventRe.res @@ -13,16 +13,6 @@ module MakeSyntheticWrapper = ( @get external eventPhase: Type.t => int = "eventPhase" @get external isTrusted: Type.t => bool = "isTrusted" @get external nativeEvent: Type.t => {..} = "nativeEvent" /* Should return Dom.event */ - @bs.send.pipe(: Type.t) external preventDefault: unit = "preventDefault" - @bs.send.pipe(: Type.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @bs.send.pipe(: Type.t) external stopPropagation: unit = "stopPropagation" - @bs.send.pipe(: Type.t) - external isPropagationStopped: bool = "isPropagationStopped" - @get external target: Type.t => Dom.element = "target" /* Should return Dom.evetTarget */ - @get external timeStamp: Type.t => float = "timeStamp" - @get external _type: Type.t => string = "type" - @bs.send.pipe(: Type.t) external persist: unit = "persist" } module Synthetic = { @@ -39,18 +29,6 @@ module Synthetic = { @get external isTrusted: synthetic<'a> => bool = "isTrusted" @get external nativeEvent: synthetic<'a> => {..} = "nativeEvent" /* Should return Dom.event */ - @bs.send.pipe(: synthetic<'a>) - external preventDefault: unit = "preventDefault" - @bs.send.pipe(: synthetic<'a>) - external isDefaultPrevented: bool = "isDefaultPrevented" - @bs.send.pipe(: synthetic<'a>) - external stopPropagation: unit = "stopPropagation" - @bs.send.pipe(: synthetic<'a>) - external isPropagationStopped: bool = "isPropagationStopped" - @get external target: synthetic<'a> => Dom.element = "target" /* Should return Dom.evetTarget */ - @get external timeStamp: synthetic<'a> => float = "timeStamp" - @get external _type: synthetic<'a> => string = "type" - @bs.send.pipe(: synthetic<'a>) external persist: unit = "persist" } /* Cast any event type to the general synthetic type. This is safe, since synthetic is more general */ @@ -83,8 +61,6 @@ module Keyboard = { @get external altKey: t => bool = "altKey" @get external charCode: t => int = "charCode" @get external ctrlKey: t => bool = "ctrlKey" - @bs.send.pipe(: t) - external getModifierState: string => bool = "getModifierState" @get external key: t => string = "key" @get external keyCode: t => int = "keyCode" @get external locale: t => string = "locale" @@ -125,8 +101,6 @@ module Mouse = { @get external clientX: t => int = "clientX" @get external clientY: t => int = "clientY" @get external ctrlKey: t => bool = "ctrlKey" - @bs.send.pipe(: t) - external getModifierState: string => bool = "getModifierState" @get external metaKey: t => bool = "metaKey" @get external pageX: t => int = "pageX" @get external pageY: t => int = "pageY" @@ -154,8 +128,6 @@ module Touch = { @get external altKey: t => bool = "altKey" @get external changedTouches: t => {..} = "changedTouches" /* Should return Dom.touchList */ @get external ctrlKey: t => bool = "ctrlKey" - @bs.send.pipe(: t) - external getModifierState: string => bool = "getModifierState" @get external metaKey: t => bool = "metaKey" @get external shiftKey: t => bool = "shiftKey" @get external targetTouches: t => {..} = "targetTouches" /* Should return Dom.touchList */ diff --git a/jscomp/syntax/tests/idempotency/reason-react/src/ReactEventRe.resi b/jscomp/syntax/tests/idempotency/reason-react/src/ReactEventRe.resi index 77a29c0198..0eaa149b27 100644 --- a/jscomp/syntax/tests/idempotency/reason-react/src/ReactEventRe.resi +++ b/jscomp/syntax/tests/idempotency/reason-react/src/ReactEventRe.resi @@ -25,29 +25,12 @@ module Synthetic: { @deprecated("Please use ReactEvent.Synthetic.nativeEvent") @get external nativeEvent: ReactEvent.synthetic<'a> => {..} = "nativeEvent" @deprecated("Please use myEvent->ReactEvent.Synthetic.preventDefault") - @bs.send.pipe(: ReactEvent.synthetic<'a>) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Synthetic.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.synthetic<'a>) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Synthetic.stopPropagation") - @bs.send.pipe(: ReactEvent.synthetic<'a>) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Synthetic.isPropagationStopped") - @bs.send.pipe(: ReactEvent.synthetic<'a>) - external isPropagationStopped: bool = "isPropagationStopped" - @deprecated( - "Please use ReactEvent.Synthetic.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" - ) @get external target: ReactEvent.synthetic<'a> => Dom.element = "target" @deprecated("Please use ReactEvent.Synthetic.timeStamp") @get external timeStamp: ReactEvent.synthetic<'a> => float = "timeStamp" @deprecated("Please use ReactEvent.Synthetic.type_") @get external _type: ReactEvent.synthetic<'a> => string = "type" - @deprecated("Please use myEvent->ReactEvent.Synthetic.persist") - @bs.send.pipe(: ReactEvent.synthetic<'a>) - external persist: unit = "persist" } /* Cast any event type to the general synthetic type. This is safe, since synthetic is more general */ @@ -77,17 +60,6 @@ module Clipboard: { @deprecated("Please use ReactEvent.Clipboard.nativeEvent") @get external nativeEvent: ReactEvent.Clipboard.t => {..} = "nativeEvent" @deprecated("Please use myEvent->ReactEvent.Clipboard.preventDefault") - @bs.send.pipe(: ReactEvent.Clipboard.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Clipboard.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Clipboard.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Clipboard.stopPropagation") - @bs.send.pipe(: ReactEvent.Clipboard.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Clipboard.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Clipboard.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Clipboard.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -98,8 +70,6 @@ module Clipboard: { @deprecated("Please use ReactEvent.Clipboard.type_") @get external _type: ReactEvent.Clipboard.t => string = "type" @deprecated("Please use myEvent->ReactEvent.Clipboard.persist") - @bs.send.pipe(: ReactEvent.Clipboard.t) - external persist: unit = "persist" @deprecated("Please use ReactEvent.Clipboard.clipboardData") @get external clipboardData: ReactEvent.Clipboard.t => {..} = "clipboardData" /* Should return Dom.dataTransfer */ @@ -128,20 +98,6 @@ module Composition: { @deprecated("Please use ReactEvent.Composition.nativeEvent") @get external nativeEvent: ReactEvent.Composition.t => {..} = "nativeEvent" @deprecated("Please use myEvent->ReactEvent.Composition.preventDefault") - @bs.send.pipe(: ReactEvent.Composition.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Composition.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Composition.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Composition.stopPropagation") - @bs.send.pipe(: ReactEvent.Composition.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Composition.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Composition.t) - external isPropagationStopped: bool = "isPropagationStopped" - @deprecated( - "Please use ReactEvent.Composition.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" - ) @get external target: ReactEvent.Composition.t => Dom.element = "target" @deprecated("Please use ReactEvent.Composition.timeStamp") @get @@ -149,8 +105,6 @@ module Composition: { @deprecated("Please use ReactEvent.Composition.type_") @get external _type: ReactEvent.Composition.t => string = "type" @deprecated("Please use myEvent->ReactEvent.Composition.persist") - @bs.send.pipe(: ReactEvent.Composition.t) - external persist: unit = "persist" @deprecated("Please use ReactEvent.Composition.data") @get external data: ReactEvent.Composition.t => string = "data" } @@ -177,18 +131,7 @@ module Keyboard: { external isTrusted: ReactEvent.Keyboard.t => bool = "isTrusted" @deprecated("Please use ReactEvent.Keyboard.nativeEvent") @get external nativeEvent: ReactEvent.Keyboard.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.Keyboard.preventDefault") - @bs.send.pipe(: ReactEvent.Keyboard.t) - external preventDefault: unit = "preventDefault" @deprecated("Please use myEvent->ReactEvent.Keyboard.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Keyboard.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Keyboard.stopPropagation") - @bs.send.pipe(: ReactEvent.Keyboard.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Keyboard.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Keyboard.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Keyboard.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -198,18 +141,12 @@ module Keyboard: { external timeStamp: ReactEvent.Keyboard.t => float = "timeStamp" @deprecated("Please use ReactEvent.Keyboard.type_") @get external _type: ReactEvent.Keyboard.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Keyboard.persist") - @bs.send.pipe(: ReactEvent.Keyboard.t) - external persist: unit = "persist" @deprecated("Please use ReactEvent.Keyboard.altKey") @get external altKey: ReactEvent.Keyboard.t => bool = "altKey" @deprecated("Please use ReactEvent.Keyboard.charCode") @get external charCode: ReactEvent.Keyboard.t => int = "charCode" @deprecated("Please use ReactEvent.Keyboard.ctrlKey") @get external ctrlKey: ReactEvent.Keyboard.t => bool = "ctrlKey" - @deprecated("Please use myEvent->ReactEvent.Keyboard.getModifierState") - @bs.send.pipe(: ReactEvent.Keyboard.t) - external getModifierState: string => bool = "getModifierState" @deprecated("Please use ReactEvent.Keyboard.key") @get external key: ReactEvent.Keyboard.t => string = "key" @deprecated("Please use ReactEvent.Keyboard.keyCode") @get @@ -250,18 +187,6 @@ module Focus: { external isTrusted: ReactEvent.Focus.t => bool = "isTrusted" @deprecated("Please use ReactEvent.Focus.nativeEvent") @get external nativeEvent: ReactEvent.Focus.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.Focus.preventDefault") - @bs.send.pipe(: ReactEvent.Focus.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Focus.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Focus.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Focus.stopPropagation") - @bs.send.pipe(: ReactEvent.Focus.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Focus.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Focus.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Focus.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -271,8 +196,6 @@ module Focus: { external timeStamp: ReactEvent.Focus.t => float = "timeStamp" @deprecated("Please use ReactEvent.Focus.type_") @get external _type: ReactEvent.Focus.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Focus.persist") @bs.send.pipe(: ReactEvent.Focus.t) - external persist: unit = "persist" @deprecated( "Please use ReactEvent.Focus.relatedTarget and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -304,17 +227,6 @@ module Form: { @deprecated("Please use ReactEvent.Form.nativeEvent") @get external nativeEvent: ReactEvent.Form.t => {..} = "nativeEvent" @deprecated("Please use myEvent->ReactEvent.Form.preventDefault") - @bs.send.pipe(: ReactEvent.Form.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Form.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Form.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Form.stopPropagation") - @bs.send.pipe(: ReactEvent.Form.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Form.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Form.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Form.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -324,8 +236,6 @@ module Form: { external timeStamp: ReactEvent.Form.t => float = "timeStamp" @deprecated("Please use ReactEvent.Form.type_") @get external _type: ReactEvent.Form.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Form.persist") @bs.send.pipe(: ReactEvent.Form.t) - external persist: unit = "persist" } module Mouse: { @@ -350,18 +260,6 @@ module Mouse: { external isTrusted: ReactEvent.Mouse.t => bool = "isTrusted" @deprecated("Please use ReactEvent.Mouse.nativeEvent") @get external nativeEvent: ReactEvent.Mouse.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.Mouse.preventDefault") - @bs.send.pipe(: ReactEvent.Mouse.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Mouse.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Mouse.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Mouse.stopPropagation") - @bs.send.pipe(: ReactEvent.Mouse.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Mouse.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Mouse.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Mouse.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -371,8 +269,6 @@ module Mouse: { external timeStamp: ReactEvent.Mouse.t => float = "timeStamp" @deprecated("Please use ReactEvent.Mouse.type_") @get external _type: ReactEvent.Mouse.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Mouse.persist") @bs.send.pipe(: ReactEvent.Mouse.t) - external persist: unit = "persist" @deprecated("Please use ReactEvent.Mouse.altKey") @get external altKey: ReactEvent.Mouse.t => bool = "altKey" @deprecated("Please use ReactEvent.Mouse.button") @get @@ -385,9 +281,6 @@ module Mouse: { external clientY: ReactEvent.Mouse.t => int = "clientY" @deprecated("Please use ReactEvent.Mouse.ctrlKey") @get external ctrlKey: ReactEvent.Mouse.t => bool = "ctrlKey" - @deprecated("Please use myEvent->ReactEvent.Mouse.getModifierState") - @bs.send.pipe(: ReactEvent.Mouse.t) - external getModifierState: string => bool = "getModifierState" @deprecated("Please use ReactEvent.Mouse.metaKey") @get external metaKey: ReactEvent.Mouse.t => bool = "metaKey" @deprecated("Please use ReactEvent.Mouse.pageX") @get @@ -430,17 +323,6 @@ module Selection: { external isTrusted: ReactEvent.Selection.t => bool = "isTrusted" @deprecated("Please use ReactEvent.Selection.nativeEvent") @get external nativeEvent: ReactEvent.Selection.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.Selection.preventDefault") - @bs.send.pipe(: ReactEvent.Selection.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Selection.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Selection.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Selection.stopPropagation") - @bs.send.pipe(: ReactEvent.Selection.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Selection.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Selection.t) external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Selection.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" @@ -451,9 +333,6 @@ module Selection: { external timeStamp: ReactEvent.Selection.t => float = "timeStamp" @deprecated("Please use ReactEvent.Selection.type_") @get external _type: ReactEvent.Selection.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Selection.persist") - @bs.send.pipe(: ReactEvent.Selection.t) - external persist: unit = "persist" } module Touch: { @@ -479,17 +358,6 @@ module Touch: { @deprecated("Please use ReactEvent.Touch.nativeEvent") @get external nativeEvent: ReactEvent.Touch.t => {..} = "nativeEvent" @deprecated("Please use myEvent->ReactEvent.Touch.preventDefault") - @bs.send.pipe(: ReactEvent.Touch.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Touch.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Touch.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Touch.stopPropagation") - @bs.send.pipe(: ReactEvent.Touch.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Touch.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Touch.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Touch.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -499,8 +367,6 @@ module Touch: { external timeStamp: ReactEvent.Touch.t => float = "timeStamp" @deprecated("Please use ReactEvent.Touch.type_") @get external _type: ReactEvent.Touch.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Touch.persist") @bs.send.pipe(: ReactEvent.Touch.t) - external persist: unit = "persist" @deprecated("Please use ReactEvent.Touch.altKey") @get external altKey: ReactEvent.Touch.t => bool = "altKey" @deprecated("Please use ReactEvent.Touch.changedTouches") @get @@ -508,9 +374,6 @@ module Touch: { "changedTouches" /* Should return Dom.touchList */ @deprecated("Please use ReactEvent.Touch.ctrlKey") @get external ctrlKey: ReactEvent.Touch.t => bool = "ctrlKey" - @deprecated("Please use myEvent->ReactEvent.Touch.getModifierState") - @bs.send.pipe(: ReactEvent.Touch.t) - external getModifierState: string => bool = "getModifierState" @deprecated("Please use ReactEvent.Touch.metaKey") @get external metaKey: ReactEvent.Touch.t => bool = "metaKey" @deprecated("Please use ReactEvent.Touch.shiftKey") @get @@ -544,16 +407,6 @@ module UI: { external isTrusted: ReactEvent.UI.t => bool = "isTrusted" @deprecated("Please use ReactEvent.UI.nativeEvent") @get external nativeEvent: ReactEvent.UI.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.UI.preventDefault") @bs.send.pipe(: ReactEvent.UI.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.UI.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.UI.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.UI.stopPropagation") @bs.send.pipe(: ReactEvent.UI.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.UI.isPropagationStopped") - @bs.send.pipe(: ReactEvent.UI.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.UI.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -563,8 +416,6 @@ module UI: { external timeStamp: ReactEvent.UI.t => float = "timeStamp" @deprecated("Please use ReactEvent.UI.type_") @get external _type: ReactEvent.UI.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.UI.persist") @bs.send.pipe(: ReactEvent.UI.t) - external persist: unit = "persist" @deprecated("Please use ReactEvent.UI.detail") @get external detail: ReactEvent.UI.t => int = "detail" @deprecated("Please use ReactEvent.UI.view") @get @@ -594,18 +445,6 @@ module Wheel: { external isTrusted: ReactEvent.Wheel.t => bool = "isTrusted" @deprecated("Please use ReactEvent.Wheel.nativeEvent") @get external nativeEvent: ReactEvent.Wheel.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.Wheel.preventDefault") - @bs.send.pipe(: ReactEvent.Wheel.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Wheel.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Wheel.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Wheel.stopPropagation") - @bs.send.pipe(: ReactEvent.Wheel.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Wheel.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Wheel.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Wheel.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -615,8 +454,6 @@ module Wheel: { external timeStamp: ReactEvent.Wheel.t => float = "timeStamp" @deprecated("Please use ReactEvent.Wheel.type_") @get external _type: ReactEvent.Wheel.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Wheel.persist") @bs.send.pipe(: ReactEvent.Wheel.t) - external persist: unit = "persist" @deprecated("Please use ReactEvent.Wheel.deltaMode") @get external deltaMode: ReactEvent.Wheel.t => int = "deltaMode" @deprecated("Please use ReactEvent.Wheel.deltaX") @get @@ -649,18 +486,6 @@ module Media: { external isTrusted: ReactEvent.Media.t => bool = "isTrusted" @deprecated("Please use ReactEvent.Media.nativeEvent") @get external nativeEvent: ReactEvent.Media.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.Media.preventDefault") - @bs.send.pipe(: ReactEvent.Media.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Media.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Media.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Media.stopPropagation") - @bs.send.pipe(: ReactEvent.Media.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Media.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Media.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Media.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -670,8 +495,6 @@ module Media: { external timeStamp: ReactEvent.Media.t => float = "timeStamp" @deprecated("Please use ReactEvent.Media.type_") @get external _type: ReactEvent.Media.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Media.persist") @bs.send.pipe(: ReactEvent.Media.t) - external persist: unit = "persist" } module Image: { @@ -696,18 +519,6 @@ module Image: { external isTrusted: ReactEvent.Image.t => bool = "isTrusted" @deprecated("Please use ReactEvent.Image.nativeEvent") @get external nativeEvent: ReactEvent.Image.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.Image.preventDefault") - @bs.send.pipe(: ReactEvent.Image.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Image.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Image.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Image.stopPropagation") - @bs.send.pipe(: ReactEvent.Image.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Image.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Image.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Image.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -717,8 +528,6 @@ module Image: { external timeStamp: ReactEvent.Image.t => float = "timeStamp" @deprecated("Please use ReactEvent.Image.type_") @get external _type: ReactEvent.Image.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Image.persist") @bs.send.pipe(: ReactEvent.Image.t) - external persist: unit = "persist" } module Animation: { @@ -743,18 +552,6 @@ module Animation: { external isTrusted: ReactEvent.Animation.t => bool = "isTrusted" @deprecated("Please use ReactEvent.Animation.nativeEvent") @get external nativeEvent: ReactEvent.Animation.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.Animation.preventDefault") - @bs.send.pipe(: ReactEvent.Animation.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Animation.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Animation.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Animation.stopPropagation") - @bs.send.pipe(: ReactEvent.Animation.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Animation.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Animation.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Animation.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -764,9 +561,6 @@ module Animation: { external timeStamp: ReactEvent.Animation.t => float = "timeStamp" @deprecated("Please use ReactEvent.Animation.type_") @get external _type: ReactEvent.Animation.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Animation.persist") - @bs.send.pipe(: ReactEvent.Animation.t) - external persist: unit = "persist" @deprecated("Please use ReactEvent.Animation.animationName") @get external animationName: ReactEvent.Animation.t => string = "animationName" @deprecated("Please use ReactEvent.Animation.pseudoElement") @get @@ -797,18 +591,6 @@ module Transition: { external isTrusted: ReactEvent.Transition.t => bool = "isTrusted" @deprecated("Please use ReactEvent.Transition.nativeEvent") @get external nativeEvent: ReactEvent.Transition.t => {..} = "nativeEvent" - @deprecated("Please use myEvent->ReactEvent.Transition.preventDefault") - @bs.send.pipe(: ReactEvent.Transition.t) - external preventDefault: unit = "preventDefault" - @deprecated("Please use myEvent->ReactEvent.Transition.isDefaultPrevented") - @bs.send.pipe(: ReactEvent.Transition.t) - external isDefaultPrevented: bool = "isDefaultPrevented" - @deprecated("Please use myEvent->ReactEvent.Transition.stopPropagation") - @bs.send.pipe(: ReactEvent.Transition.t) - external stopPropagation: unit = "stopPropagation" - @deprecated("Please use myEvent->ReactEvent.Transition.isPropagationStopped") - @bs.send.pipe(: ReactEvent.Transition.t) - external isPropagationStopped: bool = "isPropagationStopped" @deprecated( "Please use ReactEvent.Transition.target and remove the surrounding ReactDOMRe.domElementToObj wrapper if any (no longer needed)" ) @@ -818,8 +600,6 @@ module Transition: { external timeStamp: ReactEvent.Transition.t => float = "timeStamp" @deprecated("Please use ReactEvent.Transition.type_") @get external _type: ReactEvent.Transition.t => string = "type" - @deprecated("Please use myEvent->ReactEvent.Transition.persist") - @bs.send.pipe(: ReactEvent.Transition.t) external persist: unit = "persist" @deprecated("Please use ReactEvent.Transition.propertyName") @get external propertyName: ReactEvent.Transition.t => string = "propertyName" diff --git a/jscomp/test/build.ninja b/jscomp/test/build.ninja index 006e619779..e23a1352c0 100644 --- a/jscomp/test/build.ninja +++ b/jscomp/test/build.ninja @@ -324,7 +324,6 @@ o test/gpr_5071_test.cmi test/gpr_5071_test.cmj : cc test/gpr_5071_test.res | te o test/gpr_5169_test.cmi test/gpr_5169_test.cmj : cc test/gpr_5169_test.res | $bsc $stdlib runtime o test/gpr_5218_test.cmi test/gpr_5218_test.cmj : cc test/gpr_5218_test.res | test/mt.cmj $bsc $stdlib runtime o test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj : cc test/gpr_5280_optimize_test.res | $bsc $stdlib runtime -o test/gpr_5312.cmi test/gpr_5312.cmj : cc test/gpr_5312.res | $bsc $stdlib runtime o test/gpr_5557.cmi test/gpr_5557.cmj : cc test/gpr_5557.res | $bsc $stdlib runtime o test/gpr_5753.cmi test/gpr_5753.cmj : cc test/gpr_5753.res | $bsc $stdlib runtime o test/gpr_658.cmi test/gpr_658.cmj : cc test/gpr_658.res | $bsc $stdlib runtime @@ -404,7 +403,6 @@ o test/js_obj_test.cmi test/js_obj_test.cmj : cc test/js_obj_test.res | test/mt. o test/js_option_test.cmi test/js_option_test.cmj : cc test/js_option_test.res | test/mt.cmj $bsc $stdlib runtime o test/js_re_test.cmi test/js_re_test.cmj : cc test/js_re_test.res | test/mt.cmj $bsc $stdlib runtime o test/js_string_test.cmi test/js_string_test.cmj : cc test/js_string_test.res | test/mt.cmj $bsc $stdlib runtime -o test/js_typed_array_test.cmi test/js_typed_array_test.cmj : cc test/js_typed_array_test.res | test/mt.cmj $bsc $stdlib runtime o test/js_undefined_test.cmi test/js_undefined_test.cmj : cc test/js_undefined_test.res | test/mt.cmj $bsc $stdlib runtime o test/js_val.cmi test/js_val.cmj : cc test/js_val.res | $bsc $stdlib runtime o test/jsoo_400_test.cmi test/jsoo_400_test.cmj : cc test/jsoo_400_test.res | test/mt.cmj $bsc $stdlib runtime @@ -714,4 +712,4 @@ o test/update_record_test.cmi test/update_record_test.cmj : cc test/update_recor o test/variant.cmi test/variant.cmj : cc test/variant.res | $bsc $stdlib runtime o test/variantsMatching.cmi test/variantsMatching.cmj : cc test/variantsMatching.res | $bsc $stdlib runtime o test/webpack_config.cmi test/webpack_config.cmj : cc test/webpack_config.res | $bsc $stdlib runtime -o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DerivingAccessorsCurried.cmi test/DerivingAccessorsCurried.cmj test/DerivingAccessorsUncurried.cmi test/DerivingAccessorsUncurried.cmj test/DictInference.cmi test/DictInference.cmj test/DisambiguateOptionalFields.cmi test/DisambiguateOptionalFields.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/ImportAttributes.cmi test/ImportAttributes.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/bigint_test.cmi test/bigint_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exotic_labels_test.cmi test/exotic_labels_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/function_directives.cmi test/function_directives.cmj test/function_directives_no_inline.cmi test/function_directives_no_inline.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5312.cmi test/gpr_5312.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import2.cmi test/import2.cmj test/import_external.cmi test/import_external.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_typed_array_test.cmi test/js_typed_array_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/omit_trailing_undefined_in_external_calls.cmi test/omit_trailing_undefined_in_external_calls.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/recmodule.cmi test/recmodule.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tagged_template_test.cmi test/tagged_template_test.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type-coercion-free-vars.cmi test/type-coercion-free-vars.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj +o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/AsInUncurriedExternals.cmi test/AsInUncurriedExternals.cmj test/Coercion.cmi test/Coercion.cmj test/DerivingAccessorsCurried.cmi test/DerivingAccessorsCurried.cmj test/DerivingAccessorsUncurried.cmi test/DerivingAccessorsUncurried.cmj test/DictInference.cmi test/DictInference.cmj test/DisambiguateOptionalFields.cmi test/DisambiguateOptionalFields.cmj test/DotDotDot.cmi test/DotDotDot.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/FFI.cmi test/FFI.cmj test/Import.cmi test/Import.cmj test/ImportAttributes.cmi test/ImportAttributes.cmj test/RecordCoercion.cmi test/RecordCoercion.cmj test/RecordOrObject.cmi test/RecordOrObject.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/UntaggedVariants.cmi test/UntaggedVariants.cmj test/VariantCoercion.cmi test/VariantCoercion.cmj test/VariantSpreads.cmi test/VariantSpreads.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/as_inline_record_test.cmi test/as_inline_record_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/async_inside_loop.cmi test/async_inside_loop.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/bigint_test.cmi test/bigint_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_bigint_test.cmi test/caml_compare_bigint_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exotic_labels_test.cmi test/exotic_labels_test.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/function_directives.cmi test/function_directives.cmj test/function_directives_no_inline.cmi test/function_directives_no_inline.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/import2.cmi test/import2.cmj test/import_external.cmi test/import_external.cmj test/import_side_effect.cmi test/import_side_effect.cmj test/import_side_effect_free.cmi test/import_side_effect_free.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_condition_with_pattern_matching.cmi test/inline_condition_with_pattern_matching.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/omit_trailing_undefined_in_external_calls.cmi test/omit_trailing_undefined_in_external_calls.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/recmodule.cmi test/recmodule.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_type_spread.cmi test/record_type_spread.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect2.cmi test/side_effect2.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tagged_template_test.cmi test/tagged_template_test.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type-coercion-free-vars.cmi test/type-coercion-free-vars.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/update_record_test.cmi test/update_record_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/webpack_config.cmi test/webpack_config.cmj diff --git a/jscomp/test/ffi_splice_test.js b/jscomp/test/ffi_splice_test.js index c4e4b6c483..d6133427dc 100644 --- a/jscomp/test/ffi_splice_test.js +++ b/jscomp/test/ffi_splice_test.js @@ -56,7 +56,7 @@ let v = new Make(1, 2, 3, 4); let u = v.sum(); -eq("File \"ffi_splice_test.res\", line 56, characters 12-19", u, 10); +eq("File \"ffi_splice_test.res\", line 55, characters 12-19", u, 10); Mt.from_pair_suites("Ffi_splice_test", suites.contents); diff --git a/jscomp/test/ffi_splice_test.res b/jscomp/test/ffi_splice_test.res index 0c5ce8c677..a0f60c031b 100644 --- a/jscomp/test/ffi_splice_test.res +++ b/jscomp/test/ffi_splice_test.res @@ -44,7 +44,6 @@ type t @send @variadic external test: (t, array) => t = "test" /* FIXME */ /* compile error */ -/* external test2 : int -> string -> t= "" [@@bs.send.pipe: t ] [@@variadic] */ let u = ["x", "d"] let f = x => x->test(["a", "b"])->test(["a", "b"]) /* |> test u */ diff --git a/jscomp/test/gpr_5312.js b/jscomp/test/gpr_5312.js deleted file mode 100644 index 237cd351ad..0000000000 --- a/jscomp/test/gpr_5312.js +++ /dev/null @@ -1,14 +0,0 @@ -// Generated by ReScript, PLEASE EDIT WITH CARE -'use strict'; - - -function someFunction(arg1, arg2, obj) { - obj.someFunction(arg1, arg2); -} - -let MyModule = { - someFunction: someFunction -}; - -exports.MyModule = MyModule; -/* No side effect */ diff --git a/jscomp/test/gpr_5312.res b/jscomp/test/gpr_5312.res deleted file mode 100644 index 572e0a8924..0000000000 --- a/jscomp/test/gpr_5312.res +++ /dev/null @@ -1,10 +0,0 @@ -@@config({flags : [ "-w", "-103"]}) -module type MyModule = { - type t - @bs.send.pipe(: t) external someFunction: (string, string) => unit = "someFunction" -} - -module MyModule: MyModule = { - type t - @bs.send.pipe(: t) external someFunction: (string, string) => unit = "someFunction" -} \ No newline at end of file diff --git a/jscomp/test/js_typed_array_test.js b/jscomp/test/js_typed_array_test.js deleted file mode 100644 index 1eba182c0a..0000000000 --- a/jscomp/test/js_typed_array_test.js +++ /dev/null @@ -1,2342 +0,0 @@ -// Generated by ReScript, PLEASE EDIT WITH CARE -'use strict'; - -let Mt = require("./mt.js"); -let $$Array = require("../../lib/js/array.js"); -let Curry = require("../../lib/js/curry.js"); -let Js_typed_array = require("../../lib/js/js_typed_array.js"); - -function mkI8(a) { - return new Int8Array(a); -} - -function via(make, f, arr) { - return Array.from(Curry._1(f, Curry._1(make, arr))); -} - -function viaInt8(f, arr) { - return function (param, param$1) { - return Array.from(Curry._1(param, new Int8Array(param$1))); - }; -} - -let x = new Int8Array([ - 1, - 2, - 3 - ]); - -let suites_0 = [ - "array_buffer - make", - (function (param) { - return { - TAG: "Eq", - _0: 5, - _1: new ArrayBuffer(5).byteLength - }; - }) -]; - -let suites_1 = { - hd: [ - "array_buffer - byteLength", - (function (param) { - return { - TAG: "Eq", - _0: 5, - _1: new ArrayBuffer(5).byteLength - }; - }) - ], - tl: { - hd: [ - "array_buffer - slice", - (function (param) { - return { - TAG: "Eq", - _0: 2, - _1: Js_typed_array.$$ArrayBuffer.slice(2, 4, new ArrayBuffer(5)).byteLength - }; - }) - ], - tl: { - hd: [ - "array_buffer - sliceFrom", - (function (param) { - return { - TAG: "Eq", - _0: 3, - _1: Js_typed_array.$$ArrayBuffer.sliceFrom(2, new ArrayBuffer(5)).byteLength - }; - }) - ], - tl: { - hd: [ - "typed_array - unsafe_get", - (function (param) { - return { - TAG: "Eq", - _0: 4, - _1: new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])[3] - }; - }) - ], - tl: { - hd: [ - "typed_array - unsafe_set", - (function (param) { - let a = new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "typed_array - buffer", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 3, - 4, - 5 - ]), - _1: new Int8Array(new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ]).buffer, 2) - }; - }) - ], - tl: { - hd: [ - "typed_array - byteLength", - (function (param) { - return { - TAG: "Eq", - _0: 10, - _1: new Int16Array([ - 1, - 2, - 3, - 4, - 5 - ]).byteLength - }; - }) - ], - tl: { - hd: [ - "typed_array - byteOffset", - (function (param) { - return { - TAG: "Eq", - _0: 0, - _1: new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ]).byteOffset - }; - }) - ], - tl: { - hd: [ - "typed_array - setArray", - (function (param) { - let f = function (a) { - Js_typed_array.$$Int8Array.setArray([ - 9, - 8, - 7 - ], a); - return a; - }; - return { - TAG: "Eq", - _0: new Int8Array([ - 9, - 8, - 7, - 4, - 5 - ]), - _1: f(new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - setArrayOffset", - (function (param) { - let f = function (a) { - Js_typed_array.$$Int8Array.setArrayOffset([ - 9, - 8, - 7 - ], 2, a); - return a; - }; - return { - TAG: "Eq", - _0: new Int8Array([ - 1, - 2, - 9, - 8, - 7 - ]), - _1: f(new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - length", - (function (param) { - return { - TAG: "Eq", - _0: 5, - _1: new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ]).length - }; - }) - ], - tl: { - hd: [ - "typed_array - copyWithin", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 1, - 2, - 3, - 1, - 2 - ]), - _1: Js_typed_array.$$Int8Array.copyWithin(-2, new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - copyWithinFrom", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 4, - 5, - 3, - 4, - 5 - ]), - _1: Js_typed_array.$$Int8Array.copyWithinFrom(0, 3, new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - copyWithinFromRange", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 4, - 2, - 3, - 4, - 5 - ]), - _1: Js_typed_array.$$Int8Array.copyWithinFromRange(0, 3, 4, new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - fillInPlace", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 4, - 4, - 4 - ]), - _1: Js_typed_array.$$Int8Array.fillInPlace(4, new Int8Array([ - 1, - 2, - 3 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - fillFromInPlace", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 1, - 4, - 4 - ]), - _1: Js_typed_array.$$Int8Array.fillFromInPlace(4, 1, new Int8Array([ - 1, - 2, - 3 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - fillRangeInPlace", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 1, - 4, - 3 - ]), - _1: Js_typed_array.$$Int8Array.fillRangeInPlace(4, 1, 2, new Int8Array([ - 1, - 2, - 3 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - reverseInPlace", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 3, - 2, - 1 - ]), - _1: new Int8Array([ - 1, - 2, - 3 - ]).reverse() - }; - }) - ], - tl: { - hd: [ - "typed_array - sortInPlace", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 1, - 2, - 3 - ]), - _1: new Int8Array([ - 3, - 1, - 2 - ]).sort() - }; - }) - ], - tl: { - hd: [ - "typed_array - sortInPlaceWith", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 3, - 2, - 1 - ]), - _1: Js_typed_array.$$Int8Array.sortInPlaceWith((function (a, b) { - return b - a | 0; - }), new Int8Array([ - 3, - 1, - 2 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - includes", - (function (param) { - return { - TAG: "Eq", - _0: true, - _1: Js_typed_array.$$Int8Array.includes(3, new Int8Array([ - 1, - 2, - 3 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - indexOf", - (function (param) { - return { - TAG: "Eq", - _0: 1, - _1: Js_typed_array.$$Int8Array.indexOf(2, new Int8Array([ - 1, - 2, - 3 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - indexOfFrom", - (function (param) { - return { - TAG: "Eq", - _0: 3, - _1: Js_typed_array.$$Int8Array.indexOfFrom(2, 2, new Int8Array([ - 1, - 2, - 3, - 2 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - join", - (function (param) { - return { - TAG: "Eq", - _0: "1,2,3", - _1: new Int8Array([ - 1, - 2, - 3 - ]).join() - }; - }) - ], - tl: { - hd: [ - "typed_array - joinWith", - (function (param) { - return { - TAG: "Eq", - _0: "1;2;3", - _1: Js_typed_array.$$Int8Array.joinWith(";", new Int8Array([ - 1, - 2, - 3 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - lastIndexOf", - (function (param) { - return { - TAG: "Eq", - _0: 1, - _1: Js_typed_array.$$Int8Array.lastIndexOf(2, new Int8Array([ - 1, - 2, - 3 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - lastIndexOfFrom", - (function (param) { - return { - TAG: "Eq", - _0: 1, - _1: Js_typed_array.$$Int8Array.lastIndexOfFrom(2, 2, new Int8Array([ - 1, - 2, - 3, - 2 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - slice", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 2, - 3 - ]), - _1: Js_typed_array.$$Int8Array.slice(1, 3, new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - copy", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ]), - _1: new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ]).slice() - }; - }) - ], - tl: { - hd: [ - "typed_array - sliceFrom", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 3, - 4, - 5 - ]), - _1: Js_typed_array.$$Int8Array.sliceFrom(2, new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - subarray", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 2, - 3 - ]), - _1: Js_typed_array.$$Int8Array.subarray(1, 3, new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - subarrayFrom", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 3, - 4, - 5 - ]), - _1: Js_typed_array.$$Int8Array.subarrayFrom(2, new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - toString", - (function (param) { - return { - TAG: "Eq", - _0: "1,2,3", - _1: new Int8Array([ - 1, - 2, - 3 - ]).toString() - }; - }) - ], - tl: { - hd: [ - "typed_array - toLocaleString", - (function (param) { - return { - TAG: "Eq", - _0: "1,2,3", - _1: new Int8Array([ - 1, - 2, - 3 - ]).toLocaleString() - }; - }) - ], - tl: { - hd: [ - "typed_array - every", - (function (param) { - return { - TAG: "Eq", - _0: true, - _1: Js_typed_array.$$Int8Array.every((function (n) { - return n > 0; - }), new Int8Array([ - 1, - 2, - 3 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - everyi", - (function (param) { - return { - TAG: "Eq", - _0: false, - _1: Js_typed_array.$$Int8Array.everyi((function (param, i) { - return i > 0; - }), new Int8Array([ - 1, - 2, - 3 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - filter", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 2, - 4 - ]), - _1: Js_typed_array.$$Int8Array.filter((function (n) { - return n % 2 === 0; - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - filteri", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 1, - 3 - ]), - _1: Js_typed_array.$$Int8Array.filteri((function (param, i) { - return i % 2 === 0; - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - find", - (function (param) { - return { - TAG: "Eq", - _0: 2, - _1: Js_typed_array.$$Int8Array.find((function (n) { - return n % 2 === 0; - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - findi", - (function (param) { - return { - TAG: "Eq", - _0: 1, - _1: Js_typed_array.$$Int8Array.findi((function (param, i) { - return i % 2 === 0; - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - findIndex", - (function (param) { - return { - TAG: "Eq", - _0: 1, - _1: Js_typed_array.$$Int8Array.findIndex((function (n) { - return n % 2 === 0; - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - findIndexi", - (function (param) { - return { - TAG: "Eq", - _0: 0, - _1: Js_typed_array.$$Int8Array.findIndexi((function (param, i) { - return i % 2 === 0; - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - forEach", - (function (param) { - let sum = { - contents: 0 - }; - Js_typed_array.$$Int8Array.forEach((function (n) { - sum.contents = sum.contents + n | 0; - }), new Int8Array([ - 1, - 2, - 3 - ])); - return { - TAG: "Eq", - _0: 6, - _1: sum.contents - }; - }) - ], - tl: { - hd: [ - "typed_array - forEachi", - (function (param) { - let sum = { - contents: 0 - }; - Js_typed_array.$$Int8Array.forEachi((function (param, i) { - sum.contents = sum.contents + i | 0; - }), new Int8Array([ - 1, - 2, - 3 - ])); - return { - TAG: "Eq", - _0: 3, - _1: sum.contents - }; - }) - ], - tl: { - hd: [ - "typed_array - map", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 2, - 4, - 6, - 8 - ]), - _1: Js_typed_array.$$Int8Array.map((function (n) { - return (n << 1); - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - map", - (function (param) { - return { - TAG: "Eq", - _0: new Int8Array([ - 0, - 2, - 4, - 6 - ]), - _1: Js_typed_array.$$Int8Array.mapi((function (param, i) { - return (i << 1); - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - reduce", - (function (param) { - return { - TAG: "Eq", - _0: -10, - _1: Js_typed_array.$$Int8Array.reduce((function (acc, n) { - return acc - n | 0; - }), 0, new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - reducei", - (function (param) { - return { - TAG: "Eq", - _0: -6, - _1: Js_typed_array.$$Int8Array.reducei((function (acc, param, i) { - return acc - i | 0; - }), 0, new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - reduceRight", - (function (param) { - return { - TAG: "Eq", - _0: -10, - _1: Js_typed_array.$$Int8Array.reduceRight((function (acc, n) { - return acc - n | 0; - }), 0, new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - reduceRighti", - (function (param) { - return { - TAG: "Eq", - _0: -6, - _1: Js_typed_array.$$Int8Array.reduceRighti((function (acc, param, i) { - return acc - i | 0; - }), 0, new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - some", - (function (param) { - return { - TAG: "Eq", - _0: false, - _1: Js_typed_array.$$Int8Array.some((function (n) { - return n <= 0; - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "typed_array - somei", - (function (param) { - return { - TAG: "Eq", - _0: true, - _1: Js_typed_array.$$Int8Array.somei((function (param, i) { - return i <= 0; - }), new Int8Array([ - 1, - 2, - 3, - 4 - ])) - }; - }) - ], - tl: { - hd: [ - "int8_array - _BYTES_PER_ELEMENT", - (function (param) { - return { - TAG: "Eq", - _0: 1, - _1: Int8Array.BYTES_PER_ELEMENT - }; - }) - ], - tl: { - hd: [ - "int8_array - make", - (function (param) { - return { - TAG: "Eq", - _0: 3, - _1: new Int8Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) - ], - tl: { - hd: [ - "int8_array - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new Int8Array(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "int8_array - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new Int8Array(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "int8_array - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 2, - _1: new Int8Array(buffer, 8, 2).byteLength - }; - }) - ], - tl: { - hd: [ - "int8_array - fromLength", - (function (param) { - return { - TAG: "Eq", - _0: 3, - _1: new Int8Array(3).byteLength - }; - }) - ], - tl: { - hd: [ - "int8_array - unsafe_set - typed_array sanity check", - (function (param) { - let a = new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "uint8_array - _BYTES_PER_ELEMENT", - (function (param) { - return { - TAG: "Eq", - _0: 1, - _1: Uint8Array.BYTES_PER_ELEMENT - }; - }) - ], - tl: { - hd: [ - "uint8_array - make", - (function (param) { - return { - TAG: "Eq", - _0: 3, - _1: new Uint8Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8_array - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new Uint8Array(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8_array - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new Uint8Array(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8_array - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 2, - _1: new Uint8Array(buffer, 8, 2).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8_array - fromLength", - (function (param) { - return { - TAG: "Eq", - _0: 3, - _1: new Uint8Array(3).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8_array - unsafe_set - typed_array sanity check", - (function (param) { - let a = new Uint8Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "uint8clamped_array - _BYTES_PER_ELEMENT", - (function (param) { - return { - TAG: "Eq", - _0: 1, - _1: Uint8ClampedArray.BYTES_PER_ELEMENT - }; - }) - ], - tl: { - hd: [ - "uint8clamped_array - make", - (function (param) { - return { - TAG: "Eq", - _0: 3, - _1: new Uint8ClampedArray([ - 1, - 2, - 3 - ]).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8clamped_array - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new Uint8ClampedArray(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8clamped_array - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new Uint8ClampedArray(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8clamped_array - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 2, - _1: new Uint8ClampedArray(buffer, 8, 2).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8clamped_array - fromLength", - (function (param) { - return { - TAG: "Eq", - _0: 3, - _1: new Uint8ClampedArray(3).byteLength - }; - }) - ], - tl: { - hd: [ - "uint8clamped_array - unsafe_set - typed_array sanity check", - (function (param) { - let a = new Uint8ClampedArray([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "int16_array - _BYTES_PER_ELEMENT", - (function (param) { - return { - TAG: "Eq", - _0: 2, - _1: Int16Array.BYTES_PER_ELEMENT - }; - }) - ], - tl: { - hd: [ - "int16_array - make", - (function (param) { - return { - TAG: "Eq", - _0: 6, - _1: new Int16Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) - ], - tl: { - hd: [ - "int16_array - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new Int16Array(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "int16_array - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new Int16Array(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "int16_array - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 4, - _1: new Int16Array(buffer, 8, 2).byteLength - }; - }) - ], - tl: { - hd: [ - "int16_array - fromLength", - (function (param) { - return { - TAG: "Eq", - _0: 6, - _1: new Int16Array(3).byteLength - }; - }) - ], - tl: { - hd: [ - "int16_array - unsafe_set - typed_array sanity check", - (function (param) { - let a = new Int16Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "uint16_array - _BYTES_PER_ELEMENT", - (function (param) { - return { - TAG: "Eq", - _0: 2, - _1: Uint16Array.BYTES_PER_ELEMENT - }; - }) - ], - tl: { - hd: [ - "uint16_array - make", - (function (param) { - return { - TAG: "Eq", - _0: 6, - _1: new Uint16Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) - ], - tl: { - hd: [ - "uint16_array - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new Uint16Array(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "uint16_array - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new Uint16Array(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "uint16_array - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 4, - _1: new Uint16Array(buffer, 8, 2).byteLength - }; - }) - ], - tl: { - hd: [ - "uint16_array - fromLength", - (function (param) { - return { - TAG: "Eq", - _0: 6, - _1: new Uint16Array(3).byteLength - }; - }) - ], - tl: { - hd: [ - "uint16_array - unsafe_set - typed_array sanity check", - (function (param) { - let a = new Uint16Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "int32_array - _BYTES_PER_ELEMENT", - (function (param) { - return { - TAG: "Eq", - _0: 4, - _1: Int32Array.BYTES_PER_ELEMENT - }; - }) - ], - tl: { - hd: [ - "int32_array - make", - (function (param) { - return { - TAG: "Eq", - _0: 12, - _1: new Int32Array($$Array.map((function (prim) { - return prim; - }), [ - 1, - 2, - 3 - ])).byteLength - }; - }) - ], - tl: { - hd: [ - "int32_array - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new Int32Array(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "int32_array - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new Int32Array(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "int32_array - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 8, - _1: new Int32Array(buffer, 8, 2).byteLength - }; - }) - ], - tl: { - hd: [ - "int32_array - fromLength", - (function (param) { - return { - TAG: "Eq", - _0: 12, - _1: new Int32Array(3).byteLength - }; - }) - ], - tl: { - hd: [ - "int32_array - unsafe_set - typed_array sanity check", - (function (param) { - let a = new Int32Array($$Array.map((function (prim) { - return prim; - }), [ - 1, - 2, - 3, - 4, - 5 - ])); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "uint32_array - _BYTES_PER_ELEMENT", - (function (param) { - return { - TAG: "Eq", - _0: 4, - _1: Uint32Array.BYTES_PER_ELEMENT - }; - }) - ], - tl: { - hd: [ - "uint32_array - make", - (function (param) { - return { - TAG: "Eq", - _0: 12, - _1: new Uint32Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) - ], - tl: { - hd: [ - "uint32_array - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new Uint32Array(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "uint32_array - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new Uint32Array(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "uint32_array - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 8, - _1: new Uint32Array(buffer, 8, 2).byteLength - }; - }) - ], - tl: { - hd: [ - "uint32_array - fromLength", - (function (param) { - return { - TAG: "Eq", - _0: 12, - _1: new Uint32Array(3).byteLength - }; - }) - ], - tl: { - hd: [ - "uint32_array - unsafe_set - typed_array sanity check", - (function (param) { - let a = new Uint32Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "float32_array - _BYTES_PER_ELEMENT", - (function (param) { - return { - TAG: "Eq", - _0: 4, - _1: Float32Array.BYTES_PER_ELEMENT - }; - }) - ], - tl: { - hd: [ - "float32_array - make", - (function (param) { - return { - TAG: "Eq", - _0: 12, - _1: new Float32Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) - ], - tl: { - hd: [ - "float32_array - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new Float32Array(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "float32_array - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new Float32Array(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "float32_array - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 8, - _1: new Float32Array(buffer, 8, 2).byteLength - }; - }) - ], - tl: { - hd: [ - "float32_array - fromLength", - (function (param) { - return { - TAG: "Eq", - _0: 12, - _1: new Float32Array(3).byteLength - }; - }) - ], - tl: { - hd: [ - "float32_array - unsafe_set - typed_array sanity check", - (function (param) { - let a = new Float32Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "float64_array - _BYTES_PER_ELEMENT", - (function (param) { - return { - TAG: "Eq", - _0: 8, - _1: Float64Array.BYTES_PER_ELEMENT - }; - }) - ], - tl: { - hd: [ - "float64_array - make", - (function (param) { - return { - TAG: "Eq", - _0: 24, - _1: new Float64Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) - ], - tl: { - hd: [ - "float64_array - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new Float64Array(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "float64_array - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new Float64Array(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "float64_array - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 16, - _1: new Float64Array(buffer, 8, 2).byteLength - }; - }) - ], - tl: { - hd: [ - "float64_array - fromLength", - (function (param) { - return { - TAG: "Eq", - _0: 24, - _1: new Float64Array(3).byteLength - }; - }) - ], - tl: { - hd: [ - "float64_array - unsafe_set - typed_array sanity check", - (function (param) { - let a = new Float64Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: "Eq", - _0: 14, - _1: a[3] - }; - }) - ], - tl: { - hd: [ - "DataView - make, byteLength", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new DataView(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "DataView - fromBuffer", - (function (param) { - return { - TAG: "Eq", - _0: 32, - _1: new DataView(new ArrayBuffer(32)).byteLength - }; - }) - ], - tl: { - hd: [ - "DataView - fromBufferOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 24, - _1: new DataView(buffer, 8).byteLength - }; - }) - ], - tl: { - hd: [ - "DataView - fromBufferRange", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 4, - _1: new DataView(buffer, 8, 4).byteLength - }; - }) - ], - tl: { - hd: [ - "DataView - buffer", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: buffer, - _1: new DataView(buffer).buffer - }; - }) - ], - tl: { - hd: [ - "DataView - byteOffset", - (function (param) { - let buffer = new ArrayBuffer(32); - return { - TAG: "Eq", - _0: 8, - _1: new DataView(buffer, 8).byteOffset - }; - }) - ], - tl: { - hd: [ - "DataView - setInt8, getInt8", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setInt8(0, 1); - return { - TAG: "Eq", - _0: 1, - _1: view.getInt8(0) - }; - }) - ], - tl: { - hd: [ - "DataView - setUint8, getUint8", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setUint8(0, 128); - return { - TAG: "Eq", - _0: 128, - _1: view.getUint8(0) - }; - }) - ], - tl: { - hd: [ - "DataView - setInt16, getInt16", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setInt16(0, 257); - return { - TAG: "Eq", - _0: 257, - _1: view.getInt16(0) - }; - }) - ], - tl: { - hd: [ - "DataView - getInt16LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setInt16(0, 25000, 1); - return { - TAG: "Eq", - _0: 25000, - _1: view.getInt16(0, 1) - }; - }) - ], - tl: { - hd: [ - "DataView - setInt16LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setInt16(0, 25000, 1); - return { - TAG: "Eq", - _0: -22431, - _1: view.getInt16(0) - }; - }) - ], - tl: { - hd: [ - "DataView - setUint16, getUint16", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setUint16(0, 32768); - return { - TAG: "Eq", - _0: 32768, - _1: view.getUint16(0) - }; - }) - ], - tl: { - hd: [ - "DataView - getUint16LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setUint16(0, 32768, 1); - return { - TAG: "Eq", - _0: 32768, - _1: view.getUint16(0, 1) - }; - }) - ], - tl: { - hd: [ - "DataView - setUint16LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setUint16(0, 32768, 1); - return { - TAG: "Eq", - _0: 128, - _1: view.getUint16(0) - }; - }) - ], - tl: { - hd: [ - "DataView - setInt32, getInt32", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setInt32(0, 65537); - return { - TAG: "Eq", - _0: 65537, - _1: view.getInt32(0) - }; - }) - ], - tl: { - hd: [ - "DataView - getInt32LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setInt32(0, 65537, 1); - return { - TAG: "Eq", - _0: 65537, - _1: view.getInt32(0, 1) - }; - }) - ], - tl: { - hd: [ - "DataView - setInt32LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setInt32(0, 65537, 1); - return { - TAG: "Eq", - _0: 16777472, - _1: view.getInt32(0) - }; - }) - ], - tl: { - hd: [ - "DataView - setUint32, getUint32", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setUint32(0, 65537); - return { - TAG: "Eq", - _0: 65537, - _1: view.getUint32(0) - }; - }) - ], - tl: { - hd: [ - "DataView - getUint32LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setUint32(0, 65537, 1); - return { - TAG: "Eq", - _0: 65537, - _1: view.getUint32(0, 1) - }; - }) - ], - tl: { - hd: [ - "DataView - setUint32LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setUint32(0, 65537, 1); - return { - TAG: "Eq", - _0: 16777472, - _1: view.getUint32(0) - }; - }) - ], - tl: { - hd: [ - "DataView - setFloat32, getFloat32", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setFloat32(0, 65537.0); - return { - TAG: "Eq", - _0: 65537.0, - _1: view.getFloat32(0) - }; - }) - ], - tl: { - hd: [ - "DataView - getFloat32LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setFloat32(0, 65537.0, 1); - return { - TAG: "Eq", - _0: 65537.0, - _1: view.getFloat32(0, 1) - }; - }) - ], - tl: { - hd: [ - "DataView - setFloat32LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setFloat32(0, 1.0, 1); - return { - TAG: "Eq", - _0: 4.600602988224807e-41, - _1: view.getFloat32(0) - }; - }) - ], - tl: { - hd: [ - "DataView - setFloat64, getFloat64", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setFloat64(0, 1e200); - return { - TAG: "Eq", - _0: 1e200, - _1: view.getFloat64(0) - }; - }) - ], - tl: { - hd: [ - "DataView - getFloat64LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setFloat64(0, 1e200, 1); - return { - TAG: "Eq", - _0: 1e200, - _1: view.getFloat64(0, 1) - }; - }) - ], - tl: { - hd: [ - "DataView - setFloat64LittleEndian", - (function (param) { - let buffer = new ArrayBuffer(8); - let view = new DataView(buffer); - view.setFloat64(0, 1.0, 1); - return { - TAG: "Eq", - _0: 3.03865e-319, - _1: view.getFloat64(0) - }; - }) - ], - tl: /* [] */0 - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -}; - -let suites = { - hd: suites_0, - tl: suites_1 -}; - -Mt.from_pair_suites("Js_typed_array_test", suites); - -exports.mkI8 = mkI8; -exports.via = via; -exports.viaInt8 = viaInt8; -exports.x = x; -exports.suites = suites; -/* x Not a pure module */ diff --git a/jscomp/test/js_typed_array_test.res b/jscomp/test/js_typed_array_test.res deleted file mode 100644 index d86763e0b9..0000000000 --- a/jscomp/test/js_typed_array_test.res +++ /dev/null @@ -1,889 +0,0 @@ -open Js_typed_array - -@val external arrayFrom: 'a => array<'b> = "Array.from" - -let mkI8 = a => Int8Array.make(a) -let via = (make, f, arr) => arrayFrom(f(make(arr))) -let viaInt8 = (f, arr) => via(Int8Array.make) - -/* make sure we expose a type that's easy to refer to */ -let x: Int8Array.t = mkI8([1, 2, 3]) - -let suites = { - open Mt - list{ - /* ArrayBuffer - */ - - ("array_buffer - make", _ => Eq(5, ArrayBuffer.make(5) |> ArrayBuffer.byteLength)), - /* experimental - "array_buffer - transfer", (fun _ -> - Eq(5, ArrayBuffer.make 5 |> ArrayBuffer.transfer |> ArrayBuffer.byteLength)); - "array_buffer - transferWithLength", (fun _ -> - let a = ArrayBuffer.make 5 in - Eq(10, ArrayBuffer.transferWithLength a 10 |> ArrayBuffer.byteLength)); - */ - - ("array_buffer - byteLength", _ => Eq(5, ArrayBuffer.make(5) |> ArrayBuffer.byteLength)), - ( - "array_buffer - slice", - _ => Eq( - 2, - ArrayBuffer.make(5) |> ArrayBuffer.slice(~start=2, ~end_=4) |> ArrayBuffer.byteLength, - ), - ), - ( - "array_buffer - sliceFrom", - _ => Eq(3, ArrayBuffer.make(5) |> ArrayBuffer.sliceFrom(2) |> ArrayBuffer.byteLength), - ), - /* Generic typed array - */ - - ("typed_array - unsafe_get", _ => Eq(4, Int8Array.unsafe_get(mkI8([1, 2, 3, 4, 5]), 3))), - ( - "typed_array - unsafe_set", - _ => { - let a = mkI8([1, 2, 3, 4, 5]) - let _ = Int8Array.unsafe_set(a, 3, 14) - - Eq(14, Int8Array.unsafe_get(a, 3)) - }, - ), - ( - "typed_array - buffer", - _ => Eq( - mkI8([3, 4, 5]), - mkI8([1, 2, 3, 4, 5]) - |> Int8Array.buffer - |> ( - x => - switch x { - | a => Int8Array.fromBufferOffset(a, 2) - } - ), - ), - ), - ( - "typed_array - byteLength", - _ => Eq(10, Int16Array.make([1, 2, 3, 4, 5]) |> Int16Array.byteLength), - ), - ("typed_array - byteOffset", _ => Eq(0, mkI8([1, 2, 3, 4, 5]) |> Int8Array.byteOffset)), - ( - "typed_array - setArray", - _ => { - let f = a => { - Int8Array.setArray([9, 8, 7], a) - a - } - - Eq(mkI8([9, 8, 7, 4, 5]), mkI8([1, 2, 3, 4, 5]) |> f) - }, - ), - ( - "typed_array - setArrayOffset", - _ => { - let f = a => { - Int8Array.setArrayOffset([9, 8, 7], 2, a) - a - } - - Eq(mkI8([1, 2, 9, 8, 7]), mkI8([1, 2, 3, 4, 5]) |> f) - }, - ), - /* These shouldn't compile - "type_safe_sanity_check 1", (fun _ -> - let a = Float32Array.make [| 1.; 2.; 3.; 4.; 5. |] in - let _ = Int8Array.set a 3 14 in - - Eq(14, Int8Array.get a 3) - ); - "type_safe_sanity_check 2", (fun _ -> - let a = Int16Array.make [| 1; 2; 3; 4; 5 |] in - let _ = Int8Array.set a 3 14 in - - Eq(14, Int8Array.get a 3) - ); - */ - - /* Array itnerface(-ish) */ - - ("typed_array - length", _ => Eq(5, mkI8([1, 2, 3, 4, 5]) |> Int8Array.length)), - ( - "typed_array - copyWithin", - _ => Eq(mkI8([1, 2, 3, 1, 2]), mkI8([1, 2, 3, 4, 5]) |> Int8Array.copyWithin(~to_=-2)), - ), - ( - "typed_array - copyWithinFrom", - _ => Eq( - mkI8([4, 5, 3, 4, 5]), - mkI8([1, 2, 3, 4, 5]) |> Int8Array.copyWithinFrom(~to_=0, ~from=3), - ), - ), - ( - "typed_array - copyWithinFromRange", - _ => Eq( - mkI8([4, 2, 3, 4, 5]), - mkI8([1, 2, 3, 4, 5]) |> Int8Array.copyWithinFromRange(~to_=0, ~start=3, ~end_=4), - ), - ), - ( - "typed_array - fillInPlace", - _ => Eq(mkI8([4, 4, 4]), mkI8([1, 2, 3]) |> Int8Array.fillInPlace(4)), - ), - ( - "typed_array - fillFromInPlace", - _ => Eq(mkI8([1, 4, 4]), mkI8([1, 2, 3]) |> Int8Array.fillFromInPlace(4, ~from=1)), - ), - ( - "typed_array - fillRangeInPlace", - _ => Eq(mkI8([1, 4, 3]), mkI8([1, 2, 3]) |> Int8Array.fillRangeInPlace(4, ~start=1, ~end_=2)), - ), - ( - "typed_array - reverseInPlace", - _ => Eq(mkI8([3, 2, 1]), mkI8([1, 2, 3]) |> Int8Array.reverseInPlace), - ), - ( - "typed_array - sortInPlace", - _ => Eq(mkI8([1, 2, 3]), mkI8([3, 1, 2]) |> Int8Array.sortInPlace), - ), - ( - "typed_array - sortInPlaceWith", - _ => Eq(mkI8([3, 2, 1]), mkI8([3, 1, 2]) |> Int8Array.sortInPlaceWith((. a, b) => b - a)), - ), - /* es2016 */ - ("typed_array - includes", _ => Eq(true, mkI8([1, 2, 3]) |> Int8Array.includes(3))), - ("typed_array - indexOf", _ => Eq(1, mkI8([1, 2, 3]) |> Int8Array.indexOf(2))), - ( - "typed_array - indexOfFrom", - _ => Eq(3, mkI8([1, 2, 3, 2]) |> Int8Array.indexOfFrom(2, ~from=2)), - ), - ("typed_array - join", _ => Eq("1,2,3", mkI8([1, 2, 3]) |> Int8Array.join)), - ("typed_array - joinWith", _ => Eq("1;2;3", mkI8([1, 2, 3]) |> Int8Array.joinWith(";"))), - ("typed_array - lastIndexOf", _ => Eq(1, mkI8([1, 2, 3]) |> Int8Array.lastIndexOf(2))), - ( - "typed_array - lastIndexOfFrom", - _ => Eq(1, mkI8([1, 2, 3, 2]) |> Int8Array.lastIndexOfFrom(2, ~from=2)), - ), - ( - "typed_array - slice", - _ => Eq(mkI8([2, 3]), mkI8([1, 2, 3, 4, 5]) |> Int8Array.slice(~start=1, ~end_=3)), - ), - ("typed_array - copy", _ => Eq(mkI8([1, 2, 3, 4, 5]), mkI8([1, 2, 3, 4, 5]) |> Int8Array.copy)), - ( - "typed_array - sliceFrom", - _ => Eq(mkI8([3, 4, 5]), mkI8([1, 2, 3, 4, 5]) |> Int8Array.sliceFrom(2)), - ), - ( - "typed_array - subarray", - _ => Eq(mkI8([2, 3]), mkI8([1, 2, 3, 4, 5]) |> Int8Array.subarray(~start=1, ~end_=3)), - ), - ( - "typed_array - subarrayFrom", - _ => Eq(mkI8([3, 4, 5]), mkI8([1, 2, 3, 4, 5]) |> Int8Array.subarrayFrom(2)), - ), - ("typed_array - toString", _ => Eq("1,2,3", mkI8([1, 2, 3]) |> Int8Array.toString)), - ("typed_array - toLocaleString", _ => Eq("1,2,3", mkI8([1, 2, 3]) |> Int8Array.toLocaleString)), - /* es2015, iterator - "typed_array - entries", (fun _ -> - Eq(mkI8 [| (0, "a"); (1, "b"); (2, "c") |], - mkI8 [| "a"; "b"; "c" |] |> Int8Array.entries |> Int8Array.from) - ); - */ - - ("typed_array - every", _ => Eq(true, mkI8([1, 2, 3]) |> Int8Array.every((. n) => n > 0))), - ( - "typed_array - everyi", - _ => Eq(false, mkI8([1, 2, 3]) |> Int8Array.everyi((. _, i) => i > 0)), - ), - ( - "typed_array - filter", - _ => Eq(mkI8([2, 4]), mkI8([1, 2, 3, 4]) |> Int8Array.filter((. n) => mod(n, 2) == 0)), - ), - ( - "typed_array - filteri", - _ => Eq(mkI8([1, 3]), mkI8([1, 2, 3, 4]) |> Int8Array.filteri((. _, i) => mod(i, 2) == 0)), - ), - ( - "typed_array - find", - _ => Eq( - Js.Undefined.return(2), - mkI8([1, 2, 3, 4]) |> Int8Array.find((. n) => mod(n, 2) == 0), - ), - ), - ( - "typed_array - findi", - _ => Eq( - Js.Undefined.return(1), - mkI8([1, 2, 3, 4]) |> Int8Array.findi((. _, i) => mod(i, 2) == 0), - ), - ), - ( - "typed_array - findIndex", - _ => Eq(1, mkI8([1, 2, 3, 4]) |> Int8Array.findIndex((. n) => mod(n, 2) == 0)), - ), - ( - "typed_array - findIndexi", - _ => Eq(0, mkI8([1, 2, 3, 4]) |> Int8Array.findIndexi((. _, i) => mod(i, 2) == 0)), - ), - ( - "typed_array - forEach", - _ => { - let sum = ref(0) - let _ = mkI8([1, 2, 3]) |> Int8Array.forEach((. n) => sum := sum.contents + n) - - Eq(6, sum.contents) - }, - ), - ( - "typed_array - forEachi", - _ => { - let sum = ref(0) - let _ = mkI8([1, 2, 3]) |> Int8Array.forEachi((. _, i) => sum := sum.contents + i) - - Eq(3, sum.contents) - }, - ), - /* es2015, iterator - "typed_array - keys", (fun _ -> - Eq(mkI8 [| 0; 1; 2 |], - mkI8 [| "a"; "b"; "c" |] |> Int8Array.keys |> Int8Array.from) - ); - */ - - ( - "typed_array - map", - _ => Eq(mkI8([2, 4, 6, 8]), mkI8([1, 2, 3, 4]) |> Int8Array.map((. n) => n * 2)), - ), - ( - "typed_array - map", - _ => Eq(mkI8([0, 2, 4, 6]), mkI8([1, 2, 3, 4]) |> Int8Array.mapi((. _, i) => i * 2)), - ), - ( - "typed_array - reduce", - _ => Eq(-10, mkI8([1, 2, 3, 4]) |> Int8Array.reduce((. acc, n) => acc - n, 0)), - ), - ( - "typed_array - reducei", - _ => Eq(-6, mkI8([1, 2, 3, 4]) |> Int8Array.reducei((. acc, _, i) => acc - i, 0)), - ), - ( - "typed_array - reduceRight", - _ => Eq(-10, mkI8([1, 2, 3, 4]) |> Int8Array.reduceRight((. acc, n) => acc - n, 0)), - ), - ( - "typed_array - reduceRighti", - _ => Eq(-6, mkI8([1, 2, 3, 4]) |> Int8Array.reduceRighti((. acc, _, i) => acc - i, 0)), - ), - ("typed_array - some", _ => Eq(false, mkI8([1, 2, 3, 4]) |> Int8Array.some((. n) => n <= 0))), - ( - "typed_array - somei", - _ => Eq(true, mkI8([1, 2, 3, 4]) |> Int8Array.somei((. _, i) => i <= 0)), - ), - /* es2015, iterator - "typed_array - values", (fun _ -> - Eq(mkI8 [| "a"; "b"; "c" |], - mkI8 [| "a"; "b"; "c" |] |> Int8Array.values |> Int8Array.from) - ); - */ - - /* Int8Array - */ - - ("int8_array - _BYTES_PER_ELEMENT", _ => Eq(1, Int8Array._BYTES_PER_ELEMENT)), - /* byte length is a decent indicator of the kind of typed array */ - ("int8_array - make", _ => Eq(3, Int8Array.make([1, 2, 3]) |> Int8Array.byteLength)), - ( - "int8_array - fromBuffer", - _ => Eq(32, ArrayBuffer.make(32) |> Int8Array.fromBuffer |> Int8Array.byteLength), - ), - ( - "int8_array - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, Int8Array.fromBufferOffset(buffer, 8) |> Int8Array.byteLength) - }, - ), - ( - "int8_array - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(2, Int8Array.fromBufferRange(buffer, ~offset=8, ~length=2) |> Int8Array.byteLength) - }, - ), - ("int8_array - fromLength", _ => Eq(3, Int8Array.fromLength(3) |> Int8Array.byteLength)), - /* unable to test because nothing currently implements array_like - "int8_array - from", (fun _ -> - Eq(3, [| "a"; "b"; "c" |] |> Js.Array.keys |> Int8Array.from |> Int8Array.byteLength)); - */ - ( - "int8_array - unsafe_set - typed_array sanity check", - _ => { - let a = Int8Array.make([1, 2, 3, 4, 5]) - let _ = Int8Array.unsafe_set(a, 3, 14) - - Eq(14, Int8Array.unsafe_get(a, 3)) - }, - ), - /* Uint8Array - */ - - ("uint8_array - _BYTES_PER_ELEMENT", _ => Eq(1, Uint8Array._BYTES_PER_ELEMENT)), - /* byte length is a decent indicator of the kind of typed array */ - ("uint8_array - make", _ => Eq(3, Uint8Array.make([1, 2, 3]) |> Uint8Array.byteLength)), - ( - "uint8_array - fromBuffer", - _ => Eq(32, ArrayBuffer.make(32) |> Uint8Array.fromBuffer |> Uint8Array.byteLength), - ), - ( - "uint8_array - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, Uint8Array.fromBufferOffset(buffer, 8) |> Uint8Array.byteLength) - }, - ), - ( - "uint8_array - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(2, Uint8Array.fromBufferRange(buffer, ~offset=8, ~length=2) |> Uint8Array.byteLength) - }, - ), - ("uint8_array - fromLength", _ => Eq(3, Uint8Array.fromLength(3) |> Uint8Array.byteLength)), - /* unable to test because nothing currently implements array_like - "uint8_array - from", (fun _ -> - Eq(3, [| "a"; "b"; "c" |] |> Js.Array.keys |> Uint8Array.from |> Uint8Array.byteLength)); - */ - ( - "uint8_array - unsafe_set - typed_array sanity check", - _ => { - let a = Uint8Array.make([1, 2, 3, 4, 5]) - let _ = Uint8Array.unsafe_set(a, 3, 14) - - Eq(14, Uint8Array.unsafe_get(a, 3)) - }, - ), - /* Uint8ClampedArray - */ - - ("uint8clamped_array - _BYTES_PER_ELEMENT", _ => Eq(1, Uint8ClampedArray._BYTES_PER_ELEMENT)), - /* byte length is a decent indicator of the kind of typed array */ - ( - "uint8clamped_array - make", - _ => Eq(3, Uint8ClampedArray.make([1, 2, 3]) |> Uint8ClampedArray.byteLength), - ), - ( - "uint8clamped_array - fromBuffer", - _ => Eq( - 32, - ArrayBuffer.make(32) |> Uint8ClampedArray.fromBuffer |> Uint8ClampedArray.byteLength, - ), - ), - ( - "uint8clamped_array - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, Uint8ClampedArray.fromBufferOffset(buffer, 8) |> Uint8ClampedArray.byteLength) - }, - ), - ( - "uint8clamped_array - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq( - 2, - Uint8ClampedArray.fromBufferRange( - buffer, - ~offset=8, - ~length=2, - ) |> Uint8ClampedArray.byteLength, - ) - }, - ), - ( - "uint8clamped_array - fromLength", - _ => Eq(3, Uint8ClampedArray.fromLength(3) |> Uint8ClampedArray.byteLength), - ), - /* unable to test because nothing currently implements array_like - "uint8clamped_array - from", (fun _ -> - Eq(3, [| "a"; "b"; "c" |] |> Js.Array.keys |> Uint8ClampedArray.from |> Uint8ClampedArray.byteLength)); - */ - ( - "uint8clamped_array - unsafe_set - typed_array sanity check", - _ => { - let a = Uint8ClampedArray.make([1, 2, 3, 4, 5]) - let _ = Uint8ClampedArray.unsafe_set(a, 3, 14) - - Eq(14, Uint8ClampedArray.unsafe_get(a, 3)) - }, - ), - /* Int16Array - */ - - ("int16_array - _BYTES_PER_ELEMENT", _ => Eq(2, Int16Array._BYTES_PER_ELEMENT)), - /* byte length is a decent indicator of the kind of typed array */ - ("int16_array - make", _ => Eq(6, Int16Array.make([1, 2, 3]) |> Int16Array.byteLength)), - ( - "int16_array - fromBuffer", - _ => Eq(32, ArrayBuffer.make(32) |> Int16Array.fromBuffer |> Int16Array.byteLength), - ), - ( - "int16_array - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, Int16Array.fromBufferOffset(buffer, 8) |> Int16Array.byteLength) - }, - ), - ( - "int16_array - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(4, Int16Array.fromBufferRange(buffer, ~offset=8, ~length=2) |> Int16Array.byteLength) - }, - ), - ("int16_array - fromLength", _ => Eq(6, Int16Array.fromLength(3) |> Int16Array.byteLength)), - /* unable to test because nothing currently implements array_like - "int16_array - from", (fun _ -> - Eq(3, [| "a"; "b"; "c" |] |> Js.Array.keys |> Int16Array.from |> Int16Array.byteLength)); - */ - ( - "int16_array - unsafe_set - typed_array sanity check", - _ => { - let a = Int16Array.make([1, 2, 3, 4, 5]) - let _ = Int16Array.unsafe_set(a, 3, 14) - - Eq(14, Int16Array.unsafe_get(a, 3)) - }, - ), - /* Uint16Array - */ - - ("uint16_array - _BYTES_PER_ELEMENT", _ => Eq(2, Uint16Array._BYTES_PER_ELEMENT)), - /* byte length is a decent indicator of the kind of typed array */ - ("uint16_array - make", _ => Eq(6, Uint16Array.make([1, 2, 3]) |> Uint16Array.byteLength)), - ( - "uint16_array - fromBuffer", - _ => Eq(32, ArrayBuffer.make(32) |> Uint16Array.fromBuffer |> Uint16Array.byteLength), - ), - ( - "uint16_array - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, Uint16Array.fromBufferOffset(buffer, 8) |> Uint16Array.byteLength) - }, - ), - ( - "uint16_array - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(4, Uint16Array.fromBufferRange(buffer, ~offset=8, ~length=2) |> Uint16Array.byteLength) - }, - ), - ("uint16_array - fromLength", _ => Eq(6, Uint16Array.fromLength(3) |> Uint16Array.byteLength)), - /* unable to test because nothing currently implements array_like - "uint16_array - from", (fun _ -> - Eq(3, [| "a"; "b"; "c" |] |> Js.Array.keys |> Uint16Array.from |> Uint16Array.byteLength)); - */ - ( - "uint16_array - unsafe_set - typed_array sanity check", - _ => { - let a = Uint16Array.make([1, 2, 3, 4, 5]) - let _ = Uint16Array.unsafe_set(a, 3, 14) - - Eq(14, Uint16Array.unsafe_get(a, 3)) - }, - ), - /* Int32Array - */ - - ("int32_array - _BYTES_PER_ELEMENT", _ => Eq(4, Int32Array._BYTES_PER_ELEMENT)), - /* byte length is a decent indicator of the kind of typed array */ - ( - "int32_array - make", - _ => Eq(12, Int32Array.make([1, 2, 3] |> Array.map(Int32.of_int)) |> Int32Array.byteLength), - ), - ( - "int32_array - fromBuffer", - _ => Eq(32, ArrayBuffer.make(32) |> Int32Array.fromBuffer |> Int32Array.byteLength), - ), - ( - "int32_array - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, Int32Array.fromBufferOffset(buffer, 8) |> Int32Array.byteLength) - }, - ), - ( - "int32_array - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(8, Int32Array.fromBufferRange(buffer, ~offset=8, ~length=2) |> Int32Array.byteLength) - }, - ), - ("int32_array - fromLength", _ => Eq(12, Int32Array.fromLength(3) |> Int32Array.byteLength)), - /* unable to test because nothing currently implements array_like - "int32_array - from", (fun _ -> - Eq(3, [| "a"; "b"; "c" |] |> Js.Array.keys |> Int32Array.from |> Int32Array.byteLength)); - */ - ( - "int32_array - unsafe_set - typed_array sanity check", - _ => { - let a = Int32Array.make([1, 2, 3, 4, 5] |> Array.map(Int32.of_int)) - let _ = Int32Array.unsafe_set(a, 3, Int32.of_int(14)) - - Eq(Int32.of_int(14), Int32Array.unsafe_get(a, 3)) - }, - ), - /* Uint32Array - */ - - ("uint32_array - _BYTES_PER_ELEMENT", _ => Eq(4, Uint32Array._BYTES_PER_ELEMENT)), - /* byte length is a decent indicator of the kind of typed array */ - ("uint32_array - make", _ => Eq(12, Uint32Array.make([1, 2, 3]) |> Uint32Array.byteLength)), - ( - "uint32_array - fromBuffer", - _ => Eq(32, ArrayBuffer.make(32) |> Uint32Array.fromBuffer |> Uint32Array.byteLength), - ), - ( - "uint32_array - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, Uint32Array.fromBufferOffset(buffer, 8) |> Uint32Array.byteLength) - }, - ), - ( - "uint32_array - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(8, Uint32Array.fromBufferRange(buffer, ~offset=8, ~length=2) |> Uint32Array.byteLength) - }, - ), - ("uint32_array - fromLength", _ => Eq(12, Uint32Array.fromLength(3) |> Uint32Array.byteLength)), - /* unable to test because nothing currently implements array_like - "uint32_array - from", (fun _ -> - Eq(3, [| "a"; "b"; "c" |] |> Js.Array.keys |> Uint32Array.from |> Uint32Array.byteLength)); - */ - ( - "uint32_array - unsafe_set - typed_array sanity check", - _ => { - let a = Uint32Array.make([1, 2, 3, 4, 5]) - let _ = Uint32Array.unsafe_set(a, 3, 14) - - Eq(14, Uint32Array.unsafe_get(a, 3)) - }, - ), - /* Float32Array - */ - - ("float32_array - _BYTES_PER_ELEMENT", _ => Eq(4, Float32Array._BYTES_PER_ELEMENT)), - /* byte length is a decent indicator of the kind of typed array */ - ( - "float32_array - make", - _ => Eq(12, Float32Array.make([1., 2., 3.]) |> Float32Array.byteLength), - ), - ( - "float32_array - fromBuffer", - _ => Eq(32, ArrayBuffer.make(32) |> Float32Array.fromBuffer |> Float32Array.byteLength), - ), - ( - "float32_array - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, Float32Array.fromBufferOffset(buffer, 8) |> Float32Array.byteLength) - }, - ), - ( - "float32_array - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(8, Float32Array.fromBufferRange(buffer, ~offset=8, ~length=2) |> Float32Array.byteLength) - }, - ), - ( - "float32_array - fromLength", - _ => Eq(12, Float32Array.fromLength(3) |> Float32Array.byteLength), - ), - /* unable to test because nothing currently implements array_like - "float32_array - from", (fun _ -> - Eq(3, [| "a"; "b"; "c" |] |> Js.Array.keys |> Float32Array.from |> Float32Array.byteLength)); - */ - ( - "float32_array - unsafe_set - typed_array sanity check", - _ => { - let a = Float32Array.make([1., 2., 3., 4., 5.]) - let _ = Float32Array.unsafe_set(a, 3, 14.) - - Eq(14., Float32Array.unsafe_get(a, 3)) - }, - ), - /* Float64Array - */ - - ("float64_array - _BYTES_PER_ELEMENT", _ => Eq(8, Float64Array._BYTES_PER_ELEMENT)), - /* byte length is a decent indicator of the kind of typed array */ - ( - "float64_array - make", - _ => Eq(24, Float64Array.make([1., 2., 3.]) |> Float64Array.byteLength), - ), - ( - "float64_array - fromBuffer", - _ => Eq(32, ArrayBuffer.make(32) |> Float64Array.fromBuffer |> Float64Array.byteLength), - ), - ( - "float64_array - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, Float64Array.fromBufferOffset(buffer, 8) |> Float64Array.byteLength) - }, - ), - ( - "float64_array - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq( - 16, - Float64Array.fromBufferRange(buffer, ~offset=8, ~length=2) |> Float64Array.byteLength, - ) - }, - ), - ( - "float64_array - fromLength", - _ => Eq(24, Float64Array.fromLength(3) |> Float64Array.byteLength), - ), - /* unable to test because nothing currently implements array_like - "float64_array - from", (fun _ -> - Eq(3, [| "a"; "b"; "c" |] |> Js.Array.keys |> Float64Array.from |> Float64Array.byteLength)); - */ - ( - "float64_array - unsafe_set - typed_array sanity check", - _ => { - let a = Float64Array.make([1., 2., 3., 4., 5.]) - let _ = Float64Array.unsafe_set(a, 3, 14.) - - Eq(14., Float64Array.unsafe_get(a, 3)) - }, - ), - /* DataView - */ - - ( - "DataView - make, byteLength", - _ => Eq(32, ArrayBuffer.make(32) |> DataView.make |> DataView.byteLength), - ), - ( - "DataView - fromBuffer", - _ => Eq(32, ArrayBuffer.make(32) |> DataView.fromBuffer |> DataView.byteLength), - ), - ( - "DataView - fromBufferOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(24, DataView.fromBufferOffset(buffer, 8) |> DataView.byteLength) - }, - ), - ( - "DataView - fromBufferRange", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(4, DataView.fromBufferRange(buffer, ~offset=8, ~length=4) |> DataView.byteLength) - }, - ), - ( - "DataView - buffer", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(buffer, DataView.fromBuffer(buffer) |> DataView.buffer) - }, - ), - ( - "DataView - byteOffset", - _ => { - let buffer = ArrayBuffer.make(32) - Eq(8, DataView.fromBufferOffset(buffer, 8) |> DataView.byteOffset) - }, - ), - ( - "DataView - setInt8, getInt8", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setInt8(view, 0, 1) - Eq(1, DataView.getInt8(view, 0)) - }, - ), - ( - "DataView - setUint8, getUint8", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setUint8(view, 0, 128) - Eq(128, DataView.getUint8(view, 0)) - }, - ), - ( - "DataView - setInt16, getInt16", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setInt16(view, 0, 257) - Eq(257, DataView.getInt16(view, 0)) - }, - ), - ( - "DataView - getInt16LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setInt16LittleEndian(view, 0, 25000) - Eq(25000, DataView.getInt16LittleEndian(view, 0)) - }, - ), - ( - "DataView - setInt16LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setInt16LittleEndian(view, 0, 25000) - Eq(-22431, DataView.getInt16(view, 0)) - }, - ), - ( - "DataView - setUint16, getUint16", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setUint16(view, 0, 32768) - Eq(32768, DataView.getUint16(view, 0)) - }, - ), - ( - "DataView - getUint16LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setUint16LittleEndian(view, 0, 32768) - Eq(32768, DataView.getUint16LittleEndian(view, 0)) - }, - ), - ( - "DataView - setUint16LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setUint16LittleEndian(view, 0, 32768) - Eq(128, DataView.getUint16(view, 0)) - }, - ), - ( - "DataView - setInt32, getInt32", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setInt32(view, 0, 65537) - Eq(65537, DataView.getInt32(view, 0)) - }, - ), - ( - "DataView - getInt32LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setInt32LittleEndian(view, 0, 65537) - Eq(65537, DataView.getInt32LittleEndian(view, 0)) - }, - ), - ( - "DataView - setInt32LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setInt32LittleEndian(view, 0, 65537) - Eq(16777472, DataView.getInt32(view, 0)) - }, - ), - /* Testing against 2_147_483_649 would be better, - but JS platform restrict us with int32 */ - ( - "DataView - setUint32, getUint32", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setUint32(view, 0, 65537) - Eq(65537, DataView.getUint32(view, 0)) - }, - ), - ( - "DataView - getUint32LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setUint32LittleEndian(view, 0, 65537) - Eq(65537, DataView.getUint32LittleEndian(view, 0)) - }, - ), - ( - "DataView - setUint32LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setUint32LittleEndian(view, 0, 65537) - Eq(16777472, DataView.getUint32(view, 0)) - }, - ), - ( - "DataView - setFloat32, getFloat32", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setFloat32(view, 0, 65537.0) - Eq(65537.0, DataView.getFloat32(view, 0)) - }, - ), - ( - "DataView - getFloat32LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setFloat32LittleEndian(view, 0, 65537.0) - Eq(65537.0, DataView.getFloat32LittleEndian(view, 0)) - }, - ), - ( - "DataView - setFloat32LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setFloat32LittleEndian(view, 0, 1.0) - Eq(4.600602988224807e-41, DataView.getFloat32(view, 0)) - }, - ), - ( - "DataView - setFloat64, getFloat64", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setFloat64(view, 0, 1e200) - Eq(1e200, DataView.getFloat64(view, 0)) - }, - ), - ( - "DataView - getFloat64LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setFloat64LittleEndian(view, 0, 1e200) - Eq(1e200, DataView.getFloat64LittleEndian(view, 0)) - }, - ), - ( - "DataView - setFloat64LittleEndian", - _ => { - let buffer = ArrayBuffer.make(8) - let view = DataView.make(buffer) - DataView.setFloat64LittleEndian(view, 0, 1.0) - Eq(3.03865e-319, DataView.getFloat64(view, 0)) - }, - ), - } -} - -Mt.from_pair_suites(__MODULE__, suites) diff --git a/lib/es6/js_typed_array.js b/lib/es6/js_typed_array.js deleted file mode 100644 index 3516646992..0000000000 --- a/lib/es6/js_typed_array.js +++ /dev/null @@ -1,1733 +0,0 @@ - - - -function slice(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom(arg1, obj) { - return obj.slice(arg1); -} - -let $$ArrayBuffer = { - slice: slice, - sliceFrom: sliceFrom -}; - -function setArray(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith(arg1, obj) { - return obj.sort(arg1); -} - -function includes(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$1(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$1(arg1, obj) { - return obj.slice(arg1); -} - -function subarray(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom(arg1, obj) { - return obj.subarray(arg1); -} - -function every(arg1, obj) { - return obj.every(arg1); -} - -function everyi(arg1, obj) { - return obj.every(arg1); -} - -function filter(arg1, obj) { - return obj.filter(arg1); -} - -function filteri(arg1, obj) { - return obj.filter(arg1); -} - -function find(arg1, obj) { - return obj.find(arg1); -} - -function findi(arg1, obj) { - return obj.find(arg1); -} - -function findIndex(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi(arg1, obj) { - obj.forEach(arg1); -} - -function map(arg1, obj) { - return obj.map(arg1); -} - -function mapi(arg1, obj) { - return obj.map(arg1); -} - -function reduce(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some(arg1, obj) { - return obj.some(arg1); -} - -function somei(arg1, obj) { - return obj.some(arg1); -} - -let $$Int8Array = { - setArray: setArray, - setArrayOffset: setArrayOffset, - copyWithin: copyWithin, - copyWithinFrom: copyWithinFrom, - copyWithinFromRange: copyWithinFromRange, - fillInPlace: fillInPlace, - fillFromInPlace: fillFromInPlace, - fillRangeInPlace: fillRangeInPlace, - sortInPlaceWith: sortInPlaceWith, - includes: includes, - indexOf: indexOf, - indexOfFrom: indexOfFrom, - joinWith: joinWith, - lastIndexOf: lastIndexOf, - lastIndexOfFrom: lastIndexOfFrom, - slice: slice$1, - sliceFrom: sliceFrom$1, - subarray: subarray, - subarrayFrom: subarrayFrom, - every: every, - everyi: everyi, - filter: filter, - filteri: filteri, - find: find, - findi: findi, - findIndex: findIndex, - findIndexi: findIndexi, - forEach: forEach, - forEachi: forEachi, - map: map, - mapi: mapi, - reduce: reduce, - reducei: reducei, - reduceRight: reduceRight, - reduceRighti: reduceRighti, - some: some, - somei: somei -}; - -function setArray$1(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$1(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$1(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$1(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$1(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$1(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$1(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$1(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$1(arg1, obj) { - return obj.sort(arg1); -} - -function includes$1(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$1(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$1(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$1(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$1(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$1(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$2(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$2(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$1(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$1(arg1, obj) { - return obj.subarray(arg1); -} - -function every$1(arg1, obj) { - return obj.every(arg1); -} - -function everyi$1(arg1, obj) { - return obj.every(arg1); -} - -function filter$1(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$1(arg1, obj) { - return obj.filter(arg1); -} - -function find$1(arg1, obj) { - return obj.find(arg1); -} - -function findi$1(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$1(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$1(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$1(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$1(arg1, obj) { - obj.forEach(arg1); -} - -function map$1(arg1, obj) { - return obj.map(arg1); -} - -function mapi$1(arg1, obj) { - return obj.map(arg1); -} - -function reduce$1(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$1(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$1(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$1(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$1(arg1, obj) { - return obj.some(arg1); -} - -function somei$1(arg1, obj) { - return obj.some(arg1); -} - -let $$Uint8Array = { - setArray: setArray$1, - setArrayOffset: setArrayOffset$1, - copyWithin: copyWithin$1, - copyWithinFrom: copyWithinFrom$1, - copyWithinFromRange: copyWithinFromRange$1, - fillInPlace: fillInPlace$1, - fillFromInPlace: fillFromInPlace$1, - fillRangeInPlace: fillRangeInPlace$1, - sortInPlaceWith: sortInPlaceWith$1, - includes: includes$1, - indexOf: indexOf$1, - indexOfFrom: indexOfFrom$1, - joinWith: joinWith$1, - lastIndexOf: lastIndexOf$1, - lastIndexOfFrom: lastIndexOfFrom$1, - slice: slice$2, - sliceFrom: sliceFrom$2, - subarray: subarray$1, - subarrayFrom: subarrayFrom$1, - every: every$1, - everyi: everyi$1, - filter: filter$1, - filteri: filteri$1, - find: find$1, - findi: findi$1, - findIndex: findIndex$1, - findIndexi: findIndexi$1, - forEach: forEach$1, - forEachi: forEachi$1, - map: map$1, - mapi: mapi$1, - reduce: reduce$1, - reducei: reducei$1, - reduceRight: reduceRight$1, - reduceRighti: reduceRighti$1, - some: some$1, - somei: somei$1 -}; - -function setArray$2(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$2(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$2(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$2(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$2(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$2(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$2(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$2(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$2(arg1, obj) { - return obj.sort(arg1); -} - -function includes$2(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$2(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$2(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$2(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$2(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$2(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$3(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$3(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$2(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$2(arg1, obj) { - return obj.subarray(arg1); -} - -function every$2(arg1, obj) { - return obj.every(arg1); -} - -function everyi$2(arg1, obj) { - return obj.every(arg1); -} - -function filter$2(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$2(arg1, obj) { - return obj.filter(arg1); -} - -function find$2(arg1, obj) { - return obj.find(arg1); -} - -function findi$2(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$2(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$2(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$2(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$2(arg1, obj) { - obj.forEach(arg1); -} - -function map$2(arg1, obj) { - return obj.map(arg1); -} - -function mapi$2(arg1, obj) { - return obj.map(arg1); -} - -function reduce$2(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$2(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$2(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$2(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$2(arg1, obj) { - return obj.some(arg1); -} - -function somei$2(arg1, obj) { - return obj.some(arg1); -} - -let $$Uint8ClampedArray = { - setArray: setArray$2, - setArrayOffset: setArrayOffset$2, - copyWithin: copyWithin$2, - copyWithinFrom: copyWithinFrom$2, - copyWithinFromRange: copyWithinFromRange$2, - fillInPlace: fillInPlace$2, - fillFromInPlace: fillFromInPlace$2, - fillRangeInPlace: fillRangeInPlace$2, - sortInPlaceWith: sortInPlaceWith$2, - includes: includes$2, - indexOf: indexOf$2, - indexOfFrom: indexOfFrom$2, - joinWith: joinWith$2, - lastIndexOf: lastIndexOf$2, - lastIndexOfFrom: lastIndexOfFrom$2, - slice: slice$3, - sliceFrom: sliceFrom$3, - subarray: subarray$2, - subarrayFrom: subarrayFrom$2, - every: every$2, - everyi: everyi$2, - filter: filter$2, - filteri: filteri$2, - find: find$2, - findi: findi$2, - findIndex: findIndex$2, - findIndexi: findIndexi$2, - forEach: forEach$2, - forEachi: forEachi$2, - map: map$2, - mapi: mapi$2, - reduce: reduce$2, - reducei: reducei$2, - reduceRight: reduceRight$2, - reduceRighti: reduceRighti$2, - some: some$2, - somei: somei$2 -}; - -function setArray$3(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$3(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$3(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$3(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$3(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$3(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$3(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$3(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$3(arg1, obj) { - return obj.sort(arg1); -} - -function includes$3(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$3(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$3(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$3(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$3(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$3(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$4(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$4(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$3(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$3(arg1, obj) { - return obj.subarray(arg1); -} - -function every$3(arg1, obj) { - return obj.every(arg1); -} - -function everyi$3(arg1, obj) { - return obj.every(arg1); -} - -function filter$3(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$3(arg1, obj) { - return obj.filter(arg1); -} - -function find$3(arg1, obj) { - return obj.find(arg1); -} - -function findi$3(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$3(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$3(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$3(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$3(arg1, obj) { - obj.forEach(arg1); -} - -function map$3(arg1, obj) { - return obj.map(arg1); -} - -function mapi$3(arg1, obj) { - return obj.map(arg1); -} - -function reduce$3(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$3(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$3(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$3(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$3(arg1, obj) { - return obj.some(arg1); -} - -function somei$3(arg1, obj) { - return obj.some(arg1); -} - -let $$Int16Array = { - setArray: setArray$3, - setArrayOffset: setArrayOffset$3, - copyWithin: copyWithin$3, - copyWithinFrom: copyWithinFrom$3, - copyWithinFromRange: copyWithinFromRange$3, - fillInPlace: fillInPlace$3, - fillFromInPlace: fillFromInPlace$3, - fillRangeInPlace: fillRangeInPlace$3, - sortInPlaceWith: sortInPlaceWith$3, - includes: includes$3, - indexOf: indexOf$3, - indexOfFrom: indexOfFrom$3, - joinWith: joinWith$3, - lastIndexOf: lastIndexOf$3, - lastIndexOfFrom: lastIndexOfFrom$3, - slice: slice$4, - sliceFrom: sliceFrom$4, - subarray: subarray$3, - subarrayFrom: subarrayFrom$3, - every: every$3, - everyi: everyi$3, - filter: filter$3, - filteri: filteri$3, - find: find$3, - findi: findi$3, - findIndex: findIndex$3, - findIndexi: findIndexi$3, - forEach: forEach$3, - forEachi: forEachi$3, - map: map$3, - mapi: mapi$3, - reduce: reduce$3, - reducei: reducei$3, - reduceRight: reduceRight$3, - reduceRighti: reduceRighti$3, - some: some$3, - somei: somei$3 -}; - -function setArray$4(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$4(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$4(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$4(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$4(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$4(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$4(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$4(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$4(arg1, obj) { - return obj.sort(arg1); -} - -function includes$4(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$4(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$4(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$4(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$4(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$4(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$5(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$5(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$4(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$4(arg1, obj) { - return obj.subarray(arg1); -} - -function every$4(arg1, obj) { - return obj.every(arg1); -} - -function everyi$4(arg1, obj) { - return obj.every(arg1); -} - -function filter$4(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$4(arg1, obj) { - return obj.filter(arg1); -} - -function find$4(arg1, obj) { - return obj.find(arg1); -} - -function findi$4(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$4(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$4(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$4(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$4(arg1, obj) { - obj.forEach(arg1); -} - -function map$4(arg1, obj) { - return obj.map(arg1); -} - -function mapi$4(arg1, obj) { - return obj.map(arg1); -} - -function reduce$4(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$4(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$4(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$4(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$4(arg1, obj) { - return obj.some(arg1); -} - -function somei$4(arg1, obj) { - return obj.some(arg1); -} - -let $$Uint16Array = { - setArray: setArray$4, - setArrayOffset: setArrayOffset$4, - copyWithin: copyWithin$4, - copyWithinFrom: copyWithinFrom$4, - copyWithinFromRange: copyWithinFromRange$4, - fillInPlace: fillInPlace$4, - fillFromInPlace: fillFromInPlace$4, - fillRangeInPlace: fillRangeInPlace$4, - sortInPlaceWith: sortInPlaceWith$4, - includes: includes$4, - indexOf: indexOf$4, - indexOfFrom: indexOfFrom$4, - joinWith: joinWith$4, - lastIndexOf: lastIndexOf$4, - lastIndexOfFrom: lastIndexOfFrom$4, - slice: slice$5, - sliceFrom: sliceFrom$5, - subarray: subarray$4, - subarrayFrom: subarrayFrom$4, - every: every$4, - everyi: everyi$4, - filter: filter$4, - filteri: filteri$4, - find: find$4, - findi: findi$4, - findIndex: findIndex$4, - findIndexi: findIndexi$4, - forEach: forEach$4, - forEachi: forEachi$4, - map: map$4, - mapi: mapi$4, - reduce: reduce$4, - reducei: reducei$4, - reduceRight: reduceRight$4, - reduceRighti: reduceRighti$4, - some: some$4, - somei: somei$4 -}; - -function setArray$5(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$5(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$5(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$5(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$5(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$5(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$5(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$5(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$5(arg1, obj) { - return obj.sort(arg1); -} - -function includes$5(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$5(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$5(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$5(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$5(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$5(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$6(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$6(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$5(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$5(arg1, obj) { - return obj.subarray(arg1); -} - -function every$5(arg1, obj) { - return obj.every(arg1); -} - -function everyi$5(arg1, obj) { - return obj.every(arg1); -} - -function filter$5(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$5(arg1, obj) { - return obj.filter(arg1); -} - -function find$5(arg1, obj) { - return obj.find(arg1); -} - -function findi$5(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$5(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$5(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$5(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$5(arg1, obj) { - obj.forEach(arg1); -} - -function map$5(arg1, obj) { - return obj.map(arg1); -} - -function mapi$5(arg1, obj) { - return obj.map(arg1); -} - -function reduce$5(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$5(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$5(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$5(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$5(arg1, obj) { - return obj.some(arg1); -} - -function somei$5(arg1, obj) { - return obj.some(arg1); -} - -let $$Int32Array = { - setArray: setArray$5, - setArrayOffset: setArrayOffset$5, - copyWithin: copyWithin$5, - copyWithinFrom: copyWithinFrom$5, - copyWithinFromRange: copyWithinFromRange$5, - fillInPlace: fillInPlace$5, - fillFromInPlace: fillFromInPlace$5, - fillRangeInPlace: fillRangeInPlace$5, - sortInPlaceWith: sortInPlaceWith$5, - includes: includes$5, - indexOf: indexOf$5, - indexOfFrom: indexOfFrom$5, - joinWith: joinWith$5, - lastIndexOf: lastIndexOf$5, - lastIndexOfFrom: lastIndexOfFrom$5, - slice: slice$6, - sliceFrom: sliceFrom$6, - subarray: subarray$5, - subarrayFrom: subarrayFrom$5, - every: every$5, - everyi: everyi$5, - filter: filter$5, - filteri: filteri$5, - find: find$5, - findi: findi$5, - findIndex: findIndex$5, - findIndexi: findIndexi$5, - forEach: forEach$5, - forEachi: forEachi$5, - map: map$5, - mapi: mapi$5, - reduce: reduce$5, - reducei: reducei$5, - reduceRight: reduceRight$5, - reduceRighti: reduceRighti$5, - some: some$5, - somei: somei$5 -}; - -function setArray$6(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$6(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$6(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$6(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$6(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$6(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$6(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$6(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$6(arg1, obj) { - return obj.sort(arg1); -} - -function includes$6(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$6(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$6(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$6(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$6(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$6(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$7(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$7(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$6(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$6(arg1, obj) { - return obj.subarray(arg1); -} - -function every$6(arg1, obj) { - return obj.every(arg1); -} - -function everyi$6(arg1, obj) { - return obj.every(arg1); -} - -function filter$6(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$6(arg1, obj) { - return obj.filter(arg1); -} - -function find$6(arg1, obj) { - return obj.find(arg1); -} - -function findi$6(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$6(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$6(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$6(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$6(arg1, obj) { - obj.forEach(arg1); -} - -function map$6(arg1, obj) { - return obj.map(arg1); -} - -function mapi$6(arg1, obj) { - return obj.map(arg1); -} - -function reduce$6(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$6(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$6(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$6(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$6(arg1, obj) { - return obj.some(arg1); -} - -function somei$6(arg1, obj) { - return obj.some(arg1); -} - -let $$Uint32Array = { - setArray: setArray$6, - setArrayOffset: setArrayOffset$6, - copyWithin: copyWithin$6, - copyWithinFrom: copyWithinFrom$6, - copyWithinFromRange: copyWithinFromRange$6, - fillInPlace: fillInPlace$6, - fillFromInPlace: fillFromInPlace$6, - fillRangeInPlace: fillRangeInPlace$6, - sortInPlaceWith: sortInPlaceWith$6, - includes: includes$6, - indexOf: indexOf$6, - indexOfFrom: indexOfFrom$6, - joinWith: joinWith$6, - lastIndexOf: lastIndexOf$6, - lastIndexOfFrom: lastIndexOfFrom$6, - slice: slice$7, - sliceFrom: sliceFrom$7, - subarray: subarray$6, - subarrayFrom: subarrayFrom$6, - every: every$6, - everyi: everyi$6, - filter: filter$6, - filteri: filteri$6, - find: find$6, - findi: findi$6, - findIndex: findIndex$6, - findIndexi: findIndexi$6, - forEach: forEach$6, - forEachi: forEachi$6, - map: map$6, - mapi: mapi$6, - reduce: reduce$6, - reducei: reducei$6, - reduceRight: reduceRight$6, - reduceRighti: reduceRighti$6, - some: some$6, - somei: somei$6 -}; - -function setArray$7(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$7(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$7(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$7(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$7(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$7(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$7(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$7(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$7(arg1, obj) { - return obj.sort(arg1); -} - -function includes$7(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$7(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$7(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$7(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$7(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$7(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$8(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$8(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$7(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$7(arg1, obj) { - return obj.subarray(arg1); -} - -function every$7(arg1, obj) { - return obj.every(arg1); -} - -function everyi$7(arg1, obj) { - return obj.every(arg1); -} - -function filter$7(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$7(arg1, obj) { - return obj.filter(arg1); -} - -function find$7(arg1, obj) { - return obj.find(arg1); -} - -function findi$7(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$7(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$7(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$7(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$7(arg1, obj) { - obj.forEach(arg1); -} - -function map$7(arg1, obj) { - return obj.map(arg1); -} - -function mapi$7(arg1, obj) { - return obj.map(arg1); -} - -function reduce$7(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$7(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$7(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$7(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$7(arg1, obj) { - return obj.some(arg1); -} - -function somei$7(arg1, obj) { - return obj.some(arg1); -} - -let $$Float32Array = { - setArray: setArray$7, - setArrayOffset: setArrayOffset$7, - copyWithin: copyWithin$7, - copyWithinFrom: copyWithinFrom$7, - copyWithinFromRange: copyWithinFromRange$7, - fillInPlace: fillInPlace$7, - fillFromInPlace: fillFromInPlace$7, - fillRangeInPlace: fillRangeInPlace$7, - sortInPlaceWith: sortInPlaceWith$7, - includes: includes$7, - indexOf: indexOf$7, - indexOfFrom: indexOfFrom$7, - joinWith: joinWith$7, - lastIndexOf: lastIndexOf$7, - lastIndexOfFrom: lastIndexOfFrom$7, - slice: slice$8, - sliceFrom: sliceFrom$8, - subarray: subarray$7, - subarrayFrom: subarrayFrom$7, - every: every$7, - everyi: everyi$7, - filter: filter$7, - filteri: filteri$7, - find: find$7, - findi: findi$7, - findIndex: findIndex$7, - findIndexi: findIndexi$7, - forEach: forEach$7, - forEachi: forEachi$7, - map: map$7, - mapi: mapi$7, - reduce: reduce$7, - reducei: reducei$7, - reduceRight: reduceRight$7, - reduceRighti: reduceRighti$7, - some: some$7, - somei: somei$7 -}; - -function setArray$8(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$8(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$8(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$8(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$8(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$8(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$8(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$8(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$8(arg1, obj) { - return obj.sort(arg1); -} - -function includes$8(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$8(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$8(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$8(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$8(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$8(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$9(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$9(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$8(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$8(arg1, obj) { - return obj.subarray(arg1); -} - -function every$8(arg1, obj) { - return obj.every(arg1); -} - -function everyi$8(arg1, obj) { - return obj.every(arg1); -} - -function filter$8(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$8(arg1, obj) { - return obj.filter(arg1); -} - -function find$8(arg1, obj) { - return obj.find(arg1); -} - -function findi$8(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$8(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$8(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$8(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$8(arg1, obj) { - obj.forEach(arg1); -} - -function map$8(arg1, obj) { - return obj.map(arg1); -} - -function mapi$8(arg1, obj) { - return obj.map(arg1); -} - -function reduce$8(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$8(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$8(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$8(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$8(arg1, obj) { - return obj.some(arg1); -} - -function somei$8(arg1, obj) { - return obj.some(arg1); -} - -let $$Float64Array = { - setArray: setArray$8, - setArrayOffset: setArrayOffset$8, - copyWithin: copyWithin$8, - copyWithinFrom: copyWithinFrom$8, - copyWithinFromRange: copyWithinFromRange$8, - fillInPlace: fillInPlace$8, - fillFromInPlace: fillFromInPlace$8, - fillRangeInPlace: fillRangeInPlace$8, - sortInPlaceWith: sortInPlaceWith$8, - includes: includes$8, - indexOf: indexOf$8, - indexOfFrom: indexOfFrom$8, - joinWith: joinWith$8, - lastIndexOf: lastIndexOf$8, - lastIndexOfFrom: lastIndexOfFrom$8, - slice: slice$9, - sliceFrom: sliceFrom$9, - subarray: subarray$8, - subarrayFrom: subarrayFrom$8, - every: every$8, - everyi: everyi$8, - filter: filter$8, - filteri: filteri$8, - find: find$8, - findi: findi$8, - findIndex: findIndex$8, - findIndexi: findIndexi$8, - forEach: forEach$8, - forEachi: forEachi$8, - map: map$8, - mapi: mapi$8, - reduce: reduce$8, - reducei: reducei$8, - reduceRight: reduceRight$8, - reduceRighti: reduceRighti$8, - some: some$8, - somei: somei$8 -}; - -let $$DataView = {}; - -let Int32_array; - -let Float32_array; - -let Float64_array; - -export { - $$ArrayBuffer, - $$Int8Array, - $$Uint8Array, - $$Uint8ClampedArray, - $$Int16Array, - $$Uint16Array, - $$Int32Array, - Int32_array, - $$Uint32Array, - $$Float32Array, - Float32_array, - $$Float64Array, - Float64_array, - $$DataView, -} -/* No side effect */ diff --git a/lib/js/js_typed_array.js b/lib/js/js_typed_array.js deleted file mode 100644 index cadb668ff9..0000000000 --- a/lib/js/js_typed_array.js +++ /dev/null @@ -1,1731 +0,0 @@ -'use strict'; - - -function slice(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom(arg1, obj) { - return obj.slice(arg1); -} - -let $$ArrayBuffer = { - slice: slice, - sliceFrom: sliceFrom -}; - -function setArray(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith(arg1, obj) { - return obj.sort(arg1); -} - -function includes(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$1(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$1(arg1, obj) { - return obj.slice(arg1); -} - -function subarray(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom(arg1, obj) { - return obj.subarray(arg1); -} - -function every(arg1, obj) { - return obj.every(arg1); -} - -function everyi(arg1, obj) { - return obj.every(arg1); -} - -function filter(arg1, obj) { - return obj.filter(arg1); -} - -function filteri(arg1, obj) { - return obj.filter(arg1); -} - -function find(arg1, obj) { - return obj.find(arg1); -} - -function findi(arg1, obj) { - return obj.find(arg1); -} - -function findIndex(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi(arg1, obj) { - obj.forEach(arg1); -} - -function map(arg1, obj) { - return obj.map(arg1); -} - -function mapi(arg1, obj) { - return obj.map(arg1); -} - -function reduce(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some(arg1, obj) { - return obj.some(arg1); -} - -function somei(arg1, obj) { - return obj.some(arg1); -} - -let $$Int8Array = { - setArray: setArray, - setArrayOffset: setArrayOffset, - copyWithin: copyWithin, - copyWithinFrom: copyWithinFrom, - copyWithinFromRange: copyWithinFromRange, - fillInPlace: fillInPlace, - fillFromInPlace: fillFromInPlace, - fillRangeInPlace: fillRangeInPlace, - sortInPlaceWith: sortInPlaceWith, - includes: includes, - indexOf: indexOf, - indexOfFrom: indexOfFrom, - joinWith: joinWith, - lastIndexOf: lastIndexOf, - lastIndexOfFrom: lastIndexOfFrom, - slice: slice$1, - sliceFrom: sliceFrom$1, - subarray: subarray, - subarrayFrom: subarrayFrom, - every: every, - everyi: everyi, - filter: filter, - filteri: filteri, - find: find, - findi: findi, - findIndex: findIndex, - findIndexi: findIndexi, - forEach: forEach, - forEachi: forEachi, - map: map, - mapi: mapi, - reduce: reduce, - reducei: reducei, - reduceRight: reduceRight, - reduceRighti: reduceRighti, - some: some, - somei: somei -}; - -function setArray$1(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$1(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$1(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$1(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$1(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$1(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$1(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$1(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$1(arg1, obj) { - return obj.sort(arg1); -} - -function includes$1(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$1(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$1(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$1(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$1(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$1(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$2(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$2(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$1(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$1(arg1, obj) { - return obj.subarray(arg1); -} - -function every$1(arg1, obj) { - return obj.every(arg1); -} - -function everyi$1(arg1, obj) { - return obj.every(arg1); -} - -function filter$1(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$1(arg1, obj) { - return obj.filter(arg1); -} - -function find$1(arg1, obj) { - return obj.find(arg1); -} - -function findi$1(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$1(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$1(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$1(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$1(arg1, obj) { - obj.forEach(arg1); -} - -function map$1(arg1, obj) { - return obj.map(arg1); -} - -function mapi$1(arg1, obj) { - return obj.map(arg1); -} - -function reduce$1(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$1(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$1(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$1(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$1(arg1, obj) { - return obj.some(arg1); -} - -function somei$1(arg1, obj) { - return obj.some(arg1); -} - -let $$Uint8Array = { - setArray: setArray$1, - setArrayOffset: setArrayOffset$1, - copyWithin: copyWithin$1, - copyWithinFrom: copyWithinFrom$1, - copyWithinFromRange: copyWithinFromRange$1, - fillInPlace: fillInPlace$1, - fillFromInPlace: fillFromInPlace$1, - fillRangeInPlace: fillRangeInPlace$1, - sortInPlaceWith: sortInPlaceWith$1, - includes: includes$1, - indexOf: indexOf$1, - indexOfFrom: indexOfFrom$1, - joinWith: joinWith$1, - lastIndexOf: lastIndexOf$1, - lastIndexOfFrom: lastIndexOfFrom$1, - slice: slice$2, - sliceFrom: sliceFrom$2, - subarray: subarray$1, - subarrayFrom: subarrayFrom$1, - every: every$1, - everyi: everyi$1, - filter: filter$1, - filteri: filteri$1, - find: find$1, - findi: findi$1, - findIndex: findIndex$1, - findIndexi: findIndexi$1, - forEach: forEach$1, - forEachi: forEachi$1, - map: map$1, - mapi: mapi$1, - reduce: reduce$1, - reducei: reducei$1, - reduceRight: reduceRight$1, - reduceRighti: reduceRighti$1, - some: some$1, - somei: somei$1 -}; - -function setArray$2(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$2(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$2(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$2(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$2(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$2(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$2(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$2(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$2(arg1, obj) { - return obj.sort(arg1); -} - -function includes$2(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$2(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$2(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$2(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$2(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$2(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$3(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$3(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$2(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$2(arg1, obj) { - return obj.subarray(arg1); -} - -function every$2(arg1, obj) { - return obj.every(arg1); -} - -function everyi$2(arg1, obj) { - return obj.every(arg1); -} - -function filter$2(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$2(arg1, obj) { - return obj.filter(arg1); -} - -function find$2(arg1, obj) { - return obj.find(arg1); -} - -function findi$2(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$2(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$2(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$2(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$2(arg1, obj) { - obj.forEach(arg1); -} - -function map$2(arg1, obj) { - return obj.map(arg1); -} - -function mapi$2(arg1, obj) { - return obj.map(arg1); -} - -function reduce$2(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$2(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$2(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$2(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$2(arg1, obj) { - return obj.some(arg1); -} - -function somei$2(arg1, obj) { - return obj.some(arg1); -} - -let $$Uint8ClampedArray = { - setArray: setArray$2, - setArrayOffset: setArrayOffset$2, - copyWithin: copyWithin$2, - copyWithinFrom: copyWithinFrom$2, - copyWithinFromRange: copyWithinFromRange$2, - fillInPlace: fillInPlace$2, - fillFromInPlace: fillFromInPlace$2, - fillRangeInPlace: fillRangeInPlace$2, - sortInPlaceWith: sortInPlaceWith$2, - includes: includes$2, - indexOf: indexOf$2, - indexOfFrom: indexOfFrom$2, - joinWith: joinWith$2, - lastIndexOf: lastIndexOf$2, - lastIndexOfFrom: lastIndexOfFrom$2, - slice: slice$3, - sliceFrom: sliceFrom$3, - subarray: subarray$2, - subarrayFrom: subarrayFrom$2, - every: every$2, - everyi: everyi$2, - filter: filter$2, - filteri: filteri$2, - find: find$2, - findi: findi$2, - findIndex: findIndex$2, - findIndexi: findIndexi$2, - forEach: forEach$2, - forEachi: forEachi$2, - map: map$2, - mapi: mapi$2, - reduce: reduce$2, - reducei: reducei$2, - reduceRight: reduceRight$2, - reduceRighti: reduceRighti$2, - some: some$2, - somei: somei$2 -}; - -function setArray$3(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$3(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$3(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$3(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$3(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$3(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$3(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$3(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$3(arg1, obj) { - return obj.sort(arg1); -} - -function includes$3(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$3(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$3(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$3(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$3(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$3(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$4(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$4(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$3(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$3(arg1, obj) { - return obj.subarray(arg1); -} - -function every$3(arg1, obj) { - return obj.every(arg1); -} - -function everyi$3(arg1, obj) { - return obj.every(arg1); -} - -function filter$3(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$3(arg1, obj) { - return obj.filter(arg1); -} - -function find$3(arg1, obj) { - return obj.find(arg1); -} - -function findi$3(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$3(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$3(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$3(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$3(arg1, obj) { - obj.forEach(arg1); -} - -function map$3(arg1, obj) { - return obj.map(arg1); -} - -function mapi$3(arg1, obj) { - return obj.map(arg1); -} - -function reduce$3(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$3(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$3(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$3(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$3(arg1, obj) { - return obj.some(arg1); -} - -function somei$3(arg1, obj) { - return obj.some(arg1); -} - -let $$Int16Array = { - setArray: setArray$3, - setArrayOffset: setArrayOffset$3, - copyWithin: copyWithin$3, - copyWithinFrom: copyWithinFrom$3, - copyWithinFromRange: copyWithinFromRange$3, - fillInPlace: fillInPlace$3, - fillFromInPlace: fillFromInPlace$3, - fillRangeInPlace: fillRangeInPlace$3, - sortInPlaceWith: sortInPlaceWith$3, - includes: includes$3, - indexOf: indexOf$3, - indexOfFrom: indexOfFrom$3, - joinWith: joinWith$3, - lastIndexOf: lastIndexOf$3, - lastIndexOfFrom: lastIndexOfFrom$3, - slice: slice$4, - sliceFrom: sliceFrom$4, - subarray: subarray$3, - subarrayFrom: subarrayFrom$3, - every: every$3, - everyi: everyi$3, - filter: filter$3, - filteri: filteri$3, - find: find$3, - findi: findi$3, - findIndex: findIndex$3, - findIndexi: findIndexi$3, - forEach: forEach$3, - forEachi: forEachi$3, - map: map$3, - mapi: mapi$3, - reduce: reduce$3, - reducei: reducei$3, - reduceRight: reduceRight$3, - reduceRighti: reduceRighti$3, - some: some$3, - somei: somei$3 -}; - -function setArray$4(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$4(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$4(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$4(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$4(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$4(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$4(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$4(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$4(arg1, obj) { - return obj.sort(arg1); -} - -function includes$4(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$4(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$4(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$4(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$4(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$4(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$5(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$5(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$4(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$4(arg1, obj) { - return obj.subarray(arg1); -} - -function every$4(arg1, obj) { - return obj.every(arg1); -} - -function everyi$4(arg1, obj) { - return obj.every(arg1); -} - -function filter$4(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$4(arg1, obj) { - return obj.filter(arg1); -} - -function find$4(arg1, obj) { - return obj.find(arg1); -} - -function findi$4(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$4(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$4(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$4(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$4(arg1, obj) { - obj.forEach(arg1); -} - -function map$4(arg1, obj) { - return obj.map(arg1); -} - -function mapi$4(arg1, obj) { - return obj.map(arg1); -} - -function reduce$4(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$4(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$4(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$4(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$4(arg1, obj) { - return obj.some(arg1); -} - -function somei$4(arg1, obj) { - return obj.some(arg1); -} - -let $$Uint16Array = { - setArray: setArray$4, - setArrayOffset: setArrayOffset$4, - copyWithin: copyWithin$4, - copyWithinFrom: copyWithinFrom$4, - copyWithinFromRange: copyWithinFromRange$4, - fillInPlace: fillInPlace$4, - fillFromInPlace: fillFromInPlace$4, - fillRangeInPlace: fillRangeInPlace$4, - sortInPlaceWith: sortInPlaceWith$4, - includes: includes$4, - indexOf: indexOf$4, - indexOfFrom: indexOfFrom$4, - joinWith: joinWith$4, - lastIndexOf: lastIndexOf$4, - lastIndexOfFrom: lastIndexOfFrom$4, - slice: slice$5, - sliceFrom: sliceFrom$5, - subarray: subarray$4, - subarrayFrom: subarrayFrom$4, - every: every$4, - everyi: everyi$4, - filter: filter$4, - filteri: filteri$4, - find: find$4, - findi: findi$4, - findIndex: findIndex$4, - findIndexi: findIndexi$4, - forEach: forEach$4, - forEachi: forEachi$4, - map: map$4, - mapi: mapi$4, - reduce: reduce$4, - reducei: reducei$4, - reduceRight: reduceRight$4, - reduceRighti: reduceRighti$4, - some: some$4, - somei: somei$4 -}; - -function setArray$5(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$5(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$5(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$5(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$5(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$5(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$5(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$5(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$5(arg1, obj) { - return obj.sort(arg1); -} - -function includes$5(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$5(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$5(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$5(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$5(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$5(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$6(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$6(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$5(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$5(arg1, obj) { - return obj.subarray(arg1); -} - -function every$5(arg1, obj) { - return obj.every(arg1); -} - -function everyi$5(arg1, obj) { - return obj.every(arg1); -} - -function filter$5(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$5(arg1, obj) { - return obj.filter(arg1); -} - -function find$5(arg1, obj) { - return obj.find(arg1); -} - -function findi$5(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$5(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$5(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$5(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$5(arg1, obj) { - obj.forEach(arg1); -} - -function map$5(arg1, obj) { - return obj.map(arg1); -} - -function mapi$5(arg1, obj) { - return obj.map(arg1); -} - -function reduce$5(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$5(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$5(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$5(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$5(arg1, obj) { - return obj.some(arg1); -} - -function somei$5(arg1, obj) { - return obj.some(arg1); -} - -let $$Int32Array = { - setArray: setArray$5, - setArrayOffset: setArrayOffset$5, - copyWithin: copyWithin$5, - copyWithinFrom: copyWithinFrom$5, - copyWithinFromRange: copyWithinFromRange$5, - fillInPlace: fillInPlace$5, - fillFromInPlace: fillFromInPlace$5, - fillRangeInPlace: fillRangeInPlace$5, - sortInPlaceWith: sortInPlaceWith$5, - includes: includes$5, - indexOf: indexOf$5, - indexOfFrom: indexOfFrom$5, - joinWith: joinWith$5, - lastIndexOf: lastIndexOf$5, - lastIndexOfFrom: lastIndexOfFrom$5, - slice: slice$6, - sliceFrom: sliceFrom$6, - subarray: subarray$5, - subarrayFrom: subarrayFrom$5, - every: every$5, - everyi: everyi$5, - filter: filter$5, - filteri: filteri$5, - find: find$5, - findi: findi$5, - findIndex: findIndex$5, - findIndexi: findIndexi$5, - forEach: forEach$5, - forEachi: forEachi$5, - map: map$5, - mapi: mapi$5, - reduce: reduce$5, - reducei: reducei$5, - reduceRight: reduceRight$5, - reduceRighti: reduceRighti$5, - some: some$5, - somei: somei$5 -}; - -function setArray$6(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$6(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$6(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$6(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$6(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$6(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$6(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$6(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$6(arg1, obj) { - return obj.sort(arg1); -} - -function includes$6(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$6(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$6(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$6(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$6(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$6(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$7(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$7(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$6(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$6(arg1, obj) { - return obj.subarray(arg1); -} - -function every$6(arg1, obj) { - return obj.every(arg1); -} - -function everyi$6(arg1, obj) { - return obj.every(arg1); -} - -function filter$6(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$6(arg1, obj) { - return obj.filter(arg1); -} - -function find$6(arg1, obj) { - return obj.find(arg1); -} - -function findi$6(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$6(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$6(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$6(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$6(arg1, obj) { - obj.forEach(arg1); -} - -function map$6(arg1, obj) { - return obj.map(arg1); -} - -function mapi$6(arg1, obj) { - return obj.map(arg1); -} - -function reduce$6(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$6(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$6(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$6(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$6(arg1, obj) { - return obj.some(arg1); -} - -function somei$6(arg1, obj) { - return obj.some(arg1); -} - -let $$Uint32Array = { - setArray: setArray$6, - setArrayOffset: setArrayOffset$6, - copyWithin: copyWithin$6, - copyWithinFrom: copyWithinFrom$6, - copyWithinFromRange: copyWithinFromRange$6, - fillInPlace: fillInPlace$6, - fillFromInPlace: fillFromInPlace$6, - fillRangeInPlace: fillRangeInPlace$6, - sortInPlaceWith: sortInPlaceWith$6, - includes: includes$6, - indexOf: indexOf$6, - indexOfFrom: indexOfFrom$6, - joinWith: joinWith$6, - lastIndexOf: lastIndexOf$6, - lastIndexOfFrom: lastIndexOfFrom$6, - slice: slice$7, - sliceFrom: sliceFrom$7, - subarray: subarray$6, - subarrayFrom: subarrayFrom$6, - every: every$6, - everyi: everyi$6, - filter: filter$6, - filteri: filteri$6, - find: find$6, - findi: findi$6, - findIndex: findIndex$6, - findIndexi: findIndexi$6, - forEach: forEach$6, - forEachi: forEachi$6, - map: map$6, - mapi: mapi$6, - reduce: reduce$6, - reducei: reducei$6, - reduceRight: reduceRight$6, - reduceRighti: reduceRighti$6, - some: some$6, - somei: somei$6 -}; - -function setArray$7(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$7(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$7(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$7(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$7(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$7(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$7(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$7(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$7(arg1, obj) { - return obj.sort(arg1); -} - -function includes$7(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$7(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$7(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$7(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$7(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$7(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$8(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$8(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$7(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$7(arg1, obj) { - return obj.subarray(arg1); -} - -function every$7(arg1, obj) { - return obj.every(arg1); -} - -function everyi$7(arg1, obj) { - return obj.every(arg1); -} - -function filter$7(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$7(arg1, obj) { - return obj.filter(arg1); -} - -function find$7(arg1, obj) { - return obj.find(arg1); -} - -function findi$7(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$7(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$7(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$7(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$7(arg1, obj) { - obj.forEach(arg1); -} - -function map$7(arg1, obj) { - return obj.map(arg1); -} - -function mapi$7(arg1, obj) { - return obj.map(arg1); -} - -function reduce$7(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$7(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$7(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$7(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$7(arg1, obj) { - return obj.some(arg1); -} - -function somei$7(arg1, obj) { - return obj.some(arg1); -} - -let $$Float32Array = { - setArray: setArray$7, - setArrayOffset: setArrayOffset$7, - copyWithin: copyWithin$7, - copyWithinFrom: copyWithinFrom$7, - copyWithinFromRange: copyWithinFromRange$7, - fillInPlace: fillInPlace$7, - fillFromInPlace: fillFromInPlace$7, - fillRangeInPlace: fillRangeInPlace$7, - sortInPlaceWith: sortInPlaceWith$7, - includes: includes$7, - indexOf: indexOf$7, - indexOfFrom: indexOfFrom$7, - joinWith: joinWith$7, - lastIndexOf: lastIndexOf$7, - lastIndexOfFrom: lastIndexOfFrom$7, - slice: slice$8, - sliceFrom: sliceFrom$8, - subarray: subarray$7, - subarrayFrom: subarrayFrom$7, - every: every$7, - everyi: everyi$7, - filter: filter$7, - filteri: filteri$7, - find: find$7, - findi: findi$7, - findIndex: findIndex$7, - findIndexi: findIndexi$7, - forEach: forEach$7, - forEachi: forEachi$7, - map: map$7, - mapi: mapi$7, - reduce: reduce$7, - reducei: reducei$7, - reduceRight: reduceRight$7, - reduceRighti: reduceRighti$7, - some: some$7, - somei: somei$7 -}; - -function setArray$8(arg1, obj) { - obj.set(arg1); -} - -function setArrayOffset$8(arg1, arg2, obj) { - obj.set(arg1, arg2); -} - -function copyWithin$8(to_, obj) { - return obj.copyWithin(to_); -} - -function copyWithinFrom$8(to_, from, obj) { - return obj.copyWithin(to_, from); -} - -function copyWithinFromRange$8(to_, start, end_, obj) { - return obj.copyWithin(to_, start, end_); -} - -function fillInPlace$8(arg1, obj) { - return obj.fill(arg1); -} - -function fillFromInPlace$8(arg1, from, obj) { - return obj.fill(arg1, from); -} - -function fillRangeInPlace$8(arg1, start, end_, obj) { - return obj.fill(arg1, start, end_); -} - -function sortInPlaceWith$8(arg1, obj) { - return obj.sort(arg1); -} - -function includes$8(arg1, obj) { - return obj.includes(arg1); -} - -function indexOf$8(arg1, obj) { - return obj.indexOf(arg1); -} - -function indexOfFrom$8(arg1, from, obj) { - return obj.indexOf(arg1, from); -} - -function joinWith$8(arg1, obj) { - return obj.join(arg1); -} - -function lastIndexOf$8(arg1, obj) { - return obj.lastIndexOf(arg1); -} - -function lastIndexOfFrom$8(arg1, from, obj) { - return obj.lastIndexOf(arg1, from); -} - -function slice$9(start, end_, obj) { - return obj.slice(start, end_); -} - -function sliceFrom$9(arg1, obj) { - return obj.slice(arg1); -} - -function subarray$8(start, end_, obj) { - return obj.subarray(start, end_); -} - -function subarrayFrom$8(arg1, obj) { - return obj.subarray(arg1); -} - -function every$8(arg1, obj) { - return obj.every(arg1); -} - -function everyi$8(arg1, obj) { - return obj.every(arg1); -} - -function filter$8(arg1, obj) { - return obj.filter(arg1); -} - -function filteri$8(arg1, obj) { - return obj.filter(arg1); -} - -function find$8(arg1, obj) { - return obj.find(arg1); -} - -function findi$8(arg1, obj) { - return obj.find(arg1); -} - -function findIndex$8(arg1, obj) { - return obj.findIndex(arg1); -} - -function findIndexi$8(arg1, obj) { - return obj.findIndex(arg1); -} - -function forEach$8(arg1, obj) { - obj.forEach(arg1); -} - -function forEachi$8(arg1, obj) { - obj.forEach(arg1); -} - -function map$8(arg1, obj) { - return obj.map(arg1); -} - -function mapi$8(arg1, obj) { - return obj.map(arg1); -} - -function reduce$8(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reducei$8(arg1, arg2, obj) { - return obj.reduce(arg1, arg2); -} - -function reduceRight$8(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function reduceRighti$8(arg1, arg2, obj) { - return obj.reduceRight(arg1, arg2); -} - -function some$8(arg1, obj) { - return obj.some(arg1); -} - -function somei$8(arg1, obj) { - return obj.some(arg1); -} - -let $$Float64Array = { - setArray: setArray$8, - setArrayOffset: setArrayOffset$8, - copyWithin: copyWithin$8, - copyWithinFrom: copyWithinFrom$8, - copyWithinFromRange: copyWithinFromRange$8, - fillInPlace: fillInPlace$8, - fillFromInPlace: fillFromInPlace$8, - fillRangeInPlace: fillRangeInPlace$8, - sortInPlaceWith: sortInPlaceWith$8, - includes: includes$8, - indexOf: indexOf$8, - indexOfFrom: indexOfFrom$8, - joinWith: joinWith$8, - lastIndexOf: lastIndexOf$8, - lastIndexOfFrom: lastIndexOfFrom$8, - slice: slice$9, - sliceFrom: sliceFrom$9, - subarray: subarray$8, - subarrayFrom: subarrayFrom$8, - every: every$8, - everyi: everyi$8, - filter: filter$8, - filteri: filteri$8, - find: find$8, - findi: findi$8, - findIndex: findIndex$8, - findIndexi: findIndexi$8, - forEach: forEach$8, - forEachi: forEachi$8, - map: map$8, - mapi: mapi$8, - reduce: reduce$8, - reducei: reducei$8, - reduceRight: reduceRight$8, - reduceRighti: reduceRighti$8, - some: some$8, - somei: somei$8 -}; - -let $$DataView = {}; - -let Int32_array; - -let Float32_array; - -let Float64_array; - -exports.$$ArrayBuffer = $$ArrayBuffer; -exports.$$Int8Array = $$Int8Array; -exports.$$Uint8Array = $$Uint8Array; -exports.$$Uint8ClampedArray = $$Uint8ClampedArray; -exports.$$Int16Array = $$Int16Array; -exports.$$Uint16Array = $$Uint16Array; -exports.$$Int32Array = $$Int32Array; -exports.Int32_array = Int32_array; -exports.$$Uint32Array = $$Uint32Array; -exports.$$Float32Array = $$Float32Array; -exports.Float32_array = Float32_array; -exports.$$Float64Array = $$Float64Array; -exports.Float64_array = Float64_array; -exports.$$DataView = $$DataView; -/* No side effect */ diff --git a/packages/artifacts.txt b/packages/artifacts.txt index 2b8be09d5c..d237740ebf 100644 --- a/packages/artifacts.txt +++ b/packages/artifacts.txt @@ -148,7 +148,6 @@ lib/es6/js_result.js lib/es6/js_set.js lib/es6/js_string.js lib/es6/js_string2.js -lib/es6/js_typed_array.js lib/es6/js_typed_array2.js lib/es6/js_types.js lib/es6/js_undefined.js @@ -315,7 +314,6 @@ lib/js/js_result.js lib/js/js_set.js lib/js/js_string.js lib/js/js_string2.js -lib/js/js_typed_array.js lib/js/js_typed_array2.js lib/js/js_types.js lib/js/js_undefined.js @@ -855,10 +853,6 @@ lib/ocaml/js_string2.cmi lib/ocaml/js_string2.cmj lib/ocaml/js_string2.cmt lib/ocaml/js_string2.res -lib/ocaml/js_typed_array.cmi -lib/ocaml/js_typed_array.cmj -lib/ocaml/js_typed_array.cmt -lib/ocaml/js_typed_array.res lib/ocaml/js_typed_array2.cmi lib/ocaml/js_typed_array2.cmj lib/ocaml/js_typed_array2.cmt