From 9a646cc657b7d239334c33a2bc8d754472d51f40 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Fri, 13 Oct 2023 00:16:14 -0300 Subject: [PATCH] test --- data/api_module_paths.json | 1 + data/belt.json | 9289 ++++++++++++++++++++++ data/dom.json | 1990 +++++ data/js.json | 14872 +++++++++++++++++++++++++++++++++++ package.json | 2 +- scripts/build_doc.mjs | 24 +- scripts/build_doc.res | 109 +- src/ApiDocs.res | 50 +- src/common/App.res | 18 +- 9 files changed, 26240 insertions(+), 115 deletions(-) create mode 100644 data/api_module_paths.json create mode 100644 data/belt.json create mode 100644 data/dom.json create mode 100644 data/js.json diff --git a/data/api_module_paths.json b/data/api_module_paths.json new file mode 100644 index 000000000..9d0897a2b --- /dev/null +++ b/data/api_module_paths.json @@ -0,0 +1 @@ +["dom","dom/storage2","dom/storage","belt","belt/hashmap/string","belt/hashmap/int","belt/hashset/string","belt/hashset/int","belt/mutablemap/string","belt/mutablemap/int","belt/mutableset/string","belt/mutableset/int","belt/map/dict","belt/map/string","belt/map/int","belt/set/dict","belt/set/string","belt/set/int","belt/sortarray/string","belt/sortarray/int","belt/id/makehashable","belt/id/makehashableu","belt/id/makecomparable","belt/id/makecomparableu","belt/float","belt/int","belt/result","belt/option","belt/hashmap","belt/hashset","belt/mutablemap","belt/mutableset","belt/map","belt/set","belt/range","belt/list","belt/mutablestack","belt/mutablequeue","belt/sortarray","belt/array","belt/id","js","js/typedarray2/dataview","js/typedarray2/float64array","js/typedarray2/float32array","js/typedarray2/uint32array","js/typedarray2/int32array","js/typedarray2/uint16array","js/typedarray2/int16array","js/typedarray2/uint8clampedarray","js/typedarray2/uint8array","js/typedarray2/int8array","js/typedarray2/arraybuffer","js/typed_array/dataview","js/typed_array/float64_array","js/typed_array/float64array","js/typed_array/float32_array","js/typed_array/float32array","js/typed_array/uint32array","js/typed_array/int32_array","js/typed_array/int32array","js/typed_array/uint16array","js/typed_array/int16array","js/typed_array/uint8clampedarray","js/typed_array/uint8array","js/typed_array/int8array","js/typed_array/s","js/typed_array/arraybuffer","js/typed_array/type","js/json/kind","js/weakmap","js/map","js/weakset","js/set","js/console","js/vector","js/list","js/result","js/option","js/blob","js/file","js/bigint","js/int","js/float","js/types","js/typedarray2","js/typed_array","js/obj","js/math","js/json","js/global","js/dict","js/date","js/promise2","js/promise","js/re","js/string2","js/string","js/array2","js/array","js/exn","js/null_undefined","js/nullable","js/undefined","js/null","js/internal","js/mapperrt"] \ No newline at end of file diff --git a/data/belt.json b/data/belt.json new file mode 100644 index 000000000..44ca84880 --- /dev/null +++ b/data/belt.json @@ -0,0 +1,9289 @@ +{ + "belt": { + "id": "Belt", + "name": "Belt", + "docstrings": [ + "The ReScript standard library.\n\nBelt is currently mostly covering collection types. It has no string or date functions yet, although Belt.String is in the works. In the meantime, use [Js.String](js/string) for string functions and [Js.Date](js/date) for date functions.\n\n## Motivation\n\nBelt provides:\n\n- The **highest quality** immutable data structures in JavaScript.\n- Safety by default: A Belt function will never throw exceptions, unless it is\n indicated explicitly in the function name (suffix \"Exn\").\n- Better performance and smaller code size running on the JS platform.\n- Ready for [Tree Shaking](https://webpack.js.org/guides/tree-shaking/).\n\n## Usage\n\nTo use modules from Belt, either refer to them by their fully qualified name (`Belt.List`, `Belt.Array` etc.) or open the `Belt` module by putting\n\n```rescript\nopen Belt\n```\n\nat the top of your source files. After opening Belt this way, `Array` will refer to `Belt.Array`, `List` will refer to `Belt.List` etc. in the subsequent code.\n\nIf you want to open Belt globally for all files in your project instead, you can put\n\n```json\n\"bsc-flags\": [\"-open Belt\"]\n```\n\ninto your `bsconfig.json`.\n\n**Note**: this is the **only** `open` we encourage.\n\nExample usage:\n\n```rescript\nlet someNumbers = [1, 1, 4, 2, 3, 6, 3, 4, 2]\n\nlet greaterThan2UniqueAndSorted =\n someNumbers\n ->Belt.Array.keep(x => x > 2)\n // convert to and from set to make values unique\n ->Belt.Set.Int.fromArray\n ->Belt.Set.Int.toArray // output is already sorted\n\nJs.log2(\"result\", greaterThan2UniqueAndSorted)\n```\n\n## Curried vs. Uncurried Callbacks\n\nFor functions taking a callback parameter, there are usually two versions\navailable:\n\n- curried (no suffix)\n- uncurried (suffixed with `U`)\n\nE.g.:\n\n```rescript\nlet forEach: (t<'a>, 'a => unit) => unit\n\nlet forEachU: (t<'a>, (. 'a) => unit) => unit\n```\n\nThe uncurried version will be faster in some cases, but for simplicity we recommend to stick with the curried version unless you need the extra performance.\n\nThe two versions can be invoked as follows:\n\n```rescript\n[\"a\", \"b\", \"c\"]->Belt.Array.forEach(x => Js.log(x))\n\n[\"a\", \"b\", \"c\"]->Belt.Array.forEachU((. x) => Js.log(x))\n```\n\n## Specialized Collections\n\nFor collections types like set or map, Belt provides both a generic module as well as specialized, more efficient implementations for string and int keys.\n\nFor example, Belt has the following set modules:\n\n- [Belt.Set](belt/set)\n- [Belt.Set.Int](belt/set-int)\n- [Belt.Set.String](belt/set-string)\n\n## Implementation Details\n\n### Array access runtime safety\n\nOne common confusion comes from the way Belt handles array access. It differs from than the default standard library's.\n\n```rescript\nlet letters = [\"a\", \"b\", \"c\"]\nlet a = letters[0] // a == \"a\"\nlet capitalA = Js.String.toUpperCase(a)\nlet k = letters[10] // Raises an exception! The 10th index doesn't exist.\n```\n\nBecause Belt avoids exceptions and returns `options` instead, this code behaves differently:\n\n```rescript\nopen Belt\nlet letters = [\"a\", \"b\", \"c\"]\nlet a = letters[0] // a == Some(\"a\")\nlet captialA = Js.String.toUpperCase(a) // Type error! This code will not compile.\nlet k = letters[10] // k == None\n```\n\nAlthough we've fixed the problem where `k` raises an exception, we now have a type error when trying to capitalize `a`. There are a few things going on here:\n\n- Reason transforms array index access to the function `Array.get`. So `letters[0]` is the same as `Array.get(letters, 0)`.\n- The compiler uses whichever `Array` module is in scope. If you `open Belt`, then it uses `Belt.Array`.\n- `Belt.Array.get` returns values wrapped in options, so `letters[0] == Some(\"a\")`.\n\nFortunately, this is easy to fix:\n\n```rescript\nopen Belt\nlet letters = [\"a\", \"b\", \"c\"]\nlet a = letters[0]\n\n// Use a switch statement:\nlet capitalA =\n switch a {\n | Some(a) => Some(Js.String.toUpperCase(a))\n | None => None\n }\n\nlet k = letters[10] // k == None\n```\n\nWith that little bit of tweaking, our code now compiles successfully and is 100% free of runtime errors!\n\n### A Special Encoding for Collection Safety\n\nWhen we create a collection library for a custom data type we need a way to provide a comparator function. Take Set for example, suppose its element type is a pair of ints, it needs a custom compare function that takes two tuples and returns their order. The Set could not just be typed as Set.t (int \\* int) , its customized compare function needs to manifest itself in the signature, otherwise, if the user creates another customized compare function, the two collection could mix which would result in runtime error.\n\nWe use a phantom type to solve the problem:\n\n```rescript\nmodule Comparable1 =\n Belt.Id.MakeComparable(\n {\n type t = (int, int)\n let cmp = ((a0, a1), (b0, b1)) =>\n switch Pervasives.compare(a0, b0) {\n | 0 => Pervasives.compare(a1, b1)\n | c => c\n }\n }\n )\n\nlet mySet1 = Belt.Set.make(~id=module(Comparable1))\n\nmodule Comparable2 =\n Belt.Id.MakeComparable(\n {\n type t = (int, int)\n let cmp = ((a0, a1), (b0, b1)) =>\n switch Pervasives.compare(a0, b0) {\n | 0 => Pervasives.compare(a1, b1)\n | c => c\n }\n }\n )\n\nlet mySet2 = Belt.Set.make(~id=module(Comparable2))\n```\n\nHere, the compiler would infer `mySet1` and `mySet2` having different type, so e.g. a `merge` operation that tries to merge these two sets will correctly fail.\n\n```rescript\nlet mySet1: t<(int, int), Comparable1.identity>\nlet mySet2: t<(int, int), Comparable2.identity>\n```\n\n`Comparable1.identity` and `Comparable2.identity` are not the same using our encoding scheme." + ], + "items": [] + }, + "belt/hashmap/string": { + "id": "Belt.HashMap.String", + "name": "String", + "docstrings": [ + "Specalized when key type is `string`, more efficient\n than the generic type" + ], + "items": [ + { + "id": "Belt.HashMap.String.key", + "kind": "type", + "name": "key", + "docstrings": [], + "signature": "type key = string" + }, + { + "id": "Belt.HashMap.String.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'b>" + }, + { + "id": "Belt.HashMap.String.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~hintSize: int) => t<'b>" + }, + { + "id": "Belt.HashMap.String.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t<'b> => unit" + }, + { + "id": "Belt.HashMap.String.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'a> => bool" + }, + { + "id": "Belt.HashMap.String.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`setDone tbl k v` if `k` does not exist,\n add the binding `k,v`, otherwise, update the old value with the new\n `v`" + ], + "signature": "let set: (t<'a>, key, 'a) => unit" + }, + { + "id": "Belt.HashMap.String.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Belt.HashMap.String.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'a>, key) => option<'a>" + }, + { + "id": "Belt.HashMap.String.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'b>, key) => bool" + }, + { + "id": "Belt.HashMap.String.remove", + "kind": "value", + "name": "remove", + "docstrings": [], + "signature": "let remove: (t<'a>, key) => unit" + }, + { + "id": "Belt.HashMap.String.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'b>, (. key, 'b) => unit) => unit" + }, + { + "id": "Belt.HashMap.String.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t<'b>, (key, 'b) => unit) => unit" + }, + { + "id": "Belt.HashMap.String.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'b>, 'c, (. 'c, key, 'b) => 'c) => 'c" + }, + { + "id": "Belt.HashMap.String.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t<'b>, 'c, ('c, key, 'b) => 'c) => 'c" + }, + { + "id": "Belt.HashMap.String.keepMapInPlaceU", + "kind": "value", + "name": "keepMapInPlaceU", + "docstrings": [], + "signature": "let keepMapInPlaceU: (t<'a>, (. key, 'a) => option<'a>) => unit" + }, + { + "id": "Belt.HashMap.String.keepMapInPlace", + "kind": "value", + "name": "keepMapInPlace", + "docstrings": [], + "signature": "let keepMapInPlace: (t<'a>, (key, 'a) => option<'a>) => unit" + }, + { + "id": "Belt.HashMap.String.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'a> => int" + }, + { + "id": "Belt.HashMap.String.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t<'a> => array<(key, 'a)>" + }, + { + "id": "Belt.HashMap.String.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [], + "signature": "let keysToArray: t<'a> => array" + }, + { + "id": "Belt.HashMap.String.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [], + "signature": "let valuesToArray: t<'a> => array<'a>" + }, + { + "id": "Belt.HashMap.String.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array<(key, 'a)> => t<'a>" + }, + { + "id": "Belt.HashMap.String.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t<'a>, array<(key, 'a)>) => unit" + }, + { + "id": "Belt.HashMap.String.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "docstrings": [], + "signature": "let getBucketHistogram: t<'a> => array" + }, + { + "id": "Belt.HashMap.String.logStats", + "kind": "value", + "name": "logStats", + "docstrings": [], + "signature": "let logStats: t<'a> => unit" + } + ] + }, + "belt/hashmap/int": { + "id": "Belt.HashMap.Int", + "name": "Int", + "docstrings": [ + "Specalized when key type is `int`, more efficient\n than the generic type" + ], + "items": [ + { + "id": "Belt.HashMap.Int.key", + "kind": "type", + "name": "key", + "docstrings": [], + "signature": "type key = int" + }, + { + "id": "Belt.HashMap.Int.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'b>" + }, + { + "id": "Belt.HashMap.Int.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~hintSize: int) => t<'b>" + }, + { + "id": "Belt.HashMap.Int.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t<'b> => unit" + }, + { + "id": "Belt.HashMap.Int.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'a> => bool" + }, + { + "id": "Belt.HashMap.Int.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`setDone tbl k v` if `k` does not exist,\n add the binding `k,v`, otherwise, update the old value with the new\n `v`" + ], + "signature": "let set: (t<'a>, key, 'a) => unit" + }, + { + "id": "Belt.HashMap.Int.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Belt.HashMap.Int.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'a>, key) => option<'a>" + }, + { + "id": "Belt.HashMap.Int.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'b>, key) => bool" + }, + { + "id": "Belt.HashMap.Int.remove", + "kind": "value", + "name": "remove", + "docstrings": [], + "signature": "let remove: (t<'a>, key) => unit" + }, + { + "id": "Belt.HashMap.Int.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'b>, (. key, 'b) => unit) => unit" + }, + { + "id": "Belt.HashMap.Int.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t<'b>, (key, 'b) => unit) => unit" + }, + { + "id": "Belt.HashMap.Int.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'b>, 'c, (. 'c, key, 'b) => 'c) => 'c" + }, + { + "id": "Belt.HashMap.Int.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t<'b>, 'c, ('c, key, 'b) => 'c) => 'c" + }, + { + "id": "Belt.HashMap.Int.keepMapInPlaceU", + "kind": "value", + "name": "keepMapInPlaceU", + "docstrings": [], + "signature": "let keepMapInPlaceU: (t<'a>, (. key, 'a) => option<'a>) => unit" + }, + { + "id": "Belt.HashMap.Int.keepMapInPlace", + "kind": "value", + "name": "keepMapInPlace", + "docstrings": [], + "signature": "let keepMapInPlace: (t<'a>, (key, 'a) => option<'a>) => unit" + }, + { + "id": "Belt.HashMap.Int.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'a> => int" + }, + { + "id": "Belt.HashMap.Int.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t<'a> => array<(key, 'a)>" + }, + { + "id": "Belt.HashMap.Int.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [], + "signature": "let keysToArray: t<'a> => array" + }, + { + "id": "Belt.HashMap.Int.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [], + "signature": "let valuesToArray: t<'a> => array<'a>" + }, + { + "id": "Belt.HashMap.Int.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array<(key, 'a)> => t<'a>" + }, + { + "id": "Belt.HashMap.Int.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t<'a>, array<(key, 'a)>) => unit" + }, + { + "id": "Belt.HashMap.Int.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "docstrings": [], + "signature": "let getBucketHistogram: t<'a> => array" + }, + { + "id": "Belt.HashMap.Int.logStats", + "kind": "value", + "name": "logStats", + "docstrings": [], + "signature": "let logStats: t<'a> => unit" + } + ] + }, + "belt/hashset/string": { + "id": "Belt.HashSet.String", + "name": "String", + "docstrings": [ + "Specalized when key type is `string`, more efficient\n than the generic type" + ], + "items": [ + { + "id": "Belt.HashSet.String.key", + "kind": "type", + "name": "key", + "docstrings": [], + "signature": "type key = string" + }, + { + "id": "Belt.HashSet.String.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Belt.HashSet.String.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~hintSize: int) => t" + }, + { + "id": "Belt.HashSet.String.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t => unit" + }, + { + "id": "Belt.HashSet.String.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t => bool" + }, + { + "id": "Belt.HashSet.String.add", + "kind": "value", + "name": "add", + "docstrings": [], + "signature": "let add: (t, key) => unit" + }, + { + "id": "Belt.HashSet.String.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Belt.HashSet.String.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t, key) => bool" + }, + { + "id": "Belt.HashSet.String.remove", + "kind": "value", + "name": "remove", + "docstrings": [], + "signature": "let remove: (t, key) => unit" + }, + { + "id": "Belt.HashSet.String.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t, (. key) => unit) => unit" + }, + { + "id": "Belt.HashSet.String.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, key => unit) => unit" + }, + { + "id": "Belt.HashSet.String.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t, 'c, (. 'c, key) => 'c) => 'c" + }, + { + "id": "Belt.HashSet.String.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, 'c, ('c, key) => 'c) => 'c" + }, + { + "id": "Belt.HashSet.String.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t => int" + }, + { + "id": "Belt.HashSet.String.logStats", + "kind": "value", + "name": "logStats", + "docstrings": [], + "signature": "let logStats: t => unit" + }, + { + "id": "Belt.HashSet.String.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t => array" + }, + { + "id": "Belt.HashSet.String.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array => t" + }, + { + "id": "Belt.HashSet.String.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t, array) => unit" + }, + { + "id": "Belt.HashSet.String.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "docstrings": [], + "signature": "let getBucketHistogram: t => array" + } + ] + }, + "belt/hashset/int": { + "id": "Belt.HashSet.Int", + "name": "Int", + "docstrings": [ + "Specalized when key type is `int`, more efficient\n than the generic type" + ], + "items": [ + { + "id": "Belt.HashSet.Int.key", + "kind": "type", + "name": "key", + "docstrings": [], + "signature": "type key = int" + }, + { + "id": "Belt.HashSet.Int.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Belt.HashSet.Int.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~hintSize: int) => t" + }, + { + "id": "Belt.HashSet.Int.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t => unit" + }, + { + "id": "Belt.HashSet.Int.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t => bool" + }, + { + "id": "Belt.HashSet.Int.add", + "kind": "value", + "name": "add", + "docstrings": [], + "signature": "let add: (t, key) => unit" + }, + { + "id": "Belt.HashSet.Int.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Belt.HashSet.Int.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t, key) => bool" + }, + { + "id": "Belt.HashSet.Int.remove", + "kind": "value", + "name": "remove", + "docstrings": [], + "signature": "let remove: (t, key) => unit" + }, + { + "id": "Belt.HashSet.Int.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t, (. key) => unit) => unit" + }, + { + "id": "Belt.HashSet.Int.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, key => unit) => unit" + }, + { + "id": "Belt.HashSet.Int.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t, 'c, (. 'c, key) => 'c) => 'c" + }, + { + "id": "Belt.HashSet.Int.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, 'c, ('c, key) => 'c) => 'c" + }, + { + "id": "Belt.HashSet.Int.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t => int" + }, + { + "id": "Belt.HashSet.Int.logStats", + "kind": "value", + "name": "logStats", + "docstrings": [], + "signature": "let logStats: t => unit" + }, + { + "id": "Belt.HashSet.Int.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t => array" + }, + { + "id": "Belt.HashSet.Int.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array => t" + }, + { + "id": "Belt.HashSet.Int.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t, array) => unit" + }, + { + "id": "Belt.HashSet.Int.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "docstrings": [], + "signature": "let getBucketHistogram: t => array" + } + ] + }, + "belt/mutablemap/string": { + "id": "Belt.MutableMap.String", + "name": "String", + "docstrings": [], + "items": [ + { + "id": "Belt.MutableMap.String.key", + "kind": "type", + "name": "key", + "docstrings": [], + "signature": "type key = string" + }, + { + "id": "Belt.MutableMap.String.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a>" + }, + { + "id": "Belt.MutableMap.String.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: unit => t<'a>" + }, + { + "id": "Belt.MutableMap.String.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t<'a> => unit" + }, + { + "id": "Belt.MutableMap.String.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'a> => bool" + }, + { + "id": "Belt.MutableMap.String.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'a>, key) => bool" + }, + { + "id": "Belt.MutableMap.String.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [], + "signature": "let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int" + }, + { + "id": "Belt.MutableMap.String.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "`cmp m1 m2 cmp`\n First compare by size, if size is the same,\n compare by key, value pair" + ], + "signature": "let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int" + }, + { + "id": "Belt.MutableMap.String.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.String.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq m1 m2 cmp`" + ], + "signature": "let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.String.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'a>, (. key, 'a) => unit) => unit" + }, + { + "id": "Belt.MutableMap.String.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach m f` applies `f` to all bindings in map `m`.\n `f` receives the key as first argument, and the associated value\n as second argument.\n The application order of `f` is in increasing order." + ], + "signature": "let forEach: (t<'a>, (key, 'a) => unit) => unit" + }, + { + "id": "Belt.MutableMap.String.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'a>, 'b, (. 'b, key, 'a) => 'b) => 'b" + }, + { + "id": "Belt.MutableMap.String.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce m a f` computes `(f kN dN ... (f k1 d1 a)...)`,\n where `k1 ... kN` are the keys of all bindings in `m`\n (in increasing order), and `d1 ... dN` are the associated data." + ], + "signature": "let reduce: (t<'a>, 'b, ('b, key, 'a) => 'b) => 'b" + }, + { + "id": "Belt.MutableMap.String.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'a>, (. key, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.String.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every m p` checks if all the bindings of the map\n satisfy the predicate `p`.\n The application order of `p` is unspecified." + ], + "signature": "let every: (t<'a>, (key, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.String.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'a>, (. key, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.String.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some m p` checks if at least one binding of the map\n satisfy the predicate `p`.\n The application order of `p` is unspecified." + ], + "signature": "let some: (t<'a>, (key, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.String.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'a> => int" + }, + { + "id": "Belt.MutableMap.String.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order" + ], + "signature": "let toList: t<'a> => list<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.String.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "In increasing order" + ], + "signature": "let toArray: t<'a> => array<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.String.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array<(key, 'a)> => t<'a>" + }, + { + "id": "Belt.MutableMap.String.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [], + "signature": "let keysToArray: t<'a> => array" + }, + { + "id": "Belt.MutableMap.String.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [], + "signature": "let valuesToArray: t<'a> => array<'a>" + }, + { + "id": "Belt.MutableMap.String.minKey", + "kind": "value", + "name": "minKey", + "docstrings": [], + "signature": "let minKey: t<'a> => option" + }, + { + "id": "Belt.MutableMap.String.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "docstrings": [], + "signature": "let minKeyUndefined: t<'a> => Js.undefined" + }, + { + "id": "Belt.MutableMap.String.maxKey", + "kind": "value", + "name": "maxKey", + "docstrings": [], + "signature": "let maxKey: t<'a> => option" + }, + { + "id": "Belt.MutableMap.String.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "docstrings": [], + "signature": "let maxKeyUndefined: t<'a> => Js.undefined" + }, + { + "id": "Belt.MutableMap.String.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t<'a> => option<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.String.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t<'a> => Js.undefined<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.String.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t<'a> => option<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.String.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t<'a> => Js.undefined<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.String.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'a>, key) => option<'a>" + }, + { + "id": "Belt.MutableMap.String.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t<'a>, key) => Js.undefined<'a>" + }, + { + "id": "Belt.MutableMap.String.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (t<'a>, key, 'a) => 'a" + }, + { + "id": "Belt.MutableMap.String.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t<'a>, key) => 'a" + }, + { + "id": "Belt.MutableMap.String.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t<'a> => unit" + }, + { + "id": "Belt.MutableMap.String.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "`remove m x` do the in-place modification" + ], + "signature": "let remove: (t<'a>, key) => unit" + }, + { + "id": "Belt.MutableMap.String.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t<'a>, array) => unit" + }, + { + "id": "Belt.MutableMap.String.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set m x y` do the in-place modification, return\n `m` for chaining. If `x` was already bound\n in `m`, its previous binding disappears." + ], + "signature": "let set: (t<'a>, key, 'a) => unit" + }, + { + "id": "Belt.MutableMap.String.updateU", + "kind": "value", + "name": "updateU", + "docstrings": [], + "signature": "let updateU: (t<'a>, key, (. option<'a>) => option<'a>) => unit" + }, + { + "id": "Belt.MutableMap.String.update", + "kind": "value", + "name": "update", + "docstrings": [], + "signature": "let update: (t<'a>, key, option<'a> => option<'a>) => unit" + }, + { + "id": "Belt.MutableMap.String.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => t<'b>" + }, + { + "id": "Belt.MutableMap.String.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map m f` returns a map with same domain as `m`, where the\n associated value `a` of all bindings of `m` has been\n replaced by the result of the application of `f` to `a`.\n The bindings are passed to `f` in increasing order\n with respect to the ordering over the type of the keys." + ], + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Belt.MutableMap.String.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "docstrings": [], + "signature": "let mapWithKeyU: (t<'a>, (. key, 'a) => 'b) => t<'b>" + }, + { + "id": "Belt.MutableMap.String.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "docstrings": [], + "signature": "let mapWithKey: (t<'a>, (key, 'a) => 'b) => t<'b>" + } + ] + }, + "belt/mutablemap/int": { + "id": "Belt.MutableMap.Int", + "name": "Int", + "docstrings": [], + "items": [ + { + "id": "Belt.MutableMap.Int.key", + "kind": "type", + "name": "key", + "docstrings": [], + "signature": "type key = int" + }, + { + "id": "Belt.MutableMap.Int.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a>" + }, + { + "id": "Belt.MutableMap.Int.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: unit => t<'a>" + }, + { + "id": "Belt.MutableMap.Int.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t<'a> => unit" + }, + { + "id": "Belt.MutableMap.Int.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'a> => bool" + }, + { + "id": "Belt.MutableMap.Int.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'a>, key) => bool" + }, + { + "id": "Belt.MutableMap.Int.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [], + "signature": "let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int" + }, + { + "id": "Belt.MutableMap.Int.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "`cmp m1 m2 cmp`\n First compare by size, if size is the same,\n compare by key, value pair" + ], + "signature": "let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int" + }, + { + "id": "Belt.MutableMap.Int.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.Int.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq m1 m2 cmp`" + ], + "signature": "let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.Int.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'a>, (. key, 'a) => unit) => unit" + }, + { + "id": "Belt.MutableMap.Int.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach m f` applies `f` to all bindings in map `m`.\n `f` receives the key as first argument, and the associated value\n as second argument.\n The application order of `f` is in increasing order." + ], + "signature": "let forEach: (t<'a>, (key, 'a) => unit) => unit" + }, + { + "id": "Belt.MutableMap.Int.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'a>, 'b, (. 'b, key, 'a) => 'b) => 'b" + }, + { + "id": "Belt.MutableMap.Int.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce m a f` computes `(f kN dN ... (f k1 d1 a)...)`,\n where `k1 ... kN` are the keys of all bindings in `m`\n (in increasing order), and `d1 ... dN` are the associated data." + ], + "signature": "let reduce: (t<'a>, 'b, ('b, key, 'a) => 'b) => 'b" + }, + { + "id": "Belt.MutableMap.Int.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'a>, (. key, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.Int.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every m p` checks if all the bindings of the map\n satisfy the predicate `p`.\n The application order of `p` is unspecified." + ], + "signature": "let every: (t<'a>, (key, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.Int.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'a>, (. key, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.Int.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some m p` checks if at least one binding of the map\n satisfy the predicate `p`.\n The application order of `p` is unspecified." + ], + "signature": "let some: (t<'a>, (key, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.Int.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'a> => int" + }, + { + "id": "Belt.MutableMap.Int.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order" + ], + "signature": "let toList: t<'a> => list<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.Int.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "In increasing order" + ], + "signature": "let toArray: t<'a> => array<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.Int.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array<(key, 'a)> => t<'a>" + }, + { + "id": "Belt.MutableMap.Int.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [], + "signature": "let keysToArray: t<'a> => array" + }, + { + "id": "Belt.MutableMap.Int.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [], + "signature": "let valuesToArray: t<'a> => array<'a>" + }, + { + "id": "Belt.MutableMap.Int.minKey", + "kind": "value", + "name": "minKey", + "docstrings": [], + "signature": "let minKey: t<'a> => option" + }, + { + "id": "Belt.MutableMap.Int.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "docstrings": [], + "signature": "let minKeyUndefined: t<'a> => Js.undefined" + }, + { + "id": "Belt.MutableMap.Int.maxKey", + "kind": "value", + "name": "maxKey", + "docstrings": [], + "signature": "let maxKey: t<'a> => option" + }, + { + "id": "Belt.MutableMap.Int.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "docstrings": [], + "signature": "let maxKeyUndefined: t<'a> => Js.undefined" + }, + { + "id": "Belt.MutableMap.Int.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t<'a> => option<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.Int.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t<'a> => Js.undefined<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.Int.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t<'a> => option<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.Int.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t<'a> => Js.undefined<(key, 'a)>" + }, + { + "id": "Belt.MutableMap.Int.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'a>, key) => option<'a>" + }, + { + "id": "Belt.MutableMap.Int.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t<'a>, key) => Js.undefined<'a>" + }, + { + "id": "Belt.MutableMap.Int.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (t<'a>, key, 'a) => 'a" + }, + { + "id": "Belt.MutableMap.Int.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t<'a>, key) => 'a" + }, + { + "id": "Belt.MutableMap.Int.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t<'a> => unit" + }, + { + "id": "Belt.MutableMap.Int.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "`remove m x` do the in-place modification" + ], + "signature": "let remove: (t<'a>, key) => unit" + }, + { + "id": "Belt.MutableMap.Int.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t<'a>, array) => unit" + }, + { + "id": "Belt.MutableMap.Int.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set m x y` do the in-place modification, return\n `m` for chaining. If `x` was already bound\n in `m`, its previous binding disappears." + ], + "signature": "let set: (t<'a>, key, 'a) => unit" + }, + { + "id": "Belt.MutableMap.Int.updateU", + "kind": "value", + "name": "updateU", + "docstrings": [], + "signature": "let updateU: (t<'a>, key, (. option<'a>) => option<'a>) => unit" + }, + { + "id": "Belt.MutableMap.Int.update", + "kind": "value", + "name": "update", + "docstrings": [], + "signature": "let update: (t<'a>, key, option<'a> => option<'a>) => unit" + }, + { + "id": "Belt.MutableMap.Int.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => t<'b>" + }, + { + "id": "Belt.MutableMap.Int.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map m f` returns a map with same domain as `m`, where the\n associated value `a` of all bindings of `m` has been\n replaced by the result of the application of `f` to `a`.\n The bindings are passed to `f` in increasing order\n with respect to the ordering over the type of the keys." + ], + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Belt.MutableMap.Int.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "docstrings": [], + "signature": "let mapWithKeyU: (t<'a>, (. key, 'a) => 'b) => t<'b>" + }, + { + "id": "Belt.MutableMap.Int.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "docstrings": [], + "signature": "let mapWithKey: (t<'a>, (key, 'a) => 'b) => t<'b>" + } + ] + }, + "belt/mutableset/string": { + "id": "Belt.MutableSet.String", + "name": "String", + "docstrings": [ + "Specialized when key type is `string`, more efficient\n than the generic type" + ], + "items": [ + { + "id": "Belt.MutableSet.String.value", + "kind": "type", + "name": "value", + "docstrings": [ + "The type of the set elements." + ], + "signature": "type value = string" + }, + { + "id": "Belt.MutableSet.String.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type of sets." + ], + "signature": "type t" + }, + { + "id": "Belt.MutableSet.String.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: unit => t" + }, + { + "id": "Belt.MutableSet.String.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array => t" + }, + { + "id": "Belt.MutableSet.String.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "docstrings": [], + "signature": "let fromSortedArrayUnsafe: array => t" + }, + { + "id": "Belt.MutableSet.String.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Belt.MutableSet.String.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t => bool" + }, + { + "id": "Belt.MutableSet.String.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t, value) => bool" + }, + { + "id": "Belt.MutableSet.String.add", + "kind": "value", + "name": "add", + "docstrings": [], + "signature": "let add: (t, value) => unit" + }, + { + "id": "Belt.MutableSet.String.addCheck", + "kind": "value", + "name": "addCheck", + "docstrings": [], + "signature": "let addCheck: (t, value) => bool" + }, + { + "id": "Belt.MutableSet.String.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t, array) => unit" + }, + { + "id": "Belt.MutableSet.String.remove", + "kind": "value", + "name": "remove", + "docstrings": [], + "signature": "let remove: (t, value) => unit" + }, + { + "id": "Belt.MutableSet.String.removeCheck", + "kind": "value", + "name": "removeCheck", + "docstrings": [], + "signature": "let removeCheck: (t, value) => bool" + }, + { + "id": "Belt.MutableSet.String.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t, array) => unit" + }, + { + "id": "Belt.MutableSet.String.union", + "kind": "value", + "name": "union", + "docstrings": [], + "signature": "let union: (t, t) => t" + }, + { + "id": "Belt.MutableSet.String.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [], + "signature": "let intersect: (t, t) => t" + }, + { + "id": "Belt.MutableSet.String.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (t, t) => t" + }, + { + "id": "Belt.MutableSet.String.subset", + "kind": "value", + "name": "subset", + "docstrings": [], + "signature": "let subset: (t, t) => bool" + }, + { + "id": "Belt.MutableSet.String.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [], + "signature": "let cmp: (t, t) => int" + }, + { + "id": "Belt.MutableSet.String.eq", + "kind": "value", + "name": "eq", + "docstrings": [], + "signature": "let eq: (t, t) => bool" + }, + { + "id": "Belt.MutableSet.String.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t, (. value) => unit) => unit" + }, + { + "id": "Belt.MutableSet.String.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "In increasing order" + ], + "signature": "let forEach: (t, value => unit) => unit" + }, + { + "id": "Belt.MutableSet.String.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t, 'a, (. 'a, value) => 'a) => 'a" + }, + { + "id": "Belt.MutableSet.String.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "Iterate in increasing order." + ], + "signature": "let reduce: (t, 'a, ('a, value) => 'a) => 'a" + }, + { + "id": "Belt.MutableSet.String.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t, (. value) => bool) => bool" + }, + { + "id": "Belt.MutableSet.String.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every p s` checks if all elements of the set\n satisfy the predicate `p`. Order unspecified." + ], + "signature": "let every: (t, value => bool) => bool" + }, + { + "id": "Belt.MutableSet.String.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t, (. value) => bool) => bool" + }, + { + "id": "Belt.MutableSet.String.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some p s` checks if at least one element of\n the set satisfies the predicate `p`. Oder unspecified." + ], + "signature": "let some: (t, value => bool) => bool" + }, + { + "id": "Belt.MutableSet.String.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t, (. value) => bool) => t" + }, + { + "id": "Belt.MutableSet.String.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "`keep s p` returns a fresh copy of the set of all elements in `s`\n that satisfy predicate `p`." + ], + "signature": "let keep: (t, value => bool) => t" + }, + { + "id": "Belt.MutableSet.String.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t, (. value) => bool) => (t, t)" + }, + { + "id": "Belt.MutableSet.String.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition s p` returns a fresh copy pair of sets `(s1, s2)`, where\n `s1` is the set of all the elements of `s` that satisfy the\n predicate `p`, and `s2` is the set of all the elements of\n `s` that do not satisfy `p`." + ], + "signature": "let partition: (t, value => bool) => (t, t)" + }, + { + "id": "Belt.MutableSet.String.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t => int" + }, + { + "id": "Belt.MutableSet.String.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order with respect" + ], + "signature": "let toList: t => list" + }, + { + "id": "Belt.MutableSet.String.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "In increasing order with respect" + ], + "signature": "let toArray: t => array" + }, + { + "id": "Belt.MutableSet.String.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t => option" + }, + { + "id": "Belt.MutableSet.String.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t => Js.undefined" + }, + { + "id": "Belt.MutableSet.String.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t => option" + }, + { + "id": "Belt.MutableSet.String.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t => Js.undefined" + }, + { + "id": "Belt.MutableSet.String.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t, value) => option" + }, + { + "id": "Belt.MutableSet.String.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t, value) => Js.undefined" + }, + { + "id": "Belt.MutableSet.String.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t, value) => value" + }, + { + "id": "Belt.MutableSet.String.split", + "kind": "value", + "name": "split", + "docstrings": [ + "`split s key` return a fresh copy of each" + ], + "signature": "let split: (t, value) => ((t, t), bool)" + }, + { + "id": "Belt.MutableSet.String.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t => unit" + } + ] + }, + "belt/mutableset/int": { + "id": "Belt.MutableSet.Int", + "name": "Int", + "docstrings": [ + "Specialized when key type is `int`, more efficient\n than the generic type" + ], + "items": [ + { + "id": "Belt.MutableSet.Int.value", + "kind": "type", + "name": "value", + "docstrings": [ + "The type of the set elements." + ], + "signature": "type value = int" + }, + { + "id": "Belt.MutableSet.Int.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type of sets." + ], + "signature": "type t" + }, + { + "id": "Belt.MutableSet.Int.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: unit => t" + }, + { + "id": "Belt.MutableSet.Int.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array => t" + }, + { + "id": "Belt.MutableSet.Int.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "docstrings": [], + "signature": "let fromSortedArrayUnsafe: array => t" + }, + { + "id": "Belt.MutableSet.Int.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Belt.MutableSet.Int.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t => bool" + }, + { + "id": "Belt.MutableSet.Int.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t, value) => bool" + }, + { + "id": "Belt.MutableSet.Int.add", + "kind": "value", + "name": "add", + "docstrings": [], + "signature": "let add: (t, value) => unit" + }, + { + "id": "Belt.MutableSet.Int.addCheck", + "kind": "value", + "name": "addCheck", + "docstrings": [], + "signature": "let addCheck: (t, value) => bool" + }, + { + "id": "Belt.MutableSet.Int.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t, array) => unit" + }, + { + "id": "Belt.MutableSet.Int.remove", + "kind": "value", + "name": "remove", + "docstrings": [], + "signature": "let remove: (t, value) => unit" + }, + { + "id": "Belt.MutableSet.Int.removeCheck", + "kind": "value", + "name": "removeCheck", + "docstrings": [], + "signature": "let removeCheck: (t, value) => bool" + }, + { + "id": "Belt.MutableSet.Int.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t, array) => unit" + }, + { + "id": "Belt.MutableSet.Int.union", + "kind": "value", + "name": "union", + "docstrings": [], + "signature": "let union: (t, t) => t" + }, + { + "id": "Belt.MutableSet.Int.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [], + "signature": "let intersect: (t, t) => t" + }, + { + "id": "Belt.MutableSet.Int.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (t, t) => t" + }, + { + "id": "Belt.MutableSet.Int.subset", + "kind": "value", + "name": "subset", + "docstrings": [], + "signature": "let subset: (t, t) => bool" + }, + { + "id": "Belt.MutableSet.Int.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [], + "signature": "let cmp: (t, t) => int" + }, + { + "id": "Belt.MutableSet.Int.eq", + "kind": "value", + "name": "eq", + "docstrings": [], + "signature": "let eq: (t, t) => bool" + }, + { + "id": "Belt.MutableSet.Int.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t, (. value) => unit) => unit" + }, + { + "id": "Belt.MutableSet.Int.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "In increasing order" + ], + "signature": "let forEach: (t, value => unit) => unit" + }, + { + "id": "Belt.MutableSet.Int.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t, 'a, (. 'a, value) => 'a) => 'a" + }, + { + "id": "Belt.MutableSet.Int.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "Iterate in increasing order." + ], + "signature": "let reduce: (t, 'a, ('a, value) => 'a) => 'a" + }, + { + "id": "Belt.MutableSet.Int.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t, (. value) => bool) => bool" + }, + { + "id": "Belt.MutableSet.Int.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every p s` checks if all elements of the set\n satisfy the predicate `p`. Order unspecified." + ], + "signature": "let every: (t, value => bool) => bool" + }, + { + "id": "Belt.MutableSet.Int.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t, (. value) => bool) => bool" + }, + { + "id": "Belt.MutableSet.Int.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some p s` checks if at least one element of\n the set satisfies the predicate `p`. Oder unspecified." + ], + "signature": "let some: (t, value => bool) => bool" + }, + { + "id": "Belt.MutableSet.Int.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t, (. value) => bool) => t" + }, + { + "id": "Belt.MutableSet.Int.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "`keep s p` returns a fresh copy of the set of all elements in `s`\n that satisfy predicate `p`." + ], + "signature": "let keep: (t, value => bool) => t" + }, + { + "id": "Belt.MutableSet.Int.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t, (. value) => bool) => (t, t)" + }, + { + "id": "Belt.MutableSet.Int.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition s p` returns a fresh copy pair of sets `(s1, s2)`, where\n `s1` is the set of all the elements of `s` that satisfy the\n predicate `p`, and `s2` is the set of all the elements of\n `s` that do not satisfy `p`." + ], + "signature": "let partition: (t, value => bool) => (t, t)" + }, + { + "id": "Belt.MutableSet.Int.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t => int" + }, + { + "id": "Belt.MutableSet.Int.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order with respect" + ], + "signature": "let toList: t => list" + }, + { + "id": "Belt.MutableSet.Int.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "In increasing order with respect" + ], + "signature": "let toArray: t => array" + }, + { + "id": "Belt.MutableSet.Int.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t => option" + }, + { + "id": "Belt.MutableSet.Int.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t => Js.undefined" + }, + { + "id": "Belt.MutableSet.Int.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t => option" + }, + { + "id": "Belt.MutableSet.Int.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t => Js.undefined" + }, + { + "id": "Belt.MutableSet.Int.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t, value) => option" + }, + { + "id": "Belt.MutableSet.Int.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t, value) => Js.undefined" + }, + { + "id": "Belt.MutableSet.Int.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t, value) => value" + }, + { + "id": "Belt.MutableSet.Int.split", + "kind": "value", + "name": "split", + "docstrings": [ + "`split s key` return a fresh copy of each" + ], + "signature": "let split: (t, value) => ((t, t), bool)" + }, + { + "id": "Belt.MutableSet.Int.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t => unit" + } + ] + }, + "belt/map/dict": { + "id": "Belt.Map.Dict", + "name": "Dict", + "docstrings": [], + "items": [ + { + "id": "Belt.Map.Dict.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'key, 'value, 'id>" + }, + { + "id": "Belt.Map.Dict.cmp", + "kind": "type", + "name": "cmp", + "docstrings": [], + "signature": "type cmp<'key, 'id> = Belt_Id.cmp<'key, 'id>" + }, + { + "id": "Belt.Map.Dict.empty", + "kind": "value", + "name": "empty", + "docstrings": [], + "signature": "let empty: t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.Dict.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'k, 'v, 'id> => bool" + }, + { + "id": "Belt.Map.Dict.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => bool" + }, + { + "id": "Belt.Map.Dict.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [], + "signature": "let cmpU: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, ~kcmp: cmp<'k, 'id>, ~vcmp: (. 'v, 'v) => int) => int" + }, + { + "id": "Belt.Map.Dict.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [], + "signature": "let cmp: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, ~kcmp: cmp<'k, 'id>, ~vcmp: ('v, 'v) => int) => int" + }, + { + "id": "Belt.Map.Dict.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, ~kcmp: cmp<'k, 'id>, ~veq: (. 'a, 'a) => bool) => bool" + }, + { + "id": "Belt.Map.Dict.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq(m1, m2, cmp)` tests whether the maps `m1` and `m2` are equal, that is,\n contain equal keys and associate them with equal data. `cmp` is the\n equality predicate used to compare the data associated with the keys." + ], + "signature": "let eq: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, ~kcmp: cmp<'k, 'id>, ~veq: ('a, 'a) => bool) => bool" + }, + { + "id": "Belt.Map.Dict.findFirstByU", + "kind": "value", + "name": "findFirstByU", + "docstrings": [], + "signature": "let findFirstByU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => option<('k, 'v)>" + }, + { + "id": "Belt.Map.Dict.findFirstBy", + "kind": "value", + "name": "findFirstBy", + "docstrings": [ + "`findFirstBy(m, p)` uses function `f` to find the first key value pair to\n match predicate `p`.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Map.Dict.fromArray([(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"3\")], ~cmp=IntCmp.cmp)\n\n Belt.Map.Dict.findFirstBy(s0, (k, _) => k == 4) == Some((4, \"4\"))\n ```" + ], + "signature": "let findFirstBy: (t<'k, 'v, 'id>, ('k, 'v) => bool) => option<('k, 'v)>" + }, + { + "id": "Belt.Map.Dict.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'k, 'a, 'id>, (. 'k, 'a) => unit) => unit" + }, + { + "id": "Belt.Map.Dict.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(m, f)` applies `f` to all bindings in map `m`. `f` receives the\n key as first argument, and the associated value as second argument. The\n bindings are passed to `f` in increasing order with respect to the ordering\n over the type of the keys." + ], + "signature": "let forEach: (t<'k, 'a, 'id>, ('k, 'a) => unit) => unit" + }, + { + "id": "Belt.Map.Dict.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'k, 'a, 'id>, 'b, (. 'b, 'k, 'a) => 'b) => 'b" + }, + { + "id": "Belt.Map.Dict.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce(m, a, f)` computes `f(kN, dN ... f(k1, d1, a)...)`, where `k1 ...\n kN` are the keys of all bindings in `m` (in increasing order), and `d1 ...\n dN` are the associated data." + ], + "signature": "let reduce: (t<'k, 'a, 'id>, 'b, ('b, 'k, 'a) => 'b) => 'b" + }, + { + "id": "Belt.Map.Dict.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => bool" + }, + { + "id": "Belt.Map.Dict.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every(m, p)` checks if all the bindings of the map satisfy the predicate\n `p`. Order unspecified" + ], + "signature": "let every: (t<'k, 'a, 'id>, ('k, 'a) => bool) => bool" + }, + { + "id": "Belt.Map.Dict.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => bool" + }, + { + "id": "Belt.Map.Dict.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some(m, p)` checks if at least one binding of the map satisfy the\n predicate `p`. Order unspecified" + ], + "signature": "let some: (t<'k, 'a, 'id>, ('k, 'a) => bool) => bool" + }, + { + "id": "Belt.Map.Dict.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'k, 'a, 'id> => int" + }, + { + "id": "Belt.Map.Dict.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order." + ], + "signature": "let toList: t<'k, 'a, 'id> => list<('k, 'a)>" + }, + { + "id": "Belt.Map.Dict.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t<'k, 'a, 'id> => array<('k, 'a)>" + }, + { + "id": "Belt.Map.Dict.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: (array<('k, 'a)>, ~cmp: cmp<'k, 'id>) => t<'k, 'a, 'id>" + }, + { + "id": "Belt.Map.Dict.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [], + "signature": "let keysToArray: t<'k, 'a, 'id> => array<'k>" + }, + { + "id": "Belt.Map.Dict.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [], + "signature": "let valuesToArray: t<'k, 'a, 'id> => array<'a>" + }, + { + "id": "Belt.Map.Dict.minKey", + "kind": "value", + "name": "minKey", + "docstrings": [], + "signature": "let minKey: t<'k, 'a, 'b> => option<'k>" + }, + { + "id": "Belt.Map.Dict.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "docstrings": [], + "signature": "let minKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>" + }, + { + "id": "Belt.Map.Dict.maxKey", + "kind": "value", + "name": "maxKey", + "docstrings": [], + "signature": "let maxKey: t<'k, 'a, 'b> => option<'k>" + }, + { + "id": "Belt.Map.Dict.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "docstrings": [], + "signature": "let maxKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>" + }, + { + "id": "Belt.Map.Dict.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t<'k, 'a, 'b> => option<('k, 'a)>" + }, + { + "id": "Belt.Map.Dict.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t<'k, 'a, 'b> => Js.undefined<('k, 'a)>" + }, + { + "id": "Belt.Map.Dict.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t<'k, 'a, 'b> => option<('k, 'a)>" + }, + { + "id": "Belt.Map.Dict.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t<'k, 'a, 'b> => Js.undefined<('k, 'a)>" + }, + { + "id": "Belt.Map.Dict.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => option<'a>" + }, + { + "id": "Belt.Map.Dict.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => Js.undefined<'a>" + }, + { + "id": "Belt.Map.Dict.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (t<'k, 'a, 'id>, 'k, 'a, ~cmp: cmp<'k, 'id>) => 'a" + }, + { + "id": "Belt.Map.Dict.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => 'a" + }, + { + "id": "Belt.Map.Dict.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [], + "signature": "let checkInvariantInternal: t<'a, 'b, 'c> => unit" + }, + { + "id": "Belt.Map.Dict.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "`remove(m, x)` returns a map containing the same bindings as `m`, except\n for `x` which is unbound in the returned map." + ], + "signature": "let remove: (t<'a, 'b, 'id>, 'a, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>" + }, + { + "id": "Belt.Map.Dict.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t<'a, 'b, 'id>, array<'a>, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>" + }, + { + "id": "Belt.Map.Dict.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set(m, x, y)` returns a map containing the same bindings as `m`, plus a\n binding of `x` to `y`. If `x` was already bound in `m`, its previous\n binding disappears." + ], + "signature": "let set: (t<'a, 'b, 'id>, 'a, 'b, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>" + }, + { + "id": "Belt.Map.Dict.updateU", + "kind": "value", + "name": "updateU", + "docstrings": [], + "signature": "let updateU: (\\n t<'a, 'b, 'id>,\\n 'a,\\n (. option<'b>) => option<'b>,\\n ~cmp: cmp<'a, 'id>,\\n) => t<'a, 'b, 'id>" + }, + { + "id": "Belt.Map.Dict.update", + "kind": "value", + "name": "update", + "docstrings": [], + "signature": "let update: (t<'a, 'b, 'id>, 'a, option<'b> => option<'b>, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>" + }, + { + "id": "Belt.Map.Dict.mergeU", + "kind": "value", + "name": "mergeU", + "docstrings": [], + "signature": "let mergeU: (\\n t<'a, 'b, 'id>,\\n t<'a, 'c, 'id>,\\n (. 'a, option<'b>, option<'c>) => option<'d>,\\n ~cmp: cmp<'a, 'id>,\\n) => t<'a, 'd, 'id>" + }, + { + "id": "Belt.Map.Dict.merge", + "kind": "value", + "name": "merge", + "docstrings": [ + "`merge(m1, m2, f)` computes a map whose keys is a subset of keys of `m1`\n and of `m2`. The presence of each such binding, and the corresponding\n value, is determined with the function `f`." + ], + "signature": "let merge: (\\n t<'a, 'b, 'id>,\\n t<'a, 'c, 'id>,\\n ('a, option<'b>, option<'c>) => option<'d>,\\n ~cmp: cmp<'a, 'id>,\\n) => t<'a, 'd, 'id>" + }, + { + "id": "Belt.Map.Dict.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t<'a, 'b, 'id>, array<('a, 'b)>, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>" + }, + { + "id": "Belt.Map.Dict.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => t<'k, 'a, 'id>" + }, + { + "id": "Belt.Map.Dict.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "`keep(m, p)` returns the map with all the bindings in `m` that satisfy\n predicate `p`." + ], + "signature": "let keep: (t<'k, 'a, 'id>, ('k, 'a) => bool) => t<'k, 'a, 'id>" + }, + { + "id": "Belt.Map.Dict.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => (t<'k, 'a, 'id>, t<'k, 'a, 'id>)" + }, + { + "id": "Belt.Map.Dict.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition(m, p)` returns a pair of maps `(m1, m2)`, where `m1` contains\n all the bindings of `s` that satisfy the predicate `p`, and `m2` is the map\n with all the bindings of `s` that do not satisfy `p`." + ], + "signature": "let partition: (t<'k, 'a, 'id>, ('k, 'a) => bool) => (t<'k, 'a, 'id>, t<'k, 'a, 'id>)" + }, + { + "id": "Belt.Map.Dict.split", + "kind": "value", + "name": "split", + "docstrings": [ + "`split(x, m)` returns a triple `(l, data, r)`, where `l` is the map with\n all the bindings of `m` whose key is strictly less than `x`; `r` is the map\n with all the bindings of `m` whose key is strictly greater than `x`; `data`\n is `None` if `m` contains no binding for `x`, or `Some(v)` if `m` binds `v`\n to `x`." + ], + "signature": "let split: (\\n t<'a, 'b, 'id>,\\n 'a,\\n ~cmp: cmp<'a, 'id>,\\n) => ((t<'a, 'b, 'id>, t<'a, 'b, 'id>), option<'b>)" + }, + { + "id": "Belt.Map.Dict.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'k, 'a, 'id>, (. 'a) => 'b) => t<'k, 'b, 'id>" + }, + { + "id": "Belt.Map.Dict.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(m, f)` returns a map with same domain as `m`, where the associated\n value `a` of all bindings of `m` has been replaced by the result of the\n application of `f` to `a`. The bindings are passed to `f` in increasing\n order with respect to the ordering over the type of the keys." + ], + "signature": "let map: (t<'k, 'a, 'id>, 'a => 'b) => t<'k, 'b, 'id>" + }, + { + "id": "Belt.Map.Dict.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "docstrings": [], + "signature": "let mapWithKeyU: (t<'k, 'a, 'id>, (. 'k, 'a) => 'b) => t<'k, 'b, 'id>" + }, + { + "id": "Belt.Map.Dict.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "docstrings": [], + "signature": "let mapWithKey: (t<'k, 'a, 'id>, ('k, 'a) => 'b) => t<'k, 'b, 'id>" + } + ] + }, + "belt/map/string": { + "id": "Belt.Map.String", + "name": "String", + "docstrings": [], + "items": [ + { + "id": "Belt.Map.String.key", + "kind": "type", + "name": "key", + "docstrings": [], + "signature": "type key = string" + }, + { + "id": "Belt.Map.String.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type of maps from type `key` to type `'value`." + ], + "signature": "type t<'value>" + }, + { + "id": "Belt.Map.String.empty", + "kind": "value", + "name": "empty", + "docstrings": [], + "signature": "let empty: t<'v>" + }, + { + "id": "Belt.Map.String.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'v> => bool" + }, + { + "id": "Belt.Map.String.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'v>, key) => bool" + }, + { + "id": "Belt.Map.String.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [], + "signature": "let cmpU: (t<'v>, t<'v>, (. 'v, 'v) => int) => int" + }, + { + "id": "Belt.Map.String.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [], + "signature": "let cmp: (t<'v>, t<'v>, ('v, 'v) => int) => int" + }, + { + "id": "Belt.Map.String.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (t<'v>, t<'v>, (. 'v, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.String.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq m1 m2` tests whether the maps `m1` and `m2` are\n equal, that is, contain equal keys and associate them with\n equal data." + ], + "signature": "let eq: (t<'v>, t<'v>, ('v, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.String.findFirstByU", + "kind": "value", + "name": "findFirstByU", + "docstrings": [], + "signature": "let findFirstByU: (t<'v>, (. key, 'v) => bool) => option<(key, 'v)>" + }, + { + "id": "Belt.Map.String.findFirstBy", + "kind": "value", + "name": "findFirstBy", + "docstrings": [ + "`findFirstBy m p` uses funcion `f` to find the first key value pair\n to match predicate `p`.\n\n ```\n let s0 = fromArray ~id:(module IntCmp) [|4,\"4\";1,\"1\";2,\"2,\"3\"\"|];;\n findFirstBy s0 (fun k v -> k = 4 ) = option (4, \"4\");;\n ```" + ], + "signature": "let findFirstBy: (t<'v>, (key, 'v) => bool) => option<(key, 'v)>" + }, + { + "id": "Belt.Map.String.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'v>, (. key, 'v) => unit) => unit" + }, + { + "id": "Belt.Map.String.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach m f` applies `f` to all bindings in map `m`.\n `f` receives the key as first argument, and the associated value\n as second argument. The bindings are passed to `f` in increasing\n order with respect to the ordering over the type of the keys." + ], + "signature": "let forEach: (t<'v>, (key, 'v) => unit) => unit" + }, + { + "id": "Belt.Map.String.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'v>, 'v2, (. 'v2, key, 'v) => 'v2) => 'v2" + }, + { + "id": "Belt.Map.String.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce m a f` computes `(f kN dN ... (f k1 d1 a)...)`,\n where `k1 ... kN` are the keys of all bindings in `m`\n (in increasing order), and `d1 ... dN` are the associated data." + ], + "signature": "let reduce: (t<'v>, 'v2, ('v2, key, 'v) => 'v2) => 'v2" + }, + { + "id": "Belt.Map.String.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'v>, (. key, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.String.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every m p` checks if all the bindings of the map\n satisfy the predicate `p`. Order unspecified" + ], + "signature": "let every: (t<'v>, (key, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.String.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'v>, (. key, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.String.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some m p` checks if at least one binding of the map\n satisfy the predicate `p`. Order unspecified" + ], + "signature": "let some: (t<'v>, (key, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.String.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'v> => int" + }, + { + "id": "Belt.Map.String.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order." + ], + "signature": "let toList: t<'v> => list<(key, 'v)>" + }, + { + "id": "Belt.Map.String.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t<'v> => array<(key, 'v)>" + }, + { + "id": "Belt.Map.String.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array<(key, 'v)> => t<'v>" + }, + { + "id": "Belt.Map.String.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [], + "signature": "let keysToArray: t<'v> => array" + }, + { + "id": "Belt.Map.String.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [], + "signature": "let valuesToArray: t<'v> => array<'v>" + }, + { + "id": "Belt.Map.String.minKey", + "kind": "value", + "name": "minKey", + "docstrings": [], + "signature": "let minKey: t<'a> => option" + }, + { + "id": "Belt.Map.String.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "docstrings": [], + "signature": "let minKeyUndefined: t<'a> => Js.undefined" + }, + { + "id": "Belt.Map.String.maxKey", + "kind": "value", + "name": "maxKey", + "docstrings": [], + "signature": "let maxKey: t<'a> => option" + }, + { + "id": "Belt.Map.String.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "docstrings": [], + "signature": "let maxKeyUndefined: t<'a> => Js.undefined" + }, + { + "id": "Belt.Map.String.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t<'v> => option<(key, 'v)>" + }, + { + "id": "Belt.Map.String.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t<'v> => Js.undefined<(key, 'v)>" + }, + { + "id": "Belt.Map.String.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t<'v> => option<(key, 'v)>" + }, + { + "id": "Belt.Map.String.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t<'v> => Js.undefined<(key, 'v)>" + }, + { + "id": "Belt.Map.String.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'v>, key) => option<'v>" + }, + { + "id": "Belt.Map.String.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t<'v>, key) => Js.undefined<'v>" + }, + { + "id": "Belt.Map.String.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (t<'v>, key, 'v) => 'v" + }, + { + "id": "Belt.Map.String.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t<'v>, key) => 'v" + }, + { + "id": "Belt.Map.String.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t<'a> => unit" + }, + { + "id": "Belt.Map.String.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "`remove m x` returns a map containing the same bindings as\n `m`, except for `x` which is unbound in the returned map." + ], + "signature": "let remove: (t<'v>, key) => t<'v>" + }, + { + "id": "Belt.Map.String.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t<'v>, array) => t<'v>" + }, + { + "id": "Belt.Map.String.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set m x y` returns a map containing the same bindings as\n `m`, plus a binding of `x` to `y`. If `x` was already bound\n in `m`, its previous binding disappears." + ], + "signature": "let set: (t<'v>, key, 'v) => t<'v>" + }, + { + "id": "Belt.Map.String.updateU", + "kind": "value", + "name": "updateU", + "docstrings": [], + "signature": "let updateU: (t<'v>, key, (. option<'v>) => option<'v>) => t<'v>" + }, + { + "id": "Belt.Map.String.update", + "kind": "value", + "name": "update", + "docstrings": [], + "signature": "let update: (t<'v>, key, option<'v> => option<'v>) => t<'v>" + }, + { + "id": "Belt.Map.String.mergeU", + "kind": "value", + "name": "mergeU", + "docstrings": [], + "signature": "let mergeU: (t<'v>, t<'v2>, (. key, option<'v>, option<'v2>) => option<'c>) => t<'c>" + }, + { + "id": "Belt.Map.String.merge", + "kind": "value", + "name": "merge", + "docstrings": [ + "`merge m1 m2 f` computes a map whose keys is a subset of keys of `m1`\n and of `m2`. The presence of each such binding, and the corresponding\n value, is determined with the function `f`." + ], + "signature": "let merge: (t<'v>, t<'v2>, (key, option<'v>, option<'v2>) => option<'c>) => t<'c>" + }, + { + "id": "Belt.Map.String.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t<'v>, array<(key, 'v)>) => t<'v>" + }, + { + "id": "Belt.Map.String.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t<'v>, (. key, 'v) => bool) => t<'v>" + }, + { + "id": "Belt.Map.String.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "`keep m p` returns the map with all the bindings in `m`\n that satisfy predicate `p`." + ], + "signature": "let keep: (t<'v>, (key, 'v) => bool) => t<'v>" + }, + { + "id": "Belt.Map.String.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t<'v>, (. key, 'v) => bool) => (t<'v>, t<'v>)" + }, + { + "id": "Belt.Map.String.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition m p` returns a pair of maps `(m1, m2)`, where\n `m1` contains all the bindings of `s` that satisfy the\n predicate `p`, and `m2` is the map with all the bindings of\n `s` that do not satisfy `p`." + ], + "signature": "let partition: (t<'v>, (key, 'v) => bool) => (t<'v>, t<'v>)" + }, + { + "id": "Belt.Map.String.split", + "kind": "value", + "name": "split", + "docstrings": [ + "`split x m` returns a triple `(l, data, r)`, where\n `l` is the map with all the bindings of `m` whose key\n is strictly less than `x`;\n `r` is the map with all the bindings of `m` whose key\n is strictly greater than `x`;\n `data` is `None` if `m` contains no binding for `x`,\n or `Some v` if `m` binds `v` to `x`." + ], + "signature": "let split: (key, t<'v>) => (t<'v>, option<'v>, t<'v>)" + }, + { + "id": "Belt.Map.String.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'v>, (. 'v) => 'v2) => t<'v2>" + }, + { + "id": "Belt.Map.String.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map m f` returns a map with same domain as `m`, where the\n associated value `a` of all bindings of `m` has been\n replaced by the result of the application of `f` to `a`.\n The bindings are passed to `f` in increasing order\n with respect to the ordering over the type of the keys." + ], + "signature": "let map: (t<'v>, 'v => 'v2) => t<'v2>" + }, + { + "id": "Belt.Map.String.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "docstrings": [], + "signature": "let mapWithKeyU: (t<'v>, (. key, 'v) => 'v2) => t<'v2>" + }, + { + "id": "Belt.Map.String.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "docstrings": [], + "signature": "let mapWithKey: (t<'v>, (key, 'v) => 'v2) => t<'v2>" + } + ] + }, + "belt/map/int": { + "id": "Belt.Map.Int", + "name": "Int", + "docstrings": [ + "```rescript\ntype t<'key, 'value, 'identity>\ntype id<'key, 'id> = Belt_Id.comparable<'key, 'id>\n```" + ], + "items": [ + { + "id": "Belt.Map.Int.key", + "kind": "type", + "name": "key", + "docstrings": [], + "signature": "type key = int" + }, + { + "id": "Belt.Map.Int.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type of maps from type `key` to type `'value`." + ], + "signature": "type t<'value>" + }, + { + "id": "Belt.Map.Int.empty", + "kind": "value", + "name": "empty", + "docstrings": [], + "signature": "let empty: t<'v>" + }, + { + "id": "Belt.Map.Int.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'v> => bool" + }, + { + "id": "Belt.Map.Int.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'v>, key) => bool" + }, + { + "id": "Belt.Map.Int.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [], + "signature": "let cmpU: (t<'v>, t<'v>, (. 'v, 'v) => int) => int" + }, + { + "id": "Belt.Map.Int.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [], + "signature": "let cmp: (t<'v>, t<'v>, ('v, 'v) => int) => int" + }, + { + "id": "Belt.Map.Int.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (t<'v>, t<'v>, (. 'v, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.Int.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq m1 m2` tests whether the maps `m1` and `m2` are\n equal, that is, contain equal keys and associate them with\n equal data." + ], + "signature": "let eq: (t<'v>, t<'v>, ('v, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.Int.findFirstByU", + "kind": "value", + "name": "findFirstByU", + "docstrings": [], + "signature": "let findFirstByU: (t<'v>, (. key, 'v) => bool) => option<(key, 'v)>" + }, + { + "id": "Belt.Map.Int.findFirstBy", + "kind": "value", + "name": "findFirstBy", + "docstrings": [ + "`findFirstBy m p` uses funcion `f` to find the first key value pair\n to match predicate `p`.\n\n ```\n let s0 = fromArray ~id:(module IntCmp) [|4,\"4\";1,\"1\";2,\"2,\"3\"\"|];;\n findFirstBy s0 (fun k v -> k = 4 ) = option (4, \"4\");;\n ```" + ], + "signature": "let findFirstBy: (t<'v>, (key, 'v) => bool) => option<(key, 'v)>" + }, + { + "id": "Belt.Map.Int.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'v>, (. key, 'v) => unit) => unit" + }, + { + "id": "Belt.Map.Int.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach m f` applies `f` to all bindings in map `m`.\n `f` receives the key as first argument, and the associated value\n as second argument. The bindings are passed to `f` in increasing\n order with respect to the ordering over the type of the keys." + ], + "signature": "let forEach: (t<'v>, (key, 'v) => unit) => unit" + }, + { + "id": "Belt.Map.Int.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'v>, 'v2, (. 'v2, key, 'v) => 'v2) => 'v2" + }, + { + "id": "Belt.Map.Int.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce m a f` computes `(f kN dN ... (f k1 d1 a)...)`,\n where `k1 ... kN` are the keys of all bindings in `m`\n (in increasing order), and `d1 ... dN` are the associated data." + ], + "signature": "let reduce: (t<'v>, 'v2, ('v2, key, 'v) => 'v2) => 'v2" + }, + { + "id": "Belt.Map.Int.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'v>, (. key, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.Int.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every m p` checks if all the bindings of the map\n satisfy the predicate `p`. Order unspecified" + ], + "signature": "let every: (t<'v>, (key, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.Int.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'v>, (. key, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.Int.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some m p` checks if at least one binding of the map\n satisfy the predicate `p`. Order unspecified" + ], + "signature": "let some: (t<'v>, (key, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.Int.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'v> => int" + }, + { + "id": "Belt.Map.Int.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order." + ], + "signature": "let toList: t<'v> => list<(key, 'v)>" + }, + { + "id": "Belt.Map.Int.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t<'v> => array<(key, 'v)>" + }, + { + "id": "Belt.Map.Int.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array<(key, 'v)> => t<'v>" + }, + { + "id": "Belt.Map.Int.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [], + "signature": "let keysToArray: t<'v> => array" + }, + { + "id": "Belt.Map.Int.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [], + "signature": "let valuesToArray: t<'v> => array<'v>" + }, + { + "id": "Belt.Map.Int.minKey", + "kind": "value", + "name": "minKey", + "docstrings": [], + "signature": "let minKey: t<'a> => option" + }, + { + "id": "Belt.Map.Int.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "docstrings": [], + "signature": "let minKeyUndefined: t<'a> => Js.undefined" + }, + { + "id": "Belt.Map.Int.maxKey", + "kind": "value", + "name": "maxKey", + "docstrings": [], + "signature": "let maxKey: t<'a> => option" + }, + { + "id": "Belt.Map.Int.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "docstrings": [], + "signature": "let maxKeyUndefined: t<'a> => Js.undefined" + }, + { + "id": "Belt.Map.Int.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t<'v> => option<(key, 'v)>" + }, + { + "id": "Belt.Map.Int.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t<'v> => Js.undefined<(key, 'v)>" + }, + { + "id": "Belt.Map.Int.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t<'v> => option<(key, 'v)>" + }, + { + "id": "Belt.Map.Int.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t<'v> => Js.undefined<(key, 'v)>" + }, + { + "id": "Belt.Map.Int.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'v>, key) => option<'v>" + }, + { + "id": "Belt.Map.Int.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t<'v>, key) => Js.undefined<'v>" + }, + { + "id": "Belt.Map.Int.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (t<'v>, key, 'v) => 'v" + }, + { + "id": "Belt.Map.Int.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t<'v>, key) => 'v" + }, + { + "id": "Belt.Map.Int.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t<'a> => unit" + }, + { + "id": "Belt.Map.Int.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "`remove m x` returns a map containing the same bindings as\n `m`, except for `x` which is unbound in the returned map." + ], + "signature": "let remove: (t<'v>, key) => t<'v>" + }, + { + "id": "Belt.Map.Int.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t<'v>, array) => t<'v>" + }, + { + "id": "Belt.Map.Int.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set m x y` returns a map containing the same bindings as\n `m`, plus a binding of `x` to `y`. If `x` was already bound\n in `m`, its previous binding disappears." + ], + "signature": "let set: (t<'v>, key, 'v) => t<'v>" + }, + { + "id": "Belt.Map.Int.updateU", + "kind": "value", + "name": "updateU", + "docstrings": [], + "signature": "let updateU: (t<'v>, key, (. option<'v>) => option<'v>) => t<'v>" + }, + { + "id": "Belt.Map.Int.update", + "kind": "value", + "name": "update", + "docstrings": [], + "signature": "let update: (t<'v>, key, option<'v> => option<'v>) => t<'v>" + }, + { + "id": "Belt.Map.Int.mergeU", + "kind": "value", + "name": "mergeU", + "docstrings": [], + "signature": "let mergeU: (t<'v>, t<'v2>, (. key, option<'v>, option<'v2>) => option<'c>) => t<'c>" + }, + { + "id": "Belt.Map.Int.merge", + "kind": "value", + "name": "merge", + "docstrings": [ + "`merge m1 m2 f` computes a map whose keys is a subset of keys of `m1`\n and of `m2`. The presence of each such binding, and the corresponding\n value, is determined with the function `f`." + ], + "signature": "let merge: (t<'v>, t<'v2>, (key, option<'v>, option<'v2>) => option<'c>) => t<'c>" + }, + { + "id": "Belt.Map.Int.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t<'v>, array<(key, 'v)>) => t<'v>" + }, + { + "id": "Belt.Map.Int.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t<'v>, (. key, 'v) => bool) => t<'v>" + }, + { + "id": "Belt.Map.Int.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "`keep m p` returns the map with all the bindings in `m`\n that satisfy predicate `p`." + ], + "signature": "let keep: (t<'v>, (key, 'v) => bool) => t<'v>" + }, + { + "id": "Belt.Map.Int.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t<'v>, (. key, 'v) => bool) => (t<'v>, t<'v>)" + }, + { + "id": "Belt.Map.Int.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition m p` returns a pair of maps `(m1, m2)`, where\n `m1` contains all the bindings of `s` that satisfy the\n predicate `p`, and `m2` is the map with all the bindings of\n `s` that do not satisfy `p`." + ], + "signature": "let partition: (t<'v>, (key, 'v) => bool) => (t<'v>, t<'v>)" + }, + { + "id": "Belt.Map.Int.split", + "kind": "value", + "name": "split", + "docstrings": [ + "`split x m` returns a triple `(l, data, r)`, where\n `l` is the map with all the bindings of `m` whose key\n is strictly less than `x`;\n `r` is the map with all the bindings of `m` whose key\n is strictly greater than `x`;\n `data` is `None` if `m` contains no binding for `x`,\n or `Some v` if `m` binds `v` to `x`." + ], + "signature": "let split: (key, t<'v>) => (t<'v>, option<'v>, t<'v>)" + }, + { + "id": "Belt.Map.Int.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'v>, (. 'v) => 'v2) => t<'v2>" + }, + { + "id": "Belt.Map.Int.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map m f` returns a map with same domain as `m`, where the\n associated value `a` of all bindings of `m` has been\n replaced by the result of the application of `f` to `a`.\n The bindings are passed to `f` in increasing order\n with respect to the ordering over the type of the keys." + ], + "signature": "let map: (t<'v>, 'v => 'v2) => t<'v2>" + }, + { + "id": "Belt.Map.Int.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "docstrings": [], + "signature": "let mapWithKeyU: (t<'v>, (. key, 'v) => 'v2) => t<'v2>" + }, + { + "id": "Belt.Map.Int.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "docstrings": [], + "signature": "let mapWithKey: (t<'v>, (key, 'v) => 'v2) => t<'v2>" + } + ] + }, + "belt/set/dict": { + "id": "Belt.Set.Dict", + "name": "Dict", + "docstrings": [ + "This module separates identity from data, it is a bit more verbose but slightly\n more efficient due to the fact that there is no need to pack identity and data back\n after each operation" + ], + "items": [ + { + "id": "Belt.Set.Dict.t", + "kind": "type", + "name": "t", + "docstrings": [ + "`'value` is the element type\n\n `'identity` the identity of the collection" + ], + "signature": "type t<'value, 'identity>" + }, + { + "id": "Belt.Set.Dict.cmp", + "kind": "type", + "name": "cmp", + "docstrings": [ + "Type of compare function." + ], + "signature": "type cmp<'value, 'id> = Belt_Id.cmp<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.empty", + "kind": "value", + "name": "empty", + "docstrings": [ + "```rescript\n let s0 = Belt.Set.Dict.empty\n ```" + ], + "signature": "let empty: t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "Creates new set from array of elements.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([1, 3, 2, 4], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.toArray /* [1, 2, 3, 4] */\n ```" + ], + "signature": "let fromArray: (array<'value>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "docstrings": [ + "The same as [fromArray][#fromarray] except it is after assuming the input array is already sorted." + ], + "signature": "let fromSortedArrayUnsafe: array<'value> => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [ + "Checks if set is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let empty = Belt.Set.Dict.fromArray([], ~cmp=IntCmp.cmp)\n let notEmpty = Belt.Set.Dict.fromArray([1], ~cmp=IntCmp.cmp)\n\n Belt.Set.Dict.isEmpty(empty) /* true */\n Belt.Set.Dict.isEmpty(notEmpty) /* false */\n ```" + ], + "signature": "let isEmpty: t<'a, 'b> => bool" + }, + { + "id": "Belt.Set.Dict.has", + "kind": "value", + "name": "has", + "docstrings": [ + "Checks if an element exists in the set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.Set.Dict.fromArray([1, 4, 2, 5], ~cmp=IntCmp.cmp)\n\n set->Belt.Set.Dict.has(3, ~cmp=IntCmp.cmp) /* false */\n set->Belt.Set.Dict.has(1, ~cmp=IntCmp.cmp) /* true */\n ```" + ], + "signature": "let has: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => bool" + }, + { + "id": "Belt.Set.Dict.add", + "kind": "value", + "name": "add", + "docstrings": [ + "Adds element to set. If element existed in set, value is unchanged.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = s0->Belt.Set.Dict.add(1, ~cmp=IntCmp.cmp)\n let s2 = s1->Belt.Set.Dict.add(2, ~cmp=IntCmp.cmp)\n let s3 = s2->Belt.Set.Dict.add(2, ~cmp=IntCmp.cmp)\n s0->Belt.Set.Dict.toArray /* [] */\n s1->Belt.Set.Dict.toArray /* [1] */\n s2->Belt.Set.Dict.toArray /* [1, 2] */\n s3->Belt.Set.Dict.toArray /* [1,2 ] */\n s2 == s3 /* true */\n ```" + ], + "signature": "let add: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [ + "Adds each element of array to set. Unlike [add](#add), the reference of return value might be changed even if all values in array already exist in set\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.Set.Dict.empty\n\n let newSet = set->Belt.Set.Dict.mergeMany([5, 4, 3, 2, 1], ~cmp=IntCmp.cmp)\n newSet->Belt.Set.Dict.toArray /* [1, 2, 3, 4, 5] */\n ```" + ], + "signature": "let mergeMany: (t<'value, 'id>, array<'value>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "Removes element from set. If element did not exist in set, value is unchanged.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([2, 3, 1, 4, 5], ~cmp=IntCmp.cmp)\n let s1 = s0->Belt.Set.Dict.remove(1, ~cmp=IntCmp.cmp)\n let s2 = s1->Belt.Set.Dict.remove(3, ~cmp=IntCmp.cmp)\n let s3 = s2->Belt.Set.Dict.remove(3, ~cmp=IntCmp.cmp)\n\n s1->Belt.Set.Dict.toArray /* [2,3,4,5] */\n s2->Belt.Set.Dict.toArray /* [2,4,5] */\n s2 == s3 /* true */\n ```" + ], + "signature": "let remove: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [ + "Removes each element of array from set. Unlike [remove](#remove), the reference of return value might be changed even if any values in array not existed in set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.Set.Dict.fromArray([1, 2, 3, 4], ~cmp=IntCmp.cmp)\n\n let newSet = set->Belt.Set.Dict.removeMany([5, 4, 3, 2, 1], ~cmp=IntCmp.cmp)\n newSet->Belt.Set.Dict.toArray /* [] */\n ```" + ], + "signature": "let removeMany: (t<'value, 'id>, array<'value>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.union", + "kind": "value", + "name": "union", + "docstrings": [ + "Returns union of two sets.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\n let union = Belt.Set.Dict.union(s0, s1, ~cmp=IntCmp.cmp)\n union->Belt.Set.Dict.toArray /* [1,2,3,4,5,6] */\n ```" + ], + "signature": "let union: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [ + "Returns intersection of two sets.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\n let intersect = Belt.Set.Dict.intersect(s0, s1, ~cmp=IntCmp.cmp)\n intersect->Belt.Set.Dict.toArray /* [2,3,5] */\n ```" + ], + "signature": "let intersect: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.diff", + "kind": "value", + "name": "diff", + "docstrings": [ + "Returns elements from first set, not existing in second set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\n\n let diff1 = Belt.Set.Dict.diff(s0, s1, ~cmp=IntCmp.cmp)\n let diff2 = Belt.Set.Dict.diff(s1, s0, ~cmp=IntCmp.cmp)\n\n diff1->Belt.Set.Dict.toArray /* [6] */\n diff2->Belt.Set.Dict.toArray /* [1,4] */\n ```" + ], + "signature": "let diff: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.subset", + "kind": "value", + "name": "subset", + "docstrings": [ + "Checks if second set is subset of first set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\n let s2 = Belt.Set.Dict.intersect(s0, s1, ~cmp=IntCmp.cmp)\n Belt.Set.Dict.subset(s2, s0, ~cmp=IntCmp.cmp) /* true */\n Belt.Set.Dict.subset(s2, s1, ~cmp=IntCmp.cmp) /* true */\n Belt.Set.Dict.subset(s1, s0, ~cmp=IntCmp.cmp) /* false */\n ```" + ], + "signature": "let subset: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => bool" + }, + { + "id": "Belt.Set.Dict.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function for doing sets of sets. It compares size first and then iterates over each element following the order of elements." + ], + "signature": "let cmp: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => int" + }, + { + "id": "Belt.Set.Dict.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "Checks if two sets are equal.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([3, 2, 5], ~cmp=IntCmp.cmp)\n\n Belt.Set.Dict.eq(s0, s1, ~cmp=IntCmp.cmp) /* true */\n ```" + ], + "signature": "let eq: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => bool" + }, + { + "id": "Belt.Set.Dict.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [ + "Same as [forEach](##forEach) but takes uncurried functon." + ], + "signature": "let forEachU: (t<'value, 'id>, (. 'value) => unit) => unit" + }, + { + "id": "Belt.Set.Dict.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "Applies function `f` in turn to all elements of set in increasing order.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let acc = ref(list{})\n s0->Belt.Set.Dict.forEach(x => acc := Belt.List.add(acc.contents, x))\n acc /* [6,5,3,2] */\n ```" + ], + "signature": "let forEach: (t<'value, 'id>, 'value => unit) => unit" + }, + { + "id": "Belt.Set.Dict.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'value, 'id>, 'a, (. 'a, 'value) => 'a) => 'a" + }, + { + "id": "Belt.Set.Dict.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "Applies function `f` to each element of set in increasing order. Function `f` has two parameters: the item from the set and an “accumulator”, which starts with a value of `initialValue`. `reduce` returns the final value of the accumulator.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n s0->Belt.Set.Dict.reduce(list{}, (acc, element) => acc->Belt.List.add(element)) /* [6,5,3,2] */\n ```" + ], + "signature": "let reduce: (t<'value, 'id>, 'a, ('a, 'value) => 'a) => 'a" + }, + { + "id": "Belt.Set.Dict.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'value, 'id>, (. 'value) => bool) => bool" + }, + { + "id": "Belt.Set.Dict.every", + "kind": "value", + "name": "every", + "docstrings": [ + "Checks if all elements of the set satisfy the predicate. Order unspecified.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.Set.Dict.fromArray([2, 4, 6, 8], ~cmp=IntCmp.cmp)\n s0->Belt.Set.Dict.every(isEven) /* true */\n ```" + ], + "signature": "let every: (t<'value, 'id>, 'value => bool) => bool" + }, + { + "id": "Belt.Set.Dict.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'value, 'id>, (. 'value) => bool) => bool" + }, + { + "id": "Belt.Set.Dict.some", + "kind": "value", + "name": "some", + "docstrings": [ + "Checks if at least one element of the set satisfies the predicate.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 4, 6, 8], ~cmp=IntCmp.cmp)\n s0->Belt.Set.Dict.some(isOdd) /* true */\n ```" + ], + "signature": "let some: (t<'value, 'id>, 'value => bool) => bool" + }, + { + "id": "Belt.Set.Dict.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t<'value, 'id>, (. 'value) => bool) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "Returns the set of all elements that satisfy the predicate.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n let s1 = s0->Belt.Set.Dict.keep(isEven)\n\n s1->Belt.Set.Dict.toArray /* [2,4] */\n ```" + ], + "signature": "let keep: (t<'value, 'id>, 'value => bool) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t<'value, 'id>, (. 'value) => bool) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.Set.Dict.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "Returns a pair of sets, where first is the set of all the elements of set that satisfy the predicate, and second is the set of all the elements of set that do not satisfy the predicate.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n let (s1, s2) = s0->Belt.Set.Dict.partition(isOdd)\n\n s1->Belt.Set.Dict.toArray /* [1,3,5] */\n s2->Belt.Set.Dict.toArray /* [2,4] */\n ```" + ], + "signature": "let partition: (t<'value, 'id>, 'value => bool) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.Set.Dict.size", + "kind": "value", + "name": "size", + "docstrings": [ + "Returns size of the set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.size /* 4 */\n ```" + ], + "signature": "let size: t<'value, 'id> => int" + }, + { + "id": "Belt.Set.Dict.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "Returns list of ordered set elements.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.toList /* [1,2,3,5] */\n ```" + ], + "signature": "let toList: t<'value, 'id> => list<'value>" + }, + { + "id": "Belt.Set.Dict.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "Returns array of ordered set elements.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.toArray /* [1,2,3,5] */\n ```" + ], + "signature": "let toArray: t<'value, 'id> => array<'value>" + }, + { + "id": "Belt.Set.Dict.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [ + "Returns minimum value of the collection. `None` if collection is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.minimum /* None */\n s1->Belt.Set.Dict.minimum /* Some(1) */\n ```" + ], + "signature": "let minimum: t<'value, 'id> => option<'value>" + }, + { + "id": "Belt.Set.Dict.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [ + "Returns minimum value of the collection. `undefined` if collection is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.minUndefined /* undefined */\n s1->Belt.Set.Dict.minUndefined /* 1 */\n ```" + ], + "signature": "let minUndefined: t<'value, 'id> => Js.undefined<'value>" + }, + { + "id": "Belt.Set.Dict.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [ + "Returns maximum value of the collection. `None` if collection is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.maximum /* None */\n s1->Belt.Set.Dict.maximum /* Some(5) */\n ```" + ], + "signature": "let maximum: t<'value, 'id> => option<'value>" + }, + { + "id": "Belt.Set.Dict.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [ + "Returns maximum value of the collection. `undefined` if collection is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.maxUndefined /* undefined */\n s1->Belt.Set.Dict.maxUndefined /* 5 */\n ```" + ], + "signature": "let maxUndefined: t<'value, 'id> => Js.undefined<'value>" + }, + { + "id": "Belt.Set.Dict.get", + "kind": "value", + "name": "get", + "docstrings": [ + "Returns the reference of the value which is equivalent to value using the comparator specifiecd by this collection. Returns `None` if element does not exist.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.get(3, ~cmp=IntCmp.cmp) /* Some(3) */\n s0->Belt.Set.Dict.get(20, ~cmp=IntCmp.cmp) /* None */\n ```" + ], + "signature": "let get: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => option<'value>" + }, + { + "id": "Belt.Set.Dict.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [ + "Same as [get](#get) but returns `undefined` when element does not exist." + ], + "signature": "let getUndefined: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => Js.undefined<'value>" + }, + { + "id": "Belt.Set.Dict.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "Same as [get](#get) but raise when element does not exist." + ], + "signature": "let getExn: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => 'value" + }, + { + "id": "Belt.Set.Dict.split", + "kind": "value", + "name": "split", + "docstrings": [ + "Returns a tuple `((smaller, larger), present)`, `present` is true when element exist in set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n\n let ((smaller, larger), present) = s0->Belt.Set.Dict.split(3, ~cmp=IntCmp.cmp)\n\n present /* true */\n smaller->Belt.Set.Dict.toArray /* [1,2] */\n larger->Belt.Set.Dict.toArray /* [4,5] */\n ```" + ], + "signature": "let split: (\\n t<'value, 'id>,\\n 'value,\\n ~cmp: cmp<'value, 'id>,\\n) => ((t<'value, 'id>, t<'value, 'id>), bool)" + }, + { + "id": "Belt.Set.Dict.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t<'a, 'b> => unit" + } + ] + }, + "belt/set/string": { + "id": "Belt.Set.String", + "name": "String", + "docstrings": [ + "Specialized when value type is `string`, more efficient\n than the generic type, its compare behavior is fixed using the built-in comparison" + ], + "items": [ + { + "id": "Belt.Set.String.value", + "kind": "type", + "name": "value", + "docstrings": [ + "The type of the set elements." + ], + "signature": "type value = string" + }, + { + "id": "Belt.Set.String.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type of sets." + ], + "signature": "type t" + }, + { + "id": "Belt.Set.String.empty", + "kind": "value", + "name": "empty", + "docstrings": [], + "signature": "let empty: t" + }, + { + "id": "Belt.Set.String.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array => t" + }, + { + "id": "Belt.Set.String.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "docstrings": [], + "signature": "let fromSortedArrayUnsafe: array => t" + }, + { + "id": "Belt.Set.String.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t => bool" + }, + { + "id": "Belt.Set.String.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t, value) => bool" + }, + { + "id": "Belt.Set.String.add", + "kind": "value", + "name": "add", + "docstrings": [ + "`add s x` If `x` was already in `s`, `s` is returned unchanged." + ], + "signature": "let add: (t, value) => t" + }, + { + "id": "Belt.Set.String.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t, array) => t" + }, + { + "id": "Belt.Set.String.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "`remove m x` If `x` was not in `m`, `m` is returned reference unchanged." + ], + "signature": "let remove: (t, value) => t" + }, + { + "id": "Belt.Set.String.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t, array) => t" + }, + { + "id": "Belt.Set.String.union", + "kind": "value", + "name": "union", + "docstrings": [], + "signature": "let union: (t, t) => t" + }, + { + "id": "Belt.Set.String.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [], + "signature": "let intersect: (t, t) => t" + }, + { + "id": "Belt.Set.String.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (t, t) => t" + }, + { + "id": "Belt.Set.String.subset", + "kind": "value", + "name": "subset", + "docstrings": [ + "`subset s1 s2` tests whether the set `s1` is a subset of\n the set `s2`." + ], + "signature": "let subset: (t, t) => bool" + }, + { + "id": "Belt.Set.String.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function\n for doing sets of sets." + ], + "signature": "let cmp: (t, t) => int" + }, + { + "id": "Belt.Set.String.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq s1 s2` tests whether the sets `s1` and `s2` are\n equal, that is, contain equal elements." + ], + "signature": "let eq: (t, t) => bool" + }, + { + "id": "Belt.Set.String.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t, (. value) => unit) => unit" + }, + { + "id": "Belt.Set.String.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach s f` applies `f` in turn to all elements of `s`.\n In increasing order" + ], + "signature": "let forEach: (t, value => unit) => unit" + }, + { + "id": "Belt.Set.String.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t, 'a, (. 'a, value) => 'a) => 'a" + }, + { + "id": "Belt.Set.String.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "Iterate in increasing order." + ], + "signature": "let reduce: (t, 'a, ('a, value) => 'a) => 'a" + }, + { + "id": "Belt.Set.String.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t, (. value) => bool) => bool" + }, + { + "id": "Belt.Set.String.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every p s` checks if all elements of the set\n satisfy the predicate `p`. Order unspecified." + ], + "signature": "let every: (t, value => bool) => bool" + }, + { + "id": "Belt.Set.String.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t, (. value) => bool) => bool" + }, + { + "id": "Belt.Set.String.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some p s` checks if at least one element of\n the set satisfies the predicate `p`. Oder unspecified." + ], + "signature": "let some: (t, value => bool) => bool" + }, + { + "id": "Belt.Set.String.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t, (. value) => bool) => t" + }, + { + "id": "Belt.Set.String.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "`keep p s` returns the set of all elements in `s`\n that satisfy predicate `p`." + ], + "signature": "let keep: (t, value => bool) => t" + }, + { + "id": "Belt.Set.String.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t, (. value) => bool) => (t, t)" + }, + { + "id": "Belt.Set.String.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition p s` returns a pair of sets `(s1, s2)`, where\n `s1` is the set of all the elements of `s` that satisfy the\n predicate `p`, and `s2` is the set of all the elements of\n `s` that do not satisfy `p`." + ], + "signature": "let partition: (t, value => bool) => (t, t)" + }, + { + "id": "Belt.Set.String.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t => int" + }, + { + "id": "Belt.Set.String.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order" + ], + "signature": "let toList: t => list" + }, + { + "id": "Belt.Set.String.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t => array" + }, + { + "id": "Belt.Set.String.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t => option" + }, + { + "id": "Belt.Set.String.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t => Js.undefined" + }, + { + "id": "Belt.Set.String.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t => option" + }, + { + "id": "Belt.Set.String.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t => Js.undefined" + }, + { + "id": "Belt.Set.String.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t, value) => option" + }, + { + "id": "Belt.Set.String.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t, value) => Js.undefined" + }, + { + "id": "Belt.Set.String.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t, value) => value" + }, + { + "id": "Belt.Set.String.split", + "kind": "value", + "name": "split", + "docstrings": [ + "`split x s` returns a triple `(l, present, r)`, where\n `l` is the set of elements of `s` that are\n strictly less than `x`;\n `r` is the set of elements of `s` that are\n strictly greater than `x`;\n `present` is `false` if `s` contains no element equal to `x`,\n or `true` if `s` contains an element equal to `x`." + ], + "signature": "let split: (t, value) => ((t, t), bool)" + }, + { + "id": "Belt.Set.String.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t => unit" + } + ] + }, + "belt/set/int": { + "id": "Belt.Set.Int", + "name": "Int", + "docstrings": [ + "Specialized when value type is `int`, more efficient\n than the generic type, its compare behavior is fixed using the built-in comparison" + ], + "items": [ + { + "id": "Belt.Set.Int.value", + "kind": "type", + "name": "value", + "docstrings": [ + "The type of the set elements." + ], + "signature": "type value = int" + }, + { + "id": "Belt.Set.Int.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type of sets." + ], + "signature": "type t" + }, + { + "id": "Belt.Set.Int.empty", + "kind": "value", + "name": "empty", + "docstrings": [], + "signature": "let empty: t" + }, + { + "id": "Belt.Set.Int.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: array => t" + }, + { + "id": "Belt.Set.Int.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "docstrings": [], + "signature": "let fromSortedArrayUnsafe: array => t" + }, + { + "id": "Belt.Set.Int.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t => bool" + }, + { + "id": "Belt.Set.Int.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t, value) => bool" + }, + { + "id": "Belt.Set.Int.add", + "kind": "value", + "name": "add", + "docstrings": [ + "`add s x` If `x` was already in `s`, `s` is returned unchanged." + ], + "signature": "let add: (t, value) => t" + }, + { + "id": "Belt.Set.Int.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t, array) => t" + }, + { + "id": "Belt.Set.Int.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "`remove m x` If `x` was not in `m`, `m` is returned reference unchanged." + ], + "signature": "let remove: (t, value) => t" + }, + { + "id": "Belt.Set.Int.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t, array) => t" + }, + { + "id": "Belt.Set.Int.union", + "kind": "value", + "name": "union", + "docstrings": [], + "signature": "let union: (t, t) => t" + }, + { + "id": "Belt.Set.Int.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [], + "signature": "let intersect: (t, t) => t" + }, + { + "id": "Belt.Set.Int.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (t, t) => t" + }, + { + "id": "Belt.Set.Int.subset", + "kind": "value", + "name": "subset", + "docstrings": [ + "`subset s1 s2` tests whether the set `s1` is a subset of\n the set `s2`." + ], + "signature": "let subset: (t, t) => bool" + }, + { + "id": "Belt.Set.Int.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function\n for doing sets of sets." + ], + "signature": "let cmp: (t, t) => int" + }, + { + "id": "Belt.Set.Int.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq s1 s2` tests whether the sets `s1` and `s2` are\n equal, that is, contain equal elements." + ], + "signature": "let eq: (t, t) => bool" + }, + { + "id": "Belt.Set.Int.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t, (. value) => unit) => unit" + }, + { + "id": "Belt.Set.Int.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach s f` applies `f` in turn to all elements of `s`.\n In increasing order" + ], + "signature": "let forEach: (t, value => unit) => unit" + }, + { + "id": "Belt.Set.Int.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t, 'a, (. 'a, value) => 'a) => 'a" + }, + { + "id": "Belt.Set.Int.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "Iterate in increasing order." + ], + "signature": "let reduce: (t, 'a, ('a, value) => 'a) => 'a" + }, + { + "id": "Belt.Set.Int.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t, (. value) => bool) => bool" + }, + { + "id": "Belt.Set.Int.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every p s` checks if all elements of the set\n satisfy the predicate `p`. Order unspecified." + ], + "signature": "let every: (t, value => bool) => bool" + }, + { + "id": "Belt.Set.Int.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t, (. value) => bool) => bool" + }, + { + "id": "Belt.Set.Int.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some p s` checks if at least one element of\n the set satisfies the predicate `p`. Oder unspecified." + ], + "signature": "let some: (t, value => bool) => bool" + }, + { + "id": "Belt.Set.Int.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t, (. value) => bool) => t" + }, + { + "id": "Belt.Set.Int.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "`keep p s` returns the set of all elements in `s`\n that satisfy predicate `p`." + ], + "signature": "let keep: (t, value => bool) => t" + }, + { + "id": "Belt.Set.Int.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t, (. value) => bool) => (t, t)" + }, + { + "id": "Belt.Set.Int.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition p s` returns a pair of sets `(s1, s2)`, where\n `s1` is the set of all the elements of `s` that satisfy the\n predicate `p`, and `s2` is the set of all the elements of\n `s` that do not satisfy `p`." + ], + "signature": "let partition: (t, value => bool) => (t, t)" + }, + { + "id": "Belt.Set.Int.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t => int" + }, + { + "id": "Belt.Set.Int.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order" + ], + "signature": "let toList: t => list" + }, + { + "id": "Belt.Set.Int.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t => array" + }, + { + "id": "Belt.Set.Int.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t => option" + }, + { + "id": "Belt.Set.Int.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t => Js.undefined" + }, + { + "id": "Belt.Set.Int.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t => option" + }, + { + "id": "Belt.Set.Int.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t => Js.undefined" + }, + { + "id": "Belt.Set.Int.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t, value) => option" + }, + { + "id": "Belt.Set.Int.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t, value) => Js.undefined" + }, + { + "id": "Belt.Set.Int.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t, value) => value" + }, + { + "id": "Belt.Set.Int.split", + "kind": "value", + "name": "split", + "docstrings": [ + "`split x s` returns a triple `(l, present, r)`, where\n `l` is the set of elements of `s` that are\n strictly less than `x`;\n `r` is the set of elements of `s` that are\n strictly greater than `x`;\n `present` is `false` if `s` contains no element equal to `x`,\n or `true` if `s` contains an element equal to `x`." + ], + "signature": "let split: (t, value) => ((t, t), bool)" + }, + { + "id": "Belt.Set.Int.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t => unit" + } + ] + }, + "belt/sortarray/string": { + "id": "Belt.SortArray.String", + "name": "String", + "docstrings": [ + "Specalized when key type is `string`, more efficient\n than the generic type" + ], + "items": [ + { + "id": "Belt.SortArray.String.element", + "kind": "type", + "name": "element", + "docstrings": [], + "signature": "type element = string" + }, + { + "id": "Belt.SortArray.String.strictlySortedLength", + "kind": "value", + "name": "strictlySortedLength", + "docstrings": [ + "The same as [`Belt_SortArray.strictlySortedLength`]() except the comparator is fixed\n\n **return** `+n` means increasing order `-n` means negative order" + ], + "signature": "let strictlySortedLength: array => int" + }, + { + "id": "Belt.SortArray.String.isSorted", + "kind": "value", + "name": "isSorted", + "docstrings": [ + "`sorted xs` return true if `xs` is in non strict increasing order" + ], + "signature": "let isSorted: array => bool" + }, + { + "id": "Belt.SortArray.String.stableSortInPlace", + "kind": "value", + "name": "stableSortInPlace", + "docstrings": [ + "The same as [`Belt_SortArray.stableSortInPlaceBy`]() except the comparator is fixed" + ], + "signature": "let stableSortInPlace: array => unit" + }, + { + "id": "Belt.SortArray.String.stableSort", + "kind": "value", + "name": "stableSort", + "docstrings": [ + "The same as [`Belt_SortArray.stableSortBy`]() except the comparator is fixed" + ], + "signature": "let stableSort: array => array" + }, + { + "id": "Belt.SortArray.String.binarySearch", + "kind": "value", + "name": "binarySearch", + "docstrings": [ + "If value is not found and value is less than one or more elements in array,\n the negative number returned is the bitwise complement of the index of the first element\n that is larger than value.\n\n If value is not found and value is greater than all elements in array,\n the negative number returned is the bitwise complement of\n (the index of the last element plus 1)\n\n for example, if `key` is smaller than all elements return `-1` since `lnot (-1) = 0`\n if `key` is larger than all elements return `- (len + 1)` since `lnot (-(len+1)) = len`" + ], + "signature": "let binarySearch: (array, element) => int" + }, + { + "id": "Belt.SortArray.String.union", + "kind": "value", + "name": "union", + "docstrings": [ + "`union src src1ofs src1len src2 src2ofs src2len dst dstofs cmp`\n assume `src` and `src2` is strictly sorted.\n for equivalent elements, it is picked from `src`\n also assume that `dst` is large enough to store all elements" + ], + "signature": "let union: (array, int, int, array, int, int, array, int) => int" + }, + { + "id": "Belt.SortArray.String.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [], + "signature": "let intersect: (array, int, int, array, int, int, array, int) => int" + }, + { + "id": "Belt.SortArray.String.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (array, int, int, array, int, int, array, int) => int" + } + ] + }, + "belt/sortarray/int": { + "id": "Belt.SortArray.Int", + "name": "Int", + "docstrings": [ + "Specalized when key type is `int`, more efficient\n than the generic type" + ], + "items": [ + { + "id": "Belt.SortArray.Int.element", + "kind": "type", + "name": "element", + "docstrings": [], + "signature": "type element = int" + }, + { + "id": "Belt.SortArray.Int.strictlySortedLength", + "kind": "value", + "name": "strictlySortedLength", + "docstrings": [ + "The same as [`Belt_SortArray.strictlySortedLength`]() except the comparator is fixed\n\n **return** `+n` means increasing order `-n` means negative order" + ], + "signature": "let strictlySortedLength: array => int" + }, + { + "id": "Belt.SortArray.Int.isSorted", + "kind": "value", + "name": "isSorted", + "docstrings": [ + "`sorted xs` return true if `xs` is in non strict increasing order" + ], + "signature": "let isSorted: array => bool" + }, + { + "id": "Belt.SortArray.Int.stableSortInPlace", + "kind": "value", + "name": "stableSortInPlace", + "docstrings": [ + "The same as [`Belt_SortArray.stableSortInPlaceBy`]() except the comparator is fixed" + ], + "signature": "let stableSortInPlace: array => unit" + }, + { + "id": "Belt.SortArray.Int.stableSort", + "kind": "value", + "name": "stableSort", + "docstrings": [ + "The same as [`Belt_SortArray.stableSortBy`]() except the comparator is fixed" + ], + "signature": "let stableSort: array => array" + }, + { + "id": "Belt.SortArray.Int.binarySearch", + "kind": "value", + "name": "binarySearch", + "docstrings": [ + "If value is not found and value is less than one or more elements in array,\n the negative number returned is the bitwise complement of the index of the first element\n that is larger than value.\n\n If value is not found and value is greater than all elements in array,\n the negative number returned is the bitwise complement of\n (the index of the last element plus 1)\n\n for example, if `key` is smaller than all elements return `-1` since `lnot (-1) = 0`\n if `key` is larger than all elements return `- (len + 1)` since `lnot (-(len+1)) = len`" + ], + "signature": "let binarySearch: (array, element) => int" + }, + { + "id": "Belt.SortArray.Int.union", + "kind": "value", + "name": "union", + "docstrings": [ + "`union src src1ofs src1len src2 src2ofs src2len dst dstofs cmp`\n assume `src` and `src2` is strictly sorted.\n for equivalent elements, it is picked from `src`\n also assume that `dst` is large enough to store all elements" + ], + "signature": "let union: (array, int, int, array, int, int, array, int) => int" + }, + { + "id": "Belt.SortArray.Int.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [], + "signature": "let intersect: (array, int, int, array, int, int, array, int) => int" + }, + { + "id": "Belt.SortArray.Int.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (array, int, int, array, int, int, array, int) => int" + } + ] + }, + "belt/id/makehashable": { + "id": "Belt.Id.MakeHashable", + "name": "MakeHashable", + "docstrings": [], + "items": [ + { + "id": "Belt.Id.MakeHashable.identity", + "kind": "type", + "name": "identity", + "docstrings": [], + "signature": "type identity" + }, + { + "id": "Belt.Id.MakeHashable.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = M.t" + }, + { + "id": "Belt.Id.MakeHashable.hash", + "kind": "value", + "name": "hash", + "docstrings": [], + "signature": "let hash: hash" + }, + { + "id": "Belt.Id.MakeHashable.eq", + "kind": "value", + "name": "eq", + "docstrings": [], + "signature": "let eq: eq" + } + ] + }, + "belt/id/makehashableu": { + "id": "Belt.Id.MakeHashableU", + "name": "MakeHashableU", + "docstrings": [], + "items": [ + { + "id": "Belt.Id.MakeHashableU.identity", + "kind": "type", + "name": "identity", + "docstrings": [], + "signature": "type identity" + }, + { + "id": "Belt.Id.MakeHashableU.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = M.t" + }, + { + "id": "Belt.Id.MakeHashableU.hash", + "kind": "value", + "name": "hash", + "docstrings": [], + "signature": "let hash: hash" + }, + { + "id": "Belt.Id.MakeHashableU.eq", + "kind": "value", + "name": "eq", + "docstrings": [], + "signature": "let eq: eq" + } + ] + }, + "belt/id/makecomparable": { + "id": "Belt.Id.MakeComparable", + "name": "MakeComparable", + "docstrings": [], + "items": [ + { + "id": "Belt.Id.MakeComparable.identity", + "kind": "type", + "name": "identity", + "docstrings": [], + "signature": "type identity" + }, + { + "id": "Belt.Id.MakeComparable.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = M.t" + }, + { + "id": "Belt.Id.MakeComparable.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [], + "signature": "let cmp: cmp" + } + ] + }, + "belt/id/makecomparableu": { + "id": "Belt.Id.MakeComparableU", + "name": "MakeComparableU", + "docstrings": [], + "items": [ + { + "id": "Belt.Id.MakeComparableU.identity", + "kind": "type", + "name": "identity", + "docstrings": [], + "signature": "type identity" + }, + { + "id": "Belt.Id.MakeComparableU.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = M.t" + }, + { + "id": "Belt.Id.MakeComparableU.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [], + "signature": "let cmp: cmp" + } + ] + }, + "belt/float": { + "id": "Belt.Float", + "name": "Float", + "docstrings": [ + "[`Belt.Float`]()\n\n Utilities for Float." + ], + "items": [ + { + "id": "Belt.Float.toInt", + "kind": "value", + "name": "toInt", + "docstrings": [ + "Converts a given `float` to an `int`.\n\n```rescript\nJs.log(Belt.Float.toInt(1.0) === 1) /* true */\n```" + ], + "signature": "let toInt: float => int" + }, + { + "id": "Belt.Float.fromInt", + "kind": "value", + "name": "fromInt", + "docstrings": [ + "Converts a given `int` to a `float`.\n\n ```rescript\n Js.log(Belt.Float.fromInt(1) === 1.0) /* true */\n ```" + ], + "signature": "let fromInt: int => float" + }, + { + "id": "Belt.Float.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [ + "Converts a given `string` to a `float`. Returns `Some(float)` when the input is a number, `None` otherwise.\n\n ```rescript\n Js.log(Belt.Float.fromString(\"1.0\") === Some(1.0)) /* true */\n ```" + ], + "signature": "let fromString: string => option" + }, + { + "id": "Belt.Float.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Converts a given `float` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```rescript\n Js.log(Belt.Float.toString(1.0) === \"1.0\") /* true */\n ```" + ], + "signature": "let toString: float => string" + }, + { + "id": "Belt.Float.+", + "kind": "value", + "name": "+", + "docstrings": [ + "Addition of two `float` values.\n Can be opened in a module to avoid dot-notation (`+.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n ```rescript\n open Belt.Float\n Js.log(2.0 + 2.0 === 4.0) /* true */\n ```" + ], + "signature": "let _: %rescript.typehole" + }, + { + "id": "Belt.Float.-", + "kind": "value", + "name": "-", + "docstrings": [ + "Subtraction of two `float` values.\n Can be opened in a module to avoid dot-notation (`-.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n ```rescript\n open Belt.Float\n Js.log(2.0 - 1.0 === 1.0) /* true */\n ```" + ], + "signature": "let _: %rescript.typehole" + }, + { + "id": "Belt.Float.*", + "kind": "value", + "name": "*", + "docstrings": [ + "Multiplication of two `float` values.\n Can be opened in a module to avoid dot-notation (`*.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n ```rescript\n open Belt.Float\n Js.log(2.0 * 2.0 === 4.0) /* true */\n ```" + ], + "signature": "let _: %rescript.typehole" + }, + { + "id": "Belt.Float./", + "kind": "value", + "name": "/", + "docstrings": [ + "Division of two `float` values.\n Can be opened in a module to avoid dot-notation (`/.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n ```rescript\n open Belt.Float\n Js.log(4.0 / 2.0 === 2.0) /* true */\n ```" + ], + "signature": "let _: %rescript.typehole" + } + ] + }, + "belt/int": { + "id": "Belt.Int", + "name": "Int", + "docstrings": [ + "[`Belt.Int`]()\n\n Utilities for Int." + ], + "items": [ + { + "id": "Belt.Int.toFloat", + "kind": "value", + "name": "toFloat", + "docstrings": [ + "Converts a given `int` to a `float`.\n\n ```rescript\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```" + ], + "signature": "let toFloat: int => float" + }, + { + "id": "Belt.Int.fromFloat", + "kind": "value", + "name": "fromFloat", + "docstrings": [ + "Converts a given `float` to an `int`.\n\n ```rescript\n Js.log(Belt.Int.fromFloat(1.0) === 1) /* true */\n ```" + ], + "signature": "let fromFloat: float => int" + }, + { + "id": "Belt.Int.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [ + "Converts a given `string` to an `int`. Returns `Some(int)` when the input is a number, `None` otherwise.\n\n ```rescript\n Js.log(Belt.Int.fromString(\"1\") === Some(1)) /* true */\n ```" + ], + "signature": "let fromString: string => option" + }, + { + "id": "Belt.Int.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```rescript\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```" + ], + "signature": "let toString: int => string" + }, + { + "id": "Belt.Int.+", + "kind": "value", + "name": "+", + "docstrings": [ + "Addition of two `int` values. Same as the addition from `Pervasives`.\n\n ```rescript\n open Belt.Int\n Js.log(2 + 2 === 4) /* true */\n ```" + ], + "signature": "let _: %rescript.typehole" + }, + { + "id": "Belt.Int.-", + "kind": "value", + "name": "-", + "docstrings": [ + "Subtraction of two `int` values. Same as the subtraction from `Pervasives`.\n\n ```rescript\n open Belt.Int\n Js.log(2 - 1 === 1) /* true */\n ```" + ], + "signature": "let _: %rescript.typehole" + }, + { + "id": "Belt.Int.*", + "kind": "value", + "name": "*", + "docstrings": [ + "Multiplication of two `int` values. Same as the multiplication from `Pervasives`.\n\n ```rescript\n open Belt.Int\n Js.log(2 * 2 === 4) /* true */\n ```" + ], + "signature": "let _: %rescript.typehole" + }, + { + "id": "Belt.Int./", + "kind": "value", + "name": "/", + "docstrings": [ + "Division of two `int` values. Same as the division from `Pervasives`.\n\n ```rescript\n open Belt.Int\n Js.log(4 / 2 === 2); /* true */\n ```" + ], + "signature": "let _: %rescript.typehole" + } + ] + }, + "belt/result": { + "id": "Belt.Result", + "name": "Result", + "docstrings": [ + "[`Belt.Result`]()\n\n Utilities for result data type." + ], + "items": [ + { + "id": "Belt.Result.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a, 'b> = Ok('a) | Error('b)" + }, + { + "id": "Belt.Result.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "`getExn(res)`: when `res` is `Ok(n)`, returns `n` when `res` is `Error(m)`, raise an exception\n\n ```rescript\n Belt.Result.getExn(Belt.Result.Ok(42)) == 42\n\n Belt.Result.getExn(Belt.Result.Error(\"Invalid data\")) /* raises exception */\n ```" + ], + "signature": "let getExn: t<'a, 'b> => 'a" + }, + { + "id": "Belt.Result.mapWithDefaultU", + "kind": "value", + "name": "mapWithDefaultU", + "docstrings": [], + "signature": "let mapWithDefaultU: (t<'a, 'c>, 'b, (. 'a) => 'b) => 'b" + }, + { + "id": "Belt.Result.mapWithDefault", + "kind": "value", + "name": "mapWithDefault", + "docstrings": [ + "`mapWithDefault(res, default, f)`: When res is `Ok(n)`, returns `f(n)`,\n otherwise `default`.\n\n ```rescript\n let ok = Belt.Result.Ok(42)\n Belt.Result.mapWithDefault(ok, 0, (x) => x / 2) == 21\n\n let error = Belt.Result.Error(\"Invalid data\")\n Belt.Result.mapWithDefault(error, 0, (x) => x / 2) == 0\n ```" + ], + "signature": "let mapWithDefault: (t<'a, 'c>, 'b, 'a => 'b) => 'b" + }, + { + "id": "Belt.Result.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'a, 'c>, (. 'a) => 'b) => t<'b, 'c>" + }, + { + "id": "Belt.Result.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(res, f)`: When res is `Ok(n)`, returns `Ok(f(n))`. Otherwise returns res\n unchanged. Function `f` takes a value of the same type as `n` and returns an\n ordinary value.\n\n ```rescript\n let f = (x) => sqrt(Belt.Int.toFloat(x))\n\n Belt.Result.map(Ok(64), f) == Ok(8.0)\n\n Belt.Result.map(Error(\"Invalid data\"), f) == Error(\"Invalid data\")\n ```" + ], + "signature": "let map: (t<'a, 'c>, 'a => 'b) => t<'b, 'c>" + }, + { + "id": "Belt.Result.flatMapU", + "kind": "value", + "name": "flatMapU", + "docstrings": [], + "signature": "let flatMapU: (t<'a, 'c>, (. 'a) => t<'b, 'c>) => t<'b, 'c>" + }, + { + "id": "Belt.Result.flatMap", + "kind": "value", + "name": "flatMap", + "docstrings": [ + "`flatMap(res, f)`: When res is `Ok(n)`, returns `f(n)`. Otherwise, returns res\n unchanged. Function `f` takes a value of the same type as `n` and returns a\n `Belt.Result`.\n\n ```rescript\n let recip = (x) =>\n if (x !== 0.0) {\n Belt.Result.Ok(1.0 /. x)\n } else {\n Belt.Result.Error(\"Divide by zero\")\n }\n\n Belt.Result.flatMap(Ok(2.0), recip) == Ok(0.5)\n\n Belt.Result.flatMap(Ok(0.0), recip) == Error(\"Divide by zero\")\n\n Belt.Result.flatMap(Error(\"Already bad\"), recip) == Error(\"Already bad\")\n ```" + ], + "signature": "let flatMap: (t<'a, 'c>, 'a => t<'b, 'c>) => t<'b, 'c>" + }, + { + "id": "Belt.Result.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [ + "`getWithDefault(res, defaultValue)`: If `res` is `Ok(n)`, returns `n`,\n otherwise `default`\n\n ```rescript\n Belt.Result.getWithDefault(Ok(42), 0) == 42\n\n Belt.Result.getWithDefault(Error(\"Invalid Data\"), 0) == 0\n ```" + ], + "signature": "let getWithDefault: (t<'a, 'b>, 'a) => 'a" + }, + { + "id": "Belt.Result.isOk", + "kind": "value", + "name": "isOk", + "docstrings": [ + "`isOk(res)`: Returns `true` if `res` is of the form `Ok(n)`, `false` if it is\n the `Error(e)` variant." + ], + "signature": "let isOk: t<'a, 'b> => bool" + }, + { + "id": "Belt.Result.isError", + "kind": "value", + "name": "isError", + "docstrings": [ + "`isError(res)`: Returns `true` if `res` is of the form `Error(e)`, `false` if\n it is the `Ok(n)` variant." + ], + "signature": "let isError: t<'a, 'b> => bool" + }, + { + "id": "Belt.Result.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (t<'a, 'c>, t<'b, 'd>, (. 'a, 'b) => bool) => bool" + }, + { + "id": "Belt.Result.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq(res1, res2, f)`: Determine if two `Belt.Result` variables are equal with\n respect to an equality function. If `res1` and `res2` are of the form `Ok(n)`\n and `Ok(m)`, return the result of `f(n, m)`. If one of `res1` and `res2` are of\n the form `Error(e)`, return false If both `res1` and `res2` are of the form\n `Error(e)`, return true\n\n ```rescript\n let good1 = Belt.Result.Ok(42)\n\n let good2 = Belt.Result.Ok(32)\n\n let bad1 = Belt.Result.Error(\"invalid\")\n\n let bad2 = Belt.Result.Error(\"really invalid\")\n\n let mod10equal = (a, b) => mod(a, 10) === mod(b, 10)\n\n Belt.Result.eq(good1, good2, mod10equal) == true\n\n Belt.Result.eq(good1, bad1, mod10equal) == false\n\n Belt.Result.eq(bad2, good2, mod10equal) == false\n\n Belt.Result.eq(bad1, bad2, mod10equal) == true\n ```" + ], + "signature": "let eq: (t<'a, 'c>, t<'b, 'd>, ('a, 'b) => bool) => bool" + }, + { + "id": "Belt.Result.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [], + "signature": "let cmpU: (t<'a, 'c>, t<'b, 'd>, (. 'a, 'b) => int) => int" + }, + { + "id": "Belt.Result.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "`cmp(res1, res2, f)`: Compare two `Belt.Result` variables with respect to a\n comparison function. The comparison function returns -1 if the first variable\n is \"less than\" the second, 0 if the two variables are equal, and 1 if the first\n is \"greater than\" the second.\n\n If `res1` and `res2` are of the form `Ok(n)` and `Ok(m)`, return the result of\n `f(n, m)`. If `res1` is of the form `Error(e)` and `res2` of the form `Ok(n)`,\n return -1 (nothing is less than something) If `res1` is of the form `Ok(n)` and\n `res2` of the form `Error(e)`, return 1 (something is greater than nothing) If\n both `res1` and `res2` are of the form `Error(e)`, return 0 (equal)\n\n ```rescript\n let good1 = Belt.Result.Ok(59)\n\n let good2 = Belt.Result.Ok(37)\n\n let bad1 = Belt.Result.Error(\"invalid\")\n\n let bad2 = Belt.Result.Error(\"really invalid\")\n\n let mod10cmp = (a, b) => Pervasives.compare(mod(a, 10), mod(b, 10))\n\n Belt.Result.cmp(Ok(39), Ok(57), mod10cmp) == 1\n\n Belt.Result.cmp(Ok(57), Ok(39), mod10cmp) == (-1)\n\n Belt.Result.cmp(Ok(39), Error(\"y\"), mod10cmp) == 1\n\n Belt.Result.cmp(Error(\"x\"), Ok(57), mod10cmp) == (-1)\n\n Belt.Result.cmp(Error(\"x\"), Error(\"y\"), mod10cmp) == 0\n ```" + ], + "signature": "let cmp: (t<'a, 'c>, t<'b, 'd>, ('a, 'b) => int) => int" + } + ] + }, + "belt/option": { + "id": "Belt.Option", + "name": "Option", + "docstrings": [ + "[`Belt.Option`]()\n\n Utilities for option data type." + ], + "items": [ + { + "id": "Belt.Option.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [ + "Uncurried version of `keep`" + ], + "signature": "let keepU: (option<'a>, (. 'a) => bool) => option<'a>" + }, + { + "id": "Belt.Option.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "If `optionValue` is `Some(value)` and `p(value) = true`, it returns `Some(value)`; otherwise returns `None`\n\n ```rescript\n Belt.Option.keep(Some(10), x => x > 5) /* returns `Some(10)` */\n Belt.Option.keep(Some(4), x => x > 5) /* returns `None` */\n Belt.Option.keep(None, x => x > 5) /* returns `None` */\n ```" + ], + "signature": "let keep: (option<'a>, 'a => bool) => option<'a>" + }, + { + "id": "Belt.Option.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [ + "Uncurried version of `forEach`" + ], + "signature": "let forEachU: (option<'a>, (. 'a) => unit) => unit" + }, + { + "id": "Belt.Option.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "If `optionValue` is `Some(value`), it calls `f(value)`; otherwise returns `()`\n\n ```rescript\n Belt.Option.forEach(Some(\"thing\"), x => Js.log(x)) /* logs \"thing\" */\n Belt.Option.forEach(None, x => Js.log(x)) /* returns () */\n ```" + ], + "signature": "let forEach: (option<'a>, 'a => unit) => unit" + }, + { + "id": "Belt.Option.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "Raises an Error in case `None` is provided. Use with care.\n\n ```rescript\n Belt.Option.getExn(Some(3)) /* 3 */\n\n Belt.Option.getExn(None) /* Raises an Error */\n ```" + ], + "signature": "let getExn: option<'a> => 'a" + }, + { + "id": "Belt.Option.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [ + "`getUnsafe(x)` returns `x`\n\n This is an unsafe operation, it assumes `x` is neither `None`\n nor `Some(None(...)))`" + ], + "signature": "let getUnsafe: option<'a> => 'a" + }, + { + "id": "Belt.Option.mapWithDefaultU", + "kind": "value", + "name": "mapWithDefaultU", + "docstrings": [ + "Uncurried version of `mapWithDefault`" + ], + "signature": "let mapWithDefaultU: (option<'a>, 'b, (. 'a) => 'b) => 'b" + }, + { + "id": "Belt.Option.mapWithDefault", + "kind": "value", + "name": "mapWithDefault", + "docstrings": [ + "If `optionValue` is of `Some(value)`,\n this function returns that value applied with `f`, in other words `f(value)`.\n\n If `optionValue` is `None`, the default is returned.\n\n ```rescript\n let someValue = Some(3)\n someValue->Belt.Option.mapWithDefault(0, x => x + 5) /* 8 */\n\n let noneValue = None\n noneValue->Belt.Option.mapWithDefault(0, x => x + 5) /* 0 */\n ```" + ], + "signature": "let mapWithDefault: (option<'a>, 'b, 'a => 'b) => 'b" + }, + { + "id": "Belt.Option.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [ + "Uncurried version of `map`" + ], + "signature": "let mapU: (option<'a>, (. 'a) => 'b) => option<'b>" + }, + { + "id": "Belt.Option.map", + "kind": "value", + "name": "map", + "docstrings": [ + "If `optionValue` is `Some(value)` this returns `f(value)`, otherwise it returns `None`.\n\n ```rescript\n Belt.Option.map(Some(3), x => x * x) /* Some(9) */\n\n Belt.Option.map(None, x => x * x) /* None */\n ```" + ], + "signature": "let map: (option<'a>, 'a => 'b) => option<'b>" + }, + { + "id": "Belt.Option.flatMapU", + "kind": "value", + "name": "flatMapU", + "docstrings": [ + "Uncurried version of `flatMap`" + ], + "signature": "let flatMapU: (option<'a>, (. 'a) => option<'b>) => option<'b>" + }, + { + "id": "Belt.Option.flatMap", + "kind": "value", + "name": "flatMap", + "docstrings": [ + "If `optionValue` is `Some(value)`, returns `f(value)`, otherwise returns\n `None`.
\n The function `f` must have a return type of `option<'b>`.\n\n ```rescript\n let addIfAboveOne = value =>\n if (value > 1) {\n Some(value + 1)\n } else {\n None\n }\n\n Belt.Option.flatMap(Some(2), addIfAboveOne) /* Some(3) */\n\n Belt.Option.flatMap(Some(-4), addIfAboveOne) /* None */\n\n Belt.Option.flatMap(None, addIfAboveOne) /* None */\n ```" + ], + "signature": "let flatMap: (option<'a>, 'a => option<'b>) => option<'b>" + }, + { + "id": "Belt.Option.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [ + "If `optionalValue` is `Some(value)`, returns `value`, otherwise default.\n\n ```rescript\n Belt.Option.getWithDefault(None, \"Banana\") /* Banana */\n\n Belt.Option.getWithDefault(Some(\"Apple\"), \"Banana\") /* Apple */\n ```\n\n ```rescript\n let greet = (firstName: option) =>\n \"Greetings \" ++ firstName->Belt.Option.getWithDefault(\"Anonymous\")\n\n Some(\"Jane\")->greet /* \"Greetings Jane\" */\n\n None->greet /* \"Greetings Anonymous\" */\n ```" + ], + "signature": "let getWithDefault: (option<'a>, 'a) => 'a" + }, + { + "id": "Belt.Option.orElse", + "kind": "value", + "name": "orElse", + "docstrings": [ + "`orElse optionalValue otherOptional`\n\n If `optionalValue` is `Some value`, returns `Some value`, otherwise `otherOptional`\n\n ```\n orElse (Some 1812) (Some 1066) = Some 1812;;\n orElse None (Some 1066) = Some 1066;;\n orElse None None = None;;\n ```" + ], + "signature": "let orElse: (option<'a>, option<'a>) => option<'a>" + }, + { + "id": "Belt.Option.isSome", + "kind": "value", + "name": "isSome", + "docstrings": [ + "Returns `true` if the argument is `Some(value)`, `false` otherwise.\n\n ```rescript\n Belt.Option.isSome(None) /* false */\n\n Belt.Option.isSome(Some(1)) /* true */\n ```" + ], + "signature": "let isSome: option<'a> => bool" + }, + { + "id": "Belt.Option.isNone", + "kind": "value", + "name": "isNone", + "docstrings": [ + "Returns `true` if the argument is `None`, `false` otherwise.\n\n ```rescript\n Belt.Option.isNone(None) /* true */\n\n Belt.Option.isNone(Some(1)) /* false */\n ```" + ], + "signature": "let isNone: option<'a> => bool" + }, + { + "id": "Belt.Option.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [ + "Uncurried version of `eq`" + ], + "signature": "let eqU: (option<'a>, option<'b>, (. 'a, 'b) => bool) => bool" + }, + { + "id": "Belt.Option.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "Evaluates two optional values for equality with respect to a predicate\n function. If both `optValue1` and `optValue2` are `None`, returns `true`.\n If one of the arguments is `Some(value)` and the other is `None`, returns\n `false`.\n\n If arguments are `Some(value1)` and `Some(value2)`, returns the result of\n `predicate(value1, value2)`; the predicate function must return a bool.\n\n ```rescript\n let clockEqual = (a, b) => mod(a, 12) == mod(b, 12)\n\n open Belt.Option\n\n eq(Some(3), Some(15), clockEqual) /* true */\n\n eq(Some(3), None, clockEqual) /* false */\n\n eq(None, Some(3), clockEqual) /* false */\n\n eq(None, None, clockEqual) /* true */\n ```" + ], + "signature": "let eq: (option<'a>, option<'b>, ('a, 'b) => bool) => bool" + }, + { + "id": "Belt.Option.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [ + "Uncurried version of `cmp`" + ], + "signature": "let cmpU: (option<'a>, option<'b>, (. 'a, 'b) => int) => int" + }, + { + "id": "Belt.Option.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "`cmp(optValue1, optValue2, comparisonFunction)` compares two optional values\n with respect to given `comparisonFunction`.\n\n If both `optValue1` and `optValue2` are `None`, it returns `0`.\n\n If the first argument is `Some(value1)` and the second is `None`, returns `1`\n (something is greater than nothing).\n\n If the first argument is `None` and the second is `Some(value2)`, returns `-1`\n (nothing is less than something).\n\n If the arguments are `Some(value1)` and `Some(value2)`, returns the result of\n `comparisonFunction(value1, value2)`; comparisonFunction takes two arguments\n and returns `-1` if the first argument is less than the second, `0` if the\n arguments are equal, and `1` if the first argument is greater than the second.\n\n ```rescript\n let clockCompare = (a, b) => compare(mod(a, 12), mod(b, 12))\n\n open Belt.Option\n\n cmp(Some(3), Some(15), clockCompare) /* 0 */\n\n cmp(Some(3), Some(14), clockCompare) /* 1 */\n\n cmp(Some(2), Some(15), clockCompare) /* (-1) */\n\n cmp(None, Some(15), clockCompare) /* (-1) */\n\n cmp(Some(14), None, clockCompare) /* 1 */\n\n cmp(None, None, clockCompare) /* 0 */\n ```" + ], + "signature": "let cmp: (option<'a>, option<'b>, ('a, 'b) => int) => int" + } + ] + }, + "belt/hashmap": { + "id": "Belt.HashMap", + "name": "HashMap", + "docstrings": [ + "[`Belt.HashMap`]()\n\n The top level provides generic **mutable** hash map operations.\n\n It also has two specialized inner modules\n [`Belt.HashMap.Int`]() and [`Belt.HashMap.String`]()" + ], + "items": [ + { + "id": "Belt.HashMap.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type of hash tables from type `'key` to type `'value`." + ], + "signature": "type t<'key, 'value, 'id>" + }, + { + "id": "Belt.HashMap.id", + "kind": "type", + "name": "id", + "docstrings": [ + "The identity needed for making an empty hash map." + ], + "signature": "type id<'a, 'id> = Belt_Id.hashable<'a, 'id>" + }, + { + "id": "Belt.HashMap.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(~hintSize=10, ~id)` creates a new map by taking in the comparator and `hintSize`.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n\n Belt.HashMap.set(hMap, 0, \"a\")\n ```" + ], + "signature": "let make: (~hintSize: int, ~id: id<'key, 'id>) => t<'key, 'value, 'id>" + }, + { + "id": "Belt.HashMap.clear", + "kind": "value", + "name": "clear", + "docstrings": [ + "Clears a hash table.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let hMap = Belt.HashMap.fromArray([(1, \"1\")], ~id=module(IntHash))\n Belt.HashMap.clear(hMap)\n Belt.HashMap.isEmpty(hMap) == true\n ```" + ], + "signature": "let clear: t<'key, 'value, 'id> => unit" + }, + { + "id": "Belt.HashMap.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [ + "`isEmpty(m)` checks whether a hash map is empty.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n Belt.HashMap.isEmpty(Belt.HashMap.fromArray([(1, \"1\")], ~id=module(IntHash))) == false\n ```" + ], + "signature": "let isEmpty: t<'a, 'b, 'c> => bool" + }, + { + "id": "Belt.HashMap.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set(hMap, k, v)` if `k` does not exist, add the binding `k,v`, otherwise, update the old value with the new `v`.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntHash))\n\n Belt.HashMap.set(s0, 2, \"3\")\n\n Belt.HashMap.valuesToArray(s0) == [\"1\", \"3\", \"3\"]\n ```" + ], + "signature": "let set: (t<'key, 'value, 'id>, 'key, 'value) => unit" + }, + { + "id": "Belt.HashMap.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "Creates copy of a hash map.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntHash))\n let s1 = Belt.HashMap.copy(s0)\n\n Belt.HashMap.set(s0, 2, \"3\")\n\n Belt.HashMap.get(s0, 2) != Belt.HashMap.get(s1, 2)\n ```" + ], + "signature": "let copy: t<'key, 'value, 'id> => t<'key, 'value, 'id>" + }, + { + "id": "Belt.HashMap.get", + "kind": "value", + "name": "get", + "docstrings": [ + "Returns value bound under specific key. If values not exist returns `None`.\n\n```rescript\nmodule IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n})\n\nlet s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\nBelt.HashMap.set(s0, 1, \"value1\")\n\nBelt.HashMap.get(s0, 1) == Some(\"value1\")\nBelt.HashMap.get(s0, 2) == None\n```" + ], + "signature": "let get: (t<'key, 'value, 'id>, 'key) => option<'value>" + }, + { + "id": "Belt.HashMap.has", + "kind": "value", + "name": "has", + "docstrings": [ + "Checks if `x` is bound in `tbl`.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n\n Belt.HashMap.has(s0, 1) == true\n Belt.HashMap.has(s0, 2) == false\n ```" + ], + "signature": "let has: (t<'key, 'value, 'id>, 'key) => bool" + }, + { + "id": "Belt.HashMap.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "If bound exists, removes it from the hash map.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.remove(s0, 1)\n Belt.HashMap.has(s0, 1) == false\n ```" + ], + "signature": "let remove: (t<'key, 'value, 'id>, 'key) => unit" + }, + { + "id": "Belt.HashMap.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [ + "Same as [forEach](#forEach) but takes uncurried function." + ], + "signature": "let forEachU: (t<'key, 'value, 'id>, (. 'key, 'value) => unit) => unit" + }, + { + "id": "Belt.HashMap.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(tbl, f)` applies `f` to all bindings in table `tbl`. `f` receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to `f`.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.forEach(s0, (key, value) => Js.log2(key, value))\n // prints (1, \"value1\")\n ```" + ], + "signature": "let forEach: (t<'key, 'value, 'id>, ('key, 'value) => unit) => unit" + }, + { + "id": "Belt.HashMap.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'key, 'value, 'id>, 'c, (. 'c, 'key, 'value) => 'c) => 'c" + }, + { + "id": "Belt.HashMap.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce(tbl, init, f)` computes `(f(kN, dN) ... (f(k1, d1, init))...)`, where `k1 ... kN` are the keys of all bindings in `tbl`, and `d1 ... dN` are the associated values. Each binding is presented exactly once to `f`.\n\n The order in which the bindings are passed to `f` is unspecified. However, if the table contains several bindings for the same key, they are passed to `f` in reverse order of introduction, that is, the most recent binding is passed first.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.reduce(s0, \"\", (acc, key, value) => acc ++ (\", \" ++ value)) == \"value1, value2\"\n ```" + ], + "signature": "let reduce: (t<'key, 'value, 'id>, 'c, ('c, 'key, 'value) => 'c) => 'c" + }, + { + "id": "Belt.HashMap.keepMapInPlaceU", + "kind": "value", + "name": "keepMapInPlaceU", + "docstrings": [ + "Same as [keepMapInPlace](#keepMapInPlace) but takes uncurried function." + ], + "signature": "let keepMapInPlaceU: (t<'key, 'value, 'id>, (. 'key, 'value) => option<'value>) => unit" + }, + { + "id": "Belt.HashMap.keepMapInPlace", + "kind": "value", + "name": "keepMapInPlace", + "docstrings": [ + "Filters out values for which function `f` returned `None`.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.keepMapInPlace(s0, (key, value) => key == 1 ? None : Some(value))\n ```" + ], + "signature": "let keepMapInPlace: (t<'key, 'value, 'id>, ('key, 'value) => option<'value>) => unit" + }, + { + "id": "Belt.HashMap.size", + "kind": "value", + "name": "size", + "docstrings": [ + "`size(tbl)` returns the number of bindings in `tbl`. It takes constant time.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.size(s0) == 2\n ```" + ], + "signature": "let size: t<'a, 'b, 'c> => int" + }, + { + "id": "Belt.HashMap.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "Returns array of key value pairs.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.toArray(s0) == [(1, \"value1\"), (2, \"value2\")]\n ```" + ], + "signature": "let toArray: t<'key, 'value, 'id> => array<('key, 'value)>" + }, + { + "id": "Belt.HashMap.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [ + "Returns array of keys.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.keysToArray(s0) == [1, 2]\n ```" + ], + "signature": "let keysToArray: t<'key, 'a, 'b> => array<'key>" + }, + { + "id": "Belt.HashMap.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [ + "Returns array of values.\n\n ```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.valuesToArray(s0) == [\"value1\", \"value2\"]\n ```" + ], + "signature": "let valuesToArray: t<'a, 'value, 'b> => array<'value>" + }, + { + "id": "Belt.HashMap.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "Creates new hash map from array of pairs.\n\nReturns array of values.\n\n```rescript\nmodule IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n})\n\nlet s0 = Belt.HashMap.fromArray([(1, \"value1\"), (2, \"value2\")], ~id=module(IntHash))\nBelt.HashMap.toArray(s0) == [(1, \"value1\"), (2, \"value2\")]\n```" + ], + "signature": "let fromArray: (array<('key, 'value)>, ~id: id<'key, 'id>) => t<'key, 'value, 'id>" + }, + { + "id": "Belt.HashMap.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [ + "```rescript\nmodule IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n})\n\nlet hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\nBelt.HashMap.mergeMany(hMap, [(1, \"1\"), (2, \"2\")])\n```" + ], + "signature": "let mergeMany: (t<'key, 'value, 'id>, array<('key, 'value)>) => unit" + }, + { + "id": "Belt.HashMap.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "docstrings": [ + "```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n let hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(hMap, 1, \"1\")\n\n Belt.HashMap.getBucketHistogram(hMap)\n ```" + ], + "signature": "let getBucketHistogram: t<'a, 'b, 'c> => array" + }, + { + "id": "Belt.HashMap.logStats", + "kind": "value", + "name": "logStats", + "docstrings": [ + "```rescript\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n let hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(hMap, 1, \"1\")\n\n Belt.HashMap.logStats(hMap)\n ```" + ], + "signature": "let logStats: t<'a, 'b, 'c> => unit" + } + ] + }, + "belt/hashset": { + "id": "Belt.HashSet", + "name": "HashSet", + "docstrings": [ + "[`Belt.HashSet`]()\n\n The top level provides generic **mutable** hash set operations.\n\n It also has two specialized inner modules\n [`Belt.HashSet.Int`]() and [`Belt.HashSet.String`]()" + ], + "items": [ + { + "id": "Belt.HashSet.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a, 'id>" + }, + { + "id": "Belt.HashSet.id", + "kind": "type", + "name": "id", + "docstrings": [ + "The type of hash tables from type `'a` to type `'b`." + ], + "signature": "type id<'a, 'id> = Belt_Id.hashable<'a, 'id>" + }, + { + "id": "Belt.HashSet.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~hintSize: int, ~id: id<'a, 'id>) => t<'a, 'id>" + }, + { + "id": "Belt.HashSet.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t<'a, 'id> => unit" + }, + { + "id": "Belt.HashSet.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'a, 'b> => bool" + }, + { + "id": "Belt.HashSet.add", + "kind": "value", + "name": "add", + "docstrings": [], + "signature": "let add: (t<'a, 'id>, 'a) => unit" + }, + { + "id": "Belt.HashSet.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t<'a, 'id> => t<'a, 'id>" + }, + { + "id": "Belt.HashSet.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'a, 'id>, 'a) => bool" + }, + { + "id": "Belt.HashSet.remove", + "kind": "value", + "name": "remove", + "docstrings": [], + "signature": "let remove: (t<'a, 'id>, 'a) => unit" + }, + { + "id": "Belt.HashSet.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'a, 'id>, (. 'a) => unit) => unit" + }, + { + "id": "Belt.HashSet.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "Order unspecified." + ], + "signature": "let forEach: (t<'a, 'id>, 'a => unit) => unit" + }, + { + "id": "Belt.HashSet.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'a, 'id>, 'c, (. 'c, 'a) => 'c) => 'c" + }, + { + "id": "Belt.HashSet.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "Order unspecified." + ], + "signature": "let reduce: (t<'a, 'id>, 'c, ('c, 'a) => 'c) => 'c" + }, + { + "id": "Belt.HashSet.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'a, 'id> => int" + }, + { + "id": "Belt.HashSet.logStats", + "kind": "value", + "name": "logStats", + "docstrings": [], + "signature": "let logStats: t<'a, 'b> => unit" + }, + { + "id": "Belt.HashSet.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t<'a, 'id> => array<'a>" + }, + { + "id": "Belt.HashSet.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: (array<'a>, ~id: id<'a, 'id>) => t<'a, 'id>" + }, + { + "id": "Belt.HashSet.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t<'a, 'id>, array<'a>) => unit" + }, + { + "id": "Belt.HashSet.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "docstrings": [], + "signature": "let getBucketHistogram: t<'a, 'b> => array" + } + ] + }, + "belt/mutablemap": { + "id": "Belt.MutableMap", + "name": "MutableMap", + "docstrings": [ + "[`Belt.MutableMap`]()\n\n The top level provides generic **mutable** map operations.\n\n It also has two specialized inner modules\n [`Belt.MutableMap.Int`]() and [`Belt.MutableMap.String`]()" + ], + "items": [ + { + "id": "Belt.MutableMap.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'k, 'v, 'id>" + }, + { + "id": "Belt.MutableMap.id", + "kind": "type", + "name": "id", + "docstrings": [], + "signature": "type id<'key, 'id> = Belt_Id.comparable<'key, 'id>" + }, + { + "id": "Belt.MutableMap.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~id: id<'k, 'id>) => t<'k, 'a, 'id>" + }, + { + "id": "Belt.MutableMap.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t<'a, 'b, 'c> => unit" + }, + { + "id": "Belt.MutableMap.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'a, 'b, 'c> => bool" + }, + { + "id": "Belt.MutableMap.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'k, 'a, 'b>, 'k) => bool" + }, + { + "id": "Belt.MutableMap.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [], + "signature": "let cmpU: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, (. 'a, 'a) => int) => int" + }, + { + "id": "Belt.MutableMap.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "`cmp(m1, m2, cmp)` First compare by size, if size is the same, compare by\n key, value pair." + ], + "signature": "let cmp: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, ('a, 'a) => int) => int" + }, + { + "id": "Belt.MutableMap.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, (. 'a, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq(m1, m2, eqf)` tests whether the maps `m1` and `m2` are equal, that is,\n contain equal keys and associate them with equal data. `eqf` is the\n equality predicate used to compare the data associated with the keys." + ], + "signature": "let eq: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, ('a, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'k, 'a, 'id>, (. 'k, 'a) => unit) => unit" + }, + { + "id": "Belt.MutableMap.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(m, f)` applies f to all bindings in map `m`. `f` receives the `'k`\n as first argument, and the associated value as second argument. The\n bindings are passed to `f` in increasing order with respect to the ordering\n over the type of the keys." + ], + "signature": "let forEach: (t<'k, 'a, 'id>, ('k, 'a) => unit) => unit" + }, + { + "id": "Belt.MutableMap.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'k, 'a, 'id>, 'b, (. 'b, 'k, 'a) => 'b) => 'b" + }, + { + "id": "Belt.MutableMap.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce(m, a, f), computes`(f(kN, dN) ... (f(k1, d1, a))...)`, where`k1 ...\n kN`are the keys of all bindings in`m`(in increasing order), and`d1 ... dN`\n are the associated data." + ], + "signature": "let reduce: (t<'k, 'a, 'id>, 'b, ('b, 'k, 'a) => 'b) => 'b" + }, + { + "id": "Belt.MutableMap.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every(m, p)` checks if all the bindings of the map satisfy the predicate\n `p`." + ], + "signature": "let every: (t<'k, 'a, 'id>, ('k, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some(m, p)` checks if at least one binding of the map satisfy the\n predicate `p`." + ], + "signature": "let some: (t<'k, 'a, 'id>, ('k, 'a) => bool) => bool" + }, + { + "id": "Belt.MutableMap.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'k, 'a, 'id> => int" + }, + { + "id": "Belt.MutableMap.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order." + ], + "signature": "let toList: t<'k, 'a, 'id> => list<('k, 'a)>" + }, + { + "id": "Belt.MutableMap.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [], + "signature": "let toArray: t<'k, 'a, 'id> => array<('k, 'a)>" + }, + { + "id": "Belt.MutableMap.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [], + "signature": "let fromArray: (array<('k, 'a)>, ~id: id<'k, 'id>) => t<'k, 'a, 'id>" + }, + { + "id": "Belt.MutableMap.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [], + "signature": "let keysToArray: t<'k, 'a, 'b> => array<'k>" + }, + { + "id": "Belt.MutableMap.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [], + "signature": "let valuesToArray: t<'a, 'a0, 'b> => array<'a0>" + }, + { + "id": "Belt.MutableMap.minKey", + "kind": "value", + "name": "minKey", + "docstrings": [], + "signature": "let minKey: t<'k, 'a, 'b> => option<'k>" + }, + { + "id": "Belt.MutableMap.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "docstrings": [], + "signature": "let minKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>" + }, + { + "id": "Belt.MutableMap.maxKey", + "kind": "value", + "name": "maxKey", + "docstrings": [], + "signature": "let maxKey: t<'k, 'a, 'b> => option<'k>" + }, + { + "id": "Belt.MutableMap.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "docstrings": [], + "signature": "let maxKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>" + }, + { + "id": "Belt.MutableMap.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [], + "signature": "let minimum: t<'k, 'a, 'b> => option<('k, 'a)>" + }, + { + "id": "Belt.MutableMap.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [], + "signature": "let minUndefined: t<'k, 'a, 'b> => Js.undefined<('k, 'a)>" + }, + { + "id": "Belt.MutableMap.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [], + "signature": "let maximum: t<'k, 'a, 'b> => option<('k, 'a)>" + }, + { + "id": "Belt.MutableMap.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [], + "signature": "let maxUndefined: t<'k, 'a, 'b> => Js.undefined<('k, 'a)>" + }, + { + "id": "Belt.MutableMap.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'k, 'a, 'id>, 'k) => option<'a>" + }, + { + "id": "Belt.MutableMap.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [], + "signature": "let getUndefined: (t<'k, 'a, 'id>, 'k) => Js.undefined<'a>" + }, + { + "id": "Belt.MutableMap.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (t<'k, 'a, 'id>, 'k, 'a) => 'a" + }, + { + "id": "Belt.MutableMap.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: (t<'k, 'a, 'id>, 'k) => 'a" + }, + { + "id": "Belt.MutableMap.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "Raise when invariant is not held." + ], + "signature": "let checkInvariantInternal: t<'a, 'b, 'c> => unit" + }, + { + "id": "Belt.MutableMap.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "`remove(m, x)` do the in-place modification." + ], + "signature": "let remove: (t<'k, 'a, 'id>, 'k) => unit" + }, + { + "id": "Belt.MutableMap.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [], + "signature": "let removeMany: (t<'k, 'a, 'id>, array<'k>) => unit" + }, + { + "id": "Belt.MutableMap.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set(m, x, y)` do the in-place modification" + ], + "signature": "let set: (t<'k, 'a, 'id>, 'k, 'a) => unit" + }, + { + "id": "Belt.MutableMap.updateU", + "kind": "value", + "name": "updateU", + "docstrings": [], + "signature": "let updateU: (t<'k, 'a, 'id>, 'k, (. option<'a>) => option<'a>) => unit" + }, + { + "id": "Belt.MutableMap.update", + "kind": "value", + "name": "update", + "docstrings": [], + "signature": "let update: (t<'k, 'a, 'id>, 'k, option<'a> => option<'a>) => unit" + }, + { + "id": "Belt.MutableMap.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [], + "signature": "let mergeMany: (t<'k, 'a, 'id>, array<('k, 'a)>) => unit" + }, + { + "id": "Belt.MutableMap.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'k, 'a, 'id>, (. 'a) => 'b) => t<'k, 'b, 'id>" + }, + { + "id": "Belt.MutableMap.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(m, f)` returns a map with same domain as `m`, where the associated\n value a of all bindings of `m` has been replaced by the result of the\n application of `f` to `a`. The bindings are passed to `f` in increasing\n order with respect to the ordering over the type of the keys." + ], + "signature": "let map: (t<'k, 'a, 'id>, 'a => 'b) => t<'k, 'b, 'id>" + }, + { + "id": "Belt.MutableMap.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "docstrings": [], + "signature": "let mapWithKeyU: (t<'k, 'a, 'id>, (. 'k, 'a) => 'b) => t<'k, 'b, 'id>" + }, + { + "id": "Belt.MutableMap.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "docstrings": [], + "signature": "let mapWithKey: (t<'k, 'a, 'id>, ('k, 'a) => 'b) => t<'k, 'b, 'id>" + } + ] + }, + "belt/mutableset": { + "id": "Belt.MutableSet", + "name": "MutableSet", + "docstrings": [ + "[`Belt.MutableSet`]()\n\n The top level provides generic **mutable** set operations.\n\n It also has two specialized inner modules\n [`Belt.MutableSet.Int`]() and [`Belt.MutableSet.String`]()" + ], + "items": [ + { + "id": "Belt.MutableSet.t", + "kind": "type", + "name": "t", + "docstrings": [ + "`'value` is the element type\n\n `'identity` the identity of the collection" + ], + "signature": "type t<'value, 'identity>" + }, + { + "id": "Belt.MutableSet.id", + "kind": "type", + "name": "id", + "docstrings": [ + "The identity needed for making a set from scratch" + ], + "signature": "type id<'value, 'id> = Belt_Id.comparable<'value, 'id>" + }, + { + "id": "Belt.MutableSet.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new set by taking in the comparator" + ], + "signature": "let make: (~id: id<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.MutableSet.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "Creates new set from array of elements.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 3, 2, 4], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.toArray /* [1, 2, 3, 4] */\n ```" + ], + "signature": "let fromArray: (array<'value>, ~id: id<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.MutableSet.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "docstrings": [ + "The same as [fromArray][#fromarray] except it is after assuming the input array is already sorted." + ], + "signature": "let fromSortedArrayUnsafe: (array<'value>, ~id: id<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.MutableSet.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "Returns copy of a set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 3, 2, 4], ~id=module(IntCmp))\n\n let copied = s0->Belt.MutableSet.copy\n copied->Belt.MutableSet.toArray /* [1, 2, 3, 4] */\n ```" + ], + "signature": "let copy: t<'value, 'id> => t<'value, 'id>" + }, + { + "id": "Belt.MutableSet.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [ + "Checks if set is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let empty = Belt.MutableSet.fromArray([], ~id=module(IntCmp))\n let notEmpty = Belt.MutableSet.fromArray([1], ~id=module(IntCmp))\n\n Belt.MutableSet.isEmpty(empty) /* true */\n Belt.MutableSet.isEmpty(notEmpty) /* false */\n ```" + ], + "signature": "let isEmpty: t<'a, 'b> => bool" + }, + { + "id": "Belt.MutableSet.has", + "kind": "value", + "name": "has", + "docstrings": [ + "Checks if element exists in set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.MutableSet.fromArray([1, 4, 2, 5], ~id=module(IntCmp))\n\n set->Belt.MutableSet.has(3) /* false */\n set->Belt.MutableSet.has(1) /* true */\n ```" + ], + "signature": "let has: (t<'value, 'id>, 'value) => bool" + }, + { + "id": "Belt.MutableSet.add", + "kind": "value", + "name": "add", + "docstrings": [ + "Adds element to set. If element existed in set, value is unchanged.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n s0->Belt.MutableSet.add(1)\n s0->Belt.MutableSet.add(2)\n s0->Belt.MutableSet.add(2)\n\n s0->Belt.MutableSet.toArray /* [1, 2] */\n ```" + ], + "signature": "let add: (t<'value, 'id>, 'value) => unit" + }, + { + "id": "Belt.MutableSet.addCheck", + "kind": "value", + "name": "addCheck", + "docstrings": [], + "signature": "let addCheck: (t<'value, 'id>, 'value) => bool" + }, + { + "id": "Belt.MutableSet.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [ + "Adds each element of array to set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.MutableSet.make(~id=module(IntCmp))\n\n set->Belt.MutableSet.mergeMany([5, 4, 3, 2, 1])\n set->Belt.MutableSet.toArray /* [1, 2, 3, 4, 5] */\n ```" + ], + "signature": "let mergeMany: (t<'value, 'id>, array<'value>) => unit" + }, + { + "id": "Belt.MutableSet.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "Removes element from set. If element did not exist in set, value is unchanged.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([2, 3, 1, 4, 5], ~id=module(IntCmp))\n s0->Belt.MutableSet.remove(1)\n s0->Belt.MutableSet.remove(3)\n s0->Belt.MutableSet.remove(3)\n\n s0->Belt.MutableSet.toArray /* [2,4,5] */\n ```" + ], + "signature": "let remove: (t<'value, 'id>, 'value) => unit" + }, + { + "id": "Belt.MutableSet.removeCheck", + "kind": "value", + "name": "removeCheck", + "docstrings": [], + "signature": "let removeCheck: (t<'value, 'id>, 'value) => bool" + }, + { + "id": "Belt.MutableSet.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [ + "Removes each element of array from set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.MutableSet.fromArray([1, 2, 3, 4], ~id=module(IntCmp))\n\n set->Belt.MutableSet.removeMany([5, 4, 3, 2, 1])\n set->Belt.MutableSet.toArray /* [] */\n ```" + ], + "signature": "let removeMany: (t<'value, 'id>, array<'value>) => unit" + }, + { + "id": "Belt.MutableSet.union", + "kind": "value", + "name": "union", + "docstrings": [ + "Returns union of two sets.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\n let union = Belt.MutableSet.union(s0, s1)\n union->Belt.MutableSet.toArray /* [1,2,3,4,5,6] */\n ```" + ], + "signature": "let union: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.MutableSet.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [ + "Returns intersection of two sets.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\n let intersect = Belt.MutableSet.intersect(s0, s1)\n intersect->Belt.MutableSet.toArray /* [2,3,5] */\n ```" + ], + "signature": "let intersect: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.MutableSet.diff", + "kind": "value", + "name": "diff", + "docstrings": [ + "Returns elements from first set, not existing in second set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\n Belt.MutableSet.toArray(Belt.MutableSet.diff(s0, s1)) /* [6] */\n Belt.MutableSet.toArray(Belt.MutableSet.diff(s1, s0)) /* [1,4] */\n ```" + ], + "signature": "let diff: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.MutableSet.subset", + "kind": "value", + "name": "subset", + "docstrings": [ + "Checks if second set is subset of first set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\n let s2 = Belt.MutableSet.intersect(s0, s1)\n Belt.MutableSet.subset(s2, s0) /* true */\n Belt.MutableSet.subset(s2, s1) /* true */\n Belt.MutableSet.subset(s1, s0) /* false */\n ```" + ], + "signature": "let subset: (t<'value, 'id>, t<'value, 'id>) => bool" + }, + { + "id": "Belt.MutableSet.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function for doing sets of sets. It compares size first and then iterates over each element following the order of elements." + ], + "signature": "let cmp: (t<'value, 'id>, t<'value, 'id>) => int" + }, + { + "id": "Belt.MutableSet.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "Checks if two sets are equal.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 5], ~id=module(IntCmp))\n\n Belt.MutableSet.eq(s0, s1) /* true */\n ```" + ], + "signature": "let eq: (t<'value, 'id>, t<'value, 'id>) => bool" + }, + { + "id": "Belt.MutableSet.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [ + "Same as [forEach](##forEach) but takes uncurried functon." + ], + "signature": "let forEachU: (t<'value, 'id>, (. 'value) => unit) => unit" + }, + { + "id": "Belt.MutableSet.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "Applies function `f` in turn to all elements of set in increasing order.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let acc = ref(list{})\n s0->Belt.MutableSet.forEach(x => acc := Belt.List.add(acc.contents, x))\n acc /* [6,5,3,2] */\n ```" + ], + "signature": "let forEach: (t<'value, 'id>, 'value => unit) => unit" + }, + { + "id": "Belt.MutableSet.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'value, 'id>, 'a, (. 'a, 'value) => 'a) => 'a" + }, + { + "id": "Belt.MutableSet.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "Applies function `f` to each element of set in increasing order. Function `f` has two parameters: the item from the set and an “accumulator”, which starts with a value of `initialValue`. `reduce` returns the final value of the accumulator.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n s0->Belt.MutableSet.reduce(list{}, (acc, element) => acc->Belt.List.add(element)) /* [6,5,3,2] */\n ```" + ], + "signature": "let reduce: (t<'value, 'id>, 'a, ('a, 'value) => 'a) => 'a" + }, + { + "id": "Belt.MutableSet.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'value, 'id>, (. 'value) => bool) => bool" + }, + { + "id": "Belt.MutableSet.every", + "kind": "value", + "name": "every", + "docstrings": [ + "Checks if all elements of the set satisfy the predicate. Order unspecified.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.MutableSet.fromArray([2, 4, 6, 8], ~id=module(IntCmp))\n s0->Belt.MutableSet.every(isEven) /* true */\n ```" + ], + "signature": "let every: (t<'value, 'id>, 'value => bool) => bool" + }, + { + "id": "Belt.MutableSet.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'value, 'id>, (. 'value) => bool) => bool" + }, + { + "id": "Belt.MutableSet.some", + "kind": "value", + "name": "some", + "docstrings": [ + "Checks if at least one element of the set satisfies the predicate.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 4, 6, 8], ~id=module(IntCmp))\n s0->Belt.MutableSet.some(isOdd) /* true */\n ```" + ], + "signature": "let some: (t<'value, 'id>, 'value => bool) => bool" + }, + { + "id": "Belt.MutableSet.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t<'value, 'id>, (. 'value) => bool) => t<'value, 'id>" + }, + { + "id": "Belt.MutableSet.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "Returns the set of all elements that satisfy the predicate.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n let s1 = s0->Belt.MutableSet.keep(isEven)\n\n s1->Belt.MutableSet.toArray /* [2, 4] */\n ```" + ], + "signature": "let keep: (t<'value, 'id>, 'value => bool) => t<'value, 'id>" + }, + { + "id": "Belt.MutableSet.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t<'value, 'id>, (. 'value) => bool) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.MutableSet.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n let (s1, s2) = s0->Belt.MutableSet.partition(isOdd)\n\n s1->Belt.MutableSet.toArray /* [1,3,5] */\n s2->Belt.MutableSet.toArray /* [2,4] */\n ```" + ], + "signature": "let partition: (t<'value, 'id>, 'value => bool) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.MutableSet.size", + "kind": "value", + "name": "size", + "docstrings": [ + "Returns size of the set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.size /* 4 */\n ```" + ], + "signature": "let size: t<'value, 'id> => int" + }, + { + "id": "Belt.MutableSet.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "Returns list of ordered set elements.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.toList /* [1,2,3,5] */\n ```" + ], + "signature": "let toList: t<'value, 'id> => list<'value>" + }, + { + "id": "Belt.MutableSet.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "Returns array of ordered set elements.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.toArray /* [1,2,3,5] */\n ```" + ], + "signature": "let toArray: t<'value, 'id> => array<'value>" + }, + { + "id": "Belt.MutableSet.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [ + "Returns minimum value of the collection. `None` if collection is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.minimum /* None */\n s1->Belt.MutableSet.minimum /* Some(1) */\n ```" + ], + "signature": "let minimum: t<'value, 'id> => option<'value>" + }, + { + "id": "Belt.MutableSet.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [ + "Returns minimum value of the collection. `undefined` if collection is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.minUndefined /* undefined */\n s1->Belt.MutableSet.minUndefined /* 1 */\n ```" + ], + "signature": "let minUndefined: t<'value, 'id> => Js.undefined<'value>" + }, + { + "id": "Belt.MutableSet.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [ + "Returns maximum value of the collection. `None` if collection is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.maximum /* None */\n s1->Belt.MutableSet.maximum /* Some(5) */\n ```" + ], + "signature": "let maximum: t<'value, 'id> => option<'value>" + }, + { + "id": "Belt.MutableSet.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [ + "Returns maximum value of the collection. `undefined` if collection is empty.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.maxUndefined /* undefined */\n s1->Belt.MutableSet.maxUndefined /* 5 */\n ```" + ], + "signature": "let maxUndefined: t<'value, 'id> => Js.undefined<'value>" + }, + { + "id": "Belt.MutableSet.get", + "kind": "value", + "name": "get", + "docstrings": [ + "Returns the reference of the value which is equivalent to value using the comparator specifiecd by this collection. Returns `None` if element does not exist.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.get(3) /* Some(3) */\n s0->Belt.MutableSet.get(20) /* None */\n ```" + ], + "signature": "let get: (t<'value, 'id>, 'value) => option<'value>" + }, + { + "id": "Belt.MutableSet.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [ + "Same as [get](#get) but returns `undefined` when element does not exist." + ], + "signature": "let getUndefined: (t<'value, 'id>, 'value) => Js.undefined<'value>" + }, + { + "id": "Belt.MutableSet.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "Same as [get](#get) but raise when element does not exist." + ], + "signature": "let getExn: (t<'value, 'id>, 'value) => 'value" + }, + { + "id": "Belt.MutableSet.split", + "kind": "value", + "name": "split", + "docstrings": [ + "Returns a tuple `((smaller, larger), present)`, `present` is true when element exist in set.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n\n let ((smaller, larger), present) = s0->Belt.MutableSet.split(3)\n\n present /* true */\n smaller->Belt.MutableSet.toArray /* [1,2] */\n larger->Belt.MutableSet.toArray /* [4,5] */\n ```" + ], + "signature": "let split: (t<'value, 'id>, 'value) => ((t<'value, 'id>, t<'value, 'id>), bool)" + }, + { + "id": "Belt.MutableSet.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t<'a, 'b> => unit" + } + ] + }, + "belt/map": { + "id": "Belt.Map", + "name": "Map", + "docstrings": [ + "[`Belt.Map`](),\n\n The top level provides generic **immutable** map operations.\n\n It also has three specialized inner modules\n [`Belt.Map.Int`](), [`Belt.Map.String`]() and\n\n [`Belt.Map.Dict`](): This module separates data from function\n which is more verbose but slightly more efficient" + ], + "items": [ + { + "id": "Belt.Map.t", + "kind": "type", + "name": "t", + "docstrings": [ + "`'key` is the field type\n\n`'value` is the element type\n\n`'identity` the identity of the collection" + ], + "signature": "type t<'key, 'value, 'identity>" + }, + { + "id": "Belt.Map.id", + "kind": "type", + "name": "id", + "docstrings": [ + "The identity needed for making an empty map." + ], + "signature": "type id<'key, 'id> = Belt_Id.comparable<'key, 'id>" + }, + { + "id": "Belt.Map.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(~id)` creates a new map by taking in the comparator.\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n})\n\nlet m = Belt.Map.make(~id=module(IntCmp))\n\nBelt.Map.set(m, 0, \"a\")\n```" + ], + "signature": "let make: (~id: id<'k, 'id>) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [ + "`isEmpty(m)` checks whether a map m is empty.\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n})\n\nBelt.Map.isEmpty(Belt.Map.fromArray([(1, \"1\")], ~id=module(IntCmp))) == false\n```" + ], + "signature": "let isEmpty: t<'a, 'b, 'c> => bool" + }, + { + "id": "Belt.Map.has", + "kind": "value", + "name": "has", + "docstrings": [ + "`has(m, k)` checks whether `m` has the key `k`.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.has(Belt.Map.fromArray([(1, \"1\")], ~id=module(IntCmp)), 1) == true\n ```" + ], + "signature": "let has: (t<'k, 'v, 'id>, 'k) => bool" + }, + { + "id": "Belt.Map.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [], + "signature": "let cmpU: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, (. 'v, 'v) => int) => int" + }, + { + "id": "Belt.Map.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "`cmp(m0, m1, vcmp);`\n\n Total ordering of map given total ordering of value function.\n\n It will compare size first and each element following the order one by one." + ], + "signature": "let cmp: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, ('v, 'v) => int) => int" + }, + { + "id": "Belt.Map.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, (. 'v, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq(m1, m2, veq)` tests whether the maps `m1` and `m2` are equal, that is,\n contain equal keys and associate them with equal data. `veq` is the\n equality predicate used to compare the data associated with the keys." + ], + "signature": "let eq: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, ('v, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.findFirstByU", + "kind": "value", + "name": "findFirstByU", + "docstrings": [], + "signature": "let findFirstByU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => option<('k, 'v)>" + }, + { + "id": "Belt.Map.findFirstBy", + "kind": "value", + "name": "findFirstBy", + "docstrings": [ + "`findFirstBy(m, p)` uses function `f` to find the first key value pair to\n match predicate `p`.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"\")])\n\n Belt.Map.findFirstBy(s0, (k, v) => k == 4) /* (4, \"4\") */\n ```" + ], + "signature": "let findFirstBy: (t<'k, 'v, 'id>, ('k, 'v) => bool) => option<('k, 'v)>" + }, + { + "id": "Belt.Map.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'k, 'v, 'id>, (. 'k, 'v) => unit) => unit" + }, + { + "id": "Belt.Map.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(m, f)` applies `f` to all bindings in map `m`. `f` receives the\n `'k` as first argument, and the associated value as second argument. The\n bindings are passed to `f` in increasing order with respect to the ordering\n over the type of the keys.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"\")])\n\n let acc = ref(list{})\n\n Belt.Map.forEach(s0, (k, v) => acc := list{(k, v), ...acc.contents})\n\n acc.contents == list{(4, \"4\"), (3, \"3\"), (2, \"2\"), (1, \"1\")}\n ```" + ], + "signature": "let forEach: (t<'k, 'v, 'id>, ('k, 'v) => unit) => unit" + }, + { + "id": "Belt.Map.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'k, 'v, 'id>, 'acc, (. 'acc, 'k, 'v) => 'acc) => 'acc" + }, + { + "id": "Belt.Map.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce(m, a, f)` computes `(f(kN, dN) ... (f(k1, d1, a))...)`, where `k1\n ... kN` are the keys of all bindings in m (in increasing order), and `d1\n ... dN` are the associated data.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"3\")])\n\n Belt.Map.reduce(s0, list{}, (acc, k, v) => list{\n (k, v),\n ...acc,\n }) /* [(4, \"4\"), (3, \"3\"), (2, \"2\"), (1, \"1\"), 0] */\n ```" + ], + "signature": "let reduce: (t<'k, 'v, 'id>, 'acc, ('acc, 'k, 'v) => 'acc) => 'acc" + }, + { + "id": "Belt.Map.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every(m, p)` checks if all the bindings of the map satisfy the predicate\n `p`. Order unspecified" + ], + "signature": "let every: (t<'k, 'v, 'id>, ('k, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some(m, p)` checks if at least one binding of the map satisfy the\n predicate `p`. Order unspecified" + ], + "signature": "let some: (t<'k, 'v, 'id>, ('k, 'v) => bool) => bool" + }, + { + "id": "Belt.Map.size", + "kind": "value", + "name": "size", + "docstrings": [ + "`size(s)`\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.size(Belt.Map.fromArray([(2, \"2\"), (2, \"1\"), (3, \"3\")], ~id=module(IntCmp))) == 2\n ```" + ], + "signature": "let size: t<'k, 'v, 'id> => int" + }, + { + "id": "Belt.Map.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "`toArray(s)`\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.toArray(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))) == [\n (1, \"1\"),\n (2, \"2\"),\n (3, \"3\"),\n ]\n ```" + ], + "signature": "let toArray: t<'k, 'v, 'id> => array<('k, 'v)>" + }, + { + "id": "Belt.Map.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "In increasing order.\n\n See `Belt.Map.toArray`" + ], + "signature": "let toList: t<'k, 'v, 'id> => list<('k, 'v)>" + }, + { + "id": "Belt.Map.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray(kvs, ~id);`\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.toArray(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))) == [\n (1, \"1\"),\n (2, \"2\"),\n (3, \"3\"),\n ]\n ```" + ], + "signature": "let fromArray: (array<('k, 'v)>, ~id: id<'k, 'id>) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [ + "`keysToArray(s);`\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.keysToArray(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))) == [\n 1,\n 2,\n 3,\n ]\n ```" + ], + "signature": "let keysToArray: t<'k, 'v, 'id> => array<'k>" + }, + { + "id": "Belt.Map.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [ + "`valuesToArray(s);`\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.valuesToArray(\n Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp)),\n ) == [\"1\", \"2\", \"3\"]\n ```" + ], + "signature": "let valuesToArray: t<'k, 'v, 'id> => array<'v>" + }, + { + "id": "Belt.Map.minKey", + "kind": "value", + "name": "minKey", + "docstrings": [ + "`minKey(s)` returns the minimum key, None if not exist." + ], + "signature": "let minKey: t<'k, 'a, 'b> => option<'k>" + }, + { + "id": "Belt.Map.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "docstrings": [ + "See `Belt.Map.minKey`" + ], + "signature": "let minKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>" + }, + { + "id": "Belt.Map.maxKey", + "kind": "value", + "name": "maxKey", + "docstrings": [ + "`maxKey(s)` returns the maximum key, None if not exist." + ], + "signature": "let maxKey: t<'k, 'a, 'b> => option<'k>" + }, + { + "id": "Belt.Map.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "docstrings": [ + "See `Belt.Map.maxKey`" + ], + "signature": "let maxKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>" + }, + { + "id": "Belt.Map.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [ + "`minimum(s)` returns the minimum key value pair, None if not exist." + ], + "signature": "let minimum: t<'k, 'v, 'a> => option<('k, 'v)>" + }, + { + "id": "Belt.Map.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [ + "See `Belt.Map.minimum`" + ], + "signature": "let minUndefined: t<'k, 'v, 'a> => Js.undefined<('k, 'v)>" + }, + { + "id": "Belt.Map.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [ + "`maximum(s)` returns the maximum key value pair, None if not exist." + ], + "signature": "let maximum: t<'k, 'v, 'a> => option<('k, 'v)>" + }, + { + "id": "Belt.Map.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [ + "See `Belt.Map.maximum`" + ], + "signature": "let maxUndefined: t<'k, 'v, 'a> => Js.undefined<('k, 'v)>" + }, + { + "id": "Belt.Map.get", + "kind": "value", + "name": "get", + "docstrings": [ + "`get(s, k)`\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.get(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp)), 2) ==\n Some(\"2\")\n\n Belt.Map.get(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp)), 2) == None\n ```" + ], + "signature": "let get: (t<'k, 'v, 'id>, 'k) => option<'v>" + }, + { + "id": "Belt.Map.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [ + "See `Belt.Map.get`\n\n Returns `undefined` when not found" + ], + "signature": "let getUndefined: (t<'k, 'v, 'id>, 'k) => Js.undefined<'v>" + }, + { + "id": "Belt.Map.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [ + "`getWithDefault(s, k, default)`\n\n See `Belt.Map.get`\n\n Returns default when `k` is not found." + ], + "signature": "let getWithDefault: (t<'k, 'v, 'id>, 'k, 'v) => 'v" + }, + { + "id": "Belt.Map.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "`getExn(s, k)`\n\n See `Belt.Map.getExn`\n\n raise when `k` not exist" + ], + "signature": "let getExn: (t<'k, 'v, 'id>, 'k) => 'v" + }, + { + "id": "Belt.Map.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "`remove(m, x)` when `x` is not in `m`, `m` is returned reference unchanged.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))\n\n let s1 = Belt.Map.remove(s0, 1)\n\n let s2 = Belt.Map.remove(s1, 1)\n\n s1 === s2\n\n Belt.Map.keysToArray(s1) == [2, 3]\n ```" + ], + "signature": "let remove: (t<'k, 'v, 'id>, 'k) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [ + "`removeMany(s, xs)`\n\n Removing each of `xs` to `s`, note unlike `Belt.Map.remove`, the reference\n of return value might be changed even if none in `xs` exists `s`." + ], + "signature": "let removeMany: (t<'k, 'v, 'id>, array<'k>) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set(m, x, y)` returns a map containing the same bindings as `m`, with a\n new binding of `x` to `y`. If `x` was already bound in `m`, its previous\n binding disappears.\n\n ```rescript\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))\n\n let s1 = Belt.Map.set(s0, 2, \"3\")\n\n Belt.Map.valuesToArray(s1) == [\"1\", \"3\", \"3\"]\n ```" + ], + "signature": "let set: (t<'k, 'v, 'id>, 'k, 'v) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.updateU", + "kind": "value", + "name": "updateU", + "docstrings": [], + "signature": "let updateU: (t<'k, 'v, 'id>, 'k, (. option<'v>) => option<'v>) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.update", + "kind": "value", + "name": "update", + "docstrings": [ + "`update(m, x, f)` returns a map containing the same bindings as `m`, except\n for the binding of `x`. Depending on the value of `y` where `y` is\n `f(get(m, x))`, the binding of `x` is added, removed or updated. If `y` is\n `None`, the binding is removed if it exists; otherwise, if `y` is `Some(z)`\n then `x` is associated to `z` in the resulting map." + ], + "signature": "let update: (t<'k, 'v, 'id>, 'k, option<'v> => option<'v>) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [ + "`mergeMany(s, xs)`\n\n Adding each of `xs` to `s`, note unlike `add`, the reference of return\n value might be changed even if all values in `xs` exist `s`." + ], + "signature": "let mergeMany: (t<'k, 'v, 'id>, array<('k, 'v)>) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.mergeU", + "kind": "value", + "name": "mergeU", + "docstrings": [], + "signature": "let mergeU: (\\n t<'k, 'v, 'id>,\\n t<'k, 'v2, 'id>,\\n (. 'k, option<'v>, option<'v2>) => option<'v3>,\\n) => t<'k, 'v3, 'id>" + }, + { + "id": "Belt.Map.merge", + "kind": "value", + "name": "merge", + "docstrings": [ + "`merge(m1, m2, f)` computes a map whose keys is a subset of keys of `m1`\n and of `m2`. The presence of each such binding, and the corresponding\n value, is determined with the function `f`." + ], + "signature": "let merge: (\\n t<'k, 'v, 'id>,\\n t<'k, 'v2, 'id>,\\n ('k, option<'v>, option<'v2>) => option<'v3>,\\n) => t<'k, 'v3, 'id>" + }, + { + "id": "Belt.Map.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "`keep(m, p)` returns the map with all the bindings in m that satisfy\n predicate `p`." + ], + "signature": "let keep: (t<'k, 'v, 'id>, ('k, 'v) => bool) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => (t<'k, 'v, 'id>, t<'k, 'v, 'id>)" + }, + { + "id": "Belt.Map.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition(m, p)` returns a pair of maps `(m1, m2)`, where `m1` contains\n all the bindings of `s` that satisfy the predicate `p`, and `m2` is the map\n with all the bindings of `s` that do not satisfy `p`." + ], + "signature": "let partition: (t<'k, 'v, 'id>, ('k, 'v) => bool) => (t<'k, 'v, 'id>, t<'k, 'v, 'id>)" + }, + { + "id": "Belt.Map.split", + "kind": "value", + "name": "split", + "docstrings": [ + "`split(x, m)` returns a tuple `(l, r)`, data, where `l` is the map with all\n the bindings of `m` whose 'k is strictly less than `x`; `r` is the map with\n all the bindings of m whose 'k is strictly greater than `x`; `data` is\n `None` if `m` contains no binding for `x`, or `Some(v)` if `m` binds `v` to\n `x`." + ], + "signature": "let split: (t<'k, 'v, 'id>, 'k) => ((t<'k, 'v, 'id>, t<'k, 'v, 'id>), option<'v>)" + }, + { + "id": "Belt.Map.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'k, 'v, 'id>, (. 'v) => 'v2) => t<'k, 'v2, 'id>" + }, + { + "id": "Belt.Map.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(m, f) returns a map with same domain as`m`, where the associated\n value`a`of all bindings of`m`has been replaced by the result of the\n application of`f`to`a`. The bindings are passed to`f` in increasing order\n with respect to the ordering over the type of the keys." + ], + "signature": "let map: (t<'k, 'v, 'id>, 'v => 'v2) => t<'k, 'v2, 'id>" + }, + { + "id": "Belt.Map.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "docstrings": [], + "signature": "let mapWithKeyU: (t<'k, 'v, 'id>, (. 'k, 'v) => 'v2) => t<'k, 'v2, 'id>" + }, + { + "id": "Belt.Map.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "docstrings": [ + "`mapWithKey(m, f)`\n\n The same as `Belt.Map.map` except that `f` is supplied with one more\n argument: the key." + ], + "signature": "let mapWithKey: (t<'k, 'v, 'id>, ('k, 'v) => 'v2) => t<'k, 'v2, 'id>" + }, + { + "id": "Belt.Map.getData", + "kind": "value", + "name": "getData", + "docstrings": [ + "`getData(s0)`\n\n Advanced usage only\n\n Returns the raw data (detached from comparator), but its type is still\n manifested, so that user can pass identity directly without boxing." + ], + "signature": "let getData: t<'k, 'v, 'id> => Belt_MapDict.t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.getId", + "kind": "value", + "name": "getId", + "docstrings": [ + "Advanced usage only\n\n Returns the identity of s0." + ], + "signature": "let getId: t<'k, 'v, 'id> => id<'k, 'id>" + }, + { + "id": "Belt.Map.packIdData", + "kind": "value", + "name": "packIdData", + "docstrings": [ + "`packIdData(~id, ~data)`\n\n Advanced usage only\n\n Returns the packed collection." + ], + "signature": "let packIdData: (~id: id<'k, 'id>, ~data: Belt_MapDict.t<'k, 'v, 'id>) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t<'a, 'b, 'c> => unit" + } + ] + }, + "belt/set": { + "id": "Belt.Set", + "name": "Set", + "docstrings": [ + "[`Belt.Set`]()\n\n The top level provides generic **immutable** set operations.\n\n It also has three specialized inner modules\n [`Belt.Set.Int`](), [`Belt.Set.String`]() and\n\n [`Belt.Set.Dict`](): This module separates data from function\n which is more verbose but slightly more efficient" + ], + "items": [ + { + "id": "Belt.Set.t", + "kind": "type", + "name": "t", + "docstrings": [ + "`'value` is the element type\n\n `'identity` the identity of the collection" + ], + "signature": "type t<'value, 'identity>" + }, + { + "id": "Belt.Set.id", + "kind": "type", + "name": "id", + "docstrings": [ + "The identity needed for making a set from scratch" + ], + "signature": "type id<'value, 'id> = Belt_Id.comparable<'value, 'id>" + }, + { + "id": "Belt.Set.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new set by taking in the comparator\n\n ```rescript\n let set = Belt.Set.make(~id=module(IntCmp))\n ```" + ], + "signature": "let make: (~id: id<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "Creates new set from array of elements.\n\n ```rescript\n let s0 = Belt.Set.fromArray([1, 3, 2, 4], ~id=module(IntCmp))\n\n s0->Belt.Set.toArray /* [1, 2, 3, 4] */\n ```" + ], + "signature": "let fromArray: (array<'value>, ~id: id<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "docstrings": [ + "The same as [fromArray][#fromarray] except it is after assuming the input array is already sorted." + ], + "signature": "let fromSortedArrayUnsafe: (array<'value>, ~id: id<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [ + "Checks if set is empty.\n\n ```rescript\n let empty = Belt.Set.fromArray([], ~id=module(IntCmp))\n let notEmpty = Belt.Set.fromArray([1],~id=module(IntCmp))\n\n Belt.Set.isEmpty(empty) /* true */\n Belt.Set.isEmpty(notEmpty) /* false */\n ```" + ], + "signature": "let isEmpty: t<'a, 'b> => bool" + }, + { + "id": "Belt.Set.has", + "kind": "value", + "name": "has", + "docstrings": [ + "Checks if element exists in set.\n\n ```rescript\n let set = Belt.Set.fromArray([1, 4, 2, 5], ~id=module(IntCmp))\n\n set->Belt.Set.has(3) /* false */\n set->Belt.Set.has(1) /* true */\n ```" + ], + "signature": "let has: (t<'value, 'id>, 'value) => bool" + }, + { + "id": "Belt.Set.add", + "kind": "value", + "name": "add", + "docstrings": [ + "Adds element to set. If element existed in set, value is unchanged.\n\n ```rescript\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = s0->Belt.Set.add(1)\n let s2 = s1->Belt.Set.add(2)\n let s3 = s2->Belt.Set.add(2)\n s0->Belt.Set.toArray /* [] */\n s1->Belt.Set.toArray /* [1] */\n s2->Belt.Set.toArray /* [1, 2] */\n s3->Belt.Set.toArray /* [1,2 ] */\n s2 == s3 /* true */\n ```" + ], + "signature": "let add: (t<'value, 'id>, 'value) => t<'value, 'id>" + }, + { + "id": "Belt.Set.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [ + "Adds each element of array to set. Unlike [add](#add), the reference of return value might be changed even if all values in array already exist in set\n\n ```rescript\n let set = Belt.Set.make(~id=module(IntCmp))\n\n let newSet = set->Belt.Set.mergeMany([5, 4, 3, 2, 1])\n newSet->Belt.Set.toArray /* [1, 2, 3, 4, 5] */\n ```" + ], + "signature": "let mergeMany: (t<'value, 'id>, array<'value>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.remove", + "kind": "value", + "name": "remove", + "docstrings": [ + "Removes element from set. If element did not exist in set, value is unchanged.\n\n ```rescript\n let s0 = Belt.Set.fromArray([2,3,1,4,5], ~id=module(IntCmp))\n let s1 = s0->Belt.Set.remove(1)\n let s2 = s1->Belt.Set.remove(3)\n let s3 = s2->Belt.Set.remove(3)\n\n s1->Belt.Set.toArray /* [2,3,4,5] */\n s2->Belt.Set.toArray /* [2,4,5] */\n s2 == s3 /* true */\n ```" + ], + "signature": "let remove: (t<'value, 'id>, 'value) => t<'value, 'id>" + }, + { + "id": "Belt.Set.removeMany", + "kind": "value", + "name": "removeMany", + "docstrings": [ + "Removes each element of array from set. Unlike [remove](#remove), the reference of return value might be changed even if none of values in array existed in set.\n\n ```rescript\n let set = Belt.Set.fromArray([1, 2, 3, 4],~id=module(IntCmp))\n\n let newSet = set->Belt.Set.removeMany([5, 4, 3, 2, 1])\n newSet->Belt.Set.toArray /* [] */\n ```" + ], + "signature": "let removeMany: (t<'value, 'id>, array<'value>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.union", + "kind": "value", + "name": "union", + "docstrings": [ + "Returns union of two sets.\n\n ```rescript\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\n let union = Belt.Set.union(s0, s1)\n union->Belt.Set.toArray /* [1,2,3,4,5,6] */\n ```" + ], + "signature": "let union: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [ + "Returns intersection of two sets.\n\n ```rescript\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\n let intersect = Belt.Set.intersect(s0, s1)\n intersect->Belt.Set.toArray /* [2,3,5] */\n ```" + ], + "signature": "let intersect: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.diff", + "kind": "value", + "name": "diff", + "docstrings": [ + "Returns elements from first set, not existing in second set.\n\n ```rescript\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\n Belt.Set.toArray(Belt.Set.diff(s0, s1)) /* [6] */\n Belt.Set.toArray(Belt.Set.diff(s1,s0)) /* [1,4] */\n ```" + ], + "signature": "let diff: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>" + }, + { + "id": "Belt.Set.subset", + "kind": "value", + "name": "subset", + "docstrings": [ + "Checks if second set is subset of first set.\n\n ```rescript\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\n let s2 = Belt.Set.intersect(s0, s1)\n Belt.Set.subset(s2, s0) /* true */\n Belt.Set.subset(s2, s1) /* true */\n Belt.Set.subset(s1, s0) /* false */\n ```" + ], + "signature": "let subset: (t<'value, 'id>, t<'value, 'id>) => bool" + }, + { + "id": "Belt.Set.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function for doing sets of sets. It compares size first and then iterates over each element following the order of elements." + ], + "signature": "let cmp: (t<'value, 'id>, t<'value, 'id>) => int" + }, + { + "id": "Belt.Set.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "Checks if two sets are equal.\n\n ```rescript\n let s0 = Belt.Set.fromArray([5,2,3], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,5], ~id=module(IntCmp))\n\n Belt.Set.eq(s0, s1) /* true */\n ```" + ], + "signature": "let eq: (t<'value, 'id>, t<'value, 'id>) => bool" + }, + { + "id": "Belt.Set.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [ + "Same as [forEach](##forEach) but takes uncurried functon." + ], + "signature": "let forEachU: (t<'value, 'id>, (. 'value) => unit) => unit" + }, + { + "id": "Belt.Set.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "Applies function `f` in turn to all elements of set in increasing order.\n\n ```rescript\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let acc = ref(list{})\n s0->Belt.Set.forEach(x => {\n acc := Belt.List.add(acc.contents, x)\n })\n acc /* [6,5,3,2] */\n ```" + ], + "signature": "let forEach: (t<'value, 'id>, 'value => unit) => unit" + }, + { + "id": "Belt.Set.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'value, 'id>, 'a, (. 'a, 'value) => 'a) => 'a" + }, + { + "id": "Belt.Set.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "Applies function `f` to each element of set in increasing order. Function `f` has two parameters: the item from the set and an “accumulator”, which starts with a value of `initialValue`. `reduce` returns the final value of the accumulator.\n\n ```rescript\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n s0->Belt.Set.reduce(list{}, (acc, element) =>\n acc->Belt.List.add(element)\n ) /* [6,5,3,2] */\n ```" + ], + "signature": "let reduce: (t<'value, 'id>, 'a, ('a, 'value) => 'a) => 'a" + }, + { + "id": "Belt.Set.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'value, 'id>, (. 'value) => bool) => bool" + }, + { + "id": "Belt.Set.every", + "kind": "value", + "name": "every", + "docstrings": [ + "Checks if all elements of the set satisfy the predicate. Order unspecified.\n\n ```rescript\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.Set.fromArray([2,4,6,8], ~id=module(IntCmp))\n s0->Belt.Set.every(isEven) /* true */\n ```" + ], + "signature": "let every: (t<'value, 'id>, 'value => bool) => bool" + }, + { + "id": "Belt.Set.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'value, 'id>, (. 'value) => bool) => bool" + }, + { + "id": "Belt.Set.some", + "kind": "value", + "name": "some", + "docstrings": [ + "Checks if at least one element of the set satisfies the predicate.\n\n ```rescript\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.Set.fromArray([1,2,4,6,8], ~id=module(IntCmp))\n s0->Belt.Set.some(isOdd) /* true */\n ```" + ], + "signature": "let some: (t<'value, 'id>, 'value => bool) => bool" + }, + { + "id": "Belt.Set.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t<'value, 'id>, (. 'value) => bool) => t<'value, 'id>" + }, + { + "id": "Belt.Set.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "Returns the set of all elements that satisfy the predicate.\n\n ```rescript\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n let s1 = s0->Belt.Set.keep(isEven)\n\n s1->Belt.Set.toArray /* [2,4] */\n ```" + ], + "signature": "let keep: (t<'value, 'id>, 'value => bool) => t<'value, 'id>" + }, + { + "id": "Belt.Set.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t<'value, 'id>, (. 'value) => bool) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.Set.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "Returns a pair of sets, where first is the set of all the elements of set that satisfy the predicate, and second is the set of all the elements of set that do not satisfy the predicate.\n\n ```rescript\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n let (s1, s2) = s0->Belt.Set.partition(isOdd)\n\n s1->Belt.Set.toArray /* [1,3,5] */\n s2->Belt.Set.toArray /* [2,4] */\n ```" + ], + "signature": "let partition: (t<'value, 'id>, 'value => bool) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.Set.size", + "kind": "value", + "name": "size", + "docstrings": [ + "Returns size of the set.\n\n ```rescript\n let s0 = Belt.Set.fromArray([1,2,3,4], ~id=module(IntCmp))\n\n s0->Belt.Set.size /* 4 */\n ```" + ], + "signature": "let size: t<'value, 'id> => int" + }, + { + "id": "Belt.Set.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "Returns array of ordered set elements.\n\n ```rescript\n let s0 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.toArray /* [1,2,3,5] */\n ```" + ], + "signature": "let toArray: t<'value, 'id> => array<'value>" + }, + { + "id": "Belt.Set.toList", + "kind": "value", + "name": "toList", + "docstrings": [ + "Returns list of ordered set elements.\n\n ```rescript\n let s0 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.toList /* [1,2,3,5] */\n ```" + ], + "signature": "let toList: t<'value, 'id> => list<'value>" + }, + { + "id": "Belt.Set.minimum", + "kind": "value", + "name": "minimum", + "docstrings": [ + "Returns minimum value of the collection. `None` if collection is empty.\n\n ```rescript\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.minimum /* None */\n s1->Belt.Set.minimum /* Some(1) */\n ```" + ], + "signature": "let minimum: t<'value, 'id> => option<'value>" + }, + { + "id": "Belt.Set.minUndefined", + "kind": "value", + "name": "minUndefined", + "docstrings": [ + "Returns minimum value of the collection. `undefined` if collection is empty.\n\n ```rescript\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.minUndefined /* undefined */\n s1->Belt.Set.minUndefined /* 1 */\n ```" + ], + "signature": "let minUndefined: t<'value, 'id> => Js.undefined<'value>" + }, + { + "id": "Belt.Set.maximum", + "kind": "value", + "name": "maximum", + "docstrings": [ + "Returns maximum value of the collection. `None` if collection is empty.\n\n ```rescript\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.maximum /* None */\n s1->Belt.Set.maximum /* Some(5) */\n ```" + ], + "signature": "let maximum: t<'value, 'id> => option<'value>" + }, + { + "id": "Belt.Set.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "docstrings": [ + "Returns maximum value of the collection. `undefined` if collection is empty.\n\n ```rescript\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.maxUndefined /* undefined */\n s1->Belt.Set.maxUndefined /* 5 */\n ```" + ], + "signature": "let maxUndefined: t<'value, 'id> => Js.undefined<'value>" + }, + { + "id": "Belt.Set.get", + "kind": "value", + "name": "get", + "docstrings": [ + "Returns the reference of the value which is equivalent to value using the comparator specifiecd by this collection. Returns `None` if element does not exist.\n\n ```rescript\n let s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n\n s0->Belt.Set.get(3) /* Some(3) */\n s0->Belt.Set.get(20) /* None */\n ```" + ], + "signature": "let get: (t<'value, 'id>, 'value) => option<'value>" + }, + { + "id": "Belt.Set.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [ + "Same as [get](#get) but returns `undefined` when element does not exist." + ], + "signature": "let getUndefined: (t<'value, 'id>, 'value) => Js.undefined<'value>" + }, + { + "id": "Belt.Set.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "Same as [get](#get) but raise when element does not exist." + ], + "signature": "let getExn: (t<'value, 'id>, 'value) => 'value" + }, + { + "id": "Belt.Set.split", + "kind": "value", + "name": "split", + "docstrings": [ + "Returns a tuple `((smaller, larger), present)`, `present` is true when element exist in set.\n\n ```rescript\n let s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n\n let ((smaller, larger), present) = s0->Belt.Set.split(3)\n\n present /* true */\n smaller->Belt.Set.toArray /* [1,2] */\n larger->Belt.Set.toArray /* [4,5] */\n\n ```" + ], + "signature": "let split: (t<'value, 'id>, 'value) => ((t<'value, 'id>, t<'value, 'id>), bool)" + }, + { + "id": "Belt.Set.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "docstrings": [ + "**raise** when invariant is not held" + ], + "signature": "let checkInvariantInternal: t<'a, 'b> => unit" + }, + { + "id": "Belt.Set.getData", + "kind": "value", + "name": "getData", + "docstrings": [ + "**Advanced usage only**\n\n Returns the raw data (detached from comparator), but its type is still manifested, so that user can pass identity directly without boxing." + ], + "signature": "let getData: t<'value, 'id> => Belt_SetDict.t<'value, 'id>" + }, + { + "id": "Belt.Set.getId", + "kind": "value", + "name": "getId", + "docstrings": [ + "**Advanced usage only**\n\n Returns the identity of set." + ], + "signature": "let getId: t<'value, 'id> => id<'value, 'id>" + }, + { + "id": "Belt.Set.packIdData", + "kind": "value", + "name": "packIdData", + "docstrings": [ + "**Advanced usage only**\n\n Returns the packed collection." + ], + "signature": "let packIdData: (~id: id<'value, 'id>, ~data: Belt_SetDict.t<'value, 'id>) => t<'value, 'id>" + } + ] + }, + "belt/range": { + "id": "Belt.Range", + "name": "Range", + "docstrings": [ + "[`Belt.Range`]()\n\n Utilities for a closed range `(from, start)`" + ], + "items": [ + { + "id": "Belt.Range.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (int, int, (. int) => unit) => unit" + }, + { + "id": "Belt.Range.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(start, finish, action)`\n\n equivalent to `Belt.Array.(forEach(range(start, finish), action))`\n\n ```rescript\n Belt.Range.forEach(0, 4, (i) => Js.log(i))\n\n /**\n * prints:\n * 0\n * 1\n * 2\n * 3\n * 4\n */\n ```" + ], + "signature": "let forEach: (int, int, int => unit) => unit" + }, + { + "id": "Belt.Range.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (int, int, (. int) => bool) => bool" + }, + { + "id": "Belt.Range.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every(start, finish, p)`\n\n equivalent to `Belt.Array.(every(range(start, finish), p))`\n\n ```rescript\n Belt.Range.every(0, 4, (i) => i < 5) /* true */\n\n Belt.Range.every(0, 4, (i) => i < 4) /* false */\n ```" + ], + "signature": "let every: (int, int, int => bool) => bool" + }, + { + "id": "Belt.Range.everyByU", + "kind": "value", + "name": "everyByU", + "docstrings": [], + "signature": "let everyByU: (int, int, ~step: int, (. int) => bool) => bool" + }, + { + "id": "Belt.Range.everyBy", + "kind": "value", + "name": "everyBy", + "docstrings": [ + "`everyBy(start, finish, ~step, p)`\n\n See `Belt_Array.rangeBy`\n\n equivalent to `Belt.Array.(every(rangeBy(start, finish, ~step), p))`\n\n ```rescript\n Belt.Range.everyBy(0, 4, ~step=1, (i) => mod(i, 2) === 0) /* false */\n\n Belt.Range.everyBy(0, 4, ~step=2, (i) => mod(i, 2) === 0) /* true */\n ```" + ], + "signature": "let everyBy: (int, int, ~step: int, int => bool) => bool" + }, + { + "id": "Belt.Range.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (int, int, (. int) => bool) => bool" + }, + { + "id": "Belt.Range.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some(start, finish, p)`\n\n equivalent to `Belt.Array.(some(range(start, finish), p))`\n\n ```rescript\n Belt.Range.some(0, 4, (i) => i > 5) /* false */\n\n Belt.Range.some(0, 4, (i) => i > 2) /* true */\n ```" + ], + "signature": "let some: (int, int, int => bool) => bool" + }, + { + "id": "Belt.Range.someByU", + "kind": "value", + "name": "someByU", + "docstrings": [], + "signature": "let someByU: (int, int, ~step: int, (. int) => bool) => bool" + }, + { + "id": "Belt.Range.someBy", + "kind": "value", + "name": "someBy", + "docstrings": [ + "`someBy(start, finish, ~step, p)`\n\n See `Belt_Array.rangeBy`\n\n equivalent to `Belt.Array.(some(rangeBy(start, finish, ~step), p))`\n\n ```rescript\n Belt.Range.someBy(1, 5, ~step=2, (i) => mod(i, 2) === 0) /* false */\n Belt.Range.someBy(0, 4, ~step=2, (i) => mod(i, 2) === 0) /* true */\n ```" + ], + "signature": "let someBy: (int, int, ~step: int, int => bool) => bool" + } + ] + }, + "belt/list": { + "id": "Belt.List", + "name": "List", + "docstrings": [ + "[`Belt.List`]()\n\n Utilities for List data type" + ], + "items": [ + { + "id": "Belt.List.t", + "kind": "type", + "name": "t", + "docstrings": [ + "`'a t` is compatible with built-in `list` type" + ], + "signature": "type t<'a> = list<'a>" + }, + { + "id": "Belt.List.length", + "kind": "value", + "name": "length", + "docstrings": [ + "Returns the length of a list.\n\n ```rescript\n Belt.List.length(list{1, 2, 3}) // 3\n ```" + ], + "signature": "let length: t<'a> => int" + }, + { + "id": "Belt.List.size", + "kind": "value", + "name": "size", + "docstrings": [ + "**See** [`length`](##length)" + ], + "signature": "let size: t<'a> => int" + }, + { + "id": "Belt.List.head", + "kind": "value", + "name": "head", + "docstrings": [ + "Returns `Some(value)` where `value` is the first element in the list, or\n `None` if `someList` is an empty list.\n\n ```rescript\n Belt.List.head(list{}) // None\n Belt.List.head(list{1, 2, 3}) // Some(1)\n ```" + ], + "signature": "let head: t<'a> => option<'a>" + }, + { + "id": "Belt.List.headExn", + "kind": "value", + "name": "headExn", + "docstrings": [ + "Same as [head](#head), but raises an exception if `someList` is empty. Use\n with care.\n\n ```rescript\n Belt.List.headExn(list{1, 2, 3}) // 1\n\n Belt.List.headExn(list{}) // Raises an Error\n ```" + ], + "signature": "let headExn: t<'a> => 'a" + }, + { + "id": "Belt.List.tail", + "kind": "value", + "name": "tail", + "docstrings": [ + "Returns `None` if `someList` is empty, otherwise it returns `Some(tail)`\n where `tail` is everything except the first element of `someList`.\n\n ```rescript\n Belt.List.tail(list{1, 2, 3}) // Some(list{2, 3})\n\n Belt.List.tail(list{}) // None\n ```" + ], + "signature": "let tail: t<'a> => option>" + }, + { + "id": "Belt.List.tailExn", + "kind": "value", + "name": "tailExn", + "docstrings": [ + "Same as [tail](#tail), but raises an exception if `someList` is empty. Use\n with care.\n\n ```rescript\n Belt.List.tailExn(list{1, 2, 3}) // list{2, 3}\n\n Belt.List.tailExn(list{}) // Raises an Error\n ```" + ], + "signature": "let tailExn: t<'a> => t<'a>" + }, + { + "id": "Belt.List.add", + "kind": "value", + "name": "add", + "docstrings": [ + "Adds `value` to the beginning of `someList`.\n\n ```rescript\n Belt.List.add(list{2, 3}, 1) // list{1, 2, 3}\n\n Belt.List.add(list{\"World\", \"!\"}, \"Hello\") // list{\"Hello\", \"World\", \"!\"}\n ```" + ], + "signature": "let add: (t<'a>, 'a) => t<'a>" + }, + { + "id": "Belt.List.get", + "kind": "value", + "name": "get", + "docstrings": [ + "Return the nth element in `someList`, or `None` if `index` is larger than the\n length.\n\n ```rescript\n let abc = list{\"A\", \"B\", \"C\"}\n\n abc->Belt.List.get(1) // Some(\"B\")\n\n abc->Belt.List.get(4) // None\n ```" + ], + "signature": "let get: (t<'a>, int) => option<'a>" + }, + { + "id": "Belt.List.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "Same as [get](#get), but raises an exception if `index` is larger than the\n length. Use with care.\n\n ```rescript\n let abc = list{\"A\", \"B\", \"C\"}\n\n abc->Belt.List.getExn(1) // \"B\"\n\n abc->Belt.List.getExn(4) // Raises an Error\n ```" + ], + "signature": "let getExn: (t<'a>, int) => 'a" + }, + { + "id": "Belt.List.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Returns a list of length `numItems` with each element filled with value `v`. Returns an empty list if `numItems` is negative.\n\n ```rescript\n Belt.List.make(3, 1) // list{1, 1, 1}\n ```" + ], + "signature": "let make: (int, 'a) => t<'a>" + }, + { + "id": "Belt.List.makeByU", + "kind": "value", + "name": "makeByU", + "docstrings": [ + "Uncurried version of [makeBy](#makeBy)" + ], + "signature": "let makeByU: (int, (. int) => 'a) => t<'a>" + }, + { + "id": "Belt.List.makeBy", + "kind": "value", + "name": "makeBy", + "docstrings": [ + "Return a list of length `numItems` with element `i` initialized with `f(i)`.\nReturns an empty list if `numItems` is negative.\n\n```rescript\nBelt.List.makeBy(5, i => i) // list{0, 1, 2, 3, 4}\n\nBelt.List.makeBy(5, i => i * i) // list{0, 1, 4, 9, 16}\n```" + ], + "signature": "let makeBy: (int, int => 'a) => t<'a>" + }, + { + "id": "Belt.List.shuffle", + "kind": "value", + "name": "shuffle", + "docstrings": [ + "Returns a new list in random order.\n\n ```rescript\n Belt.List.shuffle(list{1, 2, 3}) // list{2, 1, 3}\n ```" + ], + "signature": "let shuffle: t<'a> => t<'a>" + }, + { + "id": "Belt.List.drop", + "kind": "value", + "name": "drop", + "docstrings": [ + "Return a new list, dropping the first `n` elements. Returns `None` if `someList` has fewer than `n` elements.\n\n ```rescript\n list{1, 2, 3}->Belt.List.drop(2) // Some(list{3})\n\n list{1, 2, 3}->Belt.List.drop(3) // Some(list{})\n\n list{1, 2, 3}->Belt.List.drop(4) // None\n ```" + ], + "signature": "let drop: (t<'a>, int) => option>" + }, + { + "id": "Belt.List.take", + "kind": "value", + "name": "take", + "docstrings": [ + "Returns a list with the first `n` elements from `someList`, or `None` if `someList` has fewer than `n` elements.\n\n```rescript\nlist{1, 2, 3}->Belt.List.take(1) // Some(list{1})\n\nlist{1, 2, 3}->Belt.List.take(2) // Some(list{1, 2})\n\nlist{1, 2, 3}->Belt.List.take(4) // None\n```" + ], + "signature": "let take: (t<'a>, int) => option>" + }, + { + "id": "Belt.List.splitAt", + "kind": "value", + "name": "splitAt", + "docstrings": [ + "Split the list `someList` at `index`. Returns `None` when the length of `someList` is less than `index`.\n\n ```rescript\n list{\"Hello\", \"World\"}->Belt.List.splitAt(1) // Some((list{\"Hello\"}, list{\"World\"}))\n\n list{0, 1, 2, 3, 4}->Belt.List.splitAt(2) // Some((list{0, 1}, list{2, 3, 4}))\n ```" + ], + "signature": "let splitAt: (t<'a>, int) => option<(list<'a>, list<'a>)>" + }, + { + "id": "Belt.List.concat", + "kind": "value", + "name": "concat", + "docstrings": [ + "Returns the list obtained by adding `secondList` after `firstList`.\n\n ```rescript\n Belt.List.concat(list{1, 2, 3}, list{4, 5}) // list{1, 2, 3, 4, 5}\n ```" + ], + "signature": "let concat: (t<'a>, t<'a>) => t<'a>" + }, + { + "id": "Belt.List.concatMany", + "kind": "value", + "name": "concatMany", + "docstrings": [ + "Returns the list obtained by concatenating all the lists in array `a`, in\n order.\n\n ```rescript\n Belt.List.concatMany([list{1, 2, 3}, list{}, list{3}]) // list{1, 2, 3, 3}\n ```" + ], + "signature": "let concatMany: array> => t<'a>" + }, + { + "id": "Belt.List.reverseConcat", + "kind": "value", + "name": "reverseConcat", + "docstrings": [ + "Equivalent to writing: `concat(reverse(firstList, secondList)`\n\n ```rescript\n Belt.List.reverseConcat(list{1, 2}, list{3, 4}) // list{2, 1, 3, 4}\n ```" + ], + "signature": "let reverseConcat: (t<'a>, t<'a>) => t<'a>" + }, + { + "id": "Belt.List.flatten", + "kind": "value", + "name": "flatten", + "docstrings": [ + "Return the list obtained by concatenating all the lists in list `ls`, in order.\n\n ```rescript\n Belt.List.flatten(list{list{1, 2, 3}, list{}, list{3}}) // list{1, 2, 3, 3}\n ```" + ], + "signature": "let flatten: t> => t<'a>" + }, + { + "id": "Belt.List.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [ + "Uncurried version of [map](#map)." + ], + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => t<'b>" + }, + { + "id": "Belt.List.map", + "kind": "value", + "name": "map", + "docstrings": [ + "Returns a new list with `f` applied to each element of `someList`.\n\n ```rescript\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```" + ], + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Belt.List.zip", + "kind": "value", + "name": "zip", + "docstrings": [ + "Returns a list of pairs from the two lists with the length of the shorter list.\n\n ```rescript\n Belt.List.zip(list{1, 2}, list{3, 4, 5}) // list{(1, 3), (2, 4)}\n ```" + ], + "signature": "let zip: (t<'a>, t<'b>) => t<('a, 'b)>" + }, + { + "id": "Belt.List.zipByU", + "kind": "value", + "name": "zipByU", + "docstrings": [ + "Uncurried version of [zipBy](#zipBy)." + ], + "signature": "let zipByU: (t<'a>, t<'b>, (. 'a, 'b) => 'c) => t<'c>" + }, + { + "id": "Belt.List.zipBy", + "kind": "value", + "name": "zipBy", + "docstrings": [ + "**See:** [zip](#zip)\n\n ```rescript\n Belt.List.zipBy(list{1, 2, 3}, list{4, 5}, (a, b) => 2 * a + b) // list{6, 9}\n ```" + ], + "signature": "let zipBy: (t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>" + }, + { + "id": "Belt.List.mapWithIndexU", + "kind": "value", + "name": "mapWithIndexU", + "docstrings": [ + "Uncurried version of [mapWithIndex](#mapWithIndex)." + ], + "signature": "let mapWithIndexU: (t<'a>, (. int, 'a) => 'b) => t<'b>" + }, + { + "id": "Belt.List.mapWithIndex", + "kind": "value", + "name": "mapWithIndex", + "docstrings": [ + "Applies `f` to each element of `someList`.\n Function `f` takes two arguments: the index starting from 0 and the element from `someList`, in that order.\n\n ```rescript\n list{1, 2, 3}->Belt.List.mapWithIndex((index, x) => index + x) // list{1, 3, 5}\n ```" + ], + "signature": "let mapWithIndex: (t<'a>, (int, 'a) => 'b) => t<'b>" + }, + { + "id": "Belt.List.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "Converts the given array to a list.\n\n ```rescript\n Belt.List.fromArray([1, 2, 3]) // list{1, 2, 3}\n ```" + ], + "signature": "let fromArray: array<'a> => t<'a>" + }, + { + "id": "Belt.List.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "Converts the given list to an array.\n\n ```rescript\n Belt.List.toArray(list{1, 2, 3}) // [1, 2, 3]\n ```" + ], + "signature": "let toArray: t<'a> => array<'a>" + }, + { + "id": "Belt.List.reverse", + "kind": "value", + "name": "reverse", + "docstrings": [ + "Returns a new list whose elements are those of `someList` in reversed order.\n\n ```rescript\n Belt.List.reverse(list{1, 2, 3}) /* list{3, 2, 1} */\n ```" + ], + "signature": "let reverse: t<'a> => t<'a>" + }, + { + "id": "Belt.List.mapReverseU", + "kind": "value", + "name": "mapReverseU", + "docstrings": [ + "Uncurried version of [mapReverse](#mapReverse)." + ], + "signature": "let mapReverseU: (t<'a>, (. 'a) => 'b) => t<'b>" + }, + { + "id": "Belt.List.mapReverse", + "kind": "value", + "name": "mapReverse", + "docstrings": [ + "Equivalent to:\n\n ```res\n map(someList, f)->reverse\n ```\n\n ```rescript\n list{3, 4, 5}->Belt.List.mapReverse(x => x * x) /* list{25, 16, 9} */\n ```" + ], + "signature": "let mapReverse: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Belt.List.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [ + "Uncurried version of [forEach](#forEach)." + ], + "signature": "let forEachU: (t<'a>, (. 'a) => 'b) => unit" + }, + { + "id": "Belt.List.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "Call `f` on each element of `someList` from the beginning to end.\n `f` returns `unit`, so no new array is created. Use `forEach` when you are primarily concerned with repetitively creating side effects.\n\n ```rescript\n Belt.List.forEach(list{\"a\", \"b\", \"c\"}, x => Js.log(\"Item: \" ++ x))\n /*\n prints:\n Item: a\n Item: b\n Item: c\n */\n ```" + ], + "signature": "let forEach: (t<'a>, 'a => 'b) => unit" + }, + { + "id": "Belt.List.forEachWithIndexU", + "kind": "value", + "name": "forEachWithIndexU", + "docstrings": [ + "Uncurried version of [forEachWithIndex](#forEachWithIndex)." + ], + "signature": "let forEachWithIndexU: (t<'a>, (. int, 'a) => 'b) => unit" + }, + { + "id": "Belt.List.forEachWithIndex", + "kind": "value", + "name": "forEachWithIndex", + "docstrings": [ + "Call `f` on each element of `someList` from beginning to end.\n Function `f` takes two arguments: the index starting from 0 and the element from `someList`. `f` returns `unit`.\n\n ```rescript\n Belt.List.forEachWithIndex(list{\"a\", \"b\", \"c\"}, (index, x) => {\n Js.log(\"Item \" ++ Belt.Int.toString(index) ++ \" is \" ++ x)\n })\n /*\n prints:\n Item 0 is a\n Item 1 is b\n Item 2 is cc\n */\n ```" + ], + "signature": "let forEachWithIndex: (t<'a>, (int, 'a) => 'b) => unit" + }, + { + "id": "Belt.List.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [ + "Uncurried version of [reduce](#reduce)." + ], + "signature": "let reduceU: (t<'a>, 'b, (. 'b, 'a) => 'b) => 'b" + }, + { + "id": "Belt.List.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "Applies `f` to each element of `someList` from beginning to end. Function `f` has two parameters: the item from the list and an “accumulator”, which starts with a value of `initialValue`. reduce returns the final value of the accumulator.\n\n ```rescript\n list{1, 2, 3, 4}->Belt.List.reduce(0, (a, b) => a + b) /* 10 */\n\n /* same as */\n\n list{1, 2, 3, 4}->Belt.List.reduce(0, (acc, item) => acc + item) /* 10 */\n ```" + ], + "signature": "let reduce: (t<'a>, 'b, ('b, 'a) => 'b) => 'b" + }, + { + "id": "Belt.List.reduceWithIndexU", + "kind": "value", + "name": "reduceWithIndexU", + "docstrings": [ + "Uncurried version of [reduceWithIndex](#reduceWithIndex)." + ], + "signature": "let reduceWithIndexU: (t<'a>, 'b, (. 'b, 'a, int) => 'b) => 'b" + }, + { + "id": "Belt.List.reduceWithIndex", + "kind": "value", + "name": "reduceWithIndex", + "docstrings": [ + "Applies `f` to each element of `someList` from beginning to end. Function `f` has three parameters: the item from the list and an “accumulator”, which starts with a value of `initialValue` and the index of each element. `reduceWithIndex` returns the final value of the accumulator.\n\n ```rescript\n list{1, 2, 3, 4}->Belt.List.reduceWithIndex(0, (acc, item, index) => acc + item + index) /* 16 */\n ```" + ], + "signature": "let reduceWithIndex: (t<'a>, 'b, ('b, 'a, int) => 'b) => 'b" + }, + { + "id": "Belt.List.reduceReverseU", + "kind": "value", + "name": "reduceReverseU", + "docstrings": [ + "Uncurried version of [reduceReverse](#reduceReverse)." + ], + "signature": "let reduceReverseU: (t<'a>, 'b, (. 'b, 'a) => 'b) => 'b" + }, + { + "id": "Belt.List.reduceReverse", + "kind": "value", + "name": "reduceReverse", + "docstrings": [ + "Works like [reduce](#reduce), except that function `f` is applied to each\n item of `someList` from the last back to the first.\n\n ```rescript\n list{1, 2, 3, 4}->Belt.List.reduceReverse(0, (a, b) => a + b) /* 10 */\n\n list{1, 2, 3, 4}->Belt.List.reduceReverse(10, (a, b) => a - b) /* 0 */\n\n list{1, 2, 3, 4}->Belt.List.reduceReverse(list{}, Belt.List.add) // list{1, 2, 3, 4}\n ```" + ], + "signature": "let reduceReverse: (t<'a>, 'b, ('b, 'a) => 'b) => 'b" + }, + { + "id": "Belt.List.mapReverse2U", + "kind": "value", + "name": "mapReverse2U", + "docstrings": [ + "Uncurried version of [mapReverse2](#mapReverse2)." + ], + "signature": "let mapReverse2U: (t<'a>, t<'b>, (. 'a, 'b) => 'c) => t<'c>" + }, + { + "id": "Belt.List.mapReverse2", + "kind": "value", + "name": "mapReverse2", + "docstrings": [ + "Equivalent to: `zipBy(xs, ys, f)->reverse`\n\n ```rescript\n\n Belt.List.mapReverse2(list{1, 2, 3}, list{1, 2}, (a, b) => a + b) // list{4, 2}\n ```" + ], + "signature": "let mapReverse2: (t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>" + }, + { + "id": "Belt.List.forEach2U", + "kind": "value", + "name": "forEach2U", + "docstrings": [ + "Uncurried version of [forEach2](#forEach2)." + ], + "signature": "let forEach2U: (t<'a>, t<'b>, (. 'a, 'b) => 'c) => unit" + }, + { + "id": "Belt.List.forEach2", + "kind": "value", + "name": "forEach2", + "docstrings": [ + "Stops at the length of the shorter list.\n\n ```rescript\n Belt.List.forEach2(list{\"Z\", \"Y\"}, list{\"A\", \"B\", \"C\"}, (x, y) => Js.log2(x, y))\n\n /*\n prints:\n \"Z\" \"A\"\n \"Y\" \"B\"\n */\n ```" + ], + "signature": "let forEach2: (t<'a>, t<'b>, ('a, 'b) => 'c) => unit" + }, + { + "id": "Belt.List.reduce2U", + "kind": "value", + "name": "reduce2U", + "docstrings": [ + "Uncurried version of [reduce2](#reduce2)." + ], + "signature": "let reduce2U: (t<'b>, t<'c>, 'a, (. 'a, 'b, 'c) => 'a) => 'a" + }, + { + "id": "Belt.List.reduce2", + "kind": "value", + "name": "reduce2", + "docstrings": [ + "Applies `f` to each element of `firstList` and `secondList` from beginning to end. Stops with the shorter list. Function `f` has three parameters: an “accumulator” which starts with a value of `initialValue`, an item from `firstList`, and an item from `secondList`. `reduce2` returns the final value of the accumulator.\n\n ```rescript\n Belt.List.reduce2(list{1, 2, 3}, list{4, 5}, 0, (acc, x, y) => acc + x * x + y) /* 0 + (1 * 1 + 4) + (2 * 2 + 5) */\n ```" + ], + "signature": "let reduce2: (t<'b>, t<'c>, 'a, ('a, 'b, 'c) => 'a) => 'a" + }, + { + "id": "Belt.List.reduceReverse2U", + "kind": "value", + "name": "reduceReverse2U", + "docstrings": [ + "Uncurried version of [reduceReverse2](#reduceReverse2)." + ], + "signature": "let reduceReverse2U: (t<'a>, t<'b>, 'c, (. 'c, 'a, 'b) => 'c) => 'c" + }, + { + "id": "Belt.List.reduceReverse2", + "kind": "value", + "name": "reduceReverse2", + "docstrings": [ + "Applies `f` to each element of `firstList` and `secondList` from end to\n beginning. Stops with the shorter list. Function `f` has three parameters: an\n “accumulator” which starts with a value of init, an item from `firstList`,\n and an item from `secondList`. `reduce2` returns the final value of the\n accumulator.\n\n ```rescript\n Belt.List.reduceReverse2(list{1, 2, 3}, list{4, 5}, 0, (acc, x, y) => acc + x * x + y) /* + (1 * 1 + 4) + (2 * 2 + 5) */\n ```" + ], + "signature": "let reduceReverse2: (t<'a>, t<'b>, 'c, ('c, 'a, 'b) => 'c) => 'c" + }, + { + "id": "Belt.List.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [ + "Uncurried version of [every](#every)." + ], + "signature": "let everyU: (t<'a>, (. 'a) => bool) => bool" + }, + { + "id": "Belt.List.every", + "kind": "value", + "name": "every", + "docstrings": [ + "Returns `true` if all elements satisfy `pred`, where `pred` is a predicate: a function taking an element and returning a bool.\n\n ```rescript\n let isBelow10 = value => value < 10\n\n list{1, 9, 8, 2}->Belt.List.every(isBelow10) /* true */\n\n list{1, 99, 8, 2}->Belt.List.every(isBelow10) /* false */\n ```" + ], + "signature": "let every: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Belt.List.someU", + "kind": "value", + "name": "someU", + "docstrings": [ + "Uncurried version of [some](#some)." + ], + "signature": "let someU: (t<'a>, (. 'a) => bool) => bool" + }, + { + "id": "Belt.List.some", + "kind": "value", + "name": "some", + "docstrings": [ + "Returns `true` if at least _one_ of the elements in `someList` satisfies\n `pred`, where `pred` is a predicate: a function taking an element and\n returning a bool.\n\n ```rescript\n let isAbove100 = value => value > 100\n\n list{101, 1, 2, 3}->Belt.List.some(isAbove100) /* true */\n\n list{1, 2, 3, 4}->Belt.List.some(isAbove100) /* false */\n ```" + ], + "signature": "let some: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Belt.List.every2U", + "kind": "value", + "name": "every2U", + "docstrings": [ + "Uncurried version of [every2](#every2)." + ], + "signature": "let every2U: (t<'a>, t<'b>, (. 'a, 'b) => bool) => bool" + }, + { + "id": "Belt.List.every2", + "kind": "value", + "name": "every2", + "docstrings": [ + "Returns `true` if predicate `pred(a, b)` is `true` for all pairs of elements\n up to the shorter length (i.e. `min(length(firstList), length(secondList))`)\n\n ```rescript\n Belt.List.every2(list{1, 2, 3}, list{0, 1}, (a, b) => a > b) /* true */\n\n Belt.List.every2(list{}, list{1}, (a, b) => a > b) /* true */\n\n Belt.List.every2(list{2, 3}, list{1}, (a, b) => a > b) /* true */\n\n Belt.List.every2(list{0, 1}, list{5, 0}, (a, b) => a > b) /* false */\n ```" + ], + "signature": "let every2: (t<'a>, t<'b>, ('a, 'b) => bool) => bool" + }, + { + "id": "Belt.List.some2U", + "kind": "value", + "name": "some2U", + "docstrings": [ + "Uncurried version of [some2](#some2)." + ], + "signature": "let some2U: (t<'a>, t<'b>, (. 'a, 'b) => bool) => bool" + }, + { + "id": "Belt.List.some2", + "kind": "value", + "name": "some2", + "docstrings": [ + "Returns `true` if predicate `pred(a, b)` is true for any pair of elements up\n to the shorter length (i.e. `min(length(firstList), length(secondList))`)\n\n ```rescript\n Belt.List.some2(list{1, 2, 3}, list{0, 1}, (a, b) => a > b) /* true */\n\n Belt.List.some2(list{}, list{1}, (a, b) => a > b) /* false */\n\n Belt.List.some2(list{2, 3}, list{1}, (a, b) => a > b) /* true */\n\n Belt.List.some2(list{0, 1}, list{5, 0}, (a, b) => a > b) /* true */\n ```" + ], + "signature": "let some2: (t<'a>, t<'b>, ('a, 'b) => bool) => bool" + }, + { + "id": "Belt.List.cmpByLength", + "kind": "value", + "name": "cmpByLength", + "docstrings": [ + "Compare two lists solely by length. Returns `-1` if `length(firstList)` is\n less than `length(secondList)`, `0` if `length(firstList)` equals\n `length(secondList)`, and `1` if `length(firstList)` is greater than\n `length(secondList)`.\n\n ```rescript\n Belt.List.cmpByLength(list{1, 2}, list{3, 4, 5, 6}) /* -1 */\n\n Belt.List.cmpByLength(list{1, 2, 3}, list{4, 5, 6}) /* = 0 */\n\n Belt.List.cmpByLength(list{1, 2, 3, 4}, list{5, 6}) /* = 1 */\n ```" + ], + "signature": "let cmpByLength: (t<'a>, t<'a>) => int" + }, + { + "id": "Belt.List.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [ + "Uncurried version of [cmp](#cmp)." + ], + "signature": "let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int" + }, + { + "id": "Belt.List.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "Compare elements one by one `compareFn(a, b)`. `compareFn` returns a negative number if `a` is \"less than\" `b`, zero if `a` is \"equal to\" `b`, a positive number if `a` is \"greater than\" `b`.\n\n The comparison returns the first non-zero result of `compareFn`, or zero if `compareFn` returns zero for all `a` and `b`.\n\n If all items have compared equal, but `firstList` is exhausted first, return `-1`. (`firstList` is shorter).\n If all items have compared equal, but `secondList` is exhausted first, return `1` (`firstList` is longer).\n\n ```rescript\n Belt.List.cmp(list{3}, list{3, 7}, (a, b) => compare(a, b)) /* (-1) */\n\n Belt.List.cmp(list{5, 3}, list{5}, (a, b) => compare(a, b)) /* 1 */\n\n Belt.List.cmp(list{1, 3, 5}, list{1, 4, 2}, (a, b) => compare(a, b)) /* (-1) */\n\n Belt.List.cmp(list{1, 3, 5}, list{1, 2, 3}, (a, b) => compare(a, b)) /* 1 */\n\n Belt.List.cmp(list{1, 3, 5}, list{1, 3, 5}, (a, b) => compare(a, b)) /* 0 */\n ```\n\n **Please note:** The total ordering of List is different from Array,\n for Array, we compare the length first and, only if the lengths are equal, elements one by one.\n For lists, we just compare elements one by one." + ], + "signature": "let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int" + }, + { + "id": "Belt.List.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [ + "Uncurried version of [eq](#eq)." + ], + "signature": "let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool" + }, + { + "id": "Belt.List.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "Check equality of `firstList` and `secondList` using `eqElem` for equality on\n elements, where `eqElem` is a function that returns `true` if items `x` and\n `y` meet some criterion for equality, `false` otherwise. eq `false` if length\n of `firstList` and `secondList` are not the same.\n\n ```rescript\n Belt.List.eq(list{1, 2, 3}, list{1, 2}, (a, b) => a == b) /* false */\n\n Belt.List.eq(list{1, 2}, list{1, 2}, (a, b) => a == b) /* true */\n\n Belt.List.eq(list{1, 2, 3}, list{(-1), (-2), (-3)}, (a, b) => abs(a) == abs(b)) /* true */\n ```" + ], + "signature": "let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool" + }, + { + "id": "Belt.List.hasU", + "kind": "value", + "name": "hasU", + "docstrings": [ + "Uncurried version of [has](#has)." + ], + "signature": "let hasU: (t<'a>, 'b, (. 'a, 'b) => bool) => bool" + }, + { + "id": "Belt.List.has", + "kind": "value", + "name": "has", + "docstrings": [ + "Returns `true` if the list contains at least one element for which\n `eqFunction(x)` returns true.\n\n ```rescript\n list{1, 2, 3}->Belt.List.has(2, (a, b) => a == b) /* true */\n\n list{1, 2, 3}->Belt.List.has(4, (a, b) => a == b) /* false */\n\n list{(-1), (-2), (-3)}->Belt.List.has(2, (a, b) => abs(a) == abs(b)) /* true */\n ```" + ], + "signature": "let has: (t<'a>, 'b, ('a, 'b) => bool) => bool" + }, + { + "id": "Belt.List.getByU", + "kind": "value", + "name": "getByU", + "docstrings": [ + "Uncurried version of [getBy](#getBy)." + ], + "signature": "let getByU: (t<'a>, (. 'a) => bool) => option<'a>" + }, + { + "id": "Belt.List.getBy", + "kind": "value", + "name": "getBy", + "docstrings": [ + "Returns `Some(value)` for the first value in `someList` that satisfies the\n predicate function `pred`. Returns `None` if no element satisfies the function.\n\n ```rescript\n Belt.List.getBy(list{1, 4, 3, 2}, x => x > 3) /* Some(4) */\n\n Belt.List.getBy(list{1, 4, 3, 2}, x => x > 4) /* None */\n ```" + ], + "signature": "let getBy: (t<'a>, 'a => bool) => option<'a>" + }, + { + "id": "Belt.List.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [ + "Uncurried version of [keep](#keep)." + ], + "signature": "let keepU: (t<'a>, (. 'a) => bool) => t<'a>" + }, + { + "id": "Belt.List.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "Returns a list of all elements in `someList` which satisfy the predicate function `pred`.\n\n ```rescript\n let isEven = x => mod(x, 2) == 0\n\n Belt.List.keep(list{1, 2, 3, 4}, isEven) /* list{2, 4} */\n\n Belt.List.keep(list{None, Some(2), Some(3), None}, Belt.Option.isSome) /* list{Some(2), Some(3)} */\n ```" + ], + "signature": "let keep: (t<'a>, 'a => bool) => t<'a>" + }, + { + "id": "Belt.List.filter", + "kind": "value", + "name": "filter", + "docstrings": [ + "Returns a list of all elements in `someList` which satisfy the predicate function `pred`.\n\n ```rescript\n let isEven = x => mod(x, 2) == 0\n\n Belt.List.filter(list{1, 2, 3, 4}, isEven) /* list{2, 4} */\n\n Belt.List.filter(list{None, Some(2), Some(3), None}, Belt.Option.isSome) /* list{Some(2), Some(3)} */\n ```" + ], + "signature": "let filter: (t<'a>, 'a => bool) => t<'a>" + }, + { + "id": "Belt.List.keepWithIndexU", + "kind": "value", + "name": "keepWithIndexU", + "docstrings": [ + "Uncurried version of [keepWithIndex](#keepWithIndex)." + ], + "signature": "let keepWithIndexU: (t<'a>, (. 'a, int) => bool) => t<'a>" + }, + { + "id": "Belt.List.keepWithIndex", + "kind": "value", + "name": "keepWithIndex", + "docstrings": [ + "Returns a list of all elements in `someList` which satisfy the predicate function `pred`.\n\n ```rescript\n let isEven = x => mod(x, 2) == 0\n\n Belt.List.keepWithIndex(list{1, 2, 3, 4}, (_x, index) => isEven(index)) /* list{1, 3} */\n ```" + ], + "signature": "let keepWithIndex: (t<'a>, ('a, int) => bool) => t<'a>" + }, + { + "id": "Belt.List.filterWithIndex", + "kind": "value", + "name": "filterWithIndex", + "docstrings": [ + "Returns a list of all elements in `someList` which satisfy the predicate function `pred`.\n\n ```rescript\n let isEven = x => mod(x, 2) == 0\n\n Belt.List.filterWithIndex(list{1, 2, 3, 4}, (_x, index) => isEven(index)) /* list{1, 3} */\n ```" + ], + "signature": "let filterWithIndex: (t<'a>, ('a, int) => bool) => t<'a>" + }, + { + "id": "Belt.List.keepMapU", + "kind": "value", + "name": "keepMapU", + "docstrings": [ + "Uncurried version of [keepMap](#keepMap)." + ], + "signature": "let keepMapU: (t<'a>, (. 'a) => option<'b>) => t<'b>" + }, + { + "id": "Belt.List.keepMap", + "kind": "value", + "name": "keepMap", + "docstrings": [ + "Applies `f` to each element of `someList`. If `f(x)` returns `Some(value)`, then `value` is _kept_ in the resulting list.\n If `f(x)` returns `None`, the element is _not_ retained in the result.\n\n ```rescript\n let isEven = x => mod(x, 2) == 0\n\n list{1, 2, 3, 4}\n ->Belt.List.keepMap(x =>\n if (isEven(x)) {\n Some(x)\n } else {\n None\n }\n ) /* list{2, 4} */\n\n list{Some(1), Some(2), None}->Belt.List.keepMap(x => x) /* list{1, 2} */\n ```" + ], + "signature": "let keepMap: (t<'a>, 'a => option<'b>) => t<'b>" + }, + { + "id": "Belt.List.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [ + "Uncurried version of [partition](#partition)." + ], + "signature": "let partitionU: (t<'a>, (. 'a) => bool) => (t<'a>, t<'a>)" + }, + { + "id": "Belt.List.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "Creates a pair of lists; the first list consists of all elements of `someList` that satisfy the predicate function `pred`; the second list consists of all elements of `someList` that _do not_ satisfy `pred.\n\n In other words:\n\n ```res\n (elementsThatSatisfies, elementsThatDoesNotSatisfy)\n ```\n\n ```rescript\n Belt.List.partition(list{1, 2, 3, 4}, x => x > 2) /* (list{3, 4}, list{1, 2}) */\n ```" + ], + "signature": "let partition: (t<'a>, 'a => bool) => (t<'a>, t<'a>)" + }, + { + "id": "Belt.List.unzip", + "kind": "value", + "name": "unzip", + "docstrings": [ + "Takes a list of pairs and creates a pair of lists. The first list contains all the first items of the pairs; the second list contains all the second items.\n\n ```rescript\n Belt.List.unzip(list{(1, 2), (3, 4)}) /* (list{1, 3}, list{2, 4}) */\n\n Belt.List.unzip(list{(\"H\", \"W\"), (\"e\", \"o\"), (\"l\", \"r\"), (\"l\", \"l\"), (\"o\", \"d\"), (\" \", \"!\")})\n /* (list{\"H\", \"e\", \"l\", \"l\", \"o\", \" \"}, list{\"W\", \"o\", \"r\", \"l\", \"d\", \"!\"}) */\n ```" + ], + "signature": "let unzip: t<('a, 'b)> => (t<'a>, t<'b>)" + }, + { + "id": "Belt.List.getAssocU", + "kind": "value", + "name": "getAssocU", + "docstrings": [ + "Uncurried version of [getAssoc](#getAssoc)." + ], + "signature": "let getAssocU: (t<('a, 'c)>, 'b, (. 'a, 'b) => bool) => option<'c>" + }, + { + "id": "Belt.List.getAssoc", + "kind": "value", + "name": "getAssoc", + "docstrings": [ + "Return the second element of a pair in `someList` where the first element equals `k` as per the predicate function `eqFunction`, or `None` if not found.\n\n ```rescript\n list{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.getAssoc(3, (a, b) => a == b) /* Some(\"c\") */\n\n list{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")}\n ->Belt.List.getAssoc(15, (k, item) => k /* 15 */ == item /* 9, 5, 22 */)\n /* Some(\"afternoon\") */\n ```" + ], + "signature": "let getAssoc: (t<('a, 'c)>, 'b, ('a, 'b) => bool) => option<'c>" + }, + { + "id": "Belt.List.hasAssocU", + "kind": "value", + "name": "hasAssocU", + "docstrings": [ + "Uncurried version of [hasAssoc](#hasAssoc)." + ], + "signature": "let hasAssocU: (t<('a, 'c)>, 'b, (. 'a, 'b) => bool) => bool" + }, + { + "id": "Belt.List.hasAssoc", + "kind": "value", + "name": "hasAssoc", + "docstrings": [ + "Returns `true` if there is a pair in `someList` where the first element equals `k` as per the predicate function `eqFunction`.\n\n ```rescript\n list{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.hasAssoc(1, (a, b) => a == b) /* true */\n\n list{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")}\n ->Belt.List.hasAssoc(25, (k, item) => k /* 25 */ == item /* 9, 5, 22 */) /* false */\n ```" + ], + "signature": "let hasAssoc: (t<('a, 'c)>, 'b, ('a, 'b) => bool) => bool" + }, + { + "id": "Belt.List.removeAssocU", + "kind": "value", + "name": "removeAssocU", + "docstrings": [ + "Uncurried version of [removeAssoc](#removeAssoc)." + ], + "signature": "let removeAssocU: (t<('a, 'c)>, 'b, (. 'a, 'b) => bool) => t<('a, 'c)>" + }, + { + "id": "Belt.List.removeAssoc", + "kind": "value", + "name": "removeAssoc", + "docstrings": [ + "Return a list after removing the first pair whose first value is `k` per the equality predicate `eqFunction`; if not found, return a new list identical to `someList`.\n\n ```rescript\n list{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.removeAssoc(1, (a, b) => a == b) /* list{(2, \"b\"), (3, \"c\")} */\n\n list{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")}\n ->Belt.List.removeAssoc(9, (k, item) => k /* 9 */ == item /* 9, 5, 22 */)\n /* list{(15, \"afternoon\"), (22, \"night\")} */\n ```" + ], + "signature": "let removeAssoc: (t<('a, 'c)>, 'b, ('a, 'b) => bool) => t<('a, 'c)>" + }, + { + "id": "Belt.List.setAssocU", + "kind": "value", + "name": "setAssocU", + "docstrings": [ + "Uncurried version of [setAssoc](#setAssoc)." + ], + "signature": "let setAssocU: (t<('a, 'c)>, 'a, 'c, (. 'a, 'a) => bool) => t<('a, 'c)>" + }, + { + "id": "Belt.List.setAssoc", + "kind": "value", + "name": "setAssoc", + "docstrings": [ + "If `k` exists in `someList` by satisfying the `eqFunction` predicate, return a new list with the key and value replaced by the new `k` and `v`; otherwise, return a new list with the pair `k`, `v` added to the head of `someList`.\n\n ```rescript\n list{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.setAssoc(2, \"x\", (a, b) => a == b) /* list{(1, \"a\"), (2, \"x\"), (3, \"c\")} */\n\n list{(1, \"a\"), (3, \"c\")}->Belt.List.setAssoc(2, \"b\", (a, b) => a == b) /* list{(2, \"b\"), (1, \"a\"), (3, \"c\")} */\n\n list{(9, \"morning\"), (3, \"morning?!\"), (22, \"night\")}\n ->Belt.List.setAssoc(15, \"afternoon\", (a, b) => mod(a, 12) == mod(b, 12))\n /* list{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")} */\n ```\n\n **Please note**\n\n In the last example, since: `15 mod 12` equals `3 mod 12`\n\n Both the key _and_ the value are replaced in the list." + ], + "signature": "let setAssoc: (t<('a, 'c)>, 'a, 'c, ('a, 'a) => bool) => t<('a, 'c)>" + }, + { + "id": "Belt.List.sortU", + "kind": "value", + "name": "sortU", + "docstrings": [ + "Uncurried version of [sort](#sort)." + ], + "signature": "let sortU: (t<'a>, (. 'a, 'a) => int) => t<'a>" + }, + { + "id": "Belt.List.sort", + "kind": "value", + "name": "sort", + "docstrings": [ + "Returns a sorted list.\n\n ```rescript\n Belt.List.sort(list{5, 4, 9, 3, 7}, (a, b) => a - b) // list{3, 4, 5, 7, 9}\n ```" + ], + "signature": "let sort: (t<'a>, ('a, 'a) => int) => t<'a>" + } + ] + }, + "belt/mutablestack": { + "id": "Belt.MutableStack", + "name": "MutableStack", + "docstrings": [ + "[`Belt.MutableStack`]()\n\n An FILO(first in last out) stack data structure" + ], + "items": [ + { + "id": "Belt.MutableStack.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a>" + }, + { + "id": "Belt.MutableStack.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Returns a new stack, initially empty." + ], + "signature": "let make: unit => t<'a>" + }, + { + "id": "Belt.MutableStack.clear", + "kind": "value", + "name": "clear", + "docstrings": [ + "Discard all elements from the stack." + ], + "signature": "let clear: t<'a> => unit" + }, + { + "id": "Belt.MutableStack.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "`copy(x)` O(1) operation, return a new stack." + ], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Belt.MutableStack.push", + "kind": "value", + "name": "push", + "docstrings": [], + "signature": "let push: (t<'a>, 'a) => unit" + }, + { + "id": "Belt.MutableStack.popUndefined", + "kind": "value", + "name": "popUndefined", + "docstrings": [], + "signature": "let popUndefined: t<'a> => Js.undefined<'a>" + }, + { + "id": "Belt.MutableStack.pop", + "kind": "value", + "name": "pop", + "docstrings": [], + "signature": "let pop: t<'a> => option<'a>" + }, + { + "id": "Belt.MutableStack.topUndefined", + "kind": "value", + "name": "topUndefined", + "docstrings": [], + "signature": "let topUndefined: t<'a> => Js.undefined<'a>" + }, + { + "id": "Belt.MutableStack.top", + "kind": "value", + "name": "top", + "docstrings": [], + "signature": "let top: t<'a> => option<'a>" + }, + { + "id": "Belt.MutableStack.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'a> => bool" + }, + { + "id": "Belt.MutableStack.size", + "kind": "value", + "name": "size", + "docstrings": [], + "signature": "let size: t<'a> => int" + }, + { + "id": "Belt.MutableStack.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'a>, (. 'a) => unit) => unit" + }, + { + "id": "Belt.MutableStack.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Belt.MutableStack.dynamicPopIterU", + "kind": "value", + "name": "dynamicPopIterU", + "docstrings": [], + "signature": "let dynamicPopIterU: (t<'a>, (. 'a) => unit) => unit" + }, + { + "id": "Belt.MutableStack.dynamicPopIter", + "kind": "value", + "name": "dynamicPopIter", + "docstrings": [ + "`dynamicPopIter(s, f)` apply `f` to each element of `s`. The item is poped\n before applying `f`, `s` will be empty after this opeartion. This function is\n useful for worklist algorithm." + ], + "signature": "let dynamicPopIter: (t<'a>, 'a => unit) => unit" + } + ] + }, + "belt/mutablequeue": { + "id": "Belt.MutableQueue", + "name": "MutableQueue", + "docstrings": [ + "[`Belt.MutableQueue`]()\n\n An FIFO(first in first out) queue data structure" + ], + "items": [ + { + "id": "Belt.MutableQueue.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type of queues containing elements of `type('a)`." + ], + "signature": "type t<'a>" + }, + { + "id": "Belt.MutableQueue.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Returns a new queue, initially empty." + ], + "signature": "let make: unit => t<'a>" + }, + { + "id": "Belt.MutableQueue.clear", + "kind": "value", + "name": "clear", + "docstrings": [ + "Discard all elements from the queue." + ], + "signature": "let clear: t<'a> => unit" + }, + { + "id": "Belt.MutableQueue.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [ + "Returns `true` if the given queue is empty, `false` otherwise." + ], + "signature": "let isEmpty: t<'a> => bool" + }, + { + "id": "Belt.MutableQueue.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` a is equivalent to `Array.forEach(a, add(q, a));`" + ], + "signature": "let fromArray: array<'a> => t<'a>" + }, + { + "id": "Belt.MutableQueue.add", + "kind": "value", + "name": "add", + "docstrings": [ + "`add(q, x)` adds the element `x` at the end of the queue `q`." + ], + "signature": "let add: (t<'a>, 'a) => unit" + }, + { + "id": "Belt.MutableQueue.peek", + "kind": "value", + "name": "peek", + "docstrings": [ + "`peekOpt(q)` returns the first element in queue `q`, without removing it from the queue." + ], + "signature": "let peek: t<'a> => option<'a>" + }, + { + "id": "Belt.MutableQueue.peekUndefined", + "kind": "value", + "name": "peekUndefined", + "docstrings": [ + "`peekUndefined(q)` returns `undefined` if not found." + ], + "signature": "let peekUndefined: t<'a> => Js.undefined<'a>" + }, + { + "id": "Belt.MutableQueue.peekExn", + "kind": "value", + "name": "peekExn", + "docstrings": [ + "raise an exception if `q` is empty" + ], + "signature": "let peekExn: t<'a> => 'a" + }, + { + "id": "Belt.MutableQueue.pop", + "kind": "value", + "name": "pop", + "docstrings": [ + "`pop(q)` removes and returns the first element in queue `q`." + ], + "signature": "let pop: t<'a> => option<'a>" + }, + { + "id": "Belt.MutableQueue.popUndefined", + "kind": "value", + "name": "popUndefined", + "docstrings": [ + "`popUndefined(q)` removes and returns the first element in queue `q`. it will return `undefined` if it is already empty." + ], + "signature": "let popUndefined: t<'a> => Js.undefined<'a>" + }, + { + "id": "Belt.MutableQueue.popExn", + "kind": "value", + "name": "popExn", + "docstrings": [ + "`popExn(q)` raise an exception if q is empty." + ], + "signature": "let popExn: t<'a> => 'a" + }, + { + "id": "Belt.MutableQueue.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "`copy(q)` returns a fresh queue." + ], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Belt.MutableQueue.size", + "kind": "value", + "name": "size", + "docstrings": [ + "Returns the number of elements in a queue." + ], + "signature": "let size: t<'a> => int" + }, + { + "id": "Belt.MutableQueue.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => t<'b>" + }, + { + "id": "Belt.MutableQueue.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Belt.MutableQueue.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'a>, (. 'a) => unit) => unit" + }, + { + "id": "Belt.MutableQueue.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(q, f) applies`f`in turn to all elements of`q`, from the least\n recently entered to the most recently entered. The queue itself is unchanged." + ], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Belt.MutableQueue.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (t<'a>, 'b, (. 'b, 'a) => 'b) => 'b" + }, + { + "id": "Belt.MutableQueue.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce(q, accu, f)` is equivalent to `List.reduce(l, accu, f)`, where `l` is the list of `q`'s elements. The queue remains unchanged." + ], + "signature": "let reduce: (t<'a>, 'b, ('b, 'a) => 'b) => 'b" + }, + { + "id": "Belt.MutableQueue.transfer", + "kind": "value", + "name": "transfer", + "docstrings": [ + "`transfer(q1, q2)` adds all of `q1`'s elements at the end of the queue `q2`, then clears `q1`. It is equivalent to the sequence `forEach((x) => add(x, q2), q1);`; clear `q1`, but runs in constant time." + ], + "signature": "let transfer: (t<'a>, t<'a>) => unit" + }, + { + "id": "Belt.MutableQueue.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "First added will be in the beginning of the array." + ], + "signature": "let toArray: t<'a> => array<'a>" + } + ] + }, + "belt/sortarray": { + "id": "Belt.SortArray", + "name": "SortArray", + "docstrings": [ + "[`Belt.SortArray`]()\n\n The top level provides some generic sort related utilities.\n\n It also has two specialized inner modules\n [`Belt.SortArray.Int`]() and [`Belt.SortArray.String`]()" + ], + "items": [ + { + "id": "Belt.SortArray.strictlySortedLengthU", + "kind": "value", + "name": "strictlySortedLengthU", + "docstrings": [], + "signature": "let strictlySortedLengthU: (array<'a>, (. 'a, 'a) => bool) => int" + }, + { + "id": "Belt.SortArray.strictlySortedLength", + "kind": "value", + "name": "strictlySortedLength", + "docstrings": [ + "`strictlySortedLenght(xs, cmp);` return `+n` means increasing order `-n` means negative order\n\n ```rescript\n Belt.SortArray.strictlySortedLength([1, 2, 3, 4, 3], (x, y) => x < y) == 4\n\n Belt.SortArray.strictlySortedLength([], (x, y) => x < y) == 0\n\n Belt.SortArray.strictlySortedLength([1], (x, y) => x < y) == 1\n\n Belt.SortArray.strictlySortedLength([4, 3, 2, 1], (x, y) => x < y) == -4\n ```" + ], + "signature": "let strictlySortedLength: (array<'a>, ('a, 'a) => bool) => int" + }, + { + "id": "Belt.SortArray.isSortedU", + "kind": "value", + "name": "isSortedU", + "docstrings": [], + "signature": "let isSortedU: (array<'a>, (. 'a, 'a) => int) => bool" + }, + { + "id": "Belt.SortArray.isSorted", + "kind": "value", + "name": "isSorted", + "docstrings": [ + "`isSorted(arr, cmp)`: Returns true if array is increasingly sorted (equal is okay)" + ], + "signature": "let isSorted: (array<'a>, ('a, 'a) => int) => bool" + }, + { + "id": "Belt.SortArray.stableSortInPlaceByU", + "kind": "value", + "name": "stableSortInPlaceByU", + "docstrings": [], + "signature": "let stableSortInPlaceByU: (array<'a>, (. 'a, 'a) => int) => unit" + }, + { + "id": "Belt.SortArray.stableSortInPlaceBy", + "kind": "value", + "name": "stableSortInPlaceBy", + "docstrings": [], + "signature": "let stableSortInPlaceBy: (array<'a>, ('a, 'a) => int) => unit" + }, + { + "id": "Belt.SortArray.stableSortByU", + "kind": "value", + "name": "stableSortByU", + "docstrings": [], + "signature": "let stableSortByU: (array<'a>, (. 'a, 'a) => int) => array<'a>" + }, + { + "id": "Belt.SortArray.stableSortBy", + "kind": "value", + "name": "stableSortBy", + "docstrings": [ + "`stableSortBy(xs, cmp)`: Returns a fresh array Sort `xs` in place using\n comparator `cmp`, the stable means if the elements are equal, their order will\n be preserved" + ], + "signature": "let stableSortBy: (array<'a>, ('a, 'a) => int) => array<'a>" + }, + { + "id": "Belt.SortArray.binarySearchByU", + "kind": "value", + "name": "binarySearchByU", + "docstrings": [], + "signature": "let binarySearchByU: (array<'a>, 'a, (. 'a, 'a) => int) => int" + }, + { + "id": "Belt.SortArray.binarySearchBy", + "kind": "value", + "name": "binarySearchBy", + "docstrings": [ + "If value is not found and value is less than one or more elements in array, the\n negative number returned is the bitwise complement of the index of the first\n element that is larger than value.\n\n If value is not found and value is greater\n than all elements in array, the negative number returned is the bitwise\n complement of (the index of the last element plus 1)for example, if `key` is\n smaller than all elements return `-1` since `lnot(-1) == 0` if `key` is larger\n than all elements return `lnot(-1) == 0` since `lnot(- (len + 1)) == len`\n\n ```rescript\n Belt.SortArray.binarySearchBy([1, 2, 3, 4, 33, 35, 36], 33, Pervasives.compare) == 4\n\n lnot(Belt.SortArray.binarySearchBy([1, 3, 5, 7], 4, Pervasives.compare)) == 2\n ```" + ], + "signature": "let binarySearchBy: (array<'a>, 'a, ('a, 'a) => int) => int" + }, + { + "id": "Belt.SortArray.unionU", + "kind": "value", + "name": "unionU", + "docstrings": [], + "signature": "let unionU: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, (. 'a, 'a) => int) => int" + }, + { + "id": "Belt.SortArray.union", + "kind": "value", + "name": "union", + "docstrings": [ + "`union src src1ofs src1len src2 src2ofs src2len dst dstofs cmp`\n assume `src` and `src2` is strictly sorted.\n for equivalent elements, it is picked from `src`\n also assume that `dst` is large enough to store all elements" + ], + "signature": "let union: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, ('a, 'a) => int) => int" + }, + { + "id": "Belt.SortArray.intersectU", + "kind": "value", + "name": "intersectU", + "docstrings": [], + "signature": "let intersectU: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, (. 'a, 'a) => int) => int" + }, + { + "id": "Belt.SortArray.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [ + "`union src src1ofs src1len src2 src2ofs src2len dst dstofs cmp`\n\n **return** the `offset` in the output array" + ], + "signature": "let intersect: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, ('a, 'a) => int) => int" + }, + { + "id": "Belt.SortArray.diffU", + "kind": "value", + "name": "diffU", + "docstrings": [], + "signature": "let diffU: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, (. 'a, 'a) => int) => int" + }, + { + "id": "Belt.SortArray.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, ('a, 'a) => int) => int" + } + ] + }, + "belt/array": { + "id": "Belt.Array", + "name": "Array", + "docstrings": [ + "[`Belt.Array`]()\n\n **mutable array**: Utilities functions" + ], + "items": [ + { + "id": "Belt.Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a> = array<'a>" + }, + { + "id": "Belt.Array.length", + "kind": "value", + "name": "length", + "docstrings": [ + "return the size of the array\n\n```rescript\n// Returns 1\nBelt.Array.length([\"test\"])\n```" + ], + "signature": "let length: t<'a> => int" + }, + { + "id": "Belt.Array.size", + "kind": "value", + "name": "size", + "docstrings": [ + "**See** [`length`]()" + ], + "signature": "let size: t<'a> => int" + }, + { + "id": "Belt.Array.get", + "kind": "value", + "name": "get", + "docstrings": [ + "If `i <= 0 <= length(arr)` returns `Some(value)` where `value` is the item at index `i`.\n If `i` is out of range returns `None`.\n\n ```rescript\n Belt.Array.get([\"a\", \"b\", \"c\"], 0) == Some(\"a\")\n Belt.Array.get([\"a\", \"b\", \"c\"], 3) == None\n Belt.Array.get([\"a\", \"b\", \"c\"], -1) == None\n ```" + ], + "signature": "let get: (t<'a>, int) => option<'a>" + }, + { + "id": "Belt.Array.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "Raise an exception if `i` is out of range.\n Otherwise return the value at index `i` in `arr`." + ], + "signature": "let getExn: (t<'a>, int) => 'a" + }, + { + "id": "Belt.Array.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [ + "`getUnsafe(arr, i)`\n\n **Unsafe**\n\n no bounds checking; this would cause type error if `i` does not stay within range" + ], + "signature": "let getUnsafe: (t<'a>, int) => 'a" + }, + { + "id": "Belt.Array.getUndefined", + "kind": "value", + "name": "getUndefined", + "docstrings": [ + "`getUndefined(arr, i)`\n\n It does the samething in the runtime as [`getUnsafe`]();\n it is _type safe_ since the return type still track whether it is\n in range or not" + ], + "signature": "let getUndefined: (t<'a>, int) => Js.undefined<'a>" + }, + { + "id": "Belt.Array.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set(arr, n, x)` modifies `arr` in place; it replaces the nth element of `arr` with `x`.\n Returning `false` means not updated due to out of range." + ], + "signature": "let set: (t<'a>, int, 'a) => bool" + }, + { + "id": "Belt.Array.setExn", + "kind": "value", + "name": "setExn", + "docstrings": [ + "`setExn(arr, i, x)` raise an exception if `i` is out of range." + ], + "signature": "let setExn: (t<'a>, int, 'a) => unit" + }, + { + "id": "Belt.Array.setUnsafe", + "kind": "value", + "name": "setUnsafe", + "docstrings": [], + "signature": "let setUnsafe: (t<'a>, int, 'a) => unit" + }, + { + "id": "Belt.Array.shuffleInPlace", + "kind": "value", + "name": "shuffleInPlace", + "docstrings": [ + "`shuffleInPlace(arr)` randomly re-orders the items in `arr`" + ], + "signature": "let shuffleInPlace: t<'a> => unit" + }, + { + "id": "Belt.Array.shuffle", + "kind": "value", + "name": "shuffle", + "docstrings": [ + "Returns a fresh array with items in original array randomly shuffled." + ], + "signature": "let shuffle: t<'a> => t<'a>" + }, + { + "id": "Belt.Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [ + "`reverseInPlace(arr)` reverses items in `arr` in place.\n\n ```rescript\n let arr = [10, 11, 12, 13, 14]\n\n let () = Belt.Array.reverseInPlace(arr)\n\n arr == [14, 13, 12, 11, 10]\n ```" + ], + "signature": "let reverseInPlace: t<'a> => unit" + }, + { + "id": "Belt.Array.reverse", + "kind": "value", + "name": "reverse", + "docstrings": [ + "`reverse(arr)` returns a fresh array with items in arr in reverse order.\n\n ```rescript\n Belt.Array.reverse([10, 11, 12, 13, 14]) == [14, 13, 12, 11, 10]\n ```" + ], + "signature": "let reverse: t<'a> => t<'a>" + }, + { + "id": "Belt.Array.makeUninitialized", + "kind": "value", + "name": "makeUninitialized", + "docstrings": [ + "`makeUninitialized(n)` creates an array of length `n` filled with the undefined value. You must specify the type of data that will eventually fill the array.\n\n ```rescript\n let arr: array> = Belt.Array.makeUninitialized(5)\n\n Belt.Array.getExn(arr, 0) == Js.undefined\n ```" + ], + "signature": "let makeUninitialized: int => array>" + }, + { + "id": "Belt.Array.makeUninitializedUnsafe", + "kind": "value", + "name": "makeUninitializedUnsafe", + "docstrings": [ + "**Unsafe**\n\n ```rescript\n let arr = Belt.Array.makeUninitializedUnsafe(5)\n\n Js.log(Belt.Array.getExn(arr, 0)) // undefined\n\n Belt.Array.setExn(arr, 0, \"example\")\n\n Js.log(Belt.Array.getExn(arr, 0) == \"example\")\n ```" + ], + "signature": "let makeUninitializedUnsafe: int => t<'a>" + }, + { + "id": "Belt.Array.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(n, e)` return an array of size `n` filled with value `e`.\n Returns an empty array when `n` is negative." + ], + "signature": "let make: (int, 'a) => t<'a>" + }, + { + "id": "Belt.Array.range", + "kind": "value", + "name": "range", + "docstrings": [ + "`range(start, finish)` create an inclusive array.\n\n ```rescript\n Belt.Array.range(0, 3) == [0, 1, 2, 3]\n\n Belt.Array.range(3, 0) == []\n\n Belt.Array.range(3, 3) == [3]\n ```" + ], + "signature": "let range: (int, int) => array" + }, + { + "id": "Belt.Array.rangeBy", + "kind": "value", + "name": "rangeBy", + "docstrings": [ + "`rangeBy(start, finish, ~step)`\n\n Returns empty array when step is 0 or negative. It also return an empty array when `start > finish`.\n\n ```rescript\n Belt.Array.rangeBy(0, 10, ~step=3) == [0, 3, 6, 9]\n\n Belt.Array.rangeBy(0, 12, ~step=3) == [0, 3, 6, 9, 12]\n\n Belt.Array.rangeBy(33, 0, ~step=1) == []\n\n Belt.Array.rangeBy(33, 0, ~step=-1) == []\n\n Belt.Array.rangeBy(3, 12, ~step=-1) == []\n\n Belt.Array.rangeBy(3, 3, ~step=0) == []\n\n Belt.Array.rangeBy(3, 3, ~step=1) == [3]\n ```" + ], + "signature": "let rangeBy: (int, int, ~step: int) => array" + }, + { + "id": "Belt.Array.makeByU", + "kind": "value", + "name": "makeByU", + "docstrings": [], + "signature": "let makeByU: (int, (. int) => 'a) => t<'a>" + }, + { + "id": "Belt.Array.makeBy", + "kind": "value", + "name": "makeBy", + "docstrings": [ + "`makeBy(n, f)`\n\n Return an empty array when n is negative return an array of size n populated by `f(i)` start from `0` to `n - 1`.\n\n ```rescript\n Belt.Array.makeBy(5, (i) => i) == [0, 1, 2, 3, 4]\n\n Belt.Array.makeBy(5, (i) => i * i) == [0, 1, 4, 9, 16]\n ```" + ], + "signature": "let makeBy: (int, int => 'a) => t<'a>" + }, + { + "id": "Belt.Array.makeByAndShuffleU", + "kind": "value", + "name": "makeByAndShuffleU", + "docstrings": [], + "signature": "let makeByAndShuffleU: (int, (. int) => 'a) => t<'a>" + }, + { + "id": "Belt.Array.makeByAndShuffle", + "kind": "value", + "name": "makeByAndShuffle", + "docstrings": [ + "Equivalent to `shuffle(makeBy(n, f))`" + ], + "signature": "let makeByAndShuffle: (int, int => 'a) => t<'a>" + }, + { + "id": "Belt.Array.zip", + "kind": "value", + "name": "zip", + "docstrings": [ + "`zip(a, b)`\n\n Create an array of pairs from corresponding elements of a and b. Stop with the shorter array.\n\n ```rescript\n Belt.Array.zip([1, 2], [3, 4, 5]) == [(1, 3), (2, 4)]\n ```" + ], + "signature": "let zip: (t<'a>, array<'b>) => array<('a, 'b)>" + }, + { + "id": "Belt.Array.zipByU", + "kind": "value", + "name": "zipByU", + "docstrings": [], + "signature": "let zipByU: (t<'a>, array<'b>, (. 'a, 'b) => 'c) => array<'c>" + }, + { + "id": "Belt.Array.zipBy", + "kind": "value", + "name": "zipBy", + "docstrings": [ + "`zipBy(xs, ys, f)`\n\n Create an array by applying `f` to corresponding elements of `xs` and `ys`. Stops with shorter array.\n\n Equivalent to `map(zip(xs, ys), ((a, b)) => f(a, b))`\n\n ```rescript\n Belt.Array.zipBy([1, 2, 3], [4, 5], (a, b) => 2 * a + b) == [6, 9]\n ```" + ], + "signature": "let zipBy: (t<'a>, array<'b>, ('a, 'b) => 'c) => array<'c>" + }, + { + "id": "Belt.Array.unzip", + "kind": "value", + "name": "unzip", + "docstrings": [ + "`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.\n\n ```rescript\n Belt.Array.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])\n\n Belt.Array.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])\n ```" + ], + "signature": "let unzip: array<('a, 'b)> => (t<'a>, array<'b>)" + }, + { + "id": "Belt.Array.concat", + "kind": "value", + "name": "concat", + "docstrings": [ + "`concat(xs, ys)`\n\n Returns a fresh array containing the concatenation of the arrays `v1` and `v2`;so even if `v1` or `v2` is empty; it can not be shared\n\n ```rescript\n Belt.Array.concat([1, 2, 3], [4, 5]) == [1, 2, 3, 4, 5]\n\n Belt.Array.concat([], [\"a\", \"b\", \"c\"]) == [\"a\", \"b\", \"c\"]\n ```" + ], + "signature": "let concat: (t<'a>, t<'a>) => t<'a>" + }, + { + "id": "Belt.Array.concatMany", + "kind": "value", + "name": "concatMany", + "docstrings": [ + "`concatMany(xss)`\n\n Returns a fresh array as the concatenation of `xss` (an array of arrays)\n\n ```rescript\n Belt.Array.concatMany([[1, 2, 3], [4, 5, 6], [7, 8]]) == [1, 2, 3, 4, 5, 6, 7, 8]\n ```" + ], + "signature": "let concatMany: array> => t<'a>" + }, + { + "id": "Belt.Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`slice(xs, offset, len)` creates a new array with the len elements of `xs`\n starting at `offset` for `offset` can be negative;and is evaluated as\n `length(xs) - offset(slice, xs) - 1(1)` means get the last element as a\n singleton array `slice(xs, ~-len, len)` will return a copy of the array if the\n array does not have enough data; `slice` extracts through the end of sequence.\n\n if `len` is negative; returns the empty array.\n\n ```rescript\n Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=2, ~len=3) == [12, 13, 14]\n\n Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=-4, ~len=3) == [13, 14, 15]\n\n Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=4, ~len=9) == [14, 15, 16]\n ```" + ], + "signature": "let slice: (t<'a>, ~offset: int, ~len: int) => t<'a>" + }, + { + "id": "Belt.Array.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "docstrings": [ + "`sliceToEnd(xs, offset)` creates a new array with the elements of `xs` starting at `offset`\n\n `offset` can be negative; and is evaluated as `length(xs) - offset(sliceToEnd, xs) - 1` means get the last element as a singleton array\n\n `sliceToEnd(xs, 0)` will return a copy of the array\n\n ```rescript\n Belt.Array.sliceToEnd([10, 11, 12, 13, 14, 15, 16], 2) == [12, 13, 14, 15, 16]\n\n Belt.Array.sliceToEnd([10, 11, 12, 13, 14, 15, 16], -4) == [13, 14, 15, 16]\n ```" + ], + "signature": "let sliceToEnd: (t<'a>, int) => t<'a>" + }, + { + "id": "Belt.Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "`copy(a)`\n\n Returns a copy of a; that is; a fresh array containing the same elements as a." + ], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Belt.Array.fill", + "kind": "value", + "name": "fill", + "docstrings": [ + "`fill(arr, ~offset, ~len, x)`\n\n Modifies `arr` in place, storing `x` in elements number `offset` to `offset + len - 1`.\n `offset` can be negative; and is evaluated as `length(arr - offset)`\n\n `fill(arr, ~offset=-1, ~len=1)` means fill the last element, if the array does not have enough data; `fill` will ignore it\n\n ```rescript\n let arr = Belt.Array.makeBy(5, (i) => i)\n\n Belt.Array.fill(arr, ~offset=2, ~len=2, 9)\n\n arr == [0, 1, 9, 9, 4]\n\n Belt.Array.fill(arr, ~offset=7, ~len=2, 8)\n\n arr == [0, 1, 9, 9, 4]" + ], + "signature": "let fill: (t<'a>, ~offset: int, ~len: int, 'a) => unit" + }, + { + "id": "Belt.Array.blit", + "kind": "value", + "name": "blit", + "docstrings": [ + "`blit(~src=v1, ~srcOffset=o1, ~dst=v2, ~dstOffset=o2, ~len)`\n\n copies `len` elements from array `v1`;starting at element number `o1`;to array `v2`, starting at element number `o2`.\n\n It works correctly even if `v1` and `v2` are the same array;and the source and destination chunks overlap.\n\n `offset` can be negative; `-1` means `len - 1`; if `len + offset` is still negative;it will be set as 0\n\n For each of the examples;presume that `v1 == [10, 11, 12, 13, 14, 15, 16, 17]` and `v2 == [20, 21, 22, 23, 24, 25, 26, 27]`. The result shown is the content of the destination array.\n\n ```rescript\n let v1 = [10, 11, 12, 13, 14, 15, 16, 17]\n let v2 = [20, 21, 22, 23, 24, 25, 26, 27]\n\n Belt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v2, ~dstOffset=2, ~len=3)\n v2 == [20, 21, 14, 15, 16, 25, 26, 27]\n\n Belt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v1, ~dstOffset=2, ~len=3)\n v1 == [10, 11, 14, 15, 16, 15, 16, 17]\n ```" + ], + "signature": "let blit: (~src: t<'a>, ~srcOffset: int, ~dst: t<'a>, ~dstOffset: int, ~len: int) => unit" + }, + { + "id": "Belt.Array.blitUnsafe", + "kind": "value", + "name": "blitUnsafe", + "docstrings": [ + "Unsafe blit without bounds checking." + ], + "signature": "let blitUnsafe: (~src: t<'a>, ~srcOffset: int, ~dst: t<'a>, ~dstOffset: int, ~len: int) => unit" + }, + { + "id": "Belt.Array.forEachU", + "kind": "value", + "name": "forEachU", + "docstrings": [], + "signature": "let forEachU: (t<'a>, (. 'a) => unit) => unit" + }, + { + "id": "Belt.Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(xs, f)`\n\n Call `f` on each element of `xs` from the beginning to end. `f` returns `unit`;so no new array is created. Use `forEach` when you are primarily concerned with repetitively creating side effects.\n\n ```rescript\n Belt.Array.forEach([\"a\", \"b\", \"c\"], x => Js.log(\"Item: \" ++ x))\n\n /*\n prints:\n Item: a\n Item: b\n Item: c\n */\n let total = ref(0)\n\n Belt.Array.forEach([1, 2, 3, 4], x => total := total.contents + x)\n\n total.contents == 1 + 2 + 3 + 4\n ```" + ], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Belt.Array.mapU", + "kind": "value", + "name": "mapU", + "docstrings": [], + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => array<'b>" + }, + { + "id": "Belt.Array.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(xs, f)`\n\n Returns a new array by calling `f` for each element of `xs` from the beginning to end.\n\n ```rescript\n Belt.Array.map([1, 2], (x) => x + 1) == [3, 4]\n ```" + ], + "signature": "let map: (t<'a>, 'a => 'b) => array<'b>" + }, + { + "id": "Belt.Array.flatMapU", + "kind": "value", + "name": "flatMapU", + "docstrings": [], + "signature": "let flatMapU: (t<'a>, (. 'a) => array<'b>) => array<'b>" + }, + { + "id": "Belt.Array.flatMap", + "kind": "value", + "name": "flatMap", + "docstrings": [ + "`flatMap(xs, f)`\n\n **Returns** a new array by calling `f` for each element of `xs` from\n the beginning to end, concatenating the results.\n\n ```rescript\n flatMap([1, 2], x => [x + 10, x + 20]) == [11, 21, 12, 22]\n ```" + ], + "signature": "let flatMap: (t<'a>, 'a => array<'b>) => array<'b>" + }, + { + "id": "Belt.Array.getByU", + "kind": "value", + "name": "getByU", + "docstrings": [], + "signature": "let getByU: (t<'a>, (. 'a) => bool) => option<'a>" + }, + { + "id": "Belt.Array.getBy", + "kind": "value", + "name": "getBy", + "docstrings": [ + "`getBy(xs, p)`\n\n Returns `Some(value)` for the first value in `xs` that satisifies the predicate function `p`; returns `None` if no element satisifies the function.\n\n ```rescript\n Belt.Array.getBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(4)\n Belt.Array.getBy([15, 13, 11], (x) => mod(x, 2) == 0) == None\n ```" + ], + "signature": "let getBy: (t<'a>, 'a => bool) => option<'a>" + }, + { + "id": "Belt.Array.getIndexByU", + "kind": "value", + "name": "getIndexByU", + "docstrings": [], + "signature": "let getIndexByU: (t<'a>, (. 'a) => bool) => option" + }, + { + "id": "Belt.Array.getIndexBy", + "kind": "value", + "name": "getIndexBy", + "docstrings": [ + "`getIndexBy(xs, p)` returns `Some(index)` for the first value in `xs` that satisifies the predicate function `p`;\n returns `None` if no element satisifies the function.\n\n ```rescript\n Belt.Array.getIndexBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(1)\n Belt.Array.getIndexBy([15, 13, 11], (x) => mod(x, 2) == 0) == None\n ```" + ], + "signature": "let getIndexBy: (t<'a>, 'a => bool) => option" + }, + { + "id": "Belt.Array.keepU", + "kind": "value", + "name": "keepU", + "docstrings": [], + "signature": "let keepU: (t<'a>, (. 'a) => bool) => t<'a>" + }, + { + "id": "Belt.Array.keep", + "kind": "value", + "name": "keep", + "docstrings": [ + "`keep(xs, p)` returns a new array that keep all elements satisfy `p`." + ], + "signature": "let keep: (t<'a>, 'a => bool) => t<'a>" + }, + { + "id": "Belt.Array.keepWithIndexU", + "kind": "value", + "name": "keepWithIndexU", + "docstrings": [], + "signature": "let keepWithIndexU: (t<'a>, (. 'a, int) => bool) => t<'a>" + }, + { + "id": "Belt.Array.keepWithIndex", + "kind": "value", + "name": "keepWithIndex", + "docstrings": [ + "`keepWithIndex(xs, p)`\n\n Returns a new array that keep all elements satisfy `p`.\n\n ```rescript\n Belt.Array.keepWithIndex([1, 2, 3], (_x, i) => i == 1) == [2]\n ```" + ], + "signature": "let keepWithIndex: (t<'a>, ('a, int) => bool) => t<'a>" + }, + { + "id": "Belt.Array.keepMapU", + "kind": "value", + "name": "keepMapU", + "docstrings": [], + "signature": "let keepMapU: (t<'a>, (. 'a) => option<'b>) => array<'b>" + }, + { + "id": "Belt.Array.keepMap", + "kind": "value", + "name": "keepMap", + "docstrings": [ + "`keepMap(xs, p)`\n\n Returns a new array that keep all elements that return a non-None applied `p`.\n\n ```rescript\n Belt.Array.keepMap([1, 2, 3], x =>\n if mod(x, 2) == 0 {\n Some(x)\n } else {\n None\n }\n )\n == [2]\n ```" + ], + "signature": "let keepMap: (t<'a>, 'a => option<'b>) => array<'b>" + }, + { + "id": "Belt.Array.forEachWithIndexU", + "kind": "value", + "name": "forEachWithIndexU", + "docstrings": [], + "signature": "let forEachWithIndexU: (t<'a>, (. int, 'a) => unit) => unit" + }, + { + "id": "Belt.Array.forEachWithIndex", + "kind": "value", + "name": "forEachWithIndex", + "docstrings": [ + "`forEachWithIndex(xs, f)`\n\n The same as `Belt.Array.forEach`;\n except that `f` is supplied two arguments: the index starting from 0 and the element from `xs`.\n\n ```rescript\n Belt.Array.forEachWithIndex([\"a\", \"b\", \"c\"], (i, x) => Js.log(\"Item \" ++ Belt.Int.toString(i) ++ \" is \" ++ x))\n\n /*\n prints:\n Item 0 is a\n Item 1 is b\n Item 2 is cc\n */\n let total = ref(0)\n\n Belt.Array.forEachWithIndex([10, 11, 12, 13], (i, x) => total := total.contents + x + i)\n\n total.contents == 0 + 10 + 1 + 11 + 2 + 12 + 3 + 13\n ```" + ], + "signature": "let forEachWithIndex: (t<'a>, (int, 'a) => unit) => unit" + }, + { + "id": "Belt.Array.mapWithIndexU", + "kind": "value", + "name": "mapWithIndexU", + "docstrings": [], + "signature": "let mapWithIndexU: (t<'a>, (. int, 'a) => 'b) => array<'b>" + }, + { + "id": "Belt.Array.mapWithIndex", + "kind": "value", + "name": "mapWithIndex", + "docstrings": [ + "`mapWithIndex(xs, f)`\n\n `mapWithIndex(xs, f)` applies `f` to each element of `xs`. Function `f` takes two arguments: the index starting from 0 and the element from `xs`.\n\n ```rescript\n Belt.Array.mapWithIndex([1, 2, 3], (i, x) => i + x) == [0 + 1, 1 + 2, 2 + 3]\n ```" + ], + "signature": "let mapWithIndex: (t<'a>, (int, 'a) => 'b) => array<'b>" + }, + { + "id": "Belt.Array.partitionU", + "kind": "value", + "name": "partitionU", + "docstrings": [], + "signature": "let partitionU: (t<'a>, (. 'a) => bool) => (t<'a>, t<'a>)" + }, + { + "id": "Belt.Array.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition(f, a)` split array into tuple of two arrays based on predicate `f`; first of tuple where predicate cause true, second where predicate cause false\n\n ```rescript\n Belt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) == 0) == ([2, 4], [1, 3, 5])\n\n Belt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) != 0) == ([1, 3, 5], [2, 4])\n ```" + ], + "signature": "let partition: (t<'a>, 'a => bool) => (t<'a>, t<'a>)" + }, + { + "id": "Belt.Array.reduceU", + "kind": "value", + "name": "reduceU", + "docstrings": [], + "signature": "let reduceU: (array<'b>, 'a, (. 'a, 'b) => 'a) => 'a" + }, + { + "id": "Belt.Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce(xs, init, f)`\n\n Applies `f` to each element of `xs` from beginning to end. Function `f` has two parameters: the item from the list and an “accumulator”; which starts with a value of `init`. `reduce` returns the final value of the accumulator.\n\n ```rescript\n Belt.Array.reduce([2, 3, 4], 1, (a, b) => a + b) == 10\n\n Belt.Array.reduce([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"abcd\"\n ```" + ], + "signature": "let reduce: (array<'b>, 'a, ('a, 'b) => 'a) => 'a" + }, + { + "id": "Belt.Array.reduceReverseU", + "kind": "value", + "name": "reduceReverseU", + "docstrings": [], + "signature": "let reduceReverseU: (array<'b>, 'a, (. 'a, 'b) => 'a) => 'a" + }, + { + "id": "Belt.Array.reduceReverse", + "kind": "value", + "name": "reduceReverse", + "docstrings": [ + "`reduceReverse(xs, init, f)`\n\n Works like `Belt_Array.reduce`; except that function `f` is applied to each item of `xs` from the last back to the first.\n\n ```rescript\n Belt.Array.reduceReverse([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"dcba\"\n ```" + ], + "signature": "let reduceReverse: (array<'b>, 'a, ('a, 'b) => 'a) => 'a" + }, + { + "id": "Belt.Array.reduceReverse2U", + "kind": "value", + "name": "reduceReverse2U", + "docstrings": [], + "signature": "let reduceReverse2U: (t<'a>, array<'b>, 'c, (. 'c, 'a, 'b) => 'c) => 'c" + }, + { + "id": "Belt.Array.reduceReverse2", + "kind": "value", + "name": "reduceReverse2", + "docstrings": [ + "`reduceReverse2(xs, ys, init, f)`\n\n Reduces two arrays xs and ys;taking items starting at `min(length(xs), length(ys))` down to and including zero.\n\n ```rescript\n Belt.Array.reduceReverse2([1, 2, 3], [1, 2], 0, (acc, x, y) => acc + x + y) == 6\n ```" + ], + "signature": "let reduceReverse2: (t<'a>, array<'b>, 'c, ('c, 'a, 'b) => 'c) => 'c" + }, + { + "id": "Belt.Array.reduceWithIndexU", + "kind": "value", + "name": "reduceWithIndexU", + "docstrings": [], + "signature": "let reduceWithIndexU: (t<'a>, 'b, (. 'b, 'a, int) => 'b) => 'b" + }, + { + "id": "Belt.Array.reduceWithIndex", + "kind": "value", + "name": "reduceWithIndex", + "docstrings": [ + "Applies `f` to each element of `xs` from beginning to end. Function `f` has three parameters: the item from the array and an “accumulator”, which starts with a value of `init` and the index of each element. `reduceWithIndex` returns the final value of the accumulator.\n\n ```rescript\n Belt.Array.reduceWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16\n ```" + ], + "signature": "let reduceWithIndex: (t<'a>, 'b, ('b, 'a, int) => 'b) => 'b" + }, + { + "id": "Belt.Array.joinWithU", + "kind": "value", + "name": "joinWithU", + "docstrings": [], + "signature": "let joinWithU: (t<'a>, string, (. 'a) => string) => string" + }, + { + "id": "Belt.Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [ + "`joinWith(xs, sep, toString)`\n\n Concatenates all the elements of `xs` converted to string with `toString`, each separated by `sep`, the string\n given as the second argument, into a single string.\n If the array has only one element, then that element will be returned\n without using the separator.\n If the array is empty, the empty string will be returned.\n\n ```rescript\n joinWith([0, 1], \", \", string_of_int) == \"0, 1\"\n joinWith([], \" \", string_of_int) == \"\"\n joinWith([1], \" \", string_of_int) == \"1\"\n ```" + ], + "signature": "let joinWith: (t<'a>, string, 'a => string) => string" + }, + { + "id": "Belt.Array.someU", + "kind": "value", + "name": "someU", + "docstrings": [], + "signature": "let someU: (t<'a>, (. 'a) => bool) => bool" + }, + { + "id": "Belt.Array.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some(xs, p)`\n\n Returns true if at least one of the elements in `xs` satifies `p`; where `p` is a predicate: a function taking an element and returning a `bool`.\n\n ```rescript\n Belt.Array.some([2, 3, 4], (x) => mod(x, 2) == 1) == true\n\n Belt.Array.some([(-1), (-3), (-5)], (x) => x > 0) == false\n ```" + ], + "signature": "let some: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Belt.Array.everyU", + "kind": "value", + "name": "everyU", + "docstrings": [], + "signature": "let everyU: (t<'a>, (. 'a) => bool) => bool" + }, + { + "id": "Belt.Array.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every(xs, p)`\n\n Returns `true` if all elements satisfy `p`; where `p` is a predicate: a function taking an element and returning a `bool`.\n\n ```rescript\n Belt.Array.every([1, 3, 5], (x) => mod(x, 2) == 1) == true\n\n Belt.Array.every([1, (-3), 5], (x) => x > 0) == false\n ```" + ], + "signature": "let every: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Belt.Array.every2U", + "kind": "value", + "name": "every2U", + "docstrings": [], + "signature": "let every2U: (t<'a>, array<'b>, (. 'a, 'b) => bool) => bool" + }, + { + "id": "Belt.Array.every2", + "kind": "value", + "name": "every2", + "docstrings": [ + "`every2(xs, ys, p)`\n\n returns true if `p(xi, yi)` is true for all pairs of elements up to the shorter length (i.e. `min(length(xs), length(ys))`)\n\n ```rescript\n Belt.Array.every2([1, 2, 3], [0, 1], (a, b) => a > b) == true\n\n Belt.Array.every2([], [1], (x, y) => x > y) == true\n\n Belt.Array.every2([2, 3], [1], (x, y) => x > y) == true\n\n Belt.Array.every2([0, 1], [5, 0], (x, y) => x > y) == false\n ```" + ], + "signature": "let every2: (t<'a>, array<'b>, ('a, 'b) => bool) => bool" + }, + { + "id": "Belt.Array.some2U", + "kind": "value", + "name": "some2U", + "docstrings": [], + "signature": "let some2U: (t<'a>, array<'b>, (. 'a, 'b) => bool) => bool" + }, + { + "id": "Belt.Array.some2", + "kind": "value", + "name": "some2", + "docstrings": [ + "`some2(xs, ys, p)`\n\n returns true if `p(xi, yi)` is true for any pair of elements up to the shorter length (i.e. `min(length(xs), length(ys))`)\n\n ```rescript\n Belt.Array.some2([0, 2], [1, 0, 3], (a, b) => a > b) == true\n\n Belt.Array.some2([], [1], (x, y) => x > y) == false\n\n Belt.Array.some2([2, 3], [1, 4], (x, y) => x > y) == true\n ```" + ], + "signature": "let some2: (t<'a>, array<'b>, ('a, 'b) => bool) => bool" + }, + { + "id": "Belt.Array.cmpU", + "kind": "value", + "name": "cmpU", + "docstrings": [], + "signature": "let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int" + }, + { + "id": "Belt.Array.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [ + "`cmp(xs, ys, f)`\n\n Compared by length if `length(xs) != length(ys)`; returning -1 if `length(xs) < length(ys)` or 1 if `length(xs) > length(ys)`\n Otherwise compare one by one `f(x, y)`. `f` returns\n a negative number if `x` is “less than” `y`\n zero if `x` is “equal to” `y`\n a positive number if `x` is “greater than” `y`\n The comparison returns the first non-zero result of `f`;or zero if `f` returns zero for all `x` and `y`.\n\n ```rescript\n Belt.Array.cmp([1, 3, 5], [1, 4, 2], (a, b) => compare(a, b)) == -1\n\n Belt.Array.cmp([1, 3, 5], [1, 2, 3], (a, b) => compare(a, b)) == 1\n\n Belt.Array.cmp([1, 3, 5], [1, 3, 5], (a, b) => compare(a, b)) == 0\n ```" + ], + "signature": "let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int" + }, + { + "id": "Belt.Array.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool" + }, + { + "id": "Belt.Array.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "`eq(xs, ys)`\n\n return false if length is not the same\n otherwise compare items one by one using `f(xi, yi)`; and return true if all results are truefalse otherwise\n\n ```rescript\n Belt.Array.eq([1, 2, 3], [(-1), (-2), (-3)], (a, b) => abs(a) == abs(b)) == true\n ```" + ], + "signature": "let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool" + }, + { + "id": "Belt.Array.truncateToLengthUnsafe", + "kind": "value", + "name": "truncateToLengthUnsafe", + "docstrings": [ + "Unsafe `truncateToLengthUnsafe(xs, n)` sets length of array `xs` to `n`.\n\n If `n` is greater than the length of `xs`; the extra elements are set to `Js.Null_undefined.null`.\n\n If `n` is less than zero; raises a `RangeError`.\n\n ```rescript\n let arr = [\"ant\", \"bee\", \"cat\", \"dog\", \"elk\"]\n\n Belt.Array.truncateToLengthUnsafe(arr, 3)\n\n arr == [\"ant\", \"bee\", \"cat\"]\n ```" + ], + "signature": "let truncateToLengthUnsafe: (t<'a>, int) => unit" + }, + { + "id": "Belt.Array.initU", + "kind": "value", + "name": "initU", + "docstrings": [], + "signature": "let initU: (int, (. int) => 'a) => t<'a>" + }, + { + "id": "Belt.Array.init", + "kind": "value", + "name": "init", + "docstrings": [], + "signature": "let init: (int, int => 'a) => t<'a>" + }, + { + "id": "Belt.Array.push", + "kind": "value", + "name": "push", + "docstrings": [ + "`arr->push(item)` pushes an element `item` into an array `arr`." + ], + "signature": "let push: (t<'a>, 'a) => unit" + } + ] + }, + "belt/id": { + "id": "Belt.Id", + "name": "Id", + "docstrings": [ + "[`Belt.Id`]()\n\n Provide utilities to create identified comparators or hashes for\n data structures used below.\n\n It create a unique identifier per module of\n functions so that different data structures with slightly different\n comparison functions won't mix" + ], + "items": [ + { + "id": "Belt.Id.hash", + "kind": "type", + "name": "hash", + "docstrings": [ + "`('a, 'id) hash`\n\n Its runtime represenation is a `hash` function, but signed with a\n type parameter, so that different hash functions type mismatch" + ], + "signature": "type hash<'a, 'id>" + }, + { + "id": "Belt.Id.eq", + "kind": "type", + "name": "eq", + "docstrings": [ + "`('a, 'id) eq`\n\n Its runtime represenation is an `eq` function, but signed with a\n type parameter, so that different hash functions type mismatch" + ], + "signature": "type eq<'a, 'id>" + }, + { + "id": "Belt.Id.cmp", + "kind": "type", + "name": "cmp", + "docstrings": [ + "`('a,'id) cmp`\n\n Its runtime representation is a `cmp` function, but signed with a\n type parameter, so that different hash functions type mismatch" + ], + "signature": "type cmp<'a, 'id>" + }, + { + "id": "Belt.Id.comparable", + "kind": "type", + "name": "comparable", + "docstrings": [ + "`('key, 'id) cmparable` is a module of functions, here it only includes `cmp`.\n\n Unlike normal functions, when created, it comes with a unique identity (guaranteed\n by the type system).\n\n It can be created using function [`comparableU`]() or [`comparable`]().\n\n The idea of a unique identity when created is that it makes sure two sets would type\n mismatch if they use different comparison function" + ], + "signature": "type comparable<'key, 'id> = module(Comparable with type identity = 'id)\\ntype t = 'key" + }, + { + "id": "Belt.Id.comparableU", + "kind": "value", + "name": "comparableU", + "docstrings": [], + "signature": "let comparableU: (~cmp: (. 'a, 'a) => int) => module(Comparable with type t = 'a)" + }, + { + "id": "Belt.Id.comparable", + "kind": "value", + "name": "comparable", + "docstrings": [ + "```\n module C = (\n val Belt.Id.comparable ~cmp:(compare : int -> int -> int)\n )\n let m = Belt.Set.make(module C)\n ```\n\n Note that the name of C can not be ignored" + ], + "signature": "let comparable: (~cmp: ('a, 'a) => int) => module(Comparable with type t = 'a)" + }, + { + "id": "Belt.Id.hashable", + "kind": "type", + "name": "hashable", + "docstrings": [ + "`('key, 'id) hashable` is a module of functions, here it only includes `hash`, `eq`.\n\n Unlike normal functions, when created, it comes with a unique identity (guaranteed\n by the type system).\n\n It can be created using function [`hashableU`]() or [`hashable`]().\n\n The idea of a unique identity when created is that it makes sure two hash sets would type\n mismatch if they use different comparison function" + ], + "signature": "type hashable<'key, 'id> = module(Hashable with type identity = 'id)\\ntype t = 'key" + }, + { + "id": "Belt.Id.hashableU", + "kind": "value", + "name": "hashableU", + "docstrings": [], + "signature": "let hashableU: (~hash: (. 'a) => int, ~eq: (. 'a, 'a) => bool) => module(Hashable with type t = 'a)" + }, + { + "id": "Belt.Id.hashable", + "kind": "value", + "name": "hashable", + "docstrings": [], + "signature": "let hashable: (~hash: 'a => int, ~eq: ('a, 'a) => bool) => module(Hashable with type t = 'a)" + }, + { + "id": "Belt.Id.getHashInternal", + "kind": "value", + "name": "getHashInternal", + "docstrings": [], + "signature": "let getHashInternal: hash<'a, 'id> => (. 'a) => int" + }, + { + "id": "Belt.Id.getEqInternal", + "kind": "value", + "name": "getEqInternal", + "docstrings": [], + "signature": "let getEqInternal: eq<'a, 'id> => (. 'a, 'a) => bool" + }, + { + "id": "Belt.Id.getCmpInternal", + "kind": "value", + "name": "getCmpInternal", + "docstrings": [], + "signature": "let getCmpInternal: cmp<'a, 'id> => (. 'a, 'a) => int" + } + ] + } +} \ No newline at end of file diff --git a/data/dom.json b/data/dom.json new file mode 100644 index 000000000..643117076 --- /dev/null +++ b/data/dom.json @@ -0,0 +1,1990 @@ +{ + "dom": { + "id": "Dom", + "name": "Dom", + "docstrings": [], + "items": [ + { + "id": "Dom._baseClass", + "kind": "type", + "name": "_baseClass", + "docstrings": [], + "signature": "type _baseClass" + }, + { + "id": "Dom.animation", + "kind": "type", + "name": "animation", + "docstrings": [], + "signature": "type animation" + }, + { + "id": "Dom.cssStyleDeclaration", + "kind": "type", + "name": "cssStyleDeclaration", + "docstrings": [], + "signature": "type cssStyleDeclaration" + }, + { + "id": "Dom.cssStyleSheet", + "kind": "type", + "name": "cssStyleSheet", + "docstrings": [], + "signature": "type cssStyleSheet" + }, + { + "id": "Dom.eventTarget_like", + "kind": "type", + "name": "eventTarget_like", + "docstrings": [], + "signature": "type eventTarget_like<'a>" + }, + { + "id": "Dom.eventTarget", + "kind": "type", + "name": "eventTarget", + "docstrings": [], + "signature": "type eventTarget = eventTarget_like<_baseClass>" + }, + { + "id": "Dom._node", + "kind": "type", + "name": "_node", + "docstrings": [], + "signature": "type _node<'a>" + }, + { + "id": "Dom.node_like", + "kind": "type", + "name": "node_like", + "docstrings": [], + "signature": "type node_like<'a> = eventTarget_like<_node<'a>>" + }, + { + "id": "Dom.node", + "kind": "type", + "name": "node", + "docstrings": [], + "signature": "type node = node_like<_baseClass>" + }, + { + "id": "Dom._attr", + "kind": "type", + "name": "_attr", + "docstrings": [], + "signature": "type _attr" + }, + { + "id": "Dom.attr", + "kind": "type", + "name": "attr", + "docstrings": [], + "signature": "type attr = node_like<_attr>" + }, + { + "id": "Dom._characterData", + "kind": "type", + "name": "_characterData", + "docstrings": [], + "signature": "type _characterData<'a>" + }, + { + "id": "Dom.characterData_like", + "kind": "type", + "name": "characterData_like", + "docstrings": [], + "signature": "type characterData_like<'a> = node_like<_characterData<'a>>" + }, + { + "id": "Dom.characterData", + "kind": "type", + "name": "characterData", + "docstrings": [], + "signature": "type characterData = characterData_like<_baseClass>" + }, + { + "id": "Dom._cdataSection", + "kind": "type", + "name": "_cdataSection", + "docstrings": [], + "signature": "type _cdataSection" + }, + { + "id": "Dom.cdataSection", + "kind": "type", + "name": "cdataSection", + "docstrings": [], + "signature": "type cdataSection = characterData_like<_cdataSection>" + }, + { + "id": "Dom._comment", + "kind": "type", + "name": "_comment", + "docstrings": [], + "signature": "type _comment" + }, + { + "id": "Dom.comment", + "kind": "type", + "name": "comment", + "docstrings": [], + "signature": "type comment = characterData_like<_comment>" + }, + { + "id": "Dom._document", + "kind": "type", + "name": "_document", + "docstrings": [], + "signature": "type _document<'a>" + }, + { + "id": "Dom.document_like", + "kind": "type", + "name": "document_like", + "docstrings": [], + "signature": "type document_like<'a> = node_like<_document<'a>>" + }, + { + "id": "Dom.document", + "kind": "type", + "name": "document", + "docstrings": [], + "signature": "type document = document_like<_baseClass>" + }, + { + "id": "Dom._documentFragment", + "kind": "type", + "name": "_documentFragment", + "docstrings": [], + "signature": "type _documentFragment" + }, + { + "id": "Dom.documentFragment", + "kind": "type", + "name": "documentFragment", + "docstrings": [], + "signature": "type documentFragment = node_like<_documentFragment>" + }, + { + "id": "Dom._documentType", + "kind": "type", + "name": "_documentType", + "docstrings": [], + "signature": "type _documentType" + }, + { + "id": "Dom.documentType", + "kind": "type", + "name": "documentType", + "docstrings": [], + "signature": "type documentType = node_like<_documentType>" + }, + { + "id": "Dom.domImplementation", + "kind": "type", + "name": "domImplementation", + "docstrings": [], + "signature": "type domImplementation" + }, + { + "id": "Dom._element", + "kind": "type", + "name": "_element", + "docstrings": [], + "signature": "type _element<'a>" + }, + { + "id": "Dom.element_like", + "kind": "type", + "name": "element_like", + "docstrings": [], + "signature": "type element_like<'a> = node_like<_element<'a>>" + }, + { + "id": "Dom.element", + "kind": "type", + "name": "element", + "docstrings": [], + "signature": "type element = element_like<_baseClass>" + }, + { + "id": "Dom.htmlCollection", + "kind": "type", + "name": "htmlCollection", + "docstrings": [], + "signature": "type htmlCollection" + }, + { + "id": "Dom.htmlFormControlsCollection", + "kind": "type", + "name": "htmlFormControlsCollection", + "docstrings": [], + "signature": "type htmlFormControlsCollection" + }, + { + "id": "Dom.htmlOptionsCollection", + "kind": "type", + "name": "htmlOptionsCollection", + "docstrings": [], + "signature": "type htmlOptionsCollection" + }, + { + "id": "Dom.intersectionObserver", + "kind": "type", + "name": "intersectionObserver", + "docstrings": [], + "signature": "type intersectionObserver" + }, + { + "id": "Dom.intersectionObserverEntry", + "kind": "type", + "name": "intersectionObserverEntry", + "docstrings": [], + "signature": "type intersectionObserverEntry" + }, + { + "id": "Dom.mutationObserver", + "kind": "type", + "name": "mutationObserver", + "docstrings": [], + "signature": "type mutationObserver" + }, + { + "id": "Dom.mutationRecord", + "kind": "type", + "name": "mutationRecord", + "docstrings": [], + "signature": "type mutationRecord" + }, + { + "id": "Dom.performanceObserver", + "kind": "type", + "name": "performanceObserver", + "docstrings": [], + "signature": "type performanceObserver" + }, + { + "id": "Dom.performanceObserverEntryList", + "kind": "type", + "name": "performanceObserverEntryList", + "docstrings": [], + "signature": "type performanceObserverEntryList" + }, + { + "id": "Dom.reportingObserver", + "kind": "type", + "name": "reportingObserver", + "docstrings": [], + "signature": "type reportingObserver" + }, + { + "id": "Dom.reportingObserverOptions", + "kind": "type", + "name": "reportingObserverOptions", + "docstrings": [], + "signature": "type reportingObserverOptions" + }, + { + "id": "Dom.resizeObserver", + "kind": "type", + "name": "resizeObserver", + "docstrings": [], + "signature": "type resizeObserver" + }, + { + "id": "Dom.resizeObserverEntry", + "kind": "type", + "name": "resizeObserverEntry", + "docstrings": [], + "signature": "type resizeObserverEntry" + }, + { + "id": "Dom.namedNodeMap", + "kind": "type", + "name": "namedNodeMap", + "docstrings": [], + "signature": "type namedNodeMap" + }, + { + "id": "Dom.nodeList", + "kind": "type", + "name": "nodeList", + "docstrings": [], + "signature": "type nodeList" + }, + { + "id": "Dom.radioNodeList", + "kind": "type", + "name": "radioNodeList", + "docstrings": [], + "signature": "type radioNodeList" + }, + { + "id": "Dom.processingInstruction", + "kind": "type", + "name": "processingInstruction", + "docstrings": [], + "signature": "type processingInstruction" + }, + { + "id": "Dom._shadowRoot", + "kind": "type", + "name": "_shadowRoot", + "docstrings": [], + "signature": "type _shadowRoot" + }, + { + "id": "Dom.shadowRoot", + "kind": "type", + "name": "shadowRoot", + "docstrings": [], + "signature": "type shadowRoot = node_like<_shadowRoot>" + }, + { + "id": "Dom._text", + "kind": "type", + "name": "_text", + "docstrings": [], + "signature": "type _text" + }, + { + "id": "Dom.text", + "kind": "type", + "name": "text", + "docstrings": [], + "signature": "type text = characterData_like<_text>" + }, + { + "id": "Dom.domRect", + "kind": "type", + "name": "domRect", + "docstrings": [], + "signature": "type domRect" + }, + { + "id": "Dom.dataTransfer", + "kind": "type", + "name": "dataTransfer", + "docstrings": [], + "signature": "type dataTransfer" + }, + { + "id": "Dom.domStringMap", + "kind": "type", + "name": "domStringMap", + "docstrings": [], + "signature": "type domStringMap" + }, + { + "id": "Dom.history", + "kind": "type", + "name": "history", + "docstrings": [], + "signature": "type history" + }, + { + "id": "Dom._htmlDocument", + "kind": "type", + "name": "_htmlDocument", + "docstrings": [], + "signature": "type _htmlDocument" + }, + { + "id": "Dom.htmlDocument", + "kind": "type", + "name": "htmlDocument", + "docstrings": [], + "signature": "type htmlDocument = document_like<_htmlDocument>" + }, + { + "id": "Dom._htmlElement", + "kind": "type", + "name": "_htmlElement", + "docstrings": [], + "signature": "type _htmlElement<'a>" + }, + { + "id": "Dom.htmlElement_like", + "kind": "type", + "name": "htmlElement_like", + "docstrings": [], + "signature": "type htmlElement_like<'a> = element_like<_htmlElement<'a>>" + }, + { + "id": "Dom.htmlElement", + "kind": "type", + "name": "htmlElement", + "docstrings": [], + "signature": "type htmlElement = htmlElement_like<_baseClass>" + }, + { + "id": "Dom._htmlAnchorElement", + "kind": "type", + "name": "_htmlAnchorElement", + "docstrings": [], + "signature": "type _htmlAnchorElement" + }, + { + "id": "Dom.htmlAnchorElement", + "kind": "type", + "name": "htmlAnchorElement", + "docstrings": [], + "signature": "type htmlAnchorElement = htmlElement_like<_htmlAnchorElement>" + }, + { + "id": "Dom._htmlAreaElement", + "kind": "type", + "name": "_htmlAreaElement", + "docstrings": [], + "signature": "type _htmlAreaElement" + }, + { + "id": "Dom.htmlAreaElement", + "kind": "type", + "name": "htmlAreaElement", + "docstrings": [], + "signature": "type htmlAreaElement = htmlElement_like<_htmlAreaElement>" + }, + { + "id": "Dom._htmlAudioElement", + "kind": "type", + "name": "_htmlAudioElement", + "docstrings": [], + "signature": "type _htmlAudioElement" + }, + { + "id": "Dom.htmlAudioElement", + "kind": "type", + "name": "htmlAudioElement", + "docstrings": [], + "signature": "type htmlAudioElement = htmlElement_like<_htmlAudioElement>" + }, + { + "id": "Dom._htmlBaseElement", + "kind": "type", + "name": "_htmlBaseElement", + "docstrings": [], + "signature": "type _htmlBaseElement" + }, + { + "id": "Dom.htmlBaseElement", + "kind": "type", + "name": "htmlBaseElement", + "docstrings": [], + "signature": "type htmlBaseElement = htmlElement_like<_htmlBaseElement>" + }, + { + "id": "Dom._htmlBodyElement", + "kind": "type", + "name": "_htmlBodyElement", + "docstrings": [], + "signature": "type _htmlBodyElement" + }, + { + "id": "Dom.htmlBodyElement", + "kind": "type", + "name": "htmlBodyElement", + "docstrings": [], + "signature": "type htmlBodyElement = htmlElement_like<_htmlBodyElement>" + }, + { + "id": "Dom._htmlBrElement", + "kind": "type", + "name": "_htmlBrElement", + "docstrings": [], + "signature": "type _htmlBrElement" + }, + { + "id": "Dom.htmlBrElement", + "kind": "type", + "name": "htmlBrElement", + "docstrings": [], + "signature": "type htmlBrElement = htmlElement_like<_htmlBrElement>" + }, + { + "id": "Dom._htmlButtonElement", + "kind": "type", + "name": "_htmlButtonElement", + "docstrings": [], + "signature": "type _htmlButtonElement" + }, + { + "id": "Dom.htmlButtonElement", + "kind": "type", + "name": "htmlButtonElement", + "docstrings": [], + "signature": "type htmlButtonElement = htmlElement_like<_htmlButtonElement>" + }, + { + "id": "Dom._htmlCanvasElement", + "kind": "type", + "name": "_htmlCanvasElement", + "docstrings": [], + "signature": "type _htmlCanvasElement" + }, + { + "id": "Dom.htmlCanvasElement", + "kind": "type", + "name": "htmlCanvasElement", + "docstrings": [], + "signature": "type htmlCanvasElement = htmlElement_like<_htmlCanvasElement>" + }, + { + "id": "Dom._htmlDataElement", + "kind": "type", + "name": "_htmlDataElement", + "docstrings": [], + "signature": "type _htmlDataElement" + }, + { + "id": "Dom.htmlDataElement", + "kind": "type", + "name": "htmlDataElement", + "docstrings": [], + "signature": "type htmlDataElement = htmlElement_like<_htmlDataElement>" + }, + { + "id": "Dom._htmlDataListElement", + "kind": "type", + "name": "_htmlDataListElement", + "docstrings": [], + "signature": "type _htmlDataListElement" + }, + { + "id": "Dom.htmlDataListElement", + "kind": "type", + "name": "htmlDataListElement", + "docstrings": [], + "signature": "type htmlDataListElement = htmlElement_like<_htmlDataListElement>" + }, + { + "id": "Dom._htmlDialogElement", + "kind": "type", + "name": "_htmlDialogElement", + "docstrings": [], + "signature": "type _htmlDialogElement" + }, + { + "id": "Dom.htmlDialogElement", + "kind": "type", + "name": "htmlDialogElement", + "docstrings": [], + "signature": "type htmlDialogElement = htmlElement_like<_htmlDialogElement>" + }, + { + "id": "Dom._htmlDivElement", + "kind": "type", + "name": "_htmlDivElement", + "docstrings": [], + "signature": "type _htmlDivElement" + }, + { + "id": "Dom.htmlDivElement", + "kind": "type", + "name": "htmlDivElement", + "docstrings": [], + "signature": "type htmlDivElement = htmlElement_like<_htmlDivElement>" + }, + { + "id": "Dom._htmlDlistElement", + "kind": "type", + "name": "_htmlDlistElement", + "docstrings": [], + "signature": "type _htmlDlistElement" + }, + { + "id": "Dom.htmlDlistElement", + "kind": "type", + "name": "htmlDlistElement", + "docstrings": [], + "signature": "type htmlDlistElement = htmlElement_like<_htmlDlistElement>" + }, + { + "id": "Dom._htmlEmbedElement", + "kind": "type", + "name": "_htmlEmbedElement", + "docstrings": [], + "signature": "type _htmlEmbedElement" + }, + { + "id": "Dom.htmlEmbedElement", + "kind": "type", + "name": "htmlEmbedElement", + "docstrings": [], + "signature": "type htmlEmbedElement = htmlElement_like<_htmlEmbedElement>" + }, + { + "id": "Dom._htmlFieldSetElement", + "kind": "type", + "name": "_htmlFieldSetElement", + "docstrings": [], + "signature": "type _htmlFieldSetElement" + }, + { + "id": "Dom.htmlFieldSetElement", + "kind": "type", + "name": "htmlFieldSetElement", + "docstrings": [], + "signature": "type htmlFieldSetElement = htmlElement_like<_htmlFieldSetElement>" + }, + { + "id": "Dom._htmlFormElement", + "kind": "type", + "name": "_htmlFormElement", + "docstrings": [], + "signature": "type _htmlFormElement" + }, + { + "id": "Dom.htmlFormElement", + "kind": "type", + "name": "htmlFormElement", + "docstrings": [], + "signature": "type htmlFormElement = htmlElement_like<_htmlFormElement>" + }, + { + "id": "Dom._htmlHeadElement", + "kind": "type", + "name": "_htmlHeadElement", + "docstrings": [], + "signature": "type _htmlHeadElement" + }, + { + "id": "Dom.htmlHeadElement", + "kind": "type", + "name": "htmlHeadElement", + "docstrings": [], + "signature": "type htmlHeadElement = htmlElement_like<_htmlHeadElement>" + }, + { + "id": "Dom._htmlHeadingElement", + "kind": "type", + "name": "_htmlHeadingElement", + "docstrings": [], + "signature": "type _htmlHeadingElement" + }, + { + "id": "Dom.htmlHeadingElement", + "kind": "type", + "name": "htmlHeadingElement", + "docstrings": [], + "signature": "type htmlHeadingElement = htmlElement_like<_htmlHeadingElement>" + }, + { + "id": "Dom._htmlHrElement", + "kind": "type", + "name": "_htmlHrElement", + "docstrings": [], + "signature": "type _htmlHrElement" + }, + { + "id": "Dom.htmlHrElement", + "kind": "type", + "name": "htmlHrElement", + "docstrings": [], + "signature": "type htmlHrElement = htmlElement_like<_htmlHrElement>" + }, + { + "id": "Dom._htmlHtmlElement", + "kind": "type", + "name": "_htmlHtmlElement", + "docstrings": [], + "signature": "type _htmlHtmlElement" + }, + { + "id": "Dom.htmlHtmlElement", + "kind": "type", + "name": "htmlHtmlElement", + "docstrings": [], + "signature": "type htmlHtmlElement = htmlElement_like<_htmlHtmlElement>" + }, + { + "id": "Dom._htmlIframeElement", + "kind": "type", + "name": "_htmlIframeElement", + "docstrings": [], + "signature": "type _htmlIframeElement" + }, + { + "id": "Dom.htmlIframeElement", + "kind": "type", + "name": "htmlIframeElement", + "docstrings": [], + "signature": "type htmlIframeElement = htmlElement_like<_htmlIframeElement>" + }, + { + "id": "Dom._htmlImageElement", + "kind": "type", + "name": "_htmlImageElement", + "docstrings": [], + "signature": "type _htmlImageElement" + }, + { + "id": "Dom.htmlImageElement", + "kind": "type", + "name": "htmlImageElement", + "docstrings": [], + "signature": "type htmlImageElement = htmlElement_like<_htmlImageElement>" + }, + { + "id": "Dom._htmlInputElement", + "kind": "type", + "name": "_htmlInputElement", + "docstrings": [], + "signature": "type _htmlInputElement" + }, + { + "id": "Dom.htmlInputElement", + "kind": "type", + "name": "htmlInputElement", + "docstrings": [], + "signature": "type htmlInputElement = htmlElement_like<_htmlInputElement>" + }, + { + "id": "Dom._htmlLabelElement", + "kind": "type", + "name": "_htmlLabelElement", + "docstrings": [], + "signature": "type _htmlLabelElement" + }, + { + "id": "Dom.htmlLabelElement", + "kind": "type", + "name": "htmlLabelElement", + "docstrings": [], + "signature": "type htmlLabelElement = htmlElement_like<_htmlLabelElement>" + }, + { + "id": "Dom._htmlLegendElement", + "kind": "type", + "name": "_htmlLegendElement", + "docstrings": [], + "signature": "type _htmlLegendElement" + }, + { + "id": "Dom.htmlLegendElement", + "kind": "type", + "name": "htmlLegendElement", + "docstrings": [], + "signature": "type htmlLegendElement = htmlElement_like<_htmlLegendElement>" + }, + { + "id": "Dom._htmlLiElement", + "kind": "type", + "name": "_htmlLiElement", + "docstrings": [], + "signature": "type _htmlLiElement" + }, + { + "id": "Dom.htmlLiElement", + "kind": "type", + "name": "htmlLiElement", + "docstrings": [], + "signature": "type htmlLiElement = htmlElement_like<_htmlLiElement>" + }, + { + "id": "Dom._htmlLinkElement", + "kind": "type", + "name": "_htmlLinkElement", + "docstrings": [], + "signature": "type _htmlLinkElement" + }, + { + "id": "Dom.htmlLinkElement", + "kind": "type", + "name": "htmlLinkElement", + "docstrings": [], + "signature": "type htmlLinkElement = htmlElement_like<_htmlLinkElement>" + }, + { + "id": "Dom._htmlMapElement", + "kind": "type", + "name": "_htmlMapElement", + "docstrings": [], + "signature": "type _htmlMapElement" + }, + { + "id": "Dom.htmlMapElement", + "kind": "type", + "name": "htmlMapElement", + "docstrings": [], + "signature": "type htmlMapElement = htmlElement_like<_htmlMapElement>" + }, + { + "id": "Dom._htmlMediaElement", + "kind": "type", + "name": "_htmlMediaElement", + "docstrings": [], + "signature": "type _htmlMediaElement" + }, + { + "id": "Dom.htmlMediaElement", + "kind": "type", + "name": "htmlMediaElement", + "docstrings": [], + "signature": "type htmlMediaElement = htmlElement_like<_htmlMediaElement>" + }, + { + "id": "Dom._htmlMenuElement", + "kind": "type", + "name": "_htmlMenuElement", + "docstrings": [], + "signature": "type _htmlMenuElement" + }, + { + "id": "Dom.htmlMenuElement", + "kind": "type", + "name": "htmlMenuElement", + "docstrings": [], + "signature": "type htmlMenuElement = htmlElement_like<_htmlMenuElement>" + }, + { + "id": "Dom._htmlMetaElement", + "kind": "type", + "name": "_htmlMetaElement", + "docstrings": [], + "signature": "type _htmlMetaElement" + }, + { + "id": "Dom.htmlMetaElement", + "kind": "type", + "name": "htmlMetaElement", + "docstrings": [], + "signature": "type htmlMetaElement = htmlElement_like<_htmlMetaElement>" + }, + { + "id": "Dom._htmlMeterElement", + "kind": "type", + "name": "_htmlMeterElement", + "docstrings": [], + "signature": "type _htmlMeterElement" + }, + { + "id": "Dom.htmlMeterElement", + "kind": "type", + "name": "htmlMeterElement", + "docstrings": [], + "signature": "type htmlMeterElement = htmlElement_like<_htmlMeterElement>" + }, + { + "id": "Dom._htmlModElement", + "kind": "type", + "name": "_htmlModElement", + "docstrings": [], + "signature": "type _htmlModElement" + }, + { + "id": "Dom.htmlModElement", + "kind": "type", + "name": "htmlModElement", + "docstrings": [], + "signature": "type htmlModElement = htmlElement_like<_htmlModElement>" + }, + { + "id": "Dom._htmlOListElement", + "kind": "type", + "name": "_htmlOListElement", + "docstrings": [], + "signature": "type _htmlOListElement" + }, + { + "id": "Dom.htmlOListElement", + "kind": "type", + "name": "htmlOListElement", + "docstrings": [], + "signature": "type htmlOListElement = htmlElement_like<_htmlOListElement>" + }, + { + "id": "Dom._htmlObjectElement", + "kind": "type", + "name": "_htmlObjectElement", + "docstrings": [], + "signature": "type _htmlObjectElement" + }, + { + "id": "Dom.htmlObjectElement", + "kind": "type", + "name": "htmlObjectElement", + "docstrings": [], + "signature": "type htmlObjectElement = htmlElement_like<_htmlObjectElement>" + }, + { + "id": "Dom._htmlOptGroupElement", + "kind": "type", + "name": "_htmlOptGroupElement", + "docstrings": [], + "signature": "type _htmlOptGroupElement" + }, + { + "id": "Dom.htmlOptGroupElement", + "kind": "type", + "name": "htmlOptGroupElement", + "docstrings": [], + "signature": "type htmlOptGroupElement = htmlElement_like<_htmlOptGroupElement>" + }, + { + "id": "Dom._htmlOptionElement", + "kind": "type", + "name": "_htmlOptionElement", + "docstrings": [], + "signature": "type _htmlOptionElement" + }, + { + "id": "Dom.htmlOptionElement", + "kind": "type", + "name": "htmlOptionElement", + "docstrings": [], + "signature": "type htmlOptionElement = htmlElement_like<_htmlOptionElement>" + }, + { + "id": "Dom._htmlOutputElement", + "kind": "type", + "name": "_htmlOutputElement", + "docstrings": [], + "signature": "type _htmlOutputElement" + }, + { + "id": "Dom.htmlOutputElement", + "kind": "type", + "name": "htmlOutputElement", + "docstrings": [], + "signature": "type htmlOutputElement = htmlElement_like<_htmlOutputElement>" + }, + { + "id": "Dom._htmlParagraphElement", + "kind": "type", + "name": "_htmlParagraphElement", + "docstrings": [], + "signature": "type _htmlParagraphElement" + }, + { + "id": "Dom.htmlParagraphElement", + "kind": "type", + "name": "htmlParagraphElement", + "docstrings": [], + "signature": "type htmlParagraphElement = htmlElement_like<_htmlParagraphElement>" + }, + { + "id": "Dom._htmlParamElement", + "kind": "type", + "name": "_htmlParamElement", + "docstrings": [], + "signature": "type _htmlParamElement" + }, + { + "id": "Dom.htmlParamElement", + "kind": "type", + "name": "htmlParamElement", + "docstrings": [], + "signature": "type htmlParamElement = htmlElement_like<_htmlParamElement>" + }, + { + "id": "Dom._htmlPreElement", + "kind": "type", + "name": "_htmlPreElement", + "docstrings": [], + "signature": "type _htmlPreElement" + }, + { + "id": "Dom.htmlPreElement", + "kind": "type", + "name": "htmlPreElement", + "docstrings": [], + "signature": "type htmlPreElement = htmlElement_like<_htmlPreElement>" + }, + { + "id": "Dom._htmlProgressElement", + "kind": "type", + "name": "_htmlProgressElement", + "docstrings": [], + "signature": "type _htmlProgressElement" + }, + { + "id": "Dom.htmlProgressElement", + "kind": "type", + "name": "htmlProgressElement", + "docstrings": [], + "signature": "type htmlProgressElement = htmlElement_like<_htmlProgressElement>" + }, + { + "id": "Dom._htmlQuoteElement", + "kind": "type", + "name": "_htmlQuoteElement", + "docstrings": [], + "signature": "type _htmlQuoteElement" + }, + { + "id": "Dom.htmlQuoteElement", + "kind": "type", + "name": "htmlQuoteElement", + "docstrings": [], + "signature": "type htmlQuoteElement = htmlElement_like<_htmlQuoteElement>" + }, + { + "id": "Dom._htmlScriptElement", + "kind": "type", + "name": "_htmlScriptElement", + "docstrings": [], + "signature": "type _htmlScriptElement" + }, + { + "id": "Dom.htmlScriptElement", + "kind": "type", + "name": "htmlScriptElement", + "docstrings": [], + "signature": "type htmlScriptElement = htmlElement_like<_htmlScriptElement>" + }, + { + "id": "Dom._htmlSelectElement", + "kind": "type", + "name": "_htmlSelectElement", + "docstrings": [], + "signature": "type _htmlSelectElement" + }, + { + "id": "Dom.htmlSelectElement", + "kind": "type", + "name": "htmlSelectElement", + "docstrings": [], + "signature": "type htmlSelectElement = htmlElement_like<_htmlSelectElement>" + }, + { + "id": "Dom._htmlSlotElement", + "kind": "type", + "name": "_htmlSlotElement", + "docstrings": [], + "signature": "type _htmlSlotElement" + }, + { + "id": "Dom.htmlSlotElement", + "kind": "type", + "name": "htmlSlotElement", + "docstrings": [], + "signature": "type htmlSlotElement = htmlElement_like<_htmlSlotElement>" + }, + { + "id": "Dom._htmlSourceElement", + "kind": "type", + "name": "_htmlSourceElement", + "docstrings": [], + "signature": "type _htmlSourceElement" + }, + { + "id": "Dom.htmlSourceElement", + "kind": "type", + "name": "htmlSourceElement", + "docstrings": [], + "signature": "type htmlSourceElement = htmlElement_like<_htmlSourceElement>" + }, + { + "id": "Dom._htmlSpanElement", + "kind": "type", + "name": "_htmlSpanElement", + "docstrings": [], + "signature": "type _htmlSpanElement" + }, + { + "id": "Dom.htmlSpanElement", + "kind": "type", + "name": "htmlSpanElement", + "docstrings": [], + "signature": "type htmlSpanElement = htmlElement_like<_htmlSpanElement>" + }, + { + "id": "Dom._htmlStyleElement", + "kind": "type", + "name": "_htmlStyleElement", + "docstrings": [], + "signature": "type _htmlStyleElement" + }, + { + "id": "Dom.htmlStyleElement", + "kind": "type", + "name": "htmlStyleElement", + "docstrings": [], + "signature": "type htmlStyleElement = htmlElement_like<_htmlStyleElement>" + }, + { + "id": "Dom._htmlTableCaptionElement", + "kind": "type", + "name": "_htmlTableCaptionElement", + "docstrings": [], + "signature": "type _htmlTableCaptionElement" + }, + { + "id": "Dom.htmlTableCaptionElement", + "kind": "type", + "name": "htmlTableCaptionElement", + "docstrings": [], + "signature": "type htmlTableCaptionElement = htmlElement_like<_htmlTableCaptionElement>" + }, + { + "id": "Dom._htmlTableCellElement", + "kind": "type", + "name": "_htmlTableCellElement", + "docstrings": [], + "signature": "type _htmlTableCellElement" + }, + { + "id": "Dom.htmlTableCellElement", + "kind": "type", + "name": "htmlTableCellElement", + "docstrings": [], + "signature": "type htmlTableCellElement = htmlElement_like<_htmlTableCellElement>" + }, + { + "id": "Dom._htmlTableColElement", + "kind": "type", + "name": "_htmlTableColElement", + "docstrings": [], + "signature": "type _htmlTableColElement" + }, + { + "id": "Dom.htmlTableColElement", + "kind": "type", + "name": "htmlTableColElement", + "docstrings": [], + "signature": "type htmlTableColElement = htmlElement_like<_htmlTableColElement>" + }, + { + "id": "Dom._htmlTableDataCellElement", + "kind": "type", + "name": "_htmlTableDataCellElement", + "docstrings": [], + "signature": "type _htmlTableDataCellElement" + }, + { + "id": "Dom.htmlTableDataCellElement", + "kind": "type", + "name": "htmlTableDataCellElement", + "docstrings": [], + "signature": "type htmlTableDataCellElement = htmlElement_like<_htmlTableDataCellElement>" + }, + { + "id": "Dom._htmlTableElement", + "kind": "type", + "name": "_htmlTableElement", + "docstrings": [], + "signature": "type _htmlTableElement" + }, + { + "id": "Dom.htmlTableElement", + "kind": "type", + "name": "htmlTableElement", + "docstrings": [], + "signature": "type htmlTableElement = htmlElement_like<_htmlTableElement>" + }, + { + "id": "Dom._htmlTableHeaderCellElement", + "kind": "type", + "name": "_htmlTableHeaderCellElement", + "docstrings": [], + "signature": "type _htmlTableHeaderCellElement" + }, + { + "id": "Dom.htmlTableHeaderCellElement", + "kind": "type", + "name": "htmlTableHeaderCellElement", + "docstrings": [], + "signature": "type htmlTableHeaderCellElement = htmlElement_like<_htmlTableHeaderCellElement>" + }, + { + "id": "Dom._htmlTableRowElement", + "kind": "type", + "name": "_htmlTableRowElement", + "docstrings": [], + "signature": "type _htmlTableRowElement" + }, + { + "id": "Dom.htmlTableRowElement", + "kind": "type", + "name": "htmlTableRowElement", + "docstrings": [], + "signature": "type htmlTableRowElement = htmlElement_like<_htmlTableRowElement>" + }, + { + "id": "Dom._htmlTableSectionElement", + "kind": "type", + "name": "_htmlTableSectionElement", + "docstrings": [], + "signature": "type _htmlTableSectionElement" + }, + { + "id": "Dom.htmlTableSectionElement", + "kind": "type", + "name": "htmlTableSectionElement", + "docstrings": [], + "signature": "type htmlTableSectionElement = htmlElement_like<_htmlTableSectionElement>" + }, + { + "id": "Dom._htmlTextAreaElement", + "kind": "type", + "name": "_htmlTextAreaElement", + "docstrings": [], + "signature": "type _htmlTextAreaElement" + }, + { + "id": "Dom.htmlTextAreaElement", + "kind": "type", + "name": "htmlTextAreaElement", + "docstrings": [], + "signature": "type htmlTextAreaElement = htmlElement_like<_htmlTextAreaElement>" + }, + { + "id": "Dom._htmlTimeElement", + "kind": "type", + "name": "_htmlTimeElement", + "docstrings": [], + "signature": "type _htmlTimeElement" + }, + { + "id": "Dom.htmlTimeElement", + "kind": "type", + "name": "htmlTimeElement", + "docstrings": [], + "signature": "type htmlTimeElement = htmlElement_like<_htmlTimeElement>" + }, + { + "id": "Dom._htmlTitleElement", + "kind": "type", + "name": "_htmlTitleElement", + "docstrings": [], + "signature": "type _htmlTitleElement" + }, + { + "id": "Dom.htmlTitleElement", + "kind": "type", + "name": "htmlTitleElement", + "docstrings": [], + "signature": "type htmlTitleElement = htmlElement_like<_htmlTitleElement>" + }, + { + "id": "Dom._htmlTrackElement", + "kind": "type", + "name": "_htmlTrackElement", + "docstrings": [], + "signature": "type _htmlTrackElement" + }, + { + "id": "Dom.htmlTrackElement", + "kind": "type", + "name": "htmlTrackElement", + "docstrings": [], + "signature": "type htmlTrackElement = htmlElement_like<_htmlTrackElement>" + }, + { + "id": "Dom._htmlUlistElement", + "kind": "type", + "name": "_htmlUlistElement", + "docstrings": [], + "signature": "type _htmlUlistElement" + }, + { + "id": "Dom.htmlUlistElement", + "kind": "type", + "name": "htmlUlistElement", + "docstrings": [], + "signature": "type htmlUlistElement = htmlElement_like<_htmlUlistElement>" + }, + { + "id": "Dom._htmlUnknownElement", + "kind": "type", + "name": "_htmlUnknownElement", + "docstrings": [], + "signature": "type _htmlUnknownElement" + }, + { + "id": "Dom.htmlUnknownElement", + "kind": "type", + "name": "htmlUnknownElement", + "docstrings": [], + "signature": "type htmlUnknownElement = htmlElement_like<_htmlUnknownElement>" + }, + { + "id": "Dom._htmlVideoElement", + "kind": "type", + "name": "_htmlVideoElement", + "docstrings": [], + "signature": "type _htmlVideoElement" + }, + { + "id": "Dom.htmlVideoElement", + "kind": "type", + "name": "htmlVideoElement", + "docstrings": [], + "signature": "type htmlVideoElement = htmlElement_like<_htmlVideoElement>" + }, + { + "id": "Dom.location", + "kind": "type", + "name": "location", + "docstrings": [], + "signature": "type location" + }, + { + "id": "Dom.window", + "kind": "type", + "name": "window", + "docstrings": [], + "signature": "type window" + }, + { + "id": "Dom._xmlDocument", + "kind": "type", + "name": "_xmlDocument", + "docstrings": [], + "signature": "type _xmlDocument" + }, + { + "id": "Dom.xmlDocument", + "kind": "type", + "name": "xmlDocument", + "docstrings": [], + "signature": "type xmlDocument = document_like<_xmlDocument>" + }, + { + "id": "Dom.event_like", + "kind": "type", + "name": "event_like", + "docstrings": [], + "signature": "type event_like<'a>" + }, + { + "id": "Dom.event", + "kind": "type", + "name": "event", + "docstrings": [], + "signature": "type event = event_like<_baseClass>" + }, + { + "id": "Dom._uiEvent", + "kind": "type", + "name": "_uiEvent", + "docstrings": [], + "signature": "type _uiEvent<'a>" + }, + { + "id": "Dom.uiEvent_like", + "kind": "type", + "name": "uiEvent_like", + "docstrings": [], + "signature": "type uiEvent_like<'a> = event_like<_uiEvent<'a>>" + }, + { + "id": "Dom.uiEvent", + "kind": "type", + "name": "uiEvent", + "docstrings": [], + "signature": "type uiEvent = uiEvent_like<_baseClass>" + }, + { + "id": "Dom._animationEvent", + "kind": "type", + "name": "_animationEvent", + "docstrings": [], + "signature": "type _animationEvent" + }, + { + "id": "Dom.animationEvent", + "kind": "type", + "name": "animationEvent", + "docstrings": [], + "signature": "type animationEvent = event_like<_animationEvent>" + }, + { + "id": "Dom._beforeUnloadEvent", + "kind": "type", + "name": "_beforeUnloadEvent", + "docstrings": [], + "signature": "type _beforeUnloadEvent" + }, + { + "id": "Dom.beforeUnloadEvent", + "kind": "type", + "name": "beforeUnloadEvent", + "docstrings": [], + "signature": "type beforeUnloadEvent = event_like<_beforeUnloadEvent>" + }, + { + "id": "Dom._clipboardEvent", + "kind": "type", + "name": "_clipboardEvent", + "docstrings": [], + "signature": "type _clipboardEvent" + }, + { + "id": "Dom.clipboardEvent", + "kind": "type", + "name": "clipboardEvent", + "docstrings": [], + "signature": "type clipboardEvent = event_like<_clipboardEvent>" + }, + { + "id": "Dom._closeEvent", + "kind": "type", + "name": "_closeEvent", + "docstrings": [], + "signature": "type _closeEvent" + }, + { + "id": "Dom.closeEvent", + "kind": "type", + "name": "closeEvent", + "docstrings": [], + "signature": "type closeEvent = event_like<_closeEvent>" + }, + { + "id": "Dom._compositionEvent", + "kind": "type", + "name": "_compositionEvent", + "docstrings": [], + "signature": "type _compositionEvent" + }, + { + "id": "Dom.compositionEvent", + "kind": "type", + "name": "compositionEvent", + "docstrings": [], + "signature": "type compositionEvent = uiEvent_like<_compositionEvent>" + }, + { + "id": "Dom._customEvent", + "kind": "type", + "name": "_customEvent", + "docstrings": [], + "signature": "type _customEvent" + }, + { + "id": "Dom.customEvent", + "kind": "type", + "name": "customEvent", + "docstrings": [], + "signature": "type customEvent = event_like<_customEvent>" + }, + { + "id": "Dom._dragEvent", + "kind": "type", + "name": "_dragEvent", + "docstrings": [], + "signature": "type _dragEvent" + }, + { + "id": "Dom.dragEvent", + "kind": "type", + "name": "dragEvent", + "docstrings": [], + "signature": "type dragEvent = event_like<_dragEvent>" + }, + { + "id": "Dom._errorEvent", + "kind": "type", + "name": "_errorEvent", + "docstrings": [], + "signature": "type _errorEvent" + }, + { + "id": "Dom.errorEvent", + "kind": "type", + "name": "errorEvent", + "docstrings": [], + "signature": "type errorEvent = event_like<_errorEvent>" + }, + { + "id": "Dom._focusEvent", + "kind": "type", + "name": "_focusEvent", + "docstrings": [], + "signature": "type _focusEvent" + }, + { + "id": "Dom.focusEvent", + "kind": "type", + "name": "focusEvent", + "docstrings": [], + "signature": "type focusEvent = uiEvent_like<_focusEvent>" + }, + { + "id": "Dom._idbVersionChangeEvent", + "kind": "type", + "name": "_idbVersionChangeEvent", + "docstrings": [], + "signature": "type _idbVersionChangeEvent" + }, + { + "id": "Dom.idbVersionChangeEvent", + "kind": "type", + "name": "idbVersionChangeEvent", + "docstrings": [], + "signature": "type idbVersionChangeEvent = event_like<_idbVersionChangeEvent>" + }, + { + "id": "Dom._inputEvent", + "kind": "type", + "name": "_inputEvent", + "docstrings": [], + "signature": "type _inputEvent" + }, + { + "id": "Dom.inputEvent", + "kind": "type", + "name": "inputEvent", + "docstrings": [], + "signature": "type inputEvent = uiEvent_like<_inputEvent>" + }, + { + "id": "Dom._keyboardEvent", + "kind": "type", + "name": "_keyboardEvent", + "docstrings": [], + "signature": "type _keyboardEvent" + }, + { + "id": "Dom.keyboardEvent", + "kind": "type", + "name": "keyboardEvent", + "docstrings": [], + "signature": "type keyboardEvent = uiEvent_like<_keyboardEvent>" + }, + { + "id": "Dom._mouseEvent", + "kind": "type", + "name": "_mouseEvent", + "docstrings": [], + "signature": "type _mouseEvent<'a>" + }, + { + "id": "Dom.mouseEvent_like", + "kind": "type", + "name": "mouseEvent_like", + "docstrings": [], + "signature": "type mouseEvent_like<'a> = uiEvent_like<_mouseEvent<'a>>" + }, + { + "id": "Dom.mouseEvent", + "kind": "type", + "name": "mouseEvent", + "docstrings": [], + "signature": "type mouseEvent = mouseEvent_like<_baseClass>" + }, + { + "id": "Dom._pageTransitionEvent", + "kind": "type", + "name": "_pageTransitionEvent", + "docstrings": [], + "signature": "type _pageTransitionEvent" + }, + { + "id": "Dom.pageTransitionEvent", + "kind": "type", + "name": "pageTransitionEvent", + "docstrings": [], + "signature": "type pageTransitionEvent = event_like<_pageTransitionEvent>" + }, + { + "id": "Dom._pointerEvent", + "kind": "type", + "name": "_pointerEvent", + "docstrings": [], + "signature": "type _pointerEvent" + }, + { + "id": "Dom.pointerEvent", + "kind": "type", + "name": "pointerEvent", + "docstrings": [], + "signature": "type pointerEvent = mouseEvent_like<_pointerEvent>" + }, + { + "id": "Dom._popStateEvent", + "kind": "type", + "name": "_popStateEvent", + "docstrings": [], + "signature": "type _popStateEvent" + }, + { + "id": "Dom.popStateEvent", + "kind": "type", + "name": "popStateEvent", + "docstrings": [], + "signature": "type popStateEvent = event_like<_popStateEvent>" + }, + { + "id": "Dom._progressEvent", + "kind": "type", + "name": "_progressEvent", + "docstrings": [], + "signature": "type _progressEvent" + }, + { + "id": "Dom.progressEvent", + "kind": "type", + "name": "progressEvent", + "docstrings": [], + "signature": "type progressEvent = event_like<_progressEvent>" + }, + { + "id": "Dom._relatedEvent", + "kind": "type", + "name": "_relatedEvent", + "docstrings": [], + "signature": "type _relatedEvent" + }, + { + "id": "Dom.relatedEvent", + "kind": "type", + "name": "relatedEvent", + "docstrings": [], + "signature": "type relatedEvent = event_like<_relatedEvent>" + }, + { + "id": "Dom._storageEvent", + "kind": "type", + "name": "_storageEvent", + "docstrings": [], + "signature": "type _storageEvent" + }, + { + "id": "Dom.storageEvent", + "kind": "type", + "name": "storageEvent", + "docstrings": [], + "signature": "type storageEvent = event_like<_storageEvent>" + }, + { + "id": "Dom._svgZoomEvent", + "kind": "type", + "name": "_svgZoomEvent", + "docstrings": [], + "signature": "type _svgZoomEvent" + }, + { + "id": "Dom.svgZoomEvent", + "kind": "type", + "name": "svgZoomEvent", + "docstrings": [], + "signature": "type svgZoomEvent = event_like<_svgZoomEvent>" + }, + { + "id": "Dom._timeEvent", + "kind": "type", + "name": "_timeEvent", + "docstrings": [], + "signature": "type _timeEvent" + }, + { + "id": "Dom.timeEvent", + "kind": "type", + "name": "timeEvent", + "docstrings": [], + "signature": "type timeEvent = event_like<_timeEvent>" + }, + { + "id": "Dom._touchEvent", + "kind": "type", + "name": "_touchEvent", + "docstrings": [], + "signature": "type _touchEvent" + }, + { + "id": "Dom.touchEvent", + "kind": "type", + "name": "touchEvent", + "docstrings": [], + "signature": "type touchEvent = uiEvent_like<_touchEvent>" + }, + { + "id": "Dom._trackEvent", + "kind": "type", + "name": "_trackEvent", + "docstrings": [], + "signature": "type _trackEvent" + }, + { + "id": "Dom.trackEvent", + "kind": "type", + "name": "trackEvent", + "docstrings": [], + "signature": "type trackEvent = event_like<_trackEvent>" + }, + { + "id": "Dom._transitionEvent", + "kind": "type", + "name": "_transitionEvent", + "docstrings": [], + "signature": "type _transitionEvent" + }, + { + "id": "Dom.transitionEvent", + "kind": "type", + "name": "transitionEvent", + "docstrings": [], + "signature": "type transitionEvent = event_like<_transitionEvent>" + }, + { + "id": "Dom._webGlContextEvent", + "kind": "type", + "name": "_webGlContextEvent", + "docstrings": [], + "signature": "type _webGlContextEvent" + }, + { + "id": "Dom.webGlContextEvent", + "kind": "type", + "name": "webGlContextEvent", + "docstrings": [], + "signature": "type webGlContextEvent = event_like<_webGlContextEvent>" + }, + { + "id": "Dom._wheelEvent", + "kind": "type", + "name": "_wheelEvent", + "docstrings": [], + "signature": "type _wheelEvent" + }, + { + "id": "Dom.wheelEvent", + "kind": "type", + "name": "wheelEvent", + "docstrings": [], + "signature": "type wheelEvent = uiEvent_like<_wheelEvent>" + }, + { + "id": "Dom.range", + "kind": "type", + "name": "range", + "docstrings": [], + "signature": "type range" + }, + { + "id": "Dom.selection", + "kind": "type", + "name": "selection", + "docstrings": [], + "signature": "type selection" + }, + { + "id": "Dom.domTokenList", + "kind": "type", + "name": "domTokenList", + "docstrings": [], + "signature": "type domTokenList" + }, + { + "id": "Dom.domSettableTokenList", + "kind": "type", + "name": "domSettableTokenList", + "docstrings": [], + "signature": "type domSettableTokenList" + }, + { + "id": "Dom.nodeFilter", + "kind": "type", + "name": "nodeFilter", + "docstrings": [], + "signature": "type nodeFilter = {acceptNode: element => int}" + }, + { + "id": "Dom.nodeIterator", + "kind": "type", + "name": "nodeIterator", + "docstrings": [], + "signature": "type nodeIterator" + }, + { + "id": "Dom.treeWalker", + "kind": "type", + "name": "treeWalker", + "docstrings": [], + "signature": "type treeWalker" + }, + { + "id": "Dom.svgRect", + "kind": "type", + "name": "svgRect", + "docstrings": [], + "signature": "type svgRect" + }, + { + "id": "Dom.svgPoint", + "kind": "type", + "name": "svgPoint", + "docstrings": [], + "signature": "type svgPoint" + }, + { + "id": "Dom.eventPointerId", + "kind": "type", + "name": "eventPointerId", + "docstrings": [], + "signature": "type eventPointerId" + } + ] + }, + "dom/storage2": { + "id": "Dom.Storage2", + "name": "Storage2", + "docstrings": [], + "items": [ + { + "id": "Dom.Storage2.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Dom.Storage2.getItem", + "kind": "value", + "name": "getItem", + "docstrings": [], + "signature": "let getItem: (t, string) => option" + }, + { + "id": "Dom.Storage2.setItem", + "kind": "value", + "name": "setItem", + "docstrings": [], + "signature": "let setItem: (t, string, string) => unit" + }, + { + "id": "Dom.Storage2.removeItem", + "kind": "value", + "name": "removeItem", + "docstrings": [], + "signature": "let removeItem: (t, string) => unit" + }, + { + "id": "Dom.Storage2.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t => unit" + }, + { + "id": "Dom.Storage2.key", + "kind": "value", + "name": "key", + "docstrings": [], + "signature": "let key: (t, int) => option" + }, + { + "id": "Dom.Storage2.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Dom.Storage2.localStorage", + "kind": "value", + "name": "localStorage", + "docstrings": [], + "signature": "let localStorage: t" + }, + { + "id": "Dom.Storage2.sessionStorage", + "kind": "value", + "name": "sessionStorage", + "docstrings": [], + "signature": "let sessionStorage: t" + } + ] + }, + "dom/storage": { + "id": "Dom.Storage", + "name": "Storage", + "docstrings": [], + "items": [ + { + "id": "Dom.Storage.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = Dom_storage2.t" + }, + { + "id": "Dom.Storage.getItem", + "kind": "value", + "name": "getItem", + "docstrings": [], + "signature": "let getItem: (t, string) => option" + }, + { + "id": "Dom.Storage.getItem", + "kind": "value", + "name": "getItem", + "docstrings": [], + "signature": "let getItem: (string, t) => option" + }, + { + "id": "Dom.Storage.setItem", + "kind": "value", + "name": "setItem", + "docstrings": [], + "signature": "let setItem: (t, string, string) => unit" + }, + { + "id": "Dom.Storage.setItem", + "kind": "value", + "name": "setItem", + "docstrings": [], + "signature": "let setItem: (string, string, t) => unit" + }, + { + "id": "Dom.Storage.removeItem", + "kind": "value", + "name": "removeItem", + "docstrings": [], + "signature": "let removeItem: (t, string) => unit" + }, + { + "id": "Dom.Storage.removeItem", + "kind": "value", + "name": "removeItem", + "docstrings": [], + "signature": "let removeItem: (string, t) => unit" + }, + { + "id": "Dom.Storage.clear", + "kind": "value", + "name": "clear", + "docstrings": [], + "signature": "let clear: t => unit" + }, + { + "id": "Dom.Storage.key", + "kind": "value", + "name": "key", + "docstrings": [], + "signature": "let key: (t, int) => option" + }, + { + "id": "Dom.Storage.key", + "kind": "value", + "name": "key", + "docstrings": [], + "signature": "let key: (int, t) => option" + }, + { + "id": "Dom.Storage.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Dom.Storage.localStorage", + "kind": "value", + "name": "localStorage", + "docstrings": [], + "signature": "let localStorage: t" + }, + { + "id": "Dom.Storage.sessionStorage", + "kind": "value", + "name": "sessionStorage", + "docstrings": [], + "signature": "let sessionStorage: t" + } + ] + } +} \ No newline at end of file diff --git a/data/js.json b/data/js.json new file mode 100644 index 000000000..2f14a4238 --- /dev/null +++ b/data/js.json @@ -0,0 +1,14872 @@ +{ + "js": { + "id": "Js", + "name": "Js", + "docstrings": [ + "The Js module mostly contains ReScript bindings to _standard JavaScript APIs_\n like [console.log](https://developer.mozilla.org/en-US/docs/Web/API/Console/log),\n or the JavaScript\n [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String),\n [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date), and\n [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n classes.\n\n It is meant as a zero-abstraction interop layer and directly exposes JavaScript functions as they are. If you can find your API in this module, prefer this over an equivalent Belt helper. For example, prefer [Js.Array2](js/array-2) over [Belt.Array](belt/array)\n\n ## Argument Order\n\n For historical reasons, some APIs in the Js namespace (e.g. [Js.String](js/string)) are\n using the data-last argument order whereas others (e.g. [Js.Date](js/date)) are using data-first.\n\n For more information about these argument orders and the trade-offs between them, see\n [this blog post](https://www.javierchavarri.com/data-first-and-data-last-a-comparison/).\n\n _Eventually, all modules in the Js namespace are going to be migrated to data-first though._\n\n In the meantime, there are several options for dealing with the data-last APIs:\n\n ```rescript\n /* Js.String (data-last API used with pipe last operator) */\n Js.log(\"2019-11-10\" |> Js.String.split(\"-\"))\n Js.log(\"ReScript\" |> Js.String.startsWith(\"Re\"))\n\n /* Js.String (data-last API used with pipe first operator) */\n Js.log(\"2019-11-10\"->Js.String.split(\"-\", _))\n Js.log(\"ReScript\"->Js.String.startsWith(\"Re\", _))\n\n /* Js.String (data-last API used without any piping) */\n Js.log(Js.String.split(\"-\", \"2019-11-10\"))\n Js.log(Js.String.startsWith(\"Re\", \"ReScript\"))\n ```\n ## Js.Xxx2 Modules\n\n Prefer `Js.Array2` over `Js.Array`, `Js.String2` over `Js.String`, etc. The latters are old modules." + ], + "items": [ + { + "id": "Js.t", + "kind": "type", + "name": "t", + "docstrings": [ + "JS object type" + ], + "signature": "type t<'a> = 'a constraint 'a = {..}" + }, + { + "id": "Js.null", + "kind": "type", + "name": "null", + "docstrings": [ + "Nullable value of this type can be either null or 'a. This type is equivalent to Js.Null.t." + ], + "signature": "type null<'a> = Value('a) | Null" + }, + { + "id": "Js.undefined", + "kind": "type", + "name": "undefined", + "docstrings": [ + "A value of this type can be either undefined or 'a. This type is equivalent to Js.Undefined.t." + ], + "signature": "type undefined<+'a>" + }, + { + "id": "Js.nullable", + "kind": "type", + "name": "nullable", + "docstrings": [], + "signature": "type nullable<'a> = Value('a) | Null | Undefined" + }, + { + "id": "Js.null_undefined", + "kind": "type", + "name": "null_undefined", + "docstrings": [], + "signature": "type null_undefined<'a> = nullable<'a>" + }, + { + "id": "Js.toOption", + "kind": "value", + "name": "toOption", + "docstrings": [], + "signature": "let toOption: nullable<'a> => option<'a>" + }, + { + "id": "Js.undefinedToOption", + "kind": "value", + "name": "undefinedToOption", + "docstrings": [], + "signature": "let undefinedToOption: undefined<'a> => option<'a>" + }, + { + "id": "Js.nullToOption", + "kind": "value", + "name": "nullToOption", + "docstrings": [], + "signature": "let nullToOption: null<'a> => option<'a>" + }, + { + "id": "Js.isNullable", + "kind": "value", + "name": "isNullable", + "docstrings": [], + "signature": "let isNullable: nullable<'a> => bool" + }, + { + "id": "Js.import", + "kind": "value", + "name": "import", + "docstrings": [], + "signature": "let import: 'a => promise<'a>" + }, + { + "id": "Js.testAny", + "kind": "value", + "name": "testAny", + "docstrings": [ + "The same as {!test} except that it is more permissive on the types of input" + ], + "signature": "let testAny: 'a => bool" + }, + { + "id": "Js.promise", + "kind": "type", + "name": "promise", + "docstrings": [ + "The promise type, defined here for interoperation across packages." + ], + "signature": "type promise<+'a, +'e>" + }, + { + "id": "Js.null", + "kind": "value", + "name": "null", + "docstrings": [ + "The same as empty in `Js.Null`. Compiles to `null`." + ], + "signature": "let null: null<'a>" + }, + { + "id": "Js.undefined", + "kind": "value", + "name": "undefined", + "docstrings": [ + "The same as empty `Js.Undefined`. Compiles to `undefined`." + ], + "signature": "let undefined: undefined<'a>" + }, + { + "id": "Js.typeof", + "kind": "value", + "name": "typeof", + "docstrings": [ + "`typeof x` will be compiled as `typeof x` in JS. Please consider functions in\n`Js.Types` for a type safe way of reflection." + ], + "signature": "let typeof: 'a => string" + }, + { + "id": "Js.log", + "kind": "value", + "name": "log", + "docstrings": [ + "Equivalent to console.log any value." + ], + "signature": "let log: 'a => unit" + }, + { + "id": "Js.log2", + "kind": "value", + "name": "log2", + "docstrings": [], + "signature": "let log2: ('a, 'b) => unit" + }, + { + "id": "Js.log3", + "kind": "value", + "name": "log3", + "docstrings": [], + "signature": "let log3: ('a, 'b, 'c) => unit" + }, + { + "id": "Js.log4", + "kind": "value", + "name": "log4", + "docstrings": [], + "signature": "let log4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Js.logMany", + "kind": "value", + "name": "logMany", + "docstrings": [ + "A convenience function to console.log more than 4 arguments" + ], + "signature": "let logMany: array<'a> => unit" + }, + { + "id": "Js.eqNull", + "kind": "value", + "name": "eqNull", + "docstrings": [], + "signature": "let eqNull: ('a, null<'a>) => bool" + }, + { + "id": "Js.eqUndefined", + "kind": "value", + "name": "eqUndefined", + "docstrings": [], + "signature": "let eqUndefined: ('a, undefined<'a>) => bool" + }, + { + "id": "Js.eqNullable", + "kind": "value", + "name": "eqNullable", + "docstrings": [], + "signature": "let eqNullable: ('a, nullable<'a>) => bool" + }, + { + "id": "Js.unsafe_lt", + "kind": "value", + "name": "unsafe_lt", + "docstrings": [ + "`unsafe_lt(a, b)` will be compiled as `a < b`.\n It is marked as unsafe, since it is impossible\n to give a proper semantics for comparision which applies to any type" + ], + "signature": "let unsafe_lt: ('a, 'a) => bool" + }, + { + "id": "Js.unsafe_le", + "kind": "value", + "name": "unsafe_le", + "docstrings": [ + "`unsafe_le(a, b) will be compiled as `a <= b`.\n See also `Js.unsafe_lt`." + ], + "signature": "let unsafe_le: ('a, 'a) => bool" + }, + { + "id": "Js.unsafe_gt", + "kind": "value", + "name": "unsafe_gt", + "docstrings": [ + "`unsafe_gt(a, b)` will be compiled as `a > b`.\n See also `Js.unsafe_lt`." + ], + "signature": "let unsafe_gt: ('a, 'a) => bool" + }, + { + "id": "Js.unsafe_ge", + "kind": "value", + "name": "unsafe_ge", + "docstrings": [ + "`unsafe_ge(a, b)` will be compiled as `a >= b`.\n See also `Js.unsafe_lt`." + ], + "signature": "let unsafe_ge: ('a, 'a) => bool" + } + ] + }, + "js/typedarray2/dataview": { + "id": "Js.TypedArray2.DataView", + "name": "DataView", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.DataView.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Js.TypedArray2.DataView.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array_buffer => t" + }, + { + "id": "Js.TypedArray2.DataView.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.DataView.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.DataView.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.DataView.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.DataView.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.DataView.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.DataView.getInt8", + "kind": "value", + "name": "getInt8", + "docstrings": [], + "signature": "let getInt8: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getUint8", + "kind": "value", + "name": "getUint8", + "docstrings": [], + "signature": "let getUint8: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getInt16", + "kind": "value", + "name": "getInt16", + "docstrings": [], + "signature": "let getInt16: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getInt16LittleEndian", + "kind": "value", + "name": "getInt16LittleEndian", + "docstrings": [], + "signature": "let getInt16LittleEndian: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getUint16", + "kind": "value", + "name": "getUint16", + "docstrings": [], + "signature": "let getUint16: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getUint16LittleEndian", + "kind": "value", + "name": "getUint16LittleEndian", + "docstrings": [], + "signature": "let getUint16LittleEndian: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getInt32", + "kind": "value", + "name": "getInt32", + "docstrings": [], + "signature": "let getInt32: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getInt32LittleEndian", + "kind": "value", + "name": "getInt32LittleEndian", + "docstrings": [], + "signature": "let getInt32LittleEndian: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getUint32", + "kind": "value", + "name": "getUint32", + "docstrings": [], + "signature": "let getUint32: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getUint32LittleEndian", + "kind": "value", + "name": "getUint32LittleEndian", + "docstrings": [], + "signature": "let getUint32LittleEndian: (t, int) => int" + }, + { + "id": "Js.TypedArray2.DataView.getFloat32", + "kind": "value", + "name": "getFloat32", + "docstrings": [], + "signature": "let getFloat32: (t, int) => float" + }, + { + "id": "Js.TypedArray2.DataView.getFloat32LittleEndian", + "kind": "value", + "name": "getFloat32LittleEndian", + "docstrings": [], + "signature": "let getFloat32LittleEndian: (t, int) => float" + }, + { + "id": "Js.TypedArray2.DataView.getFloat64", + "kind": "value", + "name": "getFloat64", + "docstrings": [], + "signature": "let getFloat64: (t, int) => float" + }, + { + "id": "Js.TypedArray2.DataView.getFloat64LittleEndian", + "kind": "value", + "name": "getFloat64LittleEndian", + "docstrings": [], + "signature": "let getFloat64LittleEndian: (t, int) => float" + }, + { + "id": "Js.TypedArray2.DataView.setInt8", + "kind": "value", + "name": "setInt8", + "docstrings": [], + "signature": "let setInt8: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setUint8", + "kind": "value", + "name": "setUint8", + "docstrings": [], + "signature": "let setUint8: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setInt16", + "kind": "value", + "name": "setInt16", + "docstrings": [], + "signature": "let setInt16: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setInt16LittleEndian", + "kind": "value", + "name": "setInt16LittleEndian", + "docstrings": [], + "signature": "let setInt16LittleEndian: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setUint16", + "kind": "value", + "name": "setUint16", + "docstrings": [], + "signature": "let setUint16: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setUint16LittleEndian", + "kind": "value", + "name": "setUint16LittleEndian", + "docstrings": [], + "signature": "let setUint16LittleEndian: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setInt32", + "kind": "value", + "name": "setInt32", + "docstrings": [], + "signature": "let setInt32: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setInt32LittleEndian", + "kind": "value", + "name": "setInt32LittleEndian", + "docstrings": [], + "signature": "let setInt32LittleEndian: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setUint32", + "kind": "value", + "name": "setUint32", + "docstrings": [], + "signature": "let setUint32: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setUint32LittleEndian", + "kind": "value", + "name": "setUint32LittleEndian", + "docstrings": [], + "signature": "let setUint32LittleEndian: (t, int, int) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setFloat32", + "kind": "value", + "name": "setFloat32", + "docstrings": [], + "signature": "let setFloat32: (t, int, float) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setFloat32LittleEndian", + "kind": "value", + "name": "setFloat32LittleEndian", + "docstrings": [], + "signature": "let setFloat32LittleEndian: (t, int, float) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setFloat64", + "kind": "value", + "name": "setFloat64", + "docstrings": [], + "signature": "let setFloat64: (t, int, float) => unit" + }, + { + "id": "Js.TypedArray2.DataView.setFloat64LittleEndian", + "kind": "value", + "name": "setFloat64LittleEndian", + "docstrings": [], + "signature": "let setFloat64LittleEndian: (t, int, float) => unit" + } + ] + }, + "js/typedarray2/float64array": { + "id": "Js.TypedArray2.Float64Array", + "name": "Float64Array", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.Float64Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = float" + }, + { + "id": "Js.TypedArray2.Float64Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.TypedArray2.Float64Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.TypedArray2.Float64Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.TypedArray2.Float64Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.TypedArray2.Float64Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.Float64Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.Float64Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.Float64Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t, array) => unit" + }, + { + "id": "Js.TypedArray2.Float64Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (t, array, int) => unit" + }, + { + "id": "Js.TypedArray2.Float64Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.TypedArray2.Float64Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t, ~to_: int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (t, elt) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Float64Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Float64Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, elt) => bool" + }, + { + "id": "Js.TypedArray2.Float64Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Float64Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Float64Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.TypedArray2.Float64Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t, string) => string" + }, + { + "id": "Js.TypedArray2.Float64Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Float64Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Float64Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let slice: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.TypedArray2.Float64Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let subarray: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.TypedArray2.Float64Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.TypedArray2.Float64Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Float64Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Float64Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t, (. elt) => bool) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (t, (. elt, int) => bool) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t, (. elt) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Float64Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Float64Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t, (. elt) => bool) => int" + }, + { + "id": "Js.TypedArray2.Float64Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (t, (. elt, int) => bool) => int" + }, + { + "id": "Js.TypedArray2.Float64Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, (. elt) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Float64Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (t, (. elt, int) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Float64Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Float64Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Float64Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Float64Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Float64Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Float64Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Float64Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Float64Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Float64Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.TypedArray2.Float64Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.TypedArray2.Float64Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.Float64Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.Float64Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.TypedArray2.Float64Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typedarray2/float32array": { + "id": "Js.TypedArray2.Float32Array", + "name": "Float32Array", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.Float32Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = float" + }, + { + "id": "Js.TypedArray2.Float32Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.TypedArray2.Float32Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.TypedArray2.Float32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.TypedArray2.Float32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.TypedArray2.Float32Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.Float32Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.Float32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.Float32Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t, array) => unit" + }, + { + "id": "Js.TypedArray2.Float32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (t, array, int) => unit" + }, + { + "id": "Js.TypedArray2.Float32Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.TypedArray2.Float32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t, ~to_: int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (t, elt) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Float32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Float32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, elt) => bool" + }, + { + "id": "Js.TypedArray2.Float32Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Float32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Float32Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.TypedArray2.Float32Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t, string) => string" + }, + { + "id": "Js.TypedArray2.Float32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Float32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Float32Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let slice: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.TypedArray2.Float32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let subarray: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.TypedArray2.Float32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.TypedArray2.Float32Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Float32Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Float32Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t, (. elt) => bool) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (t, (. elt, int) => bool) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t, (. elt) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Float32Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Float32Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t, (. elt) => bool) => int" + }, + { + "id": "Js.TypedArray2.Float32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (t, (. elt, int) => bool) => int" + }, + { + "id": "Js.TypedArray2.Float32Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, (. elt) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Float32Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (t, (. elt, int) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Float32Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Float32Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Float32Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Float32Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Float32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Float32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Float32Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Float32Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Float32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.TypedArray2.Float32Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.TypedArray2.Float32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.Float32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.Float32Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.TypedArray2.Float32Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typedarray2/uint32array": { + "id": "Js.TypedArray2.Uint32Array", + "name": "Uint32Array", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.Uint32Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.TypedArray2.Uint32Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.TypedArray2.Uint32Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.TypedArray2.Uint32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.TypedArray2.Uint32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.TypedArray2.Uint32Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.Uint32Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.Uint32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.Uint32Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t, array) => unit" + }, + { + "id": "Js.TypedArray2.Uint32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (t, array, int) => unit" + }, + { + "id": "Js.TypedArray2.Uint32Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.TypedArray2.Uint32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t, ~to_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (t, elt) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, elt) => bool" + }, + { + "id": "Js.TypedArray2.Uint32Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Uint32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Uint32Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.TypedArray2.Uint32Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t, string) => string" + }, + { + "id": "Js.TypedArray2.Uint32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Uint32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Uint32Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let slice: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let subarray: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.TypedArray2.Uint32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.TypedArray2.Uint32Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint32Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint32Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t, (. elt) => bool) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (t, (. elt, int) => bool) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t, (. elt) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Uint32Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Uint32Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t, (. elt) => bool) => int" + }, + { + "id": "Js.TypedArray2.Uint32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (t, (. elt, int) => bool) => int" + }, + { + "id": "Js.TypedArray2.Uint32Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, (. elt) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Uint32Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (t, (. elt, int) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Uint32Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Uint32Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Uint32Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint32Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint32Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint32Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.TypedArray2.Uint32Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.TypedArray2.Uint32Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typedarray2/int32array": { + "id": "Js.TypedArray2.Int32Array", + "name": "Int32Array", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.Int32Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.TypedArray2.Int32Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.TypedArray2.Int32Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.TypedArray2.Int32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.TypedArray2.Int32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.TypedArray2.Int32Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.Int32Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.Int32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.Int32Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t, array) => unit" + }, + { + "id": "Js.TypedArray2.Int32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (t, array, int) => unit" + }, + { + "id": "Js.TypedArray2.Int32Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.TypedArray2.Int32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t, ~to_: int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (t, elt) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Int32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Int32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, elt) => bool" + }, + { + "id": "Js.TypedArray2.Int32Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Int32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Int32Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.TypedArray2.Int32Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t, string) => string" + }, + { + "id": "Js.TypedArray2.Int32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Int32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Int32Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let slice: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.TypedArray2.Int32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let subarray: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.TypedArray2.Int32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.TypedArray2.Int32Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int32Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int32Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t, (. elt) => bool) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (t, (. elt, int) => bool) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t, (. elt) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Int32Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Int32Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t, (. elt) => bool) => int" + }, + { + "id": "Js.TypedArray2.Int32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (t, (. elt, int) => bool) => int" + }, + { + "id": "Js.TypedArray2.Int32Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, (. elt) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Int32Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (t, (. elt, int) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Int32Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Int32Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Int32Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int32Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int32Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int32Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.TypedArray2.Int32Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.TypedArray2.Int32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.Int32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.Int32Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.TypedArray2.Int32Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typedarray2/uint16array": { + "id": "Js.TypedArray2.Uint16Array", + "name": "Uint16Array", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.Uint16Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.TypedArray2.Uint16Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.TypedArray2.Uint16Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.TypedArray2.Uint16Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.TypedArray2.Uint16Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.TypedArray2.Uint16Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.Uint16Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.Uint16Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.Uint16Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t, array) => unit" + }, + { + "id": "Js.TypedArray2.Uint16Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (t, array, int) => unit" + }, + { + "id": "Js.TypedArray2.Uint16Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.TypedArray2.Uint16Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t, ~to_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (t, elt) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, elt) => bool" + }, + { + "id": "Js.TypedArray2.Uint16Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Uint16Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Uint16Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.TypedArray2.Uint16Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t, string) => string" + }, + { + "id": "Js.TypedArray2.Uint16Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Uint16Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Uint16Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let slice: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let subarray: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.TypedArray2.Uint16Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.TypedArray2.Uint16Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint16Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint16Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t, (. elt) => bool) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (t, (. elt, int) => bool) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t, (. elt) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Uint16Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Uint16Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t, (. elt) => bool) => int" + }, + { + "id": "Js.TypedArray2.Uint16Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (t, (. elt, int) => bool) => int" + }, + { + "id": "Js.TypedArray2.Uint16Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, (. elt) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Uint16Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (t, (. elt, int) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Uint16Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Uint16Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Uint16Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint16Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint16Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint16Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint16Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint16Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint16Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.TypedArray2.Uint16Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.TypedArray2.Uint16Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typedarray2/int16array": { + "id": "Js.TypedArray2.Int16Array", + "name": "Int16Array", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.Int16Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.TypedArray2.Int16Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.TypedArray2.Int16Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.TypedArray2.Int16Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.TypedArray2.Int16Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.TypedArray2.Int16Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.Int16Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.Int16Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.Int16Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t, array) => unit" + }, + { + "id": "Js.TypedArray2.Int16Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (t, array, int) => unit" + }, + { + "id": "Js.TypedArray2.Int16Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.TypedArray2.Int16Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t, ~to_: int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (t, elt) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Int16Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Int16Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, elt) => bool" + }, + { + "id": "Js.TypedArray2.Int16Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Int16Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Int16Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.TypedArray2.Int16Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t, string) => string" + }, + { + "id": "Js.TypedArray2.Int16Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Int16Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Int16Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let slice: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.TypedArray2.Int16Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let subarray: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.TypedArray2.Int16Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.TypedArray2.Int16Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int16Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int16Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t, (. elt) => bool) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (t, (. elt, int) => bool) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t, (. elt) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Int16Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Int16Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t, (. elt) => bool) => int" + }, + { + "id": "Js.TypedArray2.Int16Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (t, (. elt, int) => bool) => int" + }, + { + "id": "Js.TypedArray2.Int16Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, (. elt) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Int16Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (t, (. elt, int) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Int16Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Int16Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Int16Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int16Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int16Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int16Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int16Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int16Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int16Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.TypedArray2.Int16Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.TypedArray2.Int16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.Int16Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.Int16Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.TypedArray2.Int16Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typedarray2/uint8clampedarray": { + "id": "Js.TypedArray2.Uint8ClampedArray", + "name": "Uint8ClampedArray", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.Uint8ClampedArray.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t, array) => unit" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (t, array, int) => unit" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t, ~to_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (t, elt) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, elt) => bool" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t, string) => string" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let slice: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let subarray: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t, (. elt) => bool) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (t, (. elt, int) => bool) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t, (. elt) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t, (. elt) => bool) => int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (t, (. elt, int) => bool) => int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, (. elt) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (t, (. elt, int) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.TypedArray2.Uint8ClampedArray.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typedarray2/uint8array": { + "id": "Js.TypedArray2.Uint8Array", + "name": "Uint8Array", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.Uint8Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.TypedArray2.Uint8Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.TypedArray2.Uint8Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.TypedArray2.Uint8Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.TypedArray2.Uint8Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.TypedArray2.Uint8Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.Uint8Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.Uint8Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.Uint8Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t, array) => unit" + }, + { + "id": "Js.TypedArray2.Uint8Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (t, array, int) => unit" + }, + { + "id": "Js.TypedArray2.Uint8Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.TypedArray2.Uint8Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t, ~to_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (t, elt) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, elt) => bool" + }, + { + "id": "Js.TypedArray2.Uint8Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Uint8Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Uint8Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.TypedArray2.Uint8Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t, string) => string" + }, + { + "id": "Js.TypedArray2.Uint8Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Uint8Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Uint8Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let slice: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let subarray: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.TypedArray2.Uint8Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.TypedArray2.Uint8Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint8Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint8Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t, (. elt) => bool) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (t, (. elt, int) => bool) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t, (. elt) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Uint8Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Uint8Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t, (. elt) => bool) => int" + }, + { + "id": "Js.TypedArray2.Uint8Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (t, (. elt, int) => bool) => int" + }, + { + "id": "Js.TypedArray2.Uint8Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, (. elt) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Uint8Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (t, (. elt, int) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Uint8Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Uint8Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Uint8Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint8Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint8Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint8Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Uint8Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint8Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Uint8Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.TypedArray2.Uint8Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.TypedArray2.Uint8Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typedarray2/int8array": { + "id": "Js.TypedArray2.Int8Array", + "name": "Int8Array", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.Int8Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.TypedArray2.Int8Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.TypedArray2.Int8Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.TypedArray2.Int8Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.TypedArray2.Int8Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.TypedArray2.Int8Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.TypedArray2.Int8Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.Int8Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.TypedArray2.Int8Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t, array) => unit" + }, + { + "id": "Js.TypedArray2.Int8Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (t, array, int) => unit" + }, + { + "id": "Js.TypedArray2.Int8Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.TypedArray2.Int8Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t, ~to_: int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (t, elt) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Int8Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.TypedArray2.Int8Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, elt) => bool" + }, + { + "id": "Js.TypedArray2.Int8Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Int8Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Int8Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.TypedArray2.Int8Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t, string) => string" + }, + { + "id": "Js.TypedArray2.Int8Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, elt) => int" + }, + { + "id": "Js.TypedArray2.Int8Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int" + }, + { + "id": "Js.TypedArray2.Int8Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let slice: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.TypedArray2.Int8Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ], + "signature": "let subarray: (t, ~start: int, ~end_: int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (t, int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.TypedArray2.Int8Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.TypedArray2.Int8Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int8Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int8Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t, (. elt) => bool) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (t, (. elt, int) => bool) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t, (. elt) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Int8Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined" + }, + { + "id": "Js.TypedArray2.Int8Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t, (. elt) => bool) => int" + }, + { + "id": "Js.TypedArray2.Int8Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (t, (. elt, int) => bool) => int" + }, + { + "id": "Js.TypedArray2.Int8Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t, (. elt) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Int8Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (t, (. elt, int) => unit) => unit" + }, + { + "id": "Js.TypedArray2.Int8Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Int8Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>" + }, + { + "id": "Js.TypedArray2.Int8Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int8Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int8Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int8Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.TypedArray2.Int8Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t, (. elt) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int8Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (t, (. elt, int) => bool) => bool" + }, + { + "id": "Js.TypedArray2.Int8Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.TypedArray2.Int8Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.TypedArray2.Int8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.TypedArray2.Int8Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.TypedArray2.Int8Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.TypedArray2.Int8Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typedarray2/arraybuffer": { + "id": "Js.TypedArray2.ArrayBuffer", + "name": "ArrayBuffer", + "docstrings": [], + "items": [ + { + "id": "Js.TypedArray2.ArrayBuffer.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = array_buffer" + }, + { + "id": "Js.TypedArray2.ArrayBuffer.make", + "kind": "value", + "name": "make", + "docstrings": [ + "takes length. initializes elements to 0" + ], + "signature": "let make: int => t" + }, + { + "id": "Js.TypedArray2.ArrayBuffer.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.TypedArray2.ArrayBuffer.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (t, ~start: int, ~end_: int) => array_buffer" + }, + { + "id": "Js.TypedArray2.ArrayBuffer.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (t, int) => array_buffer" + } + ] + }, + "js/typed_array/dataview": { + "id": "Js.Typed_array.DataView", + "name": "DataView", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.DataView.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = Js_typed_array2.DataView.t" + }, + { + "id": "Js.Typed_array.DataView.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array_buffer => t" + }, + { + "id": "Js.Typed_array.DataView.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.DataView.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.DataView.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.DataView.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.DataView.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.DataView.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.DataView.getInt8", + "kind": "value", + "name": "getInt8", + "docstrings": [], + "signature": "let getInt8: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getUint8", + "kind": "value", + "name": "getUint8", + "docstrings": [], + "signature": "let getUint8: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getInt16", + "kind": "value", + "name": "getInt16", + "docstrings": [], + "signature": "let getInt16: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getInt16LittleEndian", + "kind": "value", + "name": "getInt16LittleEndian", + "docstrings": [], + "signature": "let getInt16LittleEndian: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getUint16", + "kind": "value", + "name": "getUint16", + "docstrings": [], + "signature": "let getUint16: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getUint16LittleEndian", + "kind": "value", + "name": "getUint16LittleEndian", + "docstrings": [], + "signature": "let getUint16LittleEndian: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getInt32", + "kind": "value", + "name": "getInt32", + "docstrings": [], + "signature": "let getInt32: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getInt32LittleEndian", + "kind": "value", + "name": "getInt32LittleEndian", + "docstrings": [], + "signature": "let getInt32LittleEndian: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getUint32", + "kind": "value", + "name": "getUint32", + "docstrings": [], + "signature": "let getUint32: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getUint32LittleEndian", + "kind": "value", + "name": "getUint32LittleEndian", + "docstrings": [], + "signature": "let getUint32LittleEndian: (t, int) => int" + }, + { + "id": "Js.Typed_array.DataView.getFloat32", + "kind": "value", + "name": "getFloat32", + "docstrings": [], + "signature": "let getFloat32: (t, int) => float" + }, + { + "id": "Js.Typed_array.DataView.getFloat32LittleEndian", + "kind": "value", + "name": "getFloat32LittleEndian", + "docstrings": [], + "signature": "let getFloat32LittleEndian: (t, int) => float" + }, + { + "id": "Js.Typed_array.DataView.getFloat64", + "kind": "value", + "name": "getFloat64", + "docstrings": [], + "signature": "let getFloat64: (t, int) => float" + }, + { + "id": "Js.Typed_array.DataView.getFloat64LittleEndian", + "kind": "value", + "name": "getFloat64LittleEndian", + "docstrings": [], + "signature": "let getFloat64LittleEndian: (t, int) => float" + }, + { + "id": "Js.Typed_array.DataView.setInt8", + "kind": "value", + "name": "setInt8", + "docstrings": [], + "signature": "let setInt8: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setUint8", + "kind": "value", + "name": "setUint8", + "docstrings": [], + "signature": "let setUint8: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setInt16", + "kind": "value", + "name": "setInt16", + "docstrings": [], + "signature": "let setInt16: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setInt16LittleEndian", + "kind": "value", + "name": "setInt16LittleEndian", + "docstrings": [], + "signature": "let setInt16LittleEndian: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setUint16", + "kind": "value", + "name": "setUint16", + "docstrings": [], + "signature": "let setUint16: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setUint16LittleEndian", + "kind": "value", + "name": "setUint16LittleEndian", + "docstrings": [], + "signature": "let setUint16LittleEndian: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setInt32", + "kind": "value", + "name": "setInt32", + "docstrings": [], + "signature": "let setInt32: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setInt32LittleEndian", + "kind": "value", + "name": "setInt32LittleEndian", + "docstrings": [], + "signature": "let setInt32LittleEndian: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setUint32", + "kind": "value", + "name": "setUint32", + "docstrings": [], + "signature": "let setUint32: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setUint32LittleEndian", + "kind": "value", + "name": "setUint32LittleEndian", + "docstrings": [], + "signature": "let setUint32LittleEndian: (t, int, int) => unit" + }, + { + "id": "Js.Typed_array.DataView.setFloat32", + "kind": "value", + "name": "setFloat32", + "docstrings": [], + "signature": "let setFloat32: (t, int, float) => unit" + }, + { + "id": "Js.Typed_array.DataView.setFloat32LittleEndian", + "kind": "value", + "name": "setFloat32LittleEndian", + "docstrings": [], + "signature": "let setFloat32LittleEndian: (t, int, float) => unit" + }, + { + "id": "Js.Typed_array.DataView.setFloat64", + "kind": "value", + "name": "setFloat64", + "docstrings": [], + "signature": "let setFloat64: (t, int, float) => unit" + }, + { + "id": "Js.Typed_array.DataView.setFloat64LittleEndian", + "kind": "value", + "name": "setFloat64LittleEndian", + "docstrings": [], + "signature": "let setFloat64LittleEndian: (t, int, float) => unit" + } + ] + }, + "js/typed_array/float64_array": { + "id": "Js.Typed_array.Float64_array", + "name": "Float64_array", + "docstrings": [], + "items": [] + }, + "js/typed_array/float64array": { + "id": "Js.Typed_array.Float64Array", + "name": "Float64Array", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Float64Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = float" + }, + { + "id": "Js.Typed_array.Float64Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a> = Js_typed_array2.Float64Array.typed_array<'a>" + }, + { + "id": "Js.Typed_array.Float64Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.Float64Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.Float64Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.Float64Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.Float64Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.Float64Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.Float64Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.Float64Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.Float64Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.Float64Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.Float64Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.Float64Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.Float64Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Float64Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Float64Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.Float64Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.Float64Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Float64Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Float64Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.Float64Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.Float64Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.Float64Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Float64Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Float64Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Float64Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Float64Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Float64Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Float64Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Float64Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Float64Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Float64Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Float64Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Float64Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Float64Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Float64Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Float64Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Float64Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Float64Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Float64Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.Typed_array.Float64Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.Typed_array.Float64Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.Float64Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.Float64Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.Float64Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.Typed_array.Float64Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + }, + { + "id": "Js.Typed_array.Float64Array.create", + "kind": "value", + "name": "create", + "docstrings": [], + "signature": "let create: array => t" + }, + { + "id": "Js.Typed_array.Float64Array.of_buffer", + "kind": "value", + "name": "of_buffer", + "docstrings": [], + "signature": "let of_buffer: array_buffer => t" + } + ] + }, + "js/typed_array/float32_array": { + "id": "Js.Typed_array.Float32_array", + "name": "Float32_array", + "docstrings": [], + "items": [] + }, + "js/typed_array/float32array": { + "id": "Js.Typed_array.Float32Array", + "name": "Float32Array", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Float32Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = float" + }, + { + "id": "Js.Typed_array.Float32Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a> = Js_typed_array2.Float32Array.typed_array<'a>" + }, + { + "id": "Js.Typed_array.Float32Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.Float32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.Float32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.Float32Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.Float32Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.Float32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.Float32Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.Float32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.Float32Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.Float32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.Float32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.Float32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.Float32Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Float32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Float32Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.Float32Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.Float32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Float32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Float32Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.Float32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.Float32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.Float32Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Float32Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Float32Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Float32Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Float32Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Float32Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Float32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Float32Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Float32Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Float32Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Float32Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Float32Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Float32Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Float32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Float32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Float32Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Float32Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Float32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.Typed_array.Float32Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.Typed_array.Float32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.Float32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.Float32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.Float32Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.Typed_array.Float32Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + }, + { + "id": "Js.Typed_array.Float32Array.create", + "kind": "value", + "name": "create", + "docstrings": [], + "signature": "let create: array => t" + }, + { + "id": "Js.Typed_array.Float32Array.of_buffer", + "kind": "value", + "name": "of_buffer", + "docstrings": [], + "signature": "let of_buffer: array_buffer => t" + } + ] + }, + "js/typed_array/uint32array": { + "id": "Js.Typed_array.Uint32Array", + "name": "Uint32Array", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Uint32Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.Typed_array.Uint32Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a> = Js_typed_array2.Uint32Array.typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint32Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.Uint32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.Uint32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.Uint32Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.Uint32Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.Uint32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.Uint32Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.Uint32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.Uint32Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.Uint32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.Uint32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.Uint32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.Uint32Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Uint32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Uint32Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.Uint32Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.Uint32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Uint32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Uint32Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.Uint32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.Uint32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.Uint32Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint32Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint32Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Uint32Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Uint32Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Uint32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Uint32Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Uint32Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Uint32Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint32Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint32Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint32Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint32Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint32Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.Typed_array.Uint32Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.Typed_array.Uint32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.Uint32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.Uint32Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.Typed_array.Uint32Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typed_array/int32_array": { + "id": "Js.Typed_array.Int32_array", + "name": "Int32_array", + "docstrings": [], + "items": [] + }, + "js/typed_array/int32array": { + "id": "Js.Typed_array.Int32Array", + "name": "Int32Array", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Int32Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.Typed_array.Int32Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a> = Js_typed_array2.Int32Array.typed_array<'a>" + }, + { + "id": "Js.Typed_array.Int32Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.Int32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.Int32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.Int32Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.Int32Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.Int32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.Int32Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.Int32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.Int32Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.Int32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.Int32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.Int32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.Int32Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Int32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Int32Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.Int32Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.Int32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Int32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Int32Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.Int32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.Int32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.Int32Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int32Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int32Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Int32Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Int32Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Int32Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Int32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Int32Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Int32Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Int32Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Int32Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Int32Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int32Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int32Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int32Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.Typed_array.Int32Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.Typed_array.Int32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.Int32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.Int32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.Int32Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.Typed_array.Int32Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + }, + { + "id": "Js.Typed_array.Int32Array.create", + "kind": "value", + "name": "create", + "docstrings": [], + "signature": "let create: array => t" + }, + { + "id": "Js.Typed_array.Int32Array.of_buffer", + "kind": "value", + "name": "of_buffer", + "docstrings": [], + "signature": "let of_buffer: array_buffer => t" + } + ] + }, + "js/typed_array/uint16array": { + "id": "Js.Typed_array.Uint16Array", + "name": "Uint16Array", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Uint16Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.Typed_array.Uint16Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a> = Js_typed_array2.Uint16Array.typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint16Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.Uint16Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.Uint16Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.Uint16Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.Uint16Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.Uint16Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.Uint16Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.Uint16Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.Uint16Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.Uint16Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.Uint16Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.Uint16Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.Uint16Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Uint16Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Uint16Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.Uint16Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.Uint16Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Uint16Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Uint16Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.Uint16Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.Uint16Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.Uint16Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint16Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint16Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Uint16Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Uint16Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Uint16Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Uint16Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Uint16Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Uint16Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint16Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint16Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint16Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint16Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint16Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint16Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint16Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint16Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.Typed_array.Uint16Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.Typed_array.Uint16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.Uint16Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.Uint16Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.Typed_array.Uint16Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typed_array/int16array": { + "id": "Js.Typed_array.Int16Array", + "name": "Int16Array", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Int16Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.Typed_array.Int16Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a> = Js_typed_array2.Int16Array.typed_array<'a>" + }, + { + "id": "Js.Typed_array.Int16Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.Int16Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.Int16Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.Int16Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.Int16Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.Int16Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.Int16Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.Int16Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.Int16Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.Int16Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.Int16Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.Int16Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.Int16Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Int16Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Int16Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.Int16Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.Int16Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Int16Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Int16Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.Int16Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.Int16Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.Int16Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int16Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int16Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Int16Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Int16Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Int16Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Int16Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Int16Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Int16Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Int16Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Int16Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Int16Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int16Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int16Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int16Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int16Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int16Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int16Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.Typed_array.Int16Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.Typed_array.Int16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.Int16Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.Int16Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.Int16Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.Typed_array.Int16Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typed_array/uint8clampedarray": { + "id": "Js.Typed_array.Uint8ClampedArray", + "name": "Uint8ClampedArray", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Uint8ClampedArray.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a> = Js_typed_array2.Uint8ClampedArray.typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.Typed_array.Uint8ClampedArray.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typed_array/uint8array": { + "id": "Js.Typed_array.Uint8Array", + "name": "Uint8Array", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Uint8Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.Typed_array.Uint8Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a> = Js_typed_array2.Uint8Array.typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint8Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.Uint8Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.Uint8Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.Uint8Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.Uint8Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.Uint8Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.Uint8Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.Uint8Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.Uint8Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.Uint8Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.Uint8Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.Uint8Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Uint8Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Uint8Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.Uint8Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.Uint8Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Uint8Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Uint8Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.Uint8Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.Uint8Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.Uint8Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Uint8Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Uint8Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Uint8Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Uint8Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Uint8Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Uint8Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint8Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Uint8Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint8Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint8Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint8Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Uint8Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Uint8Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.Typed_array.Uint8Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.Typed_array.Uint8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.Uint8Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.Uint8Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.Typed_array.Uint8Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typed_array/int8array": { + "id": "Js.Typed_array.Int8Array", + "name": "Int8Array", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Int8Array.elt", + "kind": "type", + "name": "elt", + "docstrings": [ + "" + ], + "signature": "type elt = int" + }, + { + "id": "Js.Typed_array.Int8Array.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a> = Js_typed_array2.Int8Array.typed_array<'a>" + }, + { + "id": "Js.Typed_array.Int8Array.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.Int8Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.Int8Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.Int8Array.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.Int8Array.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.Int8Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.Int8Array.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.Int8Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.Int8Array.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.Int8Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.Int8Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.Int8Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.Int8Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Int8Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Int8Array.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.Int8Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.Int8Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.Int8Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.Int8Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.Int8Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.Int8Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.Int8Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int8Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int8Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.Int8Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Int8Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.Int8Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Int8Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.Int8Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Int8Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.Int8Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Int8Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>" + }, + { + "id": "Js.Typed_array.Int8Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int8Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int8Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int8Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a" + }, + { + "id": "Js.Typed_array.Int8Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int8Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.Int8Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "docstrings": [], + "signature": "let _BYTES_PER_ELEMENT: int" + }, + { + "id": "Js.Typed_array.Int8Array.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: array => t" + }, + { + "id": "Js.Typed_array.Int8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "can throw" + ], + "signature": "let fromBuffer: array_buffer => t" + }, + { + "id": "Js.Typed_array.Int8Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "docstrings": [ + "raise Js.Exn.Error raise Js exception\n\n param offset is in bytes" + ], + "signature": "let fromBufferOffset: (array_buffer, int) => t" + }, + { + "id": "Js.Typed_array.Int8Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "docstrings": [ + "raise Js.Exn.Error raises Js exception\n\n param offset is in bytes, length in elements" + ], + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t" + }, + { + "id": "Js.Typed_array.Int8Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [], + "signature": "let fromLength: int => t" + }, + { + "id": "Js.Typed_array.Int8Array.from", + "kind": "value", + "name": "from", + "docstrings": [], + "signature": "let from: array_like => t" + } + ] + }, + "js/typed_array/s": { + "id": "Js.Typed_array.S", + "name": "S", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.S.elt", + "kind": "type", + "name": "elt", + "docstrings": [], + "signature": "type elt" + }, + { + "id": "Js.Typed_array.S.typed_array", + "kind": "type", + "name": "typed_array", + "docstrings": [], + "signature": "type typed_array<'a>" + }, + { + "id": "Js.Typed_array.S.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = typed_array" + }, + { + "id": "Js.Typed_array.S.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t, int) => elt" + }, + { + "id": "Js.Typed_array.S.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t, int, elt) => unit" + }, + { + "id": "Js.Typed_array.S.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => array_buffer" + }, + { + "id": "Js.Typed_array.S.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.S.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Js.Typed_array.S.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (array, t) => unit" + }, + { + "id": "Js.Typed_array.S.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "docstrings": [], + "signature": "let setArrayOffset: (array, int, t) => unit" + }, + { + "id": "Js.Typed_array.S.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t => int" + }, + { + "id": "Js.Typed_array.S.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t) => t" + }, + { + "id": "Js.Typed_array.S.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.S.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.S.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: (elt, t) => t" + }, + { + "id": "Js.Typed_array.S.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t" + }, + { + "id": "Js.Typed_array.S.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.S.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [], + "signature": "let reverseInPlace: t => t" + }, + { + "id": "Js.Typed_array.S.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [], + "signature": "let sortInPlace: t => t" + }, + { + "id": "Js.Typed_array.S.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t" + }, + { + "id": "Js.Typed_array.S.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (elt, t) => bool" + }, + { + "id": "Js.Typed_array.S.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.S.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.S.join", + "kind": "value", + "name": "join", + "docstrings": [], + "signature": "let join: t => string" + }, + { + "id": "Js.Typed_array.S.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t) => string" + }, + { + "id": "Js.Typed_array.S.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (elt, t) => int" + }, + { + "id": "Js.Typed_array.S.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int" + }, + { + "id": "Js.Typed_array.S.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.S.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t => t" + }, + { + "id": "Js.Typed_array.S.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.S.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (~start: int, ~end_: int, t) => t" + }, + { + "id": "Js.Typed_array.S.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "docstrings": [], + "signature": "let subarrayFrom: (int, t) => t" + }, + { + "id": "Js.Typed_array.S.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t => string" + }, + { + "id": "Js.Typed_array.S.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Typed_array.S.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.S.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: ((. elt, int) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.S.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. elt) => bool, t) => t" + }, + { + "id": "Js.Typed_array.S.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: ((. elt, int) => bool, t) => t" + }, + { + "id": "Js.Typed_array.S.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ((. elt) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.S.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined" + }, + { + "id": "Js.Typed_array.S.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ((. elt) => bool, t) => int" + }, + { + "id": "Js.Typed_array.S.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: ((. elt, int) => bool, t) => int" + }, + { + "id": "Js.Typed_array.S.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ((. elt) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.S.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: ((. elt, int) => unit, t) => unit" + }, + { + "id": "Js.Typed_array.S.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. elt) => 'b, t) => typed_array<'b>" + }, + { + "id": "Js.Typed_array.S.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. elt, int) => 'b, t) => typed_array<'b>" + }, + { + "id": "Js.Typed_array.S.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: ((. 'b, elt) => 'b, 'b, t) => 'b" + }, + { + "id": "Js.Typed_array.S.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: ((. 'b, elt, int) => 'b, 'b, t) => 'b" + }, + { + "id": "Js.Typed_array.S.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: ((. 'b, elt) => 'b, 'b, t) => 'b" + }, + { + "id": "Js.Typed_array.S.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: ((. 'b, elt, int) => 'b, 'b, t) => 'b" + }, + { + "id": "Js.Typed_array.S.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ((. elt) => bool, t) => bool" + }, + { + "id": "Js.Typed_array.S.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: ((. elt, int) => bool, t) => bool" + } + ] + }, + "js/typed_array/arraybuffer": { + "id": "Js.Typed_array.ArrayBuffer", + "name": "ArrayBuffer", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.ArrayBuffer.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = array_buffer" + }, + { + "id": "Js.Typed_array.ArrayBuffer.make", + "kind": "value", + "name": "make", + "docstrings": [ + "takes length. initializes elements to 0" + ], + "signature": "let make: int => t" + }, + { + "id": "Js.Typed_array.ArrayBuffer.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Js.Typed_array.ArrayBuffer.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t) => array_buffer" + }, + { + "id": "Js.Typed_array.ArrayBuffer.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t) => array_buffer" + } + ] + }, + "js/typed_array/type": { + "id": "Js.Typed_array.Type", + "name": "Type", + "docstrings": [], + "items": [ + { + "id": "Js.Typed_array.Type.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + } + ] + }, + "js/json/kind": { + "id": "Js.Json.Kind", + "name": "Kind", + "docstrings": [], + "items": [ + { + "id": "Js.Json.Kind.json", + "kind": "type", + "name": "json", + "docstrings": [], + "signature": "type json = t" + }, + { + "id": "Js.Json.Kind.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Underlying type of a JSON value" + ], + "signature": "type t<_> =\\n | String: t\\n | Number: t\\n | Object: t>\\n | Array: t>\\n | Boolean: t\\n | Null: t" + } + ] + }, + "js/weakmap": { + "id": "Js.WeakMap", + "name": "WeakMap", + "docstrings": [ + "Provides bindings for ES6 WeakMap" + ], + "items": [ + { + "id": "Js.WeakMap.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'k, 'v>" + } + ] + }, + "js/map": { + "id": "Js.Map", + "name": "Map", + "docstrings": [ + "Provides bindings for ES6 Map" + ], + "items": [ + { + "id": "Js.Map.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'k, 'v>" + } + ] + }, + "js/weakset": { + "id": "Js.WeakSet", + "name": "WeakSet", + "docstrings": [ + "Provides bindings for ES6 WeakSet" + ], + "items": [ + { + "id": "Js.WeakSet.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a>" + } + ] + }, + "js/set": { + "id": "Js.Set", + "name": "Set", + "docstrings": [ + "Provides bindings for ES6 Set" + ], + "items": [ + { + "id": "Js.Set.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a>" + } + ] + }, + "js/console": { + "id": "Js.Console", + "name": "Console", + "docstrings": [ + "Provides bindings for console" + ], + "items": [ + { + "id": "Js.Console.log", + "kind": "value", + "name": "log", + "docstrings": [], + "signature": "let log: 'a => unit" + }, + { + "id": "Js.Console.log2", + "kind": "value", + "name": "log2", + "docstrings": [], + "signature": "let log2: ('a, 'b) => unit" + }, + { + "id": "Js.Console.log3", + "kind": "value", + "name": "log3", + "docstrings": [], + "signature": "let log3: ('a, 'b, 'c) => unit" + }, + { + "id": "Js.Console.log4", + "kind": "value", + "name": "log4", + "docstrings": [], + "signature": "let log4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Js.Console.logMany", + "kind": "value", + "name": "logMany", + "docstrings": [], + "signature": "let logMany: array<'a> => unit" + }, + { + "id": "Js.Console.info", + "kind": "value", + "name": "info", + "docstrings": [], + "signature": "let info: 'a => unit" + }, + { + "id": "Js.Console.info2", + "kind": "value", + "name": "info2", + "docstrings": [], + "signature": "let info2: ('a, 'b) => unit" + }, + { + "id": "Js.Console.info3", + "kind": "value", + "name": "info3", + "docstrings": [], + "signature": "let info3: ('a, 'b, 'c) => unit" + }, + { + "id": "Js.Console.info4", + "kind": "value", + "name": "info4", + "docstrings": [], + "signature": "let info4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Js.Console.infoMany", + "kind": "value", + "name": "infoMany", + "docstrings": [], + "signature": "let infoMany: array<'a> => unit" + }, + { + "id": "Js.Console.warn", + "kind": "value", + "name": "warn", + "docstrings": [], + "signature": "let warn: 'a => unit" + }, + { + "id": "Js.Console.warn2", + "kind": "value", + "name": "warn2", + "docstrings": [], + "signature": "let warn2: ('a, 'b) => unit" + }, + { + "id": "Js.Console.warn3", + "kind": "value", + "name": "warn3", + "docstrings": [], + "signature": "let warn3: ('a, 'b, 'c) => unit" + }, + { + "id": "Js.Console.warn4", + "kind": "value", + "name": "warn4", + "docstrings": [], + "signature": "let warn4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Js.Console.warnMany", + "kind": "value", + "name": "warnMany", + "docstrings": [], + "signature": "let warnMany: array<'a> => unit" + }, + { + "id": "Js.Console.error", + "kind": "value", + "name": "error", + "docstrings": [], + "signature": "let error: 'a => unit" + }, + { + "id": "Js.Console.error2", + "kind": "value", + "name": "error2", + "docstrings": [], + "signature": "let error2: ('a, 'b) => unit" + }, + { + "id": "Js.Console.error3", + "kind": "value", + "name": "error3", + "docstrings": [], + "signature": "let error3: ('a, 'b, 'c) => unit" + }, + { + "id": "Js.Console.error4", + "kind": "value", + "name": "error4", + "docstrings": [], + "signature": "let error4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Js.Console.errorMany", + "kind": "value", + "name": "errorMany", + "docstrings": [], + "signature": "let errorMany: array<'a> => unit" + }, + { + "id": "Js.Console.trace", + "kind": "value", + "name": "trace", + "docstrings": [], + "signature": "let trace: unit => unit" + }, + { + "id": "Js.Console.timeStart", + "kind": "value", + "name": "timeStart", + "docstrings": [], + "signature": "let timeStart: string => unit" + }, + { + "id": "Js.Console.timeEnd", + "kind": "value", + "name": "timeEnd", + "docstrings": [], + "signature": "let timeEnd: string => unit" + } + ] + }, + "js/vector": { + "id": "Js.Vector", + "name": "Vector", + "docstrings": [ + "Provides bindings for JS Vector" + ], + "items": [ + { + "id": "Js.Vector.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a> = array<'a>" + }, + { + "id": "Js.Vector.filterInPlace", + "kind": "value", + "name": "filterInPlace", + "docstrings": [], + "signature": "let filterInPlace: ((. 'a) => bool, t<'a>) => unit" + }, + { + "id": "Js.Vector.empty", + "kind": "value", + "name": "empty", + "docstrings": [], + "signature": "let empty: t<'a> => unit" + }, + { + "id": "Js.Vector.pushBack", + "kind": "value", + "name": "pushBack", + "docstrings": [], + "signature": "let pushBack: ('a, t<'a>) => unit" + }, + { + "id": "Js.Vector.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "shallow copy" + ], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Js.Vector.memByRef", + "kind": "value", + "name": "memByRef", + "docstrings": [], + "signature": "let memByRef: ('a, t<'a>) => bool" + }, + { + "id": "Js.Vector.iter", + "kind": "value", + "name": "iter", + "docstrings": [], + "signature": "let iter: ((. 'a) => unit, t<'a>) => unit" + }, + { + "id": "Js.Vector.iteri", + "kind": "value", + "name": "iteri", + "docstrings": [], + "signature": "let iteri: ((. int, 'a) => unit, t<'a>) => unit" + }, + { + "id": "Js.Vector.toList", + "kind": "value", + "name": "toList", + "docstrings": [], + "signature": "let toList: t<'a> => list<'a>" + }, + { + "id": "Js.Vector.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. 'a) => 'b, t<'a>) => t<'b>" + }, + { + "id": "Js.Vector.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: ((. int, 'a) => 'b, t<'a>) => t<'b>" + }, + { + "id": "Js.Vector.foldLeft", + "kind": "value", + "name": "foldLeft", + "docstrings": [], + "signature": "let foldLeft: ((. 'a, 'b) => 'a, 'a, t<'b>) => 'a" + }, + { + "id": "Js.Vector.foldRight", + "kind": "value", + "name": "foldRight", + "docstrings": [], + "signature": "let foldRight: ((. 'b, 'a) => 'a, t<'b>, 'a) => 'a" + }, + { + "id": "Js.Vector.length", + "kind": "value", + "name": "length", + "docstrings": [ + "Return the length (number of elements) of the given array." + ], + "signature": "let length: t<'a> => int" + }, + { + "id": "Js.Vector.get", + "kind": "value", + "name": "get", + "docstrings": [ + "`Vector.get(a, n)` returns the element number `n` of vector `a`. The first\nelement has number 0. The last element has number `Vector.length(a) - 1`. You\ncan also write `a[n]` instead of `Vector.get(a, n)`. Raise `Invalid_argument\n\"index out of bounds\"` if `n` is outside the range 0 to (`Array.length(a) -\n1`)." + ], + "signature": "let get: (t<'a>, int) => 'a" + }, + { + "id": "Js.Vector.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`Vector.set(a, n, x)` modifies vector `a` in place, replacing element number\n`n` with `x`. Raise `Invalid_argument \"index out of bounds\"` if `n` is outside\nthe range 0 to `Array.length(a) - 1`." + ], + "signature": "let set: (t<'a>, int, 'a) => unit" + }, + { + "id": "Js.Vector.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`Vector.make(n, x)` returns a fresh vector of length `n`, initialized with `x`.\nAll the elements of this new vector are initially physically equal to `x` (in\nthe sense of the `==` predicate). Consequently, if `x` is mutable, it is shared\namong all elements of the array, and modifying `x` through one of the array\nentries will modify all other entries at the same time. Raise\n`Invalid_argument` if `n < 0` or `n > Sys.max_array_length`. If the value of\n`x` is a floating-point number, then the maximum size is only\n`Sys.max_array_length / 2`." + ], + "signature": "let make: (int, 'a) => t<'a>" + }, + { + "id": "Js.Vector.init", + "kind": "value", + "name": "init", + "docstrings": [ + "Raises `RangeError` when n is negative.\nn : size" + ], + "signature": "let init: (int, (. int) => 'a) => t<'a>" + }, + { + "id": "Js.Vector.append", + "kind": "value", + "name": "append", + "docstrings": [ + "`append(x, a)` returns a fresh vector with `x` appended to `a`." + ], + "signature": "let append: ('a, t<'a>) => t<'a>" + }, + { + "id": "Js.Vector.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [], + "signature": "let unsafe_get: (t<'a>, int) => 'a" + }, + { + "id": "Js.Vector.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [], + "signature": "let unsafe_set: (t<'a>, int, 'a) => unit" + } + ] + }, + "js/list": { + "id": "Js.List", + "name": "List", + "docstrings": [ + "Provide utilities for list" + ], + "items": [ + { + "id": "Js.List.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a> = list<'a>" + }, + { + "id": "Js.List.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t<'a> => int" + }, + { + "id": "Js.List.cons", + "kind": "value", + "name": "cons", + "docstrings": [], + "signature": "let cons: ('a, t<'a>) => t<'a>" + }, + { + "id": "Js.List.isEmpty", + "kind": "value", + "name": "isEmpty", + "docstrings": [], + "signature": "let isEmpty: t<'a> => bool" + }, + { + "id": "Js.List.hd", + "kind": "value", + "name": "hd", + "docstrings": [], + "signature": "let hd: t<'a> => option<'a>" + }, + { + "id": "Js.List.tl", + "kind": "value", + "name": "tl", + "docstrings": [], + "signature": "let tl: t<'a> => option>" + }, + { + "id": "Js.List.nth", + "kind": "value", + "name": "nth", + "docstrings": [], + "signature": "let nth: (t<'a>, int) => option<'a>" + }, + { + "id": "Js.List.revAppend", + "kind": "value", + "name": "revAppend", + "docstrings": [], + "signature": "let revAppend: (t<'a>, t<'a>) => t<'a>" + }, + { + "id": "Js.List.rev", + "kind": "value", + "name": "rev", + "docstrings": [], + "signature": "let rev: t<'a> => t<'a>" + }, + { + "id": "Js.List.mapRev", + "kind": "value", + "name": "mapRev", + "docstrings": [], + "signature": "let mapRev: ((. 'a) => 'b, t<'a>) => t<'b>" + }, + { + "id": "Js.List.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. 'a) => 'b, t<'a>) => t<'b>" + }, + { + "id": "Js.List.iter", + "kind": "value", + "name": "iter", + "docstrings": [], + "signature": "let iter: ((. 'a) => unit, t<'a>) => unit" + }, + { + "id": "Js.List.iteri", + "kind": "value", + "name": "iteri", + "docstrings": [], + "signature": "let iteri: ((. int, 'a) => unit, t<'a>) => unit" + }, + { + "id": "Js.List.foldLeft", + "kind": "value", + "name": "foldLeft", + "docstrings": [ + "Application order is left to right, tail recurisve" + ], + "signature": "let foldLeft: ((. 'a, 'b) => 'a, 'a, list<'b>) => 'a" + }, + { + "id": "Js.List.foldRight", + "kind": "value", + "name": "foldRight", + "docstrings": [ + "Application order is right to left\n tail-recursive." + ], + "signature": "let foldRight: ((. 'a, 'b) => 'b, list<'a>, 'b) => 'b" + }, + { + "id": "Js.List.flatten", + "kind": "value", + "name": "flatten", + "docstrings": [], + "signature": "let flatten: t> => t<'a>" + }, + { + "id": "Js.List.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. 'a) => bool, t<'a>) => t<'a>" + }, + { + "id": "Js.List.filterMap", + "kind": "value", + "name": "filterMap", + "docstrings": [], + "signature": "let filterMap: ((. 'a) => option<'b>, t<'a>) => t<'b>" + }, + { + "id": "Js.List.countBy", + "kind": "value", + "name": "countBy", + "docstrings": [], + "signature": "let countBy: ((. 'a) => bool, list<'a>) => int" + }, + { + "id": "Js.List.init", + "kind": "value", + "name": "init", + "docstrings": [], + "signature": "let init: (int, (. int) => 'a) => t<'a>" + }, + { + "id": "Js.List.toVector", + "kind": "value", + "name": "toVector", + "docstrings": [], + "signature": "let toVector: t<'a> => array<'a>" + }, + { + "id": "Js.List.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: ((. 'a, 'a) => bool, list<'a>, list<'a>) => bool" + } + ] + }, + "js/result": { + "id": "Js.Result", + "name": "Result", + "docstrings": [ + "Define the interface for result" + ], + "items": [ + { + "id": "Js.Result.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'good, 'bad> = Ok('good) | Error('bad)" + } + ] + }, + "js/option": { + "id": "Js.Option", + "name": "Option", + "docstrings": [ + "Provide utilities for option" + ], + "items": [ + { + "id": "Js.Option.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a> = option<'a>" + }, + { + "id": "Js.Option.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: 'a => option<'a>" + }, + { + "id": "Js.Option.isSome", + "kind": "value", + "name": "isSome", + "docstrings": [], + "signature": "let isSome: option<'a> => bool" + }, + { + "id": "Js.Option.isSomeValue", + "kind": "value", + "name": "isSomeValue", + "docstrings": [], + "signature": "let isSomeValue: ((. 'a, 'a) => bool, 'a, option<'a>) => bool" + }, + { + "id": "Js.Option.isNone", + "kind": "value", + "name": "isNone", + "docstrings": [], + "signature": "let isNone: option<'a> => bool" + }, + { + "id": "Js.Option.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: option<'a> => 'a" + }, + { + "id": "Js.Option.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: ((. 'a, 'b) => bool, option<'a>, option<'b>) => bool" + }, + { + "id": "Js.Option.andThen", + "kind": "value", + "name": "andThen", + "docstrings": [], + "signature": "let andThen: ((. 'a) => option<'b>, option<'a>) => option<'b>" + }, + { + "id": "Js.Option.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ((. 'a) => 'b, option<'a>) => option<'b>" + }, + { + "id": "Js.Option.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: ('a, option<'a>) => 'a" + }, + { + "id": "Js.Option.default", + "kind": "value", + "name": "default", + "docstrings": [], + "signature": "let default: ('a, option<'a>) => 'a" + }, + { + "id": "Js.Option.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ((. 'a) => bool, option<'a>) => option<'a>" + }, + { + "id": "Js.Option.firstSome", + "kind": "value", + "name": "firstSome", + "docstrings": [], + "signature": "let firstSome: (option<'a>, option<'a>) => option<'a>" + } + ] + }, + "js/blob": { + "id": "Js.Blob", + "name": "Blob", + "docstrings": [ + "Provide utilities for Blob" + ], + "items": [ + { + "id": "Js.Blob.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + } + ] + }, + "js/file": { + "id": "Js.File", + "name": "File", + "docstrings": [ + "Provide utilities for File" + ], + "items": [ + { + "id": "Js.File.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + } + ] + }, + "js/bigint": { + "id": "Js.Bigint", + "name": "Bigint", + "docstrings": [ + "Provide utilities for bigint" + ], + "items": [ + { + "id": "Js.Bigint.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + } + ] + }, + "js/int": { + "id": "Js.Int", + "name": "Int", + "docstrings": [ + "Provide utilities for int" + ], + "items": [ + { + "id": "Js.Int.toExponential", + "kind": "value", + "name": "toExponential", + "docstrings": [ + "Formats an `int` using exponential (scientific) notation.\nReturns a `string` representing the given value in exponential notation.\nRaises `RangeError` if digits is not in the range \\[0, 20\\] (inclusive).\n\n**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n```rescript\n/* prints \"7.7e+1\" */\nJs.log(Js.Int.toExponential(77))\n```" + ], + "signature": "let toExponential: int => string" + }, + { + "id": "Js.Int.toExponentialWithPrecision", + "kind": "value", + "name": "toExponentialWithPrecision", + "docstrings": [ + "Formats an `int` using exponential (scientific) notation.\n`digits` specifies how many digits should appear after the decimal point. The value must be in the range \\[0, 20\\] (inclusive).\n\nReturns a `string` representing the given value in exponential notation.\n\nThe output will be rounded or padded with zeroes if necessary.\nRaises `RangeError` if `digits` is not in the range \\[0, 20\\] (inclusive).\n\n**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n```rescript\n/* prints \"7.70e+1\" */\nJs.log(Js.Int.toExponentialWithPrecision(77, ~digits=2))\n\n/* prints \"5.68e+3\" */\nJs.log(Js.Int.toExponentialWithPrecision(5678, ~digits=2))\n```" + ], + "signature": "let toExponentialWithPrecision: (int, ~digits: int) => string" + }, + { + "id": "Js.Int.toPrecision", + "kind": "value", + "name": "toPrecision", + "docstrings": [ + "Formats an `int` using some fairly arbitrary rules.\nReturns a `string` representing the given value in fixed-point (usually).\n\n`toPrecision` differs from `toFixed` in that the former will format the number with full precision, while the latter will not output any digits after the decimal point.\nRaises `RangeError` if `digits` is not in the range accepted by this function.\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)\n\n```rescript\n/* prints \"123456789\" */\nJs.log(Js.Int.toPrecision(123456789))\n```" + ], + "signature": "let toPrecision: int => string" + }, + { + "id": "Js.Int.toPrecisionWithPrecision", + "kind": "value", + "name": "toPrecisionWithPrecision", + "docstrings": [ + "Formats an `int` using some fairly arbitrary rules.\n`digits` specifies how many digits should appear in total. The value must between 0 and some arbitrary number that's hopefully at least larger than 20 (for Node it's 21. Why? Who knows).\n\nReturns a `string` representing the given value in fixed-point or scientific notation.\n\nThe output will be rounded or padded with zeroes if necessary.\n\n`toPrecisionWithPrecision` differs from `toFixedWithPrecision` in that the former will count all digits against the precision, while the latter will count only the digits after the decimal point.\n`toPrecisionWithPrecision` will also use scientific notation if the specified precision is less than the number of digits before the decimal point.\nRaises `RangeError` if `digits` is not in the range accepted by this function.\n\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)\n\n```rescript\n/* prints \"1.2e+8\" */\nJs.log(Js.Int.toPrecisionWithPrecision(123456789, ~digits=2))\n\n/* prints \"0.0\" */\nJs.log(Js.Int.toPrecisionWithPrecision(0, ~digits=2))\n```" + ], + "signature": "let toPrecisionWithPrecision: (int, ~digits: int) => string" + }, + { + "id": "Js.Int.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Formats an `int` as a `string`. Returns a `string` representing the given value\nin fixed-point (usually).\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)\n\n```rescript\n/* prints \"123456789\" */\nJs.log(Js.Int.toString(123456789))\n```" + ], + "signature": "let toString: int => string" + }, + { + "id": "Js.Int.toStringWithRadix", + "kind": "value", + "name": "toStringWithRadix", + "docstrings": [ + "Formats an `int` as a `string`. `radix` specifies the radix base to use for the\nformatted number. The value must be in the range \\[2, 36\\] (inclusive). Returns\na `string` representing the given value in fixed-point (usually). Raises\n`RangeError` if `radix` is not in the range \\[2, 36\\] (inclusive).\n\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)\n\n```rescript\n/* prints \"110\" */\nJs.log(Js.Int.toStringWithRadix(6, ~radix=2))\n\n/* prints \"deadbeef\" */\nJs.log(Js.Int.toStringWithRadix(3735928559, ~radix=16))\n\n/* prints \"2n9c\" */\nJs.log(Js.Int.toStringWithRadix(123456, ~radix=36))\n```" + ], + "signature": "let toStringWithRadix: (int, ~radix: int) => string" + }, + { + "id": "Js.Int.toFloat", + "kind": "value", + "name": "toFloat", + "docstrings": [], + "signature": "let toFloat: int => float" + }, + { + "id": "Js.Int.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: (int, int) => bool" + }, + { + "id": "Js.Int.max", + "kind": "value", + "name": "max", + "docstrings": [], + "signature": "let max: int" + }, + { + "id": "Js.Int.min", + "kind": "value", + "name": "min", + "docstrings": [], + "signature": "let min: int" + } + ] + }, + "js/float": { + "id": "Js.Float", + "name": "Float", + "docstrings": [ + "Provide utilities for JS float" + ], + "items": [ + { + "id": "Js.Float._NaN", + "kind": "value", + "name": "_NaN", + "docstrings": [ + "The special value \"Not a Number\"\n\n **See:** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN)" + ], + "signature": "let _NaN: float" + }, + { + "id": "Js.Float.isNaN", + "kind": "value", + "name": "isNaN", + "docstrings": [ + "Tests if the given value is `_NaN`\n\n Note that both `_NaN = _NaN` and `_NaN == _NaN` will return `false`. `isNaN` is\n therefore necessary to test for `_NaN`.\n\n **return** `true` if the given value is `_NaN`, `false` otherwise\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN)" + ], + "signature": "let isNaN: float => bool" + }, + { + "id": "Js.Float.isFinite", + "kind": "value", + "name": "isFinite", + "docstrings": [ + "Tests if the given value is finite\n\n **return** `true` if the given value is a finite number, `false` otherwise\n\n ```rescript\n /* returns [false] */\n Js.Float.isFinite(infinity)\n\n /* returns [false] */\n Js.Float.isFinite(neg_infinity)\n\n /* returns [false] */\n Js.Float.isFinite(Js.Float._NaN)\n\n /* returns [true] */\n Js.Float.isFinite(1234.)\n ```\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite)" + ], + "signature": "let isFinite: float => bool" + }, + { + "id": "Js.Float.toExponential", + "kind": "value", + "name": "toExponential", + "docstrings": [ + "Formats a `float` using exponential (scientific) notation\n\n **return** a `string` representing the given value in exponential notation\n\n **raise** RangeError if digits is not in the range [0, 20] (inclusive)\n\n ```rescript\n /* prints \"7.71234e+1\" */\n Js.Float.toExponential(77.1234)->Js.log\n\n /* prints \"7.7e+1\" */\n Js.Float.toExponential(77.)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)" + ], + "signature": "let toExponential: float => string" + }, + { + "id": "Js.Float.toExponentialWithPrecision", + "kind": "value", + "name": "toExponentialWithPrecision", + "docstrings": [ + "Formats a `float` using exponential (scientific) notation\n\n **digits** specifies how many digits should appear after the decimal point. The\n value must be in the range [0, 20] (inclusive).\n\n **return** a `string` representing the given value in exponential notation\n\n The output will be rounded or padded with zeroes if necessary.\n\n **raise** RangeError if digits is not in the range [0, 20] (inclusive)\n\n ```rescript\n /* prints \"7.71e+1\" */\n Js.Float.toExponentialWithPrecision(77.1234, ~digits=2)->Js.log\n ```\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)" + ], + "signature": "let toExponentialWithPrecision: (float, ~digits: int) => string" + }, + { + "id": "Js.Float.toFixed", + "kind": "value", + "name": "toFixed", + "docstrings": [ + "Formats a `float` using fixed point notation\n\n **return** a `string` representing the given value in fixed-point notation (usually)\n\n **raise** RangeError if digits is not in the range [0, 20] (inclusive)\n\n ```rescript\n /* prints \"12346\" (note the rounding) */\n Js.Float.toFixed(12345.6789)->Js.log\n\n /* print \"1.2e+21\" */\n Js.Float.toFixed(1.2e21)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)" + ], + "signature": "let toFixed: float => string" + }, + { + "id": "Js.Float.toFixedWithPrecision", + "kind": "value", + "name": "toFixedWithPrecision", + "docstrings": [ + "Formats a `float` using fixed point notation\n\n **digits** specifies how many digits should appear after the decimal point. The\n value must be in the range [0, 20] (inclusive). Defaults to `0`.\n\n **return** a `string` representing the given value in fixed-point notation (usually)\n\n The output will be rounded or padded with zeroes if necessary.\n\n **raise** RangeError if digits is not in the range [0, 20] (inclusive)\n\n ```rescript\n /* prints \"12345.7\" (note the rounding) */\n Js.Float.toFixedWithPrecision(12345.6789, ~digits=1)->Js.log\n\n /* prints \"0.00\" (note the added zeroes) */\n Js.Float.toFixedWithPrecision(0., ~digits=2)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)" + ], + "signature": "let toFixedWithPrecision: (float, ~digits: int) => string" + }, + { + "id": "Js.Float.toPrecision", + "kind": "value", + "name": "toPrecision", + "docstrings": [ + "Formats a `float` using some fairly arbitrary rules\n\n **return** a `string` representing the given value in fixed-point (usually)\n\n `toPrecision` differs from `toFixed` in that the former will format the number\n with full precision, while the latter will not output any digits after the\n decimal point.\n\n **raise** RangeError if digits is not in the range accepted by this function (what do you mean \"vague\"?)\n\n ```rescript\n /* prints \"12345.6789\" */\n Js.Float.toPrecision(12345.6789)->Js.log\n\n /* print \"1.2e+21\" */\n Js.Float.toPrecision(1.2e21)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)" + ], + "signature": "let toPrecision: float => string" + }, + { + "id": "Js.Float.toPrecisionWithPrecision", + "kind": "value", + "name": "toPrecisionWithPrecision", + "docstrings": [ + "Formats a `float` using some fairly arbitrary rules\n\n **digits** specifies how many digits should appear in total. The\n value must between 0 and some arbitrary number that's hopefully at least larger\n than 20 (for Node it's 21. Why? Who knows).\n\n **return** a `string` representing the given value in fixed-point or scientific notation\n\n The output will be rounded or padded with zeroes if necessary.\n\n `toPrecisionWithPrecision` differs from `toFixedWithPrecision` in that the former\n will count all digits against the precision, while the latter will count only\n the digits after the decimal point. `toPrecisionWithPrecision` will also use\n scientific notation if the specified precision is less than the number for digits\n before the decimal point.\n\n **raise** RangeError if digits is not in the range accepted by this function (what do you mean \"vague\"?)\n\n ```rescript\n /* prints \"1e+4\" */\n Js.Float.toPrecisionWithPrecision(12345.6789, ~digits=1)->Js.log\n\n /* prints \"0.0\" */\n Js.Float.toPrecisionWithPrecision(0., ~digits=2)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)" + ], + "signature": "let toPrecisionWithPrecision: (float, ~digits: int) => string" + }, + { + "id": "Js.Float.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Formats a `float` as a string\n\n **return** a `string` representing the given value in fixed-point (usually)\n\n ```rescript\n /* prints \"12345.6789\" */\n Js.Float.toString(12345.6789)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)" + ], + "signature": "let toString: float => string" + }, + { + "id": "Js.Float.toStringWithRadix", + "kind": "value", + "name": "toStringWithRadix", + "docstrings": [ + "Formats a `float` as a string\n\n **radix** specifies the radix base to use for the formatted number. The\n value must be in the range [2, 36] (inclusive).\n\n **return** a `string` representing the given value in fixed-point (usually)\n\n **raise** RangeError if radix is not in the range [2, 36] (inclusive)\n\n ```rescript\n /* prints \"110\" */\n Js.Float.toStringWithRadix(6., ~radix=2)->Js.log\n\n /* prints \"11.001000111101011100001010001111010111000010100011111\" */\n Js.Float.toStringWithRadix(3.14, ~radix=2)->Js.log\n\n /* prints \"deadbeef\" */\n Js.Float.toStringWithRadix(3735928559., ~radix=16)->Js.log\n\n /* prints \"3f.gez4w97ry0a18ymf6qadcxr\" */\n Js.Float.toStringWithRadix(123.456, ~radix=36)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)" + ], + "signature": "let toStringWithRadix: (float, ~radix: int) => string" + }, + { + "id": "Js.Float.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [ + "Parses the given `string` into a `float` using JavaScript semantics\n\n **return** the number as a `float` if successfully parsed, `_NaN` otherwise.\n\n ```rescript\n /* returns 123 */\n Js.Float.fromString(\"123\")\n\n /* returns 12.3 */\n Js.Float.fromString(\"12.3\")\n\n /* returns 0 */\n Js.Float.fromString(\"\")\n\n /* returns 17 */\n Js.Float.fromString(\"0x11\")\n\n /* returns 3 */\n Js.Float.fromString(\"0b11\")\n\n /* returns 9 */\n Js.Float.fromString(\"0o11\")\n\n /* returns [_NaN] */\n Js.Float.fromString(\"hello\")\n\n /* returns [_NaN] */\n Js.Float.fromString(\"100a\")\n ```" + ], + "signature": "let fromString: string => float" + } + ] + }, + "js/types": { + "id": "Js.Types", + "name": "Types", + "docstrings": [ + "Provide utilities for manipulating JS types" + ], + "items": [ + { + "id": "Js.Types.symbol", + "kind": "type", + "name": "symbol", + "docstrings": [ + "Js symbol type (only available in ES6)" + ], + "signature": "type symbol" + }, + { + "id": "Js.Types.bigint_val", + "kind": "type", + "name": "bigint_val", + "docstrings": [ + "Js bigint type only available in ES2020" + ], + "signature": "type bigint_val" + }, + { + "id": "Js.Types.obj_val", + "kind": "type", + "name": "obj_val", + "docstrings": [], + "signature": "type obj_val" + }, + { + "id": "Js.Types.undefined_val", + "kind": "type", + "name": "undefined_val", + "docstrings": [ + "This type has only one value `undefined`" + ], + "signature": "type undefined_val" + }, + { + "id": "Js.Types.null_val", + "kind": "type", + "name": "null_val", + "docstrings": [ + "This type has only one value `null`" + ], + "signature": "type null_val" + }, + { + "id": "Js.Types.function_val", + "kind": "type", + "name": "function_val", + "docstrings": [], + "signature": "type function_val" + }, + { + "id": "Js.Types.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<_> =\\n | Undefined: t\\n | Null: t\\n | Boolean: t\\n | Number: t\\n | String: t\\n | Function: t\\n | Object: t\\n | Symbol: t\\n | BigInt: t" + }, + { + "id": "Js.Types.test", + "kind": "value", + "name": "test", + "docstrings": [ + "`test(value, t)` returns `true` if `value` is `typeof t`, otherwise `false`.\n This is useful for doing runtime reflection on any given value.\n\n ```rescript\n test(\"test\", String) == true\n test(() => true, Function) == true\n test(\"test\", Boolean) == false\n ```" + ], + "signature": "let test: ('a, t<'b>) => bool" + }, + { + "id": "Js.Types.tagged_t", + "kind": "type", + "name": "tagged_t", + "docstrings": [], + "signature": "type tagged_t =\\n | JSFalse\\n | JSTrue\\n | JSNull\\n | JSUndefined\\n | JSNumber(float)\\n | JSString(string)\\n | JSFunction(function_val)\\n | JSObject(obj_val)\\n | JSSymbol(symbol)\\n | JSBigInt(bigint_val)" + }, + { + "id": "Js.Types.classify", + "kind": "value", + "name": "classify", + "docstrings": [], + "signature": "let classify: 'a => tagged_t" + } + ] + }, + "js/typedarray2": { + "id": "Js.TypedArray2", + "name": "TypedArray2", + "docstrings": [ + "Provide bindings for JS typed array" + ], + "items": [ + { + "id": "Js.TypedArray2.array_buffer", + "kind": "type", + "name": "array_buffer", + "docstrings": [], + "signature": "type array_buffer" + }, + { + "id": "Js.TypedArray2.array_like", + "kind": "type", + "name": "array_like", + "docstrings": [], + "signature": "type array_like<'a>" + } + ] + }, + "js/typed_array": { + "id": "Js.Typed_array", + "name": "Typed_array", + "docstrings": [ + "Provide bindings for JS typed array" + ], + "items": [ + { + "id": "Js.Typed_array.array_buffer", + "kind": "type", + "name": "array_buffer", + "docstrings": [], + "signature": "type array_buffer = Js_typed_array2.array_buffer" + }, + { + "id": "Js.Typed_array.array_like", + "kind": "type", + "name": "array_like", + "docstrings": [], + "signature": "type array_like<'a> = Js_typed_array2.array_like<'a>" + } + ] + }, + "js/obj": { + "id": "Js.Obj", + "name": "Obj", + "docstrings": [ + "Provide utilities for `Js.t`" + ], + "items": [ + { + "id": "Js.Obj.empty", + "kind": "value", + "name": "empty", + "docstrings": [ + "`empty()` returns the empty object `{}`" + ], + "signature": "let empty: unit => {..}" + }, + { + "id": "Js.Obj.assign", + "kind": "value", + "name": "assign", + "docstrings": [ + "`assign(target, source)` copies properties from source to target.\nProperties in `target` will be overwritten by properties in `source` if they have the same key.\nReturns `target`.\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n\n```rescript\n/* Copy an object */\n\nlet obj = {\"a\": 1}\n\nlet copy = Js.Obj.assign(Js.Obj.empty(), obj)\n\n/* prints \"{ a: 1 }\" */\nJs.log(copy)\n\n/* Merge objects with same properties */\n\nlet target = {\"a\": 1, \"b\": 1}\nlet source = {\"b\": 2}\n\nlet obj = Js.Obj.assign(target, source)\n\n/* prints \"{ a: 1, b: 2 }\" */\nJs.log(obj)\n\n/* prints \"{ a: 1, b: 2 }\", target is modified */\nJs.log(target)\n```" + ], + "signature": "let assign: ({..}, {..}) => {..}" + }, + { + "id": "Js.Obj.keys", + "kind": "value", + "name": "keys", + "docstrings": [ + "`keys(obj)` returns an `array` of the keys of `obj`'s own enumerable properties." + ], + "signature": "let keys: {..} => array" + } + ] + }, + "js/math": { + "id": "Js.Math", + "name": "Math", + "docstrings": [ + "Provide bindings for JS `Math` object" + ], + "items": [ + { + "id": "Js.Math._E", + "kind": "value", + "name": "_E", + "docstrings": [ + "Euler's number; ≈ 2.718281828459045. See\n [`Math.E`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/E)\n on MDN." + ], + "signature": "let _E: float" + }, + { + "id": "Js.Math._LN2", + "kind": "value", + "name": "_LN2", + "docstrings": [ + "Natural logarithm of 2; ≈ 0.6931471805599453. See\n [`Math.LN2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN2)\n on MDN." + ], + "signature": "let _LN2: float" + }, + { + "id": "Js.Math._LN10", + "kind": "value", + "name": "_LN10", + "docstrings": [ + "Natural logarithm of 10; ≈ 2.302585092994046. See\n [`Math.LN10`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN10)\n on MDN." + ], + "signature": "let _LN10: float" + }, + { + "id": "Js.Math._LOG2E", + "kind": "value", + "name": "_LOG2E", + "docstrings": [ + "Base 2 logarithm of E; ≈ 1.4426950408889634. See\n [`Math.LOG2E`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG2E)\n on MDN." + ], + "signature": "let _LOG2E: float" + }, + { + "id": "Js.Math._LOG10E", + "kind": "value", + "name": "_LOG10E", + "docstrings": [ + "Base 10 logarithm of E; ≈ 0.4342944819032518. See\n [`Math.LOG10E`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG10E)\n on MDN." + ], + "signature": "let _LOG10E: float" + }, + { + "id": "Js.Math._PI", + "kind": "value", + "name": "_PI", + "docstrings": [ + "Pi - ratio of the circumference to the diameter of a circle; ≈ 3.141592653589793. See\n [`Math.PI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/PI)\n on MDN." + ], + "signature": "let _PI: float" + }, + { + "id": "Js.Math._SQRT1_2", + "kind": "value", + "name": "_SQRT1_2", + "docstrings": [ + "Square root of 1/2; ≈ 0.7071067811865476. See\n [`Math.SQRT1_2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2)\n on MDN." + ], + "signature": "let _SQRT1_2: float" + }, + { + "id": "Js.Math._SQRT2", + "kind": "value", + "name": "_SQRT2", + "docstrings": [ + "Square root of 2; ≈ 1.4142135623730951. See\n [`Math.SQRT2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT2)\n on MDN." + ], + "signature": "let _SQRT2: float" + }, + { + "id": "Js.Math.abs_int", + "kind": "value", + "name": "abs_int", + "docstrings": [ + "Absolute value for integer argument. See\n [`Math.abs`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs)\n on MDN." + ], + "signature": "let abs_int: int => int" + }, + { + "id": "Js.Math.abs_float", + "kind": "value", + "name": "abs_float", + "docstrings": [ + "Absolute value for float argument. See\n [`Math.abs`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs)\n on MDN." + ], + "signature": "let abs_float: float => float" + }, + { + "id": "Js.Math.acos", + "kind": "value", + "name": "acos", + "docstrings": [ + "Arccosine (in radians) of argument; returns `NaN` if the argument is outside\n the range [-1.0, 1.0]. See\n [`Math.acos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acos)\n on MDN." + ], + "signature": "let acos: float => float" + }, + { + "id": "Js.Math.acosh", + "kind": "value", + "name": "acosh", + "docstrings": [ + "Hyperbolic arccosine (in radians) of argument; returns `NaN` if the argument\n is less than 1.0. See\n [`Math.acosh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acosh)\n on MDN." + ], + "signature": "let acosh: float => float" + }, + { + "id": "Js.Math.asin", + "kind": "value", + "name": "asin", + "docstrings": [ + "Arcsine (in radians) of argument; returns `NaN` if the argument is outside\n the range [-1.0, 1.0]. See\n [`Math.asin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asin)\n on MDN." + ], + "signature": "let asin: float => float" + }, + { + "id": "Js.Math.asinh", + "kind": "value", + "name": "asinh", + "docstrings": [ + "Hyperbolic arcsine (in radians) of argument. See\n [`Math.asinh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asinh)\n on MDN." + ], + "signature": "let asinh: float => float" + }, + { + "id": "Js.Math.atan", + "kind": "value", + "name": "atan", + "docstrings": [ + "Arctangent (in radians) of argument. See\n [`Math.atan`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan)\n on MDN." + ], + "signature": "let atan: float => float" + }, + { + "id": "Js.Math.atanh", + "kind": "value", + "name": "atanh", + "docstrings": [ + "Hyperbolic arctangent (in radians) of argument; returns `NaN` if the argument\n is is outside the range [-1.0, 1.0]. Returns `-Infinity` and `Infinity` for\n arguments -1.0 and 1.0. See\n [`Math.atanh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh)\n on MDN." + ], + "signature": "let atanh: float => float" + }, + { + "id": "Js.Math.atan2", + "kind": "value", + "name": "atan2", + "docstrings": [ + "Returns the angle (in radians) of the quotient `y /. x`. It is also the angle\n between the *x*-axis and point (*x*, *y*). See\n [`Math.atan2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2)\n on MDN.\n\n ```rescript\n Js.Math.atan2(~y=0.0, ~x=10.0, ()) == 0.0\n Js.Math.atan2(~x=5.0, ~y=5.0, ()) == Js.Math._PI /. 4.0\n Js.Math.atan2(~x=-5.0, ~y=5.0, ())\n Js.Math.atan2(~x=-5.0, ~y=5.0, ()) == 3.0 *. Js.Math._PI /. 4.0\n Js.Math.atan2(~x=-0.0, ~y=-5.0, ()) == -.Js.Math._PI /. 2.0\n ```" + ], + "signature": "let atan2: (~y: float, ~x: float, unit) => float" + }, + { + "id": "Js.Math.cbrt", + "kind": "value", + "name": "cbrt", + "docstrings": [ + "Cube root. See\n [`Math.cbrt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cbrt)\n on MDN" + ], + "signature": "let cbrt: float => float" + }, + { + "id": "Js.Math.unsafe_ceil_int", + "kind": "value", + "name": "unsafe_ceil_int", + "docstrings": [ + "Returns the smallest integer greater than or equal to the argument. This\n function may return values not representable by `int`, whose range is\n -2147483648 to 2147483647. This is because, in JavaScript, there are only\n 64-bit floating point numbers, which can represent integers in the range\n ±(253-1) exactly. See\n [`Math.ceil`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil)\n on MDN.\n\n ```rescript\n Js.Math.unsafe_ceil_int(3.1) == 4\n Js.Math.unsafe_ceil_int(3.0) == 3\n Js.Math.unsafe_ceil_int(-3.1) == -3\n Js.Math.unsafe_ceil_int(1.0e15) // result is outside range of int datatype\n ```" + ], + "signature": "let unsafe_ceil_int: float => int" + }, + { + "id": "Js.Math.unsafe_ceil", + "kind": "value", + "name": "unsafe_ceil", + "docstrings": [ + "Deprecated; please use [`unsafe_ceil_int`](#unsafe_ceil_int) instead." + ], + "signature": "let unsafe_ceil: float => int" + }, + { + "id": "Js.Math.ceil_int", + "kind": "value", + "name": "ceil_int", + "docstrings": [ + "Returns the smallest `int` greater than or equal to the argument; the result\n is pinned to the range of the `int` data type: -2147483648 to 2147483647. See\n [`Math.ceil`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil)\n on MDN.\n\n ```rescript\n Js.Math.ceil_int(3.1) == 4\n Js.Math.ceil_int(3.0) == 3\n Js.Math.ceil_int(-3.1) == -3\n Js.Math.ceil_int(-1.0e15) == -2147483648\n Js.Math.ceil_int(1.0e15) == 2147483647\n ```" + ], + "signature": "let ceil_int: float => int" + }, + { + "id": "Js.Math.ceil", + "kind": "value", + "name": "ceil", + "docstrings": [ + "Deprecated; please use [`ceil_int`](#ceil_int) instead." + ], + "signature": "let ceil: float => int" + }, + { + "id": "Js.Math.ceil_float", + "kind": "value", + "name": "ceil_float", + "docstrings": [ + "Returns the smallest integral value greater than or equal to the argument.\n The result is a `float` and is not restricted to the `int` data type range.\n See\n [`Math.ceil`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil)\n on MDN.\n\n ```rescript\n Js.Math.ceil_float(3.1) == 4.0\n Js.Math.ceil_float(3.0) == 3.0\n Js.Math.ceil_float(-3.1) == -3.0\n Js.Math.ceil_float(2_150_000_000.3) == 2_150_000_001.0\n ```" + ], + "signature": "let ceil_float: float => float" + }, + { + "id": "Js.Math.clz32", + "kind": "value", + "name": "clz32", + "docstrings": [ + "Number of leading zero bits of the argument's 32 bit int representation. See\n [`Math.clz32`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32)\n on MDN.\n\n ```rescript\n Js.Math.clz32(0) == 32\n Js.Math.clz32(-1) == 0\n Js.Math.clz32(255) == 24\n ```" + ], + "signature": "let clz32: int => int" + }, + { + "id": "Js.Math.cos", + "kind": "value", + "name": "cos", + "docstrings": [ + "Cosine of argument, which must be specified in radians. See\n [`Math.cos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos)\n on MDN." + ], + "signature": "let cos: float => float" + }, + { + "id": "Js.Math.cosh", + "kind": "value", + "name": "cosh", + "docstrings": [ + "Hyperbolic cosine of argument, which must be specified in radians. See\n [`Math.cosh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cosh)\n on MDN." + ], + "signature": "let cosh: float => float" + }, + { + "id": "Js.Math.exp", + "kind": "value", + "name": "exp", + "docstrings": [ + "Natural exponentional; returns *e* (the base of natural logarithms) to the\n power of the given argument. See\n [`Math.exp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/exp)\n on MDN." + ], + "signature": "let exp: float => float" + }, + { + "id": "Js.Math.expm1", + "kind": "value", + "name": "expm1", + "docstrings": [ + "Returns *e* (the base of natural logarithms) to the power of the given\n argument minus 1. See\n [`Math.expm1`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/expm1)\n on MDN." + ], + "signature": "let expm1: float => float" + }, + { + "id": "Js.Math.unsafe_floor_int", + "kind": "value", + "name": "unsafe_floor_int", + "docstrings": [ + "Returns the largest integer less than or equal to the argument. This function\n may return values not representable by `int`, whose range is -2147483648 to\n 2147483647. This is because, in JavaScript, there are only 64-bit floating\n point numbers, which can represent integers in the range\n ±(253-1) exactly. See\n [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ```rescript\n Js.Math.unsafe_floor_int(3.7) == 3\n Js.Math.unsafe_floor_int(3.0) == 3\n Js.Math.unsafe_floor_int(-3.7) == -4\n Js.Math.unsafe_floor_int(1.0e15) // result is outside range of int datatype\n ```" + ], + "signature": "let unsafe_floor_int: float => int" + }, + { + "id": "Js.Math.unsafe_floor", + "kind": "value", + "name": "unsafe_floor", + "docstrings": [ + "Deprecated; please use [`unsafe_floor_int`](#unsafe_floor_int) instead." + ], + "signature": "let unsafe_floor: float => int" + }, + { + "id": "Js.Math.floor_int", + "kind": "value", + "name": "floor_int", + "docstrings": [ + "Returns the largest `int` less than or equal to the argument; the result is\n pinned to the range of the `int` data type: -2147483648 to 2147483647. See\n [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ```rescript\n Js.Math.floor_int(3.7) == 3\n Js.Math.floor_int(3.0) == 3\n Js.Math.floor_int(-3.1) == -4\n Js.Math.floor_int(-1.0e15) == -2147483648\n Js.Math.floor_int(1.0e15) == 2147483647\n ```" + ], + "signature": "let floor_int: float => int" + }, + { + "id": "Js.Math.floor", + "kind": "value", + "name": "floor", + "docstrings": [ + "Deprecated; please use [`floor_int`](#floor_int) instead." + ], + "signature": "let floor: float => int" + }, + { + "id": "Js.Math.floor_float", + "kind": "value", + "name": "floor_float", + "docstrings": [ + "Returns the largest integral value less than or equal to the argument. The\n result is a `float` and is not restricted to the `int` data type range. See\n [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ```rescript\n Js.Math.floor_float(3.7) == 3.0\n Js.Math.floor_float(3.0) == 3.0\n Js.Math.floor_float(-3.1) == -4.0\n Js.Math.floor_float(2_150_000_000.3) == 2_150_000_000.0\n ```" + ], + "signature": "let floor_float: float => float" + }, + { + "id": "Js.Math.fround", + "kind": "value", + "name": "fround", + "docstrings": [ + "Round to nearest single precision float. See\n [`Math.fround`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround)\n on MDN.\n\n ```rescript\n Js.Math.fround(5.5) == 5.5\n Js.Math.fround(5.05) == 5.050000190734863\n ```" + ], + "signature": "let fround: float => float" + }, + { + "id": "Js.Math.hypot", + "kind": "value", + "name": "hypot", + "docstrings": [ + "Returns the square root of the sum of squares of its two arguments (the\n Pythagorean formula). See\n [`Math.hypot`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot)\n on MDN." + ], + "signature": "let hypot: (float, float) => float" + }, + { + "id": "Js.Math.hypotMany", + "kind": "value", + "name": "hypotMany", + "docstrings": [ + "Returns the square root of the sum of squares of the numbers in the array\n argument (generalized Pythagorean equation). Using an array allows you to\n have more than two items. See\n [`Math.hypot`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot)\n on MDN.\n\n ```rescript\n Js.Math.hypotMany([3.0, 4.0, 12.0]) == 13.0\n ```" + ], + "signature": "let hypotMany: array => float" + }, + { + "id": "Js.Math.imul", + "kind": "value", + "name": "imul", + "docstrings": [ + "32-bit integer multiplication. Use this only when you need to optimize\n performance of multiplication of numbers stored as 32-bit integers. See\n [`Math.imul`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul)\n on MDN." + ], + "signature": "let imul: (int, int) => int" + }, + { + "id": "Js.Math.log", + "kind": "value", + "name": "log", + "docstrings": [ + "Returns the natural logarithm of its argument; this is the number *x* such\n that *e**x* equals the argument. Returns `NaN` for negative\n arguments. See\n [`Math.log`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log)\n on MDN.\n\n ```rescript\n Js.Math.log(Js.Math._E) == 1.0\n Js.Math.log(100.0) == 4.605170185988092\n ```" + ], + "signature": "let log: float => float" + }, + { + "id": "Js.Math.log1p", + "kind": "value", + "name": "log1p", + "docstrings": [ + "Returns the natural logarithm of one plus the argument. Returns `NaN` for\n arguments less than -1. See\n [`Math.log1p`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log1p)\n on MDN.\n\n ```rescript\n Js.Math.log1p(Js.Math._E -. 1.0) == 1.0\n Js.Math.log1p(99.0) == 4.605170185988092\n ```" + ], + "signature": "let log1p: float => float" + }, + { + "id": "Js.Math.log10", + "kind": "value", + "name": "log10", + "docstrings": [ + "Returns the base 10 logarithm of its argument. Returns `NaN` for negative\n arguments. See\n [`Math.log10`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log10)\n on MDN.\n\n ```rescript\n Js.Math.log10(1000.0) == 3.0\n Js.Math.log10(0.01) == -2.0\n Js.Math.log10(Js.Math.sqrt(10.0)) == 0.5\n ```" + ], + "signature": "let log10: float => float" + }, + { + "id": "Js.Math.log2", + "kind": "value", + "name": "log2", + "docstrings": [ + "Returns the base 2 logarithm of its argument. Returns `NaN` for negative\n arguments. See\n [`Math.log2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2)\n on MDN.\n\n ```rescript\n Js.Math.log2(512.0) == 9.0\n Js.Math.log2(0.125) == -3.0\n Js.Math.log2(Js.Math._SQRT2) == 0.5000000000000001 // due to precision\n ```" + ], + "signature": "let log2: float => float" + }, + { + "id": "Js.Math.max_int", + "kind": "value", + "name": "max_int", + "docstrings": [ + "Returns the maximum of its two integer arguments. See\n [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max)\n on MDN." + ], + "signature": "let max_int: (int, int) => int" + }, + { + "id": "Js.Math.maxMany_int", + "kind": "value", + "name": "maxMany_int", + "docstrings": [ + "Returns the maximum of the integers in the given array. See\n [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max)\n on MDN." + ], + "signature": "let maxMany_int: array => int" + }, + { + "id": "Js.Math.max_float", + "kind": "value", + "name": "max_float", + "docstrings": [ + "Returns the maximum of its two floating point arguments. See\n [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max)\n on MDN." + ], + "signature": "let max_float: (float, float) => float" + }, + { + "id": "Js.Math.maxMany_float", + "kind": "value", + "name": "maxMany_float", + "docstrings": [ + "Returns the maximum of the floating point values in the given array. See\n [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max)\n on MDN." + ], + "signature": "let maxMany_float: array => float" + }, + { + "id": "Js.Math.min_int", + "kind": "value", + "name": "min_int", + "docstrings": [ + "Returns the minimum of its two integer arguments. See\n [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min)\n on MDN." + ], + "signature": "let min_int: (int, int) => int" + }, + { + "id": "Js.Math.minMany_int", + "kind": "value", + "name": "minMany_int", + "docstrings": [ + "Returns the minimum of the integers in the given array. See\n [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min)\n on MDN." + ], + "signature": "let minMany_int: array => int" + }, + { + "id": "Js.Math.min_float", + "kind": "value", + "name": "min_float", + "docstrings": [ + "Returns the minimum of its two floating point arguments. See\n [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min)\n on MDN." + ], + "signature": "let min_float: (float, float) => float" + }, + { + "id": "Js.Math.minMany_float", + "kind": "value", + "name": "minMany_float", + "docstrings": [ + "Returns the minimum of the floating point values in the given array. See\n [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min)\n on MDN." + ], + "signature": "let minMany_float: array => float" + }, + { + "id": "Js.Math.pow_int", + "kind": "value", + "name": "pow_int", + "docstrings": [ + "Raises the given base to the given exponent. (Arguments and result are\n integers.) See\n [`Math.pow`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow)\n on MDN.\n\n ```rescript\n Js.Math.pow_int(~base=3, ~exp=4) == 81\n ```" + ], + "signature": "let pow_int: (~base: int, ~exp: int) => int" + }, + { + "id": "Js.Math.pow_float", + "kind": "value", + "name": "pow_float", + "docstrings": [ + "Raises the given base to the given exponent. (Arguments and result are\n floats.) Returns `NaN` if the result would be imaginary. See\n [`Math.pow`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow)\n on MDN.\n\n ```rescript\n Js.Math.pow_float(~base=3.0, ~exp=4.0) == 81.0\n Js.Math.pow_float(~base=4.0, ~exp=-2.0) == 0.0625\n Js.Math.pow_float(~base=625.0, ~exp=0.5) == 25.0\n Js.Math.pow_float(~base=625.0, ~exp=-0.5) == 0.04\n Js.Float.isNaN(Js.Math.pow_float(~base=-2.0, ~exp=0.5)) == true\n ```" + ], + "signature": "let pow_float: (~base: float, ~exp: float) => float" + }, + { + "id": "Js.Math.random", + "kind": "value", + "name": "random", + "docstrings": [ + "Returns a random number in the half-closed interval [0,1). See\n [`Math.random`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random)\n on MDN." + ], + "signature": "let random: unit => float" + }, + { + "id": "Js.Math.random_int", + "kind": "value", + "name": "random_int", + "docstrings": [ + "A call to `random_int(minVal, maxVal)` returns a random number in the\n half-closed interval [minVal, maxVal). See\n [`Math.random`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random)\n on MDN." + ], + "signature": "let random_int: (int, int) => int" + }, + { + "id": "Js.Math.unsafe_round", + "kind": "value", + "name": "unsafe_round", + "docstrings": [ + "Rounds its argument to nearest integer. For numbers with a fractional portion\n of exactly 0.5, the argument is rounded to the next integer in the direction\n of positive infinity. This function may return values not representable by\n `int`, whose range is -2147483648 to 2147483647. This is because, in\n JavaScript, there are only 64-bit floating point numbers, which can represent\n integers in the range ±(253-1) exactly. See\n [`Math.round`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round)\n on MDN.\n\n ```rescript\n Js.Math.unsafe_round(3.7) == 4\n Js.Math.unsafe_round(-3.5) == -3\n Js.Math.unsafe_round(2_150_000_000_000.3) // out of range for int\n ```" + ], + "signature": "let unsafe_round: float => int" + }, + { + "id": "Js.Math.round", + "kind": "value", + "name": "round", + "docstrings": [ + "Rounds to nearest integral value (expressed as a float). See\n [`Math.round`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round)\n on MDN." + ], + "signature": "let round: float => float" + }, + { + "id": "Js.Math.sign_int", + "kind": "value", + "name": "sign_int", + "docstrings": [ + "Returns the sign of its integer argument: -1 if negative, 0 if zero, 1 if\n positive. See\n [`Math.sign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign)\n on MDN." + ], + "signature": "let sign_int: int => int" + }, + { + "id": "Js.Math.sign_float", + "kind": "value", + "name": "sign_float", + "docstrings": [ + "Returns the sign of its float argument: -1.0 if negative, 0.0 if zero, 1.0 if\n positive. See\n [`Math.sign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign)\n on MDN." + ], + "signature": "let sign_float: float => float" + }, + { + "id": "Js.Math.sin", + "kind": "value", + "name": "sin", + "docstrings": [ + "Sine of argument, which must be specified in radians. See\n [`Math.sin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sin)\n on MDN." + ], + "signature": "let sin: float => float" + }, + { + "id": "Js.Math.sinh", + "kind": "value", + "name": "sinh", + "docstrings": [ + "Hyperbolic sine of argument, which must be specified in radians. See\n [`Math.sinh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sinh)\n on MDN." + ], + "signature": "let sinh: float => float" + }, + { + "id": "Js.Math.sqrt", + "kind": "value", + "name": "sqrt", + "docstrings": [ + "Square root. If the argument is negative, this function returns `NaN`. See\n [`Math.sqrt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt)\n on MDN." + ], + "signature": "let sqrt: float => float" + }, + { + "id": "Js.Math.tan", + "kind": "value", + "name": "tan", + "docstrings": [ + "Tangent of argument, which must be specified in radians. Returns `NaN` if the\n argument is positive infinity or negative infinity. See\n [`Math.cos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos)\n on MDN." + ], + "signature": "let tan: float => float" + }, + { + "id": "Js.Math.tanh", + "kind": "value", + "name": "tanh", + "docstrings": [ + "Hyperbolic tangent of argument, which must be specified in radians. See\n [`Math.tanh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tanh)\n on MDN." + ], + "signature": "let tanh: float => float" + }, + { + "id": "Js.Math.unsafe_trunc", + "kind": "value", + "name": "unsafe_trunc", + "docstrings": [ + "Truncates its argument; i.e., removes fractional digits. This function may\n return values not representable by `int`, whose range is -2147483648 to\n 2147483647. This is because, in JavaScript, there are only 64-bit floating\n point numbers, which can represent integers in the range ±(253-1)\n exactly. See\n [`Math.trunc`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc)\n on MDN." + ], + "signature": "let unsafe_trunc: float => int" + }, + { + "id": "Js.Math.trunc", + "kind": "value", + "name": "trunc", + "docstrings": [ + "Truncates its argument; i.e., removes fractional digits. See\n [`Math.trunc`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc)\n on MDN." + ], + "signature": "let trunc: float => float" + } + ] + }, + "js/json": { + "id": "Js.Json", + "name": "Json", + "docstrings": [ + "Provide utilities for json" + ], + "items": [ + { + "id": "Js.Json.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The JSON data structure" + ], + "signature": "type t =\\n | Boolean(bool)\\n | Null\\n | String(string)\\n | Number(float)\\n | Object(Js.Dict.t)\\n | Array(array)" + }, + { + "id": "Js.Json.tagged_t", + "kind": "type", + "name": "tagged_t", + "docstrings": [], + "signature": "type tagged_t =\\n | JSONFalse\\n | JSONTrue\\n | JSONNull\\n | JSONString(string)\\n | JSONNumber(float)\\n | JSONObject(Js_dict.t)\\n | JSONArray(array)" + }, + { + "id": "Js.Json.classify", + "kind": "value", + "name": "classify", + "docstrings": [], + "signature": "let classify: t => tagged_t" + }, + { + "id": "Js.Json.test", + "kind": "value", + "name": "test", + "docstrings": [ + "`test(v, kind)` returns `true` if `v` is of `kind`." + ], + "signature": "let test: ('a, Kind.t<'b>) => bool" + }, + { + "id": "Js.Json.decodeString", + "kind": "value", + "name": "decodeString", + "docstrings": [ + "`decodeString(json)` returns `Some(s)` if `json` is a `string`, `None` otherwise." + ], + "signature": "let decodeString: t => option" + }, + { + "id": "Js.Json.decodeNumber", + "kind": "value", + "name": "decodeNumber", + "docstrings": [ + "`decodeNumber(json)` returns `Some(n)` if `json` is a `number`, `None` otherwise." + ], + "signature": "let decodeNumber: t => option" + }, + { + "id": "Js.Json.decodeObject", + "kind": "value", + "name": "decodeObject", + "docstrings": [ + "`decodeObject(json)` returns `Some(o)` if `json` is an `object`, `None` otherwise." + ], + "signature": "let decodeObject: t => option>" + }, + { + "id": "Js.Json.decodeArray", + "kind": "value", + "name": "decodeArray", + "docstrings": [ + "`decodeArray(json)` returns `Some(a)` if `json` is an `array`, `None` otherwise." + ], + "signature": "let decodeArray: t => option>" + }, + { + "id": "Js.Json.decodeBoolean", + "kind": "value", + "name": "decodeBoolean", + "docstrings": [ + "`decodeBoolean(json)` returns `Some(b)` if `json` is a `boolean`, `None` otherwise." + ], + "signature": "let decodeBoolean: t => option" + }, + { + "id": "Js.Json.decodeNull", + "kind": "value", + "name": "decodeNull", + "docstrings": [ + "`decodeNull(json)` returns `Some(null)` if `json` is a `null`, `None` otherwise." + ], + "signature": "let decodeNull: t => option>" + }, + { + "id": "Js.Json.null", + "kind": "value", + "name": "null", + "docstrings": [ + "`null` is the singleton null JSON value." + ], + "signature": "let null: t" + }, + { + "id": "Js.Json.string", + "kind": "value", + "name": "string", + "docstrings": [ + "`string(s)` makes a JSON string of the `string` `s`." + ], + "signature": "let string: string => t" + }, + { + "id": "Js.Json.number", + "kind": "value", + "name": "number", + "docstrings": [ + "`number(n)` makes a JSON number of the `float` `n`." + ], + "signature": "let number: float => t" + }, + { + "id": "Js.Json.boolean", + "kind": "value", + "name": "boolean", + "docstrings": [ + "`boolean(b)` makes a JSON boolean of the `bool` `b`." + ], + "signature": "let boolean: bool => t" + }, + { + "id": "Js.Json.object_", + "kind": "value", + "name": "object_", + "docstrings": [ + "`object_(dict)` makes a JSON object of the `Js.Dict.t` `dict`." + ], + "signature": "let object_: Js_dict.t => t" + }, + { + "id": "Js.Json.array", + "kind": "value", + "name": "array", + "docstrings": [ + "`array_(a)` makes a JSON array of the `Js.Json.t` array `a`." + ], + "signature": "let array: array => t" + }, + { + "id": "Js.Json.stringArray", + "kind": "value", + "name": "stringArray", + "docstrings": [ + "`stringArray(a)` makes a JSON array of the `string` array `a`." + ], + "signature": "let stringArray: array => t" + }, + { + "id": "Js.Json.numberArray", + "kind": "value", + "name": "numberArray", + "docstrings": [ + "`numberArray(a)` makes a JSON array of the `float` array `a`." + ], + "signature": "let numberArray: array => t" + }, + { + "id": "Js.Json.booleanArray", + "kind": "value", + "name": "booleanArray", + "docstrings": [ + "`booleanArray(a)` makes a JSON array of the `bool` array `a`." + ], + "signature": "let booleanArray: array => t" + }, + { + "id": "Js.Json.objectArray", + "kind": "value", + "name": "objectArray", + "docstrings": [ + "`objectArray(a) makes a JSON array of the `JsDict.t` array `a`." + ], + "signature": "let objectArray: array> => t" + }, + { + "id": "Js.Json.parseExn", + "kind": "value", + "name": "parseExn", + "docstrings": [ + "`parseExn(s)` parses the `string` `s` into a JSON data structure.\nReturns a JSON data structure.\nRaises `SyntaxError` if the given string is not a valid JSON. Note: `SyntaxError` is a JavaScript exception.\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)\n\n```rescript\n/* parse a simple JSON string */\n\nlet json = try Js.Json.parseExn(` \"hello\" `) catch {\n| _ => failwith(\"Error parsing JSON string\")\n}\n\nswitch Js.Json.classify(json) {\n| Js.Json.JSONString(value) => Js.log(value)\n| _ => failwith(\"Expected a string\")\n}\n```\n\n```rescript\n/* parse a complex JSON string */\n\nlet getIds = s => {\n let json = try Js.Json.parseExn(s) catch {\n | _ => failwith(\"Error parsing JSON string\")\n }\n\n switch Js.Json.classify(json) {\n | Js.Json.JSONObject(value) =>\n /* In this branch, compiler infer value : Js.Json.t Js.Dict.t */\n switch Js.Dict.get(value, \"ids\") {\n | Some(ids) =>\n switch Js.Json.classify(ids) {\n | Js.Json.JSONArray(ids) => /* In this branch compiler infer ids : Js.Json.t array */\n ids\n | _ => failwith(\"Expected an array\")\n }\n | None => failwith(\"Expected an `ids` property\")\n }\n | _ => failwith(\"Expected an object\")\n }\n}\n\n/* prints `1, 2, 3` */\nJs.log(getIds(` { \"ids\" : [1, 2, 3 ] } `))\n```" + ], + "signature": "let parseExn: string => t" + }, + { + "id": "Js.Json.stringify", + "kind": "value", + "name": "stringify", + "docstrings": [ + "`stringify(json)` formats the JSON data structure as a `string`.\nReturns the string representation of a given JSON data structure.\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n```rescript\n/* Creates and stringifies a simple JS object */\n\nlet dict = Js.Dict.empty()\nJs.Dict.set(dict, \"name\", Js.Json.string(\"John Doe\"))\nJs.Dict.set(dict, \"age\", Js.Json.number(30.0))\nJs.Dict.set(dict, \"likes\", Js.Json.stringArray([\"ReScript\", \"ocaml\", \"js\"]))\n\nJs.log(Js.Json.stringify(Js.Json.object_(dict)))\n```" + ], + "signature": "let stringify: t => string" + }, + { + "id": "Js.Json.stringifyWithSpace", + "kind": "value", + "name": "stringifyWithSpace", + "docstrings": [ + "`stringifyWithSpace(json)` formats the JSON data structure as a `string`.\nReturns the string representation of a given JSON data structure with spacing.\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n```rescript\n/* Creates and stringifies a simple JS object with spacing */\n\nlet dict = Js.Dict.empty()\nJs.Dict.set(dict, \"name\", Js.Json.string(\"John Doe\"))\nJs.Dict.set(dict, \"age\", Js.Json.number(30.0))\nJs.Dict.set(dict, \"likes\", Js.Json.stringArray([\"ReScript\", \"ocaml\", \"js\"]))\n\nJs.log(Js.Json.stringifyWithSpace(Js.Json.object_(dict), 2))\n```" + ], + "signature": "let stringifyWithSpace: (t, int) => string" + }, + { + "id": "Js.Json.stringifyAny", + "kind": "value", + "name": "stringifyAny", + "docstrings": [ + "`stringifyAny(value)` formats any value into a JSON string.\n\n```rescript\n/* prints `[\"hello\", \"world\"]` */\nJs.log(Js.Json.stringifyAny([\"hello\", \"world\"]))\n```" + ], + "signature": "let stringifyAny: 'a => option" + }, + { + "id": "Js.Json.deserializeUnsafe", + "kind": "value", + "name": "deserializeUnsafe", + "docstrings": [ + "Best-effort serialization, it tries to seralize as\n many objects as possible and deserialize it back\n\n It is unsafe in two aspects\n - It may throw during parsing\n - when you cast it to a specific type, it may have a type mismatch" + ], + "signature": "let deserializeUnsafe: string => 'a" + }, + { + "id": "Js.Json.serializeExn", + "kind": "value", + "name": "serializeExn", + "docstrings": [ + "It will raise in such situations:\n - The object can not be serlialized to a JSON\n - There are cycles\n - Some JS engines can not stringify deeply nested json objects" + ], + "signature": "let serializeExn: 'a => string" + } + ] + }, + "js/global": { + "id": "Js.Global", + "name": "Global", + "docstrings": [ + "Provide bindings to JS global functions in global namespace" + ], + "items": [ + { + "id": "Js.Global.intervalId", + "kind": "type", + "name": "intervalId", + "docstrings": [ + "Identify an interval started by `Js.Global.setInterval`." + ], + "signature": "type intervalId" + }, + { + "id": "Js.Global.timeoutId", + "kind": "type", + "name": "timeoutId", + "docstrings": [ + "Identify timeout started by `Js.Global.setTimeout`." + ], + "signature": "type timeoutId" + }, + { + "id": "Js.Global.clearInterval", + "kind": "value", + "name": "clearInterval", + "docstrings": [ + "Clear an interval started by `Js.Global.setInterval`\n\n```rescript\n/* API for a somewhat aggressive snoozing alarm clock */\n\nlet punchSleepyGuy = () => Js.log(\"Punch\")\n\nlet interval = ref(Js.Nullable.null)\n\nlet remind = () => {\n Js.log(\"Wake Up!\")\n punchSleepyGuy()\n}\n\nlet snooze = mins =>\n interval := Js.Nullable.return(Js.Global.setInterval(remind, mins * 60 * 1000))\n\nlet cancel = () =>\n Js.Nullable.iter(interval.contents, (. intervalId) => Js.Global.clearInterval(intervalId))\n```" + ], + "signature": "let clearInterval: intervalId => unit" + }, + { + "id": "Js.Global.clearTimeout", + "kind": "value", + "name": "clearTimeout", + "docstrings": [ + "Clear a timeout started by `Js.Global.setTimeout`.\n\n```rescript\n/* A simple model of a code monkey's brain */\n\nlet closeHackerNewsTab = () => Js.log(\"close\")\n\nlet timer = ref(Js.Nullable.null)\n\nlet work = () => closeHackerNewsTab()\n\nlet procrastinate = mins => {\n Js.Nullable.iter(timer.contents, (. timer) => Js.Global.clearTimeout(timer))\n timer := Js.Nullable.return(Js.Global.setTimeout(work, mins * 60 * 1000))\n}\n```" + ], + "signature": "let clearTimeout: timeoutId => unit" + }, + { + "id": "Js.Global.setInterval", + "kind": "value", + "name": "setInterval", + "docstrings": [ + "Repeatedly executes a callback with a specified interval (in milliseconds)\nbetween calls. Returns a `Js.Global.intervalId` that can be passed to\n`Js.Global.clearInterval` to cancel the timeout.\n\n```rescript\n/* Will count up and print the count to the console every second */\n\nlet count = ref(0)\n\nlet tick = () => {\n count := count.contents + 1\n Js.log(Belt.Int.toString(count.contents))\n}\n\nJs.Global.setInterval(tick, 1000)\n```" + ], + "signature": "let setInterval: (unit => unit, int) => intervalId" + }, + { + "id": "Js.Global.setIntervalFloat", + "kind": "value", + "name": "setIntervalFloat", + "docstrings": [ + "Repeatedly executes a callback with a specified interval (in milliseconds)\nbetween calls. Returns a `Js.Global.intervalId` that can be passed to\n`Js.Global.clearInterval` to cancel the timeout.\n\n```rescript\n/* Will count up and print the count to the console every second */\n\nlet count = ref(0)\n\nlet tick = () => {\n count := count.contents + 1\n Js.log(Belt.Int.toString(count.contents))\n}\n\nJs.Global.setIntervalFloat(tick, 1000.0)\n```" + ], + "signature": "let setIntervalFloat: (unit => unit, float) => intervalId" + }, + { + "id": "Js.Global.setTimeout", + "kind": "value", + "name": "setTimeout", + "docstrings": [ + "Execute a callback after a specified delay (in milliseconds). Returns a\n`Js.Global.timeoutId` that can be passed to `Js.Global.clearTimeout` to cancel\nthe timeout.\n\n```rescript\n/* Prints \"Timed out!\" in the console after one second */\n\nlet message = \"Timed out!\"\n\nJs.Global.setTimeout(() => Js.log(message), 1000)\n```" + ], + "signature": "let setTimeout: (unit => unit, int) => timeoutId" + }, + { + "id": "Js.Global.setTimeoutFloat", + "kind": "value", + "name": "setTimeoutFloat", + "docstrings": [ + "Execute a callback after a specified delay (in milliseconds). Returns a\n`Js.Global.timeoutId` that can be passed to `Js.Global.clearTimeout` to cancel\nthe timeout.\n\n```rescript\n/* Prints \"Timed out!\" in the console after one second */\n\nlet message = \"Timed out!\"\n\nJs.Global.setTimeoutFloat(() => Js.log(message), 1000.0)\n```" + ], + "signature": "let setTimeoutFloat: (unit => unit, float) => timeoutId" + }, + { + "id": "Js.Global.encodeURI", + "kind": "value", + "name": "encodeURI", + "docstrings": [ + "URL-encodes a string.\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI)" + ], + "signature": "let encodeURI: string => string" + }, + { + "id": "Js.Global.decodeURI", + "kind": "value", + "name": "decodeURI", + "docstrings": [ + "Decodes a URL-enmcoded string produced by `encodeURI`\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI)" + ], + "signature": "let decodeURI: string => string" + }, + { + "id": "Js.Global.encodeURIComponent", + "kind": "value", + "name": "encodeURIComponent", + "docstrings": [ + "URL-encodes a string, including characters with special meaning in a URI.\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)" + ], + "signature": "let encodeURIComponent: string => string" + }, + { + "id": "Js.Global.decodeURIComponent", + "kind": "value", + "name": "decodeURIComponent", + "docstrings": [ + "Decodes a URL-enmcoded string produced by `encodeURIComponent`\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent)" + ], + "signature": "let decodeURIComponent: string => string" + } + ] + }, + "js/dict": { + "id": "Js.Dict", + "name": "Dict", + "docstrings": [ + "Provide utilities for JS dictionary object" + ], + "items": [ + { + "id": "Js.Dict.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a>" + }, + { + "id": "Js.Dict.key", + "kind": "type", + "name": "key", + "docstrings": [ + "The type for dictionary keys. This means that dictionaries *must* use `string`s as their keys." + ], + "signature": "type key = string" + }, + { + "id": "Js.Dict.get", + "kind": "value", + "name": "get", + "docstrings": [ + "`Js.Dict.get(key)` returns `None` if the key is not found in the dictionary,\n`Some(value)` otherwise.\n\n```rescript\nJs.Dict.get(ages, \"Vinh\") == Some(22)\nJs.Dict.get(ages, \"Paul\") == None\n```" + ], + "signature": "let get: (t<'a>, key) => option<'a>" + }, + { + "id": "Js.Dict.unsafeGet", + "kind": "value", + "name": "unsafeGet", + "docstrings": [ + "`Js.Dict.unsafeGet(key)` returns the value if the key exists, otherwise an `undefined` value is returned. Use this only when you are sure the key exists (i.e. when having used the `keys()` function to check that the key is valid).\n\n```rescript\nJs.Dict.unsafeGet(ages, \"Fred\") == 49\nJs.Dict.unsafeGet(ages, \"Paul\") // returns undefined\n```" + ], + "signature": "let unsafeGet: (t<'a>, key) => 'a" + }, + { + "id": "Js.Dict.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`Js.Dict.set(dict, key, value)` sets the key/value in the dictionary `dict`. If\nthe key does not exist, and entry will be created for it.\n\n*This function modifies the original dictionary.*\n\n```rescript\nJs.Dict.set(ages, \"Maria\", 31)\nJs.log(ages == Js.Dict.fromList(list{(\"Maria\", 31), (\"Vinh\", 22), (\"Fred\", 49)}))\n\nJs.Dict.set(ages, \"David\", 66)\nJs.log(ages == Js.Dict.fromList(list{(\"Maria\", 31), (\"Vinh\", 22), (\"Fred\", 49), (\"David\", 66)}))\n```" + ], + "signature": "let set: (t<'a>, key, 'a) => unit" + }, + { + "id": "Js.Dict.keys", + "kind": "value", + "name": "keys", + "docstrings": [ + "Returns all the keys in the dictionary `dict`.\n\n```rescript\nJs.Dict.keys(ages) == [\"Maria\", \"Vinh\", \"Fred\"]\n```" + ], + "signature": "let keys: t<'a> => array" + }, + { + "id": "Js.Dict.empty", + "kind": "value", + "name": "empty", + "docstrings": [ + "Returns an empty dictionary." + ], + "signature": "let empty: unit => t<'a>" + }, + { + "id": "Js.Dict.unsafeDeleteKey", + "kind": "value", + "name": "unsafeDeleteKey", + "docstrings": [ + "Experimental internal function" + ], + "signature": "let unsafeDeleteKey: (. t, string) => unit" + }, + { + "id": "Js.Dict.entries", + "kind": "value", + "name": "entries", + "docstrings": [ + "Returns an array of key/value pairs in the given dictionary (ES2017).\n\n```rescript\nJs.Dict.entries(ages) == [(\"Maria\", 30), (\"Vinh\", 22), (\"Fred\", 49)]\n```" + ], + "signature": "let entries: t<'a> => array<(key, 'a)>" + }, + { + "id": "Js.Dict.values", + "kind": "value", + "name": "values", + "docstrings": [ + "Returns the values in the given dictionary (ES2017).\n\n```rescript\nJs.Dict.values(ages) == [30, 22, 49]\n```" + ], + "signature": "let values: t<'a> => array<'a>" + }, + { + "id": "Js.Dict.fromList", + "kind": "value", + "name": "fromList", + "docstrings": [ + "Creates a new dictionary containing each (key, value) pair in its list\nargument.\n\n```rescript\nlet capitals = Js.Dict.fromList(list{(\"Japan\", \"Tokyo\"), (\"France\", \"Paris\"), (\"Egypt\", \"Cairo\")})\n```" + ], + "signature": "let fromList: list<(key, 'a)> => t<'a>" + }, + { + "id": "Js.Dict.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "Creates a new dictionary containing each (key, value) pair in its array\nargument.\n\n```rescript\nlet capitals2 = Js.Dict.fromArray([(\"Germany\", \"Berlin\"), (\"Burkina Faso\", \"Ouagadougou\")])\n```" + ], + "signature": "let fromArray: array<(key, 'a)> => t<'a>" + }, + { + "id": "Js.Dict.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(f, dict)` maps `dict` to a new dictionary with the same keys, using the\nfunction `f` to map each value.\n\n```rescript\nlet prices = Js.Dict.fromList(list{(\"pen\", 1.00), (\"book\", 5.00), (\"stapler\", 7.00)})\n\nlet discount = (. price) => price *. 0.90\nlet salePrices = Js.Dict.map(discount, prices)\n\nsalePrices == Js.Dict.fromList(list{(\"pen\", 0.90), (\"book\", 4.50), (\"stapler\", 6.30)})\n```" + ], + "signature": "let map: ((. 'a) => 'b, t<'a>) => t<'b>" + } + ] + }, + "js/date": { + "id": "Js.Date", + "name": "Date", + "docstrings": [ + "Provide bindings for JS Date" + ], + "items": [ + { + "id": "Js.Date.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Js.Date.valueOf", + "kind": "value", + "name": "valueOf", + "docstrings": [ + "Returns the primitive value of this date, equivalent to `getTime()`. (See\n[`Date.valueOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/valueOf)\non MDN.)\n\n```rescript\nJs.Date.valueOf(exampleDate) == 123456654321.0\n```" + ], + "signature": "let valueOf: t => float" + }, + { + "id": "Js.Date.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Returns a date representing the current time. See [`Date()`\nConstructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)\non MDN.\n\n```rescript\nlet now = Js.Date.make()\n```" + ], + "signature": "let make: unit => t" + }, + { + "id": "Js.Date.fromFloat", + "kind": "value", + "name": "fromFloat", + "docstrings": [ + "Returns a date representing the given argument, which is a number of\nmilliseconds since the epoch. See [`Date()`\nConstructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)\non MDN.\n\n```rescript\nJs.Date.fromFloat(123456654321.0) == exampleDate\n```" + ], + "signature": "let fromFloat: float => t" + }, + { + "id": "Js.Date.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [ + "Returns a `Js.Date.t` represented by the given string. The string can be in\n“IETF-compliant RFC 2822 timestamps, and also strings in a version of ISO8601.”\nReturns `NaN` if given an invalid date string. According to the [`Date()`\nConstructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)\ndocumentation on MDN, its use is discouraged.\n\n```rescript\nJs.Date.fromString(\"Thu, 29 Nov 1973 21:30:54.321 GMT\") == exampleDate\nJs.Date.fromString(\"1973-11-29T21:30:54.321Z00:00\") == exampleDate\nJs.Date.fromString(\"Thor, 32 Lok -19 60:70:80 XYZ\") // returns NaN\n```" + ], + "signature": "let fromString: string => t" + }, + { + "id": "Js.Date.makeWithYM", + "kind": "value", + "name": "makeWithYM", + "docstrings": [ + "Returns a date representing midnight of the first day of the given month and\nyear in the current time zone. Fractional parts of arguments are ignored. See\n[`Date()`\nConstructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)\non MDN.\n\n```rescript\nlet november1 = Js.Date.makeWithYM(~year=2020.0, ~month=10.0, ())\n```" + ], + "signature": "let makeWithYM: (~year: float, ~month: float, unit) => t" + }, + { + "id": "Js.Date.makeWithYMD", + "kind": "value", + "name": "makeWithYMD", + "docstrings": [ + "Returns a date representing midnight of the given date of the given month and\nyear in the current time zone. Fractional parts of arguments are ignored. See\n[`Date()`\nConstructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)\non MDN." + ], + "signature": "let makeWithYMD: (~year: float, ~month: float, ~date: float, unit) => t" + }, + { + "id": "Js.Date.makeWithYMDH", + "kind": "value", + "name": "makeWithYMDH", + "docstrings": [ + "Returns a date representing the given date of the given month and year, at zero\nminutes and zero seconds past the given `hours`, in the current time zone.\nFractional parts of arguments are ignored. See [`Date()`\nConstructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)\non MDN. Fractional parts of the arguments are ignored." + ], + "signature": "let makeWithYMDH: (~year: float, ~month: float, ~date: float, ~hours: float, unit) => t" + }, + { + "id": "Js.Date.makeWithYMDHM", + "kind": "value", + "name": "makeWithYMDHM", + "docstrings": [ + "Returns a date representing the given date of the given month and year, at zero\nseconds past the given time in hours and minutes in the current time zone.\nFractional parts of arguments are ignored. See [`Date()`\nConstructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)\non MDN." + ], + "signature": "let makeWithYMDHM: (\\n ~year: float,\\n ~month: float,\\n ~date: float,\\n ~hours: float,\\n ~minutes: float,\\n unit,\\n) => t" + }, + { + "id": "Js.Date.makeWithYMDHMS", + "kind": "value", + "name": "makeWithYMDHMS", + "docstrings": [ + "Returns a date representing the given date of the given month and year, at the\ngiven time in hours, minutes, and seconds in the current time zone. Fractional\nparts of arguments are ignored. See [`Date()`\nConstructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date)\non MDN.\n\n```rescript\nJs.Date.makeWithYMDHMS(\n ~year=1973.0,\n ~month=11.0,\n ~date=29.0,\n ~hours=21.0,\n ~minutes=30.0,\n ~seconds=54.321,\n (),\n) == exampleDate\n```" + ], + "signature": "let makeWithYMDHMS: (\\n ~year: float,\\n ~month: float,\\n ~date: float,\\n ~hours: float,\\n ~minutes: float,\\n ~seconds: float,\\n unit,\\n) => t" + }, + { + "id": "Js.Date.utcWithYM", + "kind": "value", + "name": "utcWithYM", + "docstrings": [ + "Returns a float representing the number of milliseconds past the epoch for\nmidnight of the first day of the given month and year in UTC. Fractional parts\nof arguments are ignored. See\n[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)\non MDN.\n\n```rescript\nlet november1 = Js.Date.utcWithYM(~year=2020.0, ~month=10.0, ())\n```" + ], + "signature": "let utcWithYM: (~year: float, ~month: float, unit) => float" + }, + { + "id": "Js.Date.utcWithYMD", + "kind": "value", + "name": "utcWithYMD", + "docstrings": [ + "Returns a float representing the number of milliseconds past the epoch for\nmidnight of the given date of the given month and year in UTC. Fractional parts\nof arguments are ignored. See\n[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)\non MDN." + ], + "signature": "let utcWithYMD: (~year: float, ~month: float, ~date: float, unit) => float" + }, + { + "id": "Js.Date.utcWithYMDH", + "kind": "value", + "name": "utcWithYMDH", + "docstrings": [ + "Returns a float representing the number of milliseconds past the epoch for\nmidnight of the given date of the given month and year, at zero minutes and\nseconds past the given hours in UTC. Fractional parts of arguments are ignored.\nSee\n[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)\non MDN." + ], + "signature": "let utcWithYMDH: (~year: float, ~month: float, ~date: float, ~hours: float, unit) => float" + }, + { + "id": "Js.Date.utcWithYMDHM", + "kind": "value", + "name": "utcWithYMDHM", + "docstrings": [ + "Returns a float representing the number of milliseconds past the epoch for\nmidnight of the given date of the given month and year, at zero seconds past\nthe given number of minutes past the given hours in UTC. Fractional parts of\narguments are ignored. See\n[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)\non MDN." + ], + "signature": "let utcWithYMDHM: (\\n ~year: float,\\n ~month: float,\\n ~date: float,\\n ~hours: float,\\n ~minutes: float,\\n unit,\\n) => float" + }, + { + "id": "Js.Date.utcWithYMDHMS", + "kind": "value", + "name": "utcWithYMDHMS", + "docstrings": [ + "Returns a float representing the number of milliseconds past the epoch for\nmidnight of the given date of the given month and year, at the given time in\nhours, minutes and seconds in UTC. Fractional parts of arguments are ignored.\n\nSee\n[`Date.UTC`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC)\non MDN." + ], + "signature": "let utcWithYMDHMS: (\\n ~year: float,\\n ~month: float,\\n ~date: float,\\n ~hours: float,\\n ~minutes: float,\\n ~seconds: float,\\n unit,\\n) => float" + }, + { + "id": "Js.Date.now", + "kind": "value", + "name": "now", + "docstrings": [ + "Returns the current time as number of milliseconds since Unix epoch." + ], + "signature": "let now: unit => float" + }, + { + "id": "Js.Date.parse", + "kind": "value", + "name": "parse", + "docstrings": [], + "signature": "let parse: string => t" + }, + { + "id": "Js.Date.parseAsFloat", + "kind": "value", + "name": "parseAsFloat", + "docstrings": [ + "Returns a float with the number of milliseconds past the epoch represented by\nthe given string. The string can be in “IETF-compliant RFC 2822 timestamps, and\nalso strings in a version of ISO8601.” Returns `NaN` if given an invalid date\nstring. According to the\n[`Date.parse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse)\ndocumentation on MDN, its use is discouraged. Returns `NaN` if passed invalid\ndate string." + ], + "signature": "let parseAsFloat: string => float" + }, + { + "id": "Js.Date.getDate", + "kind": "value", + "name": "getDate", + "docstrings": [ + "Returns the day of the month for its argument. The argument is evaluated in the\ncurrent time zone. See\n[`Date.getDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDate)\non MDN.\n\n```rescript\nJs.Date.getDate(exampleDate) == 29.0\n```" + ], + "signature": "let getDate: t => float" + }, + { + "id": "Js.Date.getDay", + "kind": "value", + "name": "getDay", + "docstrings": [ + "Returns the day of the week (0.0-6.0) for its argument, where 0.0 represents\nSunday. The argument is evaluated in the current time zone. See\n[`Date.getDay`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getDay)\non MDN.\n\n```rescript\nJs.Date.getDay(exampleDate) == 4.0\n```" + ], + "signature": "let getDay: t => float" + }, + { + "id": "Js.Date.getFullYear", + "kind": "value", + "name": "getFullYear", + "docstrings": [ + "Returns the full year (as opposed to the range 0-99) for its argument. The\nargument is evaluated in the current time zone. See\n[`Date.getFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getFullYear)\non MDN.\n\n```rescript\nJs.Date.getFullYear(exampleDate) == 1973.0\n```" + ], + "signature": "let getFullYear: t => float" + }, + { + "id": "Js.Date.getHours", + "kind": "value", + "name": "getHours", + "docstrings": [ + "Returns the hours for its argument, evaluated in the current time zone. See\n[`Date.getHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getHours)\non MDN.\n\n```rescript\nJs.Date.getHours(exampleDate) == 22.0 // Vienna is in GMT+01:00\n```" + ], + "signature": "let getHours: t => float" + }, + { + "id": "Js.Date.getMilliseconds", + "kind": "value", + "name": "getMilliseconds", + "docstrings": [ + "Returns the number of milliseconds for its argument, evaluated in the current\ntime zone. See\n[`Date.getMilliseconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds)\non MDN.\n\n```rescript\nJs.Date.getMilliseconds(exampleDate) == 321.0\n```" + ], + "signature": "let getMilliseconds: t => float" + }, + { + "id": "Js.Date.getMinutes", + "kind": "value", + "name": "getMinutes", + "docstrings": [ + "Returns the number of minutes for its argument, evaluated in the current time\nzone. See\n[`Date.getMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMinutes)\non MDN.\n\n```rescript\nJs.Date.getMinutes(exampleDate) == 30.0\n```" + ], + "signature": "let getMinutes: t => float" + }, + { + "id": "Js.Date.getMonth", + "kind": "value", + "name": "getMonth", + "docstrings": [ + "Returns the month (0.0-11.0) for its argument, evaluated in the current time\nzone. January is month zero. See\n[`Date.getMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth)\non MDN.\n\n```rescript\nJs.Date.getMonth(exampleDate) == 10.0\n```" + ], + "signature": "let getMonth: t => float" + }, + { + "id": "Js.Date.getSeconds", + "kind": "value", + "name": "getSeconds", + "docstrings": [ + "Returns the seconds for its argument, evaluated in the current time zone. See\n[`Date.getSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getSeconds)\non MDN.\n\n```rescript\nJs.Date.getSeconds(exampleDate) == 54.0\n```" + ], + "signature": "let getSeconds: t => float" + }, + { + "id": "Js.Date.getTime", + "kind": "value", + "name": "getTime", + "docstrings": [ + "Returns the number of milliseconds since Unix epoch, evaluated in UTC. See\n[`Date.getTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime)\non MDN.\n\n```rescript\nJs.Date.getTime(exampleDate) == 123456654321.0\n```" + ], + "signature": "let getTime: t => float" + }, + { + "id": "Js.Date.getTimezoneOffset", + "kind": "value", + "name": "getTimezoneOffset", + "docstrings": [ + "Returns the time zone offset in minutes from the current time zone to UTC. See\n[`Date.getTimezoneOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset)\non MDN.\n\n```rescript\nJs.Date.getTimezoneOffset(exampleDate) == -60.0\n```" + ], + "signature": "let getTimezoneOffset: t => float" + }, + { + "id": "Js.Date.getUTCDate", + "kind": "value", + "name": "getUTCDate", + "docstrings": [ + "Returns the day of the month of the argument, evaluated in UTC. See\n[`Date.getUTCDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDate)\non MDN.\n\n```rescript\nJs.Date.getUTCDate(exampleDate) == 29.0\n```" + ], + "signature": "let getUTCDate: t => float" + }, + { + "id": "Js.Date.getUTCDay", + "kind": "value", + "name": "getUTCDay", + "docstrings": [ + "Returns the day of the week of the argument, evaluated in UTC. The range of the\nreturn value is 0.0-6.0, where Sunday is zero. See\n[`Date.getUTCDay`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDay)\non MDN.\n\n```rescript\nJs.Date.getUTCDay(exampleDate) == 4.0\n```" + ], + "signature": "let getUTCDay: t => float" + }, + { + "id": "Js.Date.getUTCFullYear", + "kind": "value", + "name": "getUTCFullYear", + "docstrings": [ + "Returns the full year (as opposed to the range 0-99) for its argument. The\nargument is evaluated in UTC. See\n[`Date.getUTCFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear)\non MDN.\n\n```rescript\nJs.Date.getUTCFullYear(exampleDate) == 1973.0\n```" + ], + "signature": "let getUTCFullYear: t => float" + }, + { + "id": "Js.Date.getUTCHours", + "kind": "value", + "name": "getUTCHours", + "docstrings": [ + "Returns the hours for its argument, evaluated in the current time zone. See\n[`Date.getUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCHours)\non MDN.\n\n```rescript\nJs.Date.getUTCHours(exampleDate) == 21.0\n```" + ], + "signature": "let getUTCHours: t => float" + }, + { + "id": "Js.Date.getUTCMilliseconds", + "kind": "value", + "name": "getUTCMilliseconds", + "docstrings": [ + "Returns the number of milliseconds for its argument, evaluated in UTC. See\n[`Date.getUTCMilliseconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds)\non MDN.\n\n```rescript\nJs.Date.getUTCMilliseconds(exampleDate) == 321.0\n```" + ], + "signature": "let getUTCMilliseconds: t => float" + }, + { + "id": "Js.Date.getUTCMinutes", + "kind": "value", + "name": "getUTCMinutes", + "docstrings": [ + "Returns the number of minutes for its argument, evaluated in UTC. See\n[`Date.getUTCMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMinutes)\non MDN.\n\n```rescript\nJs.Date.getUTCMinutes(exampleDate) == 30.0\n```" + ], + "signature": "let getUTCMinutes: t => float" + }, + { + "id": "Js.Date.getUTCMonth", + "kind": "value", + "name": "getUTCMonth", + "docstrings": [ + "Returns the month (0.0-11.0) for its argument, evaluated in UTC. January is\nmonth zero. See\n[`Date.getUTCMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMonth)\non MDN.\n\n```rescript\nJs.Date.getUTCMonth(exampleDate) == 10.0\n```" + ], + "signature": "let getUTCMonth: t => float" + }, + { + "id": "Js.Date.getUTCSeconds", + "kind": "value", + "name": "getUTCSeconds", + "docstrings": [ + "Returns the seconds for its argument, evaluated in UTC. See\n[`Date.getUTCSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCSeconds)\non MDN.\n\n```rescript\nJs.Date.getUTCSeconds(exampleDate) == 54.0\n```" + ], + "signature": "let getUTCSeconds: t => float" + }, + { + "id": "Js.Date.getYear", + "kind": "value", + "name": "getYear", + "docstrings": [], + "signature": "let getYear: t => float" + }, + { + "id": "Js.Date.setDate", + "kind": "value", + "name": "setDate", + "docstrings": [ + "Sets the given `Date`’s day of month to the value in the second argument\naccording to the current time zone. Returns the number of milliseconds since\nthe epoch of the updated `Date`. *This function modifies the original `Date`.*\nSee\n[`Date.setDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setDate)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet twoWeeksBefore = Js.Date.setDate(date1, 15.0)\ndate1 == Js.Date.fromString(\"1973-11-15T21:30:54.321Z00:00\")\ntwoWeeksBefore == Js.Date.getTime(date1)\n```" + ], + "signature": "let setDate: (t, float) => float" + }, + { + "id": "Js.Date.setFullYear", + "kind": "value", + "name": "setFullYear", + "docstrings": [ + "Sets the given `Date`’s year to the value in the second argument according to\nthe current time zone. Returns the number of milliseconds since the epoch of\nthe updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet nextYear = Js.Date.setFullYear(date1, 1974.0)\ndate1 == Js.Date.fromString(\"1974-11-15T21:30:54.321Z00:00\")\nnextYear == Js.Date.getTime(date1)\n```" + ], + "signature": "let setFullYear: (t, float) => float" + }, + { + "id": "Js.Date.setFullYearM", + "kind": "value", + "name": "setFullYearM", + "docstrings": [ + "Sets the given `Date`’s year and month to the values in the labeled arguments\naccording to the current time zone. Returns the number of milliseconds since\nthe epoch of the updated `Date`. *This function modifies the original `Date`.*\nSee\n[`Date.setFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet future = Js.Date.setFullYearM(date1, ~year=1974.0, ~month=0.0, ())\ndate1 == Js.Date.fromString(\"1974-01-22T21:30:54.321Z00:00\")\nfuture == Js.Date.getTime(date1)\n```" + ], + "signature": "let setFullYearM: (t, ~year: float, ~month: float, unit) => float" + }, + { + "id": "Js.Date.setFullYearMD", + "kind": "value", + "name": "setFullYearMD", + "docstrings": [ + "Sets the given `Date`’s year, month, and day of month to the values in the\nlabeled arguments according to the current time zone. Returns the number of\nmilliseconds since the epoch of the updated `Date`. *This function modifies the\noriginal `Date`.* See\n[`Date.setFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet future = Js.Date.setFullYearMD(date1, ~year=1974.0, ~month=0.0, ~date=7.0, ())\ndate1 == Js.Date.fromString(\"1974-01-07T21:30:54.321Z00:00\")\nfuture == Js.Date.getTime(date1)\n```" + ], + "signature": "let setFullYearMD: (t, ~year: float, ~month: float, ~date: float, unit) => float" + }, + { + "id": "Js.Date.setHours", + "kind": "value", + "name": "setHours", + "docstrings": [ + "Sets the given `Date`’s hours to the value in the second argument according to\nthe current time zone. Returns the number of milliseconds since the epoch of\nthe updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet nextHour = Js.Date.setHours(date1, 22.0)\ndate1 == Js.Date.fromString(\"1973-11-29T22:30:54.321Z00:00\")\nnextHour == Js.Date.getTime(date1)\n```" + ], + "signature": "let setHours: (t, float) => float" + }, + { + "id": "Js.Date.setHoursM", + "kind": "value", + "name": "setHoursM", + "docstrings": [ + "Sets the given `Date`’s hours and minutes to the values in the labeled\narguments according to the current time zone. Returns the number of\nmilliseconds since the epoch of the updated `Date`. *This function modifies the\noriginal `Date`.* See\n[`Date.setHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setHoursM(date1, ~hours=22.0, ~minutes=46.0, ())\ndate1 == Js.Date.fromString(\"1973-11-29T22:46:54.321Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setHoursM: (t, ~hours: float, ~minutes: float, unit) => float" + }, + { + "id": "Js.Date.setHoursMS", + "kind": "value", + "name": "setHoursMS", + "docstrings": [ + "Sets the given `Date`’s hours, minutes, and seconds to the values in the\nlabeled arguments according to the current time zone. Returns the number of\nmilliseconds since the epoch of the updated `Date`. *This function modifies the\noriginal `Date`.* See\n[`Date.setHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setHoursMS(date1, ~hours=22.0, ~minutes=46.0, ~seconds=37.0, ())\ndate1 == Js.Date.fromString(\"1973-11-29T22:46:37.321Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setHoursMS: (t, ~hours: float, ~minutes: float, ~seconds: float, unit) => float" + }, + { + "id": "Js.Date.setHoursMSMs", + "kind": "value", + "name": "setHoursMSMs", + "docstrings": [ + "Sets the given `Date`’s hours, minutes, seconds, and milliseconds to the values\nin the labeled arguments according to the current time zone. Returns the number\nof milliseconds since the epoch of the updated `Date`. *This function modifies\nthe original `Date`.* See\n[`Date.setHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setHours)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setHoursMSMs(\n date1,\n ~hours=22.0,\n ~minutes=46.0,\n ~seconds=37.0,\n ~milliseconds=494.0,\n (),\n)\ndate1 == Js.Date.fromString(\"1973-11-29T22:46:37.494Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setHoursMSMs: (\\n t,\\n ~hours: float,\\n ~minutes: float,\\n ~seconds: float,\\n ~milliseconds: float,\\n unit,\\n) => float" + }, + { + "id": "Js.Date.setMilliseconds", + "kind": "value", + "name": "setMilliseconds", + "docstrings": [ + "Sets the given `Date`’s milliseconds to the value in the second argument\naccording to the current time zone. Returns the number of milliseconds since\nthe epoch of the updated `Date`. *This function modifies the original `Date`.*\nSee\n[`Date.setMilliseconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMilliseconds)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMilliseconds(date1, 494.0)\ndate1 == Js.Date.fromString(\"1973-11-29T21:30:54.494Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setMilliseconds: (t, float) => float" + }, + { + "id": "Js.Date.setMinutes", + "kind": "value", + "name": "setMinutes", + "docstrings": [ + "Sets the given `Date`’s minutes to the value in the second argument according\nto the current time zone. Returns the number of milliseconds since the epoch of\nthe updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMinutes(date1, 34.0)\ndate1 == Js.Date.fromString(\"1973-11-29T21:34:54.494Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setMinutes: (t, float) => float" + }, + { + "id": "Js.Date.setMinutesS", + "kind": "value", + "name": "setMinutesS", + "docstrings": [ + "Sets the given `Date`’s minutes and seconds to the values in the labeled\narguments according to the current time zone. Returns the number of\nmilliseconds since the epoch of the updated `Date`. *This function modifies the\noriginal `Date`.* See\n[`Date.setMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMinutesS(date1, ~minutes=34.0, ~seconds=56.0, ())\ndate1 == Js.Date.fromString(\"1973-11-29T21:34:56.494Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setMinutesS: (t, ~minutes: float, ~seconds: float, unit) => float" + }, + { + "id": "Js.Date.setMinutesSMs", + "kind": "value", + "name": "setMinutesSMs", + "docstrings": [ + "Sets the given `Date`’s minutes, seconds, and milliseconds to the values in the\nlabeled arguments according to the current time zone. Returns the number of\nmilliseconds since the epoch of the updated `Date`. *This function modifies the\noriginal `Date`.* See\n[`Date.setMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMinutes)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMinutesSMs(\n date1,\n ~minutes=34.0,\n ~seconds=56.0,\n ~milliseconds=789.0,\n (),\n)\ndate1 == Js.Date.fromString(\"1973-11-29T21:34:56.789Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setMinutesSMs: (t, ~minutes: float, ~seconds: float, ~milliseconds: float, unit) => float" + }, + { + "id": "Js.Date.setMonth", + "kind": "value", + "name": "setMonth", + "docstrings": [ + "Sets the given `Date`’s month to the value in the second argument according to\nthe current time zone. Returns the number of milliseconds since the epoch of\nthe updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMonth(date1, 11.0)\ndate1 == Js.Date.fromString(\"1973-12-29T21:34:56.789Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setMonth: (t, float) => float" + }, + { + "id": "Js.Date.setMonthD", + "kind": "value", + "name": "setMonthD", + "docstrings": [ + "Sets the given `Date`’s month and day of month to the values in the labeled\narguments according to the current time zone. Returns the number of\nmilliseconds since the epoch of the updated `Date`. *This function modifies the\noriginal `Date`.* See\n[`Date.setMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setMonthD(date1, ~month=11.0, ~date=8.0, ())\ndate1 == Js.Date.fromString(\"1973-12-08T21:34:56.789Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setMonthD: (t, ~month: float, ~date: float, unit) => float" + }, + { + "id": "Js.Date.setSeconds", + "kind": "value", + "name": "setSeconds", + "docstrings": [ + "Sets the given `Date`’s seconds to the value in the second argument according\nto the current time zone. Returns the number of milliseconds since the epoch of\nthe updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setSeconds)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setSeconds(date1, 56.0)\ndate1 == Js.Date.fromString(\"1973-12-29T21:30:56.321Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setSeconds: (t, float) => float" + }, + { + "id": "Js.Date.setSecondsMs", + "kind": "value", + "name": "setSecondsMs", + "docstrings": [ + "Sets the given `Date`’s seconds and milliseconds to the values in the labeled\narguments according to the current time zone. Returns the number of\nmilliseconds since the epoch of the updated `Date`. *This function modifies the\noriginal `Date`.* See\n[`Date.setSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setSeconds)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setSecondsMs(date1, ~seconds=56.0, ~milliseconds=789.0, ())\ndate1 == Js.Date.fromString(\"1973-12-29T21:30:56.789Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setSecondsMs: (t, ~seconds: float, ~milliseconds: float, unit) => float" + }, + { + "id": "Js.Date.setTime", + "kind": "value", + "name": "setTime", + "docstrings": [ + "Sets the given `Date`’s value in terms of milliseconds since the epoch. Returns\nthe number of milliseconds since the epoch of the updated `Date`. *This\nfunction modifies the original `Date`.* See\n[`Date.setTime`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setTime)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setTime(date1, 198765432101.0)\n\ndate1 == Js.Date.fromString(\"1976-04-19T12:37:12.101Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setTime: (t, float) => float" + }, + { + "id": "Js.Date.setUTCDate", + "kind": "value", + "name": "setUTCDate", + "docstrings": [ + "Sets the given `Date`’s day of month to the value in the second argument\naccording to UTC. Returns the number of milliseconds since the epoch of the\nupdated `Date`. *This function modifies the original `Date`.* See\n[`Date.setUTCDate`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCDate)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet twoWeeksBefore = Js.Date.setUTCDate(date1, 15.0)\ndate1 == Js.Date.fromString(\"1973-11-15T21:30:54.321Z00:00\")\ntwoWeeksBefore == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCDate: (t, float) => float" + }, + { + "id": "Js.Date.setUTCFullYear", + "kind": "value", + "name": "setUTCFullYear", + "docstrings": [ + "Sets the given `Date`’s year to the value in the second argument according to\nUTC. Returns the number of milliseconds since the epoch of the updated `Date`.\n*This function modifies the original `Date`.* See\n[`Date.setUTCFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet nextYear = Js.Date.setUTCFullYear(date1, 1974.0)\ndate1 == Js.Date.fromString(\"1974-11-15T21:30:54.321Z00:00\")\nnextYear == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCFullYear: (t, float) => float" + }, + { + "id": "Js.Date.setUTCFullYearM", + "kind": "value", + "name": "setUTCFullYearM", + "docstrings": [ + "Sets the given `Date`’s year and month to the values in the labeled arguments\naccording to UTC. Returns the number of milliseconds since the epoch of the\nupdated `Date`. *This function modifies the original `Date`.* See\n[`Date.setUTCFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet future = Js.Date.setUTCFullYearM(date1, ~year=1974.0, ~month=0.0, ())\ndate1 == Js.Date.fromString(\"1974-01-22T21:30:54.321Z00:00\")\nfuture == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCFullYearM: (t, ~year: float, ~month: float, unit) => float" + }, + { + "id": "Js.Date.setUTCFullYearMD", + "kind": "value", + "name": "setUTCFullYearMD", + "docstrings": [ + "Sets the given `Date`’s year, month, and day of month to the values in the\nlabeled arguments according to UTC. Returns the number of milliseconds since\nthe epoch of the updated `Date`. *This function modifies the original `Date`.*\nSee\n[`Date.setUTCFullYear`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCFullYear)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet future = Js.Date.setUTCFullYearMD(date1, ~year=1974.0, ~month=0.0, ~date=7.0, ())\ndate1 == Js.Date.fromString(\"1974-01-07T21:30:54.321Z00:00\")\nfuture == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCFullYearMD: (t, ~year: float, ~month: float, ~date: float, unit) => float" + }, + { + "id": "Js.Date.setUTCHours", + "kind": "value", + "name": "setUTCHours", + "docstrings": [ + "Sets the given `Date`’s hours to the value in the second argument according to\nUTC. Returns the number of milliseconds since the epoch of the updated `Date`.\n*This function modifies the original `Date`.* See\n[`Date.setUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet nextHour = Js.Date.setUTCHours(date1, 22.0)\ndate1 == Js.Date.fromString(\"1973-11-29T22:30:54.321Z00:00\")\nnextHour == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCHours: (t, float) => float" + }, + { + "id": "Js.Date.setUTCHoursM", + "kind": "value", + "name": "setUTCHoursM", + "docstrings": [ + "Sets the given `Date`’s hours and minutes to the values in the labeled\narguments according to UTC. Returns the number of milliseconds since the epoch\nof the updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCHoursM(date1, ~hours=22.0, ~minutes=46.0, ())\ndate1 == Js.Date.fromString(\"1973-11-29T22:46:54.321Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCHoursM: (t, ~hours: float, ~minutes: float, unit) => float" + }, + { + "id": "Js.Date.setUTCHoursMS", + "kind": "value", + "name": "setUTCHoursMS", + "docstrings": [ + "Sets the given `Date`’s hours, minutes, and seconds to the values in the\nlabeled arguments according to UTC. Returns the number of milliseconds since\nthe epoch of the updated `Date`. *This function modifies the original `Date`.*\n\nSee\n[`Date.setUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCHoursMS(date1, ~hours=22.0, ~minutes=46.0, ~seconds=37.0, ())\ndate1 == Js.Date.fromString(\"1973-11-29T22:46:37.321Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCHoursMS: (t, ~hours: float, ~minutes: float, ~seconds: float, unit) => float" + }, + { + "id": "Js.Date.setUTCHoursMSMs", + "kind": "value", + "name": "setUTCHoursMSMs", + "docstrings": [ + "Sets the given `Date`’s hours, minutes, seconds, and milliseconds to the values\nin the labeled arguments according to UTC. Returns the number of milliseconds\nsince the epoch of the updated `Date`. *This function modifies the original\n`Date`.* See\n[`Date.setUTCHours`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCHours)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCHoursMSMs(\n date1,\n ~hours=22.0,\n ~minutes=46.0,\n ~seconds=37.0,\n ~milliseconds=494.0,\n (),\n)\ndate1 == Js.Date.fromString(\"1973-11-29T22:46:37.494Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCHoursMSMs: (\\n t,\\n ~hours: float,\\n ~minutes: float,\\n ~seconds: float,\\n ~milliseconds: float,\\n unit,\\n) => float" + }, + { + "id": "Js.Date.setUTCMilliseconds", + "kind": "value", + "name": "setUTCMilliseconds", + "docstrings": [ + "Sets the given `Date`’s milliseconds to the value in the second argument\naccording to UTC. Returns the number of milliseconds since the epoch of the\nupdated `Date`. *This function modifies the original `Date`.* See\n[`Date.setUTCMilliseconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMilliseconds)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMilliseconds(date1, 494.0)\ndate1 == Js.Date.fromString(\"1973-11-29T21:30:54.494Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCMilliseconds: (t, float) => float" + }, + { + "id": "Js.Date.setUTCMinutes", + "kind": "value", + "name": "setUTCMinutes", + "docstrings": [ + "Sets the given `Date`’s minutes to the value in the second argument according\nto the current time zone. Returns the number of milliseconds since the epoch of\nthe updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setUTCMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMinutes(date1, 34.0)\ndate1 == Js.Date.fromString(\"1973-11-29T21:34:54.494Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCMinutes: (t, float) => float" + }, + { + "id": "Js.Date.setUTCMinutesS", + "kind": "value", + "name": "setUTCMinutesS", + "docstrings": [ + "Sets the given `Date`’s minutes and seconds to the values in the labeled\narguments according to UTC. Returns the number of milliseconds since the epoch\nof the updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setUTCMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMinutesS(date1, ~minutes=34.0, ~seconds=56.0, ())\ndate1 == Js.Date.fromString(\"1973-11-29T21:34:56.494Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCMinutesS: (t, ~minutes: float, ~seconds: float, unit) => float" + }, + { + "id": "Js.Date.setUTCMinutesSMs", + "kind": "value", + "name": "setUTCMinutesSMs", + "docstrings": [ + "Sets the given `Date`’s minutes, seconds, and milliseconds to the values in the\nlabeled arguments according to UTC. Returns the number of milliseconds since\nthe epoch of the updated `Date`. *This function modifies the original `Date`.*\nSee\n[`Date.setUTCMinutes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMinutes)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMinutesSMs(\n date1,\n ~minutes=34.0,\n ~seconds=56.0,\n ~milliseconds=789.0,\n (),\n)\ndate1 == Js.Date.fromString(\"1973-11-29T21:34:56.789Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCMinutesSMs: (t, ~minutes: float, ~seconds: float, ~milliseconds: float, unit) => float" + }, + { + "id": "Js.Date.setUTCMonth", + "kind": "value", + "name": "setUTCMonth", + "docstrings": [ + "Sets the given `Date`’s month to the value in the second argument according to\nUTC. Returns the number of milliseconds since the epoch of the updated `Date`.\n*This function modifies the original `Date`.* See\n[`Date.setUTCMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMonth(date1, 11.0)\ndate1 == Js.Date.fromString(\"1973-12-29T21:34:56.789Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCMonth: (t, float) => float" + }, + { + "id": "Js.Date.setUTCMonthD", + "kind": "value", + "name": "setUTCMonthD", + "docstrings": [ + "Sets the given `Date`’s month and day of month to the values in the labeled\narguments according to UTC. Returns the number of milliseconds since the epoch\nof the updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setUTCMonth`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCMonth)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCMonthD(date1, ~month=11.0, ~date=8.0, ())\ndate1 == Js.Date.fromString(\"1973-12-08T21:34:56.789Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCMonthD: (t, ~month: float, ~date: float, unit) => float" + }, + { + "id": "Js.Date.setUTCSeconds", + "kind": "value", + "name": "setUTCSeconds", + "docstrings": [ + "Sets the given `Date`’s seconds to the value in the second argument according\nto UTC. Returns the number of milliseconds since the epoch of the updated\n`Date`. *This function modifies the original `Date`.* See\n[`Date.setUTCSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCSeconds(date1, 56.0)\ndate1 == Js.Date.fromString(\"1973-12-29T21:30:56.321Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCSeconds: (t, float) => float" + }, + { + "id": "Js.Date.setUTCSecondsMs", + "kind": "value", + "name": "setUTCSecondsMs", + "docstrings": [ + "Sets the given `Date`’s seconds and milliseconds to the values in the labeled\narguments according to UTC. Returns the number of milliseconds since the epoch\nof the updated `Date`. *This function modifies the original `Date`.* See\n[`Date.setUTCSeconds`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setUTCSeconds)\non MDN.\n\n```rescript\nlet date1 = Js.Date.fromFloat(123456654321.0) // 29 November 1973 21:30:54.321 GMT\nlet futureTime = Js.Date.setUTCSecondsMs(date1, ~seconds=56.0, ~milliseconds=789.0, ())\ndate1 == Js.Date.fromString(\"1973-12-29T21:30:56.789Z00:00\")\nfutureTime == Js.Date.getTime(date1)\n```" + ], + "signature": "let setUTCSecondsMs: (t, ~seconds: float, ~milliseconds: float, unit) => float" + }, + { + "id": "Js.Date.setUTCTime", + "kind": "value", + "name": "setUTCTime", + "docstrings": [ + "Same as [`setTime()`](#settime)." + ], + "signature": "let setUTCTime: (t, float) => float" + }, + { + "id": "Js.Date.setYear", + "kind": "value", + "name": "setYear", + "docstrings": [], + "signature": "let setYear: (t, float) => float" + }, + { + "id": "Js.Date.toDateString", + "kind": "value", + "name": "toDateString", + "docstrings": [ + "Returns the date (day of week, year, month, and day of month) portion of a\n`Date` in English. See\n[`Date.toDateString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString)\non MDN.\n\n```rescript\nJs.Date.toDateString(exampleDate) == \"Thu Nov 29 1973\"\n```" + ], + "signature": "let toDateString: t => string" + }, + { + "id": "Js.Date.toGMTString", + "kind": "value", + "name": "toGMTString", + "docstrings": [], + "signature": "let toGMTString: t => string" + }, + { + "id": "Js.Date.toISOString", + "kind": "value", + "name": "toISOString", + "docstrings": [ + "Returns a simplified version of the ISO 8601 format for the date. See\n[`Date.toISOString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\non MDN.\n\n```rescript\nJs.Date.toISOString(exampleDate) == \"1973-11-29T21:30:54.321Z\"\n```" + ], + "signature": "let toISOString: t => string" + }, + { + "id": "Js.Date.toJSON", + "kind": "value", + "name": "toJSON", + "docstrings": [], + "signature": "let toJSON: t => string" + }, + { + "id": "Js.Date.toJSONUnsafe", + "kind": "value", + "name": "toJSONUnsafe", + "docstrings": [ + "Returns a string representation of the given date. See\n[`Date.toJSON`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON)\non MDN." + ], + "signature": "let toJSONUnsafe: t => string" + }, + { + "id": "Js.Date.toLocaleDateString", + "kind": "value", + "name": "toLocaleDateString", + "docstrings": [ + "Returns the year, month, and day for the given `Date` in the current locale\nformat. See\n[`Date.toLocaleDateString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString)\non MDN.\n\n```rescript\nJs.Date.toLocaleDateString(exampleDate) == \"11/29/1973\" // for en_US.utf8\nJs.Date.toLocaleDateString(exampleDate) == \"29.11.73\" // for de_DE.utf8\n```" + ], + "signature": "let toLocaleDateString: t => string" + }, + { + "id": "Js.Date.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [ + "Returns the time and date for the given `Date` in the current locale format.\nSee\n[`Date.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString)\non MDN.\n\n```rescript\nJs.Date.toLocaleString(exampleDate) == \"11/29/1973, 10:30:54 PM\" // for en_US.utf8\nJs.Date.toLocaleString(exampleDate) == \"29.11.1973, 22:30:54\" // for de_DE.utf8\n```" + ], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Js.Date.toLocaleTimeString", + "kind": "value", + "name": "toLocaleTimeString", + "docstrings": [ + "Returns the time of day for the given `Date` in the current locale format. See\n[`Date.toLocaleTimeString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString)\non MDN.\n\n```rescript\nJs.Date.toLocaleString(exampleDate) == \"10:30:54 PM\" // for en_US.utf8\nJs.Date.toLocaleString(exampleDate) == \"22:30:54\" // for de_DE.utf8\n```" + ], + "signature": "let toLocaleTimeString: t => string" + }, + { + "id": "Js.Date.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Returns a string representing the date and time of day for the given `Date` in\nthe current locale and time zone. See\n[`Date.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toString)\non MDN.\n\n```rescript\nJs.Date.toString(\n exampleDate,\n) == \"Thu Nov 29 1973 22:30:54 GMT+0100 (Central European Standard Time)\"\n```" + ], + "signature": "let toString: t => string" + }, + { + "id": "Js.Date.toTimeString", + "kind": "value", + "name": "toTimeString", + "docstrings": [ + "Returns a string representing the time of day for the given `Date` in the\ncurrent locale and time zone. See\n[`Date.toTimeString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString)\non MDN.\n\n```rescript\nJs.Date.toTimeString(exampleDate) == \"22:30:54 GMT+0100 (Central European Standard Time)\"\n```" + ], + "signature": "let toTimeString: t => string" + }, + { + "id": "Js.Date.toUTCString", + "kind": "value", + "name": "toUTCString", + "docstrings": [ + "Returns a string representing the date and time of day for the given `Date` in\nthe current locale and UTC (GMT time zone). See\n[`Date.toUTCString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString)\non MDN.\n\n```rescript\nJs.Date.toUTCString(exampleDate) == \"Thu, 29 Nov 1973 21:30:54 GMT\"\n```" + ], + "signature": "let toUTCString: t => string" + } + ] + }, + "js/promise2": { + "id": "Js.Promise2", + "name": "Promise2", + "docstrings": [ + "Provide bindings to JS Promise" + ], + "items": [ + { + "id": "Js.Promise2.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a> = promise<'a>" + }, + { + "id": "Js.Promise2.error", + "kind": "type", + "name": "error", + "docstrings": [], + "signature": "type error" + }, + { + "id": "Js.Promise2.then", + "kind": "value", + "name": "then", + "docstrings": [ + "Type-safe t-first then" + ], + "signature": "let then: (promise<'a>, 'a => promise<'b>) => promise<'b>" + }, + { + "id": "Js.Promise2.catch", + "kind": "value", + "name": "catch", + "docstrings": [ + "Type-safe t-first catch" + ], + "signature": "let catch: (promise<'a>, error => promise<'a>) => promise<'a>" + }, + { + "id": "Js.Promise2.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: ((~resolve: (. 'a) => unit, ~reject: (. exn) => unit) => unit) => promise<'a>" + }, + { + "id": "Js.Promise2.resolve", + "kind": "value", + "name": "resolve", + "docstrings": [], + "signature": "let resolve: 'a => promise<'a>" + }, + { + "id": "Js.Promise2.reject", + "kind": "value", + "name": "reject", + "docstrings": [], + "signature": "let reject: exn => promise<'a>" + }, + { + "id": "Js.Promise2.all", + "kind": "value", + "name": "all", + "docstrings": [], + "signature": "let all: array> => promise>" + }, + { + "id": "Js.Promise2.all2", + "kind": "value", + "name": "all2", + "docstrings": [], + "signature": "let all2: ((promise<'a0>, promise<'a1>)) => promise<('a0, 'a1)>" + }, + { + "id": "Js.Promise2.all3", + "kind": "value", + "name": "all3", + "docstrings": [], + "signature": "let all3: ((promise<'a0>, promise<'a1>, promise<'a2>)) => promise<('a0, 'a1, 'a2)>" + }, + { + "id": "Js.Promise2.all4", + "kind": "value", + "name": "all4", + "docstrings": [], + "signature": "let all4: ((promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>)) => promise<(\\n 'a0,\\n 'a1,\\n 'a2,\\n 'a3,\\n)>" + }, + { + "id": "Js.Promise2.all5", + "kind": "value", + "name": "all5", + "docstrings": [], + "signature": "let all5: ((promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>, promise<'a4>)) => promise<(\\n 'a0,\\n 'a1,\\n 'a2,\\n 'a3,\\n 'a4,\\n)>" + }, + { + "id": "Js.Promise2.all6", + "kind": "value", + "name": "all6", + "docstrings": [], + "signature": "let all6: (\\n (promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>, promise<'a4>, promise<'a5>)\\n) => promise<('a0, 'a1, 'a2, 'a3, 'a4, 'a5)>" + }, + { + "id": "Js.Promise2.race", + "kind": "value", + "name": "race", + "docstrings": [], + "signature": "let race: array> => promise<'a>" + }, + { + "id": "Js.Promise2.unsafe_async", + "kind": "value", + "name": "unsafe_async", + "docstrings": [], + "signature": "let unsafe_async: 'a => promise<'a>" + }, + { + "id": "Js.Promise2.unsafe_await", + "kind": "value", + "name": "unsafe_await", + "docstrings": [], + "signature": "let unsafe_await: promise<'a> => 'a" + } + ] + }, + "js/promise": { + "id": "Js.Promise", + "name": "Promise", + "docstrings": [ + "Provide bindings to JS Promise" + ], + "items": [ + { + "id": "Js.Promise.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a> = promise<'a>" + }, + { + "id": "Js.Promise.error", + "kind": "type", + "name": "error", + "docstrings": [], + "signature": "type error = Js_promise2.error" + }, + { + "id": "Js.Promise.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: ((~resolve: (. 'a) => unit, ~reject: (. exn) => unit) => unit) => promise<'a>" + }, + { + "id": "Js.Promise.resolve", + "kind": "value", + "name": "resolve", + "docstrings": [], + "signature": "let resolve: 'a => promise<'a>" + }, + { + "id": "Js.Promise.reject", + "kind": "value", + "name": "reject", + "docstrings": [], + "signature": "let reject: exn => promise<'a>" + }, + { + "id": "Js.Promise.all", + "kind": "value", + "name": "all", + "docstrings": [], + "signature": "let all: array> => promise>" + }, + { + "id": "Js.Promise.all2", + "kind": "value", + "name": "all2", + "docstrings": [], + "signature": "let all2: ((promise<'a0>, promise<'a1>)) => promise<('a0, 'a1)>" + }, + { + "id": "Js.Promise.all3", + "kind": "value", + "name": "all3", + "docstrings": [], + "signature": "let all3: ((promise<'a0>, promise<'a1>, promise<'a2>)) => promise<('a0, 'a1, 'a2)>" + }, + { + "id": "Js.Promise.all4", + "kind": "value", + "name": "all4", + "docstrings": [], + "signature": "let all4: ((promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>)) => promise<(\\n 'a0,\\n 'a1,\\n 'a2,\\n 'a3,\\n)>" + }, + { + "id": "Js.Promise.all5", + "kind": "value", + "name": "all5", + "docstrings": [], + "signature": "let all5: ((promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>, promise<'a4>)) => promise<(\\n 'a0,\\n 'a1,\\n 'a2,\\n 'a3,\\n 'a4,\\n)>" + }, + { + "id": "Js.Promise.all6", + "kind": "value", + "name": "all6", + "docstrings": [], + "signature": "let all6: (\\n (promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>, promise<'a4>, promise<'a5>)\\n) => promise<('a0, 'a1, 'a2, 'a3, 'a4, 'a5)>" + }, + { + "id": "Js.Promise.race", + "kind": "value", + "name": "race", + "docstrings": [], + "signature": "let race: array> => promise<'a>" + }, + { + "id": "Js.Promise.then_", + "kind": "value", + "name": "then_", + "docstrings": [], + "signature": "let then_: ('a => promise<'b>, promise<'a>) => promise<'b>" + }, + { + "id": "Js.Promise.catch", + "kind": "value", + "name": "catch", + "docstrings": [], + "signature": "let catch: (error => promise<'a>, promise<'a>) => promise<'a>" + }, + { + "id": "Js.Promise.unsafe_async", + "kind": "value", + "name": "unsafe_async", + "docstrings": [], + "signature": "let unsafe_async: 'a => promise<'a>" + }, + { + "id": "Js.Promise.unsafe_await", + "kind": "value", + "name": "unsafe_await", + "docstrings": [], + "signature": "let unsafe_await: promise<'a> => 'a" + } + ] + }, + "js/re": { + "id": "Js.Re", + "name": "Re", + "docstrings": [ + "Provide bindings to JS regex expression" + ], + "items": [ + { + "id": "Js.Re.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The RegExp object." + ], + "signature": "type t" + }, + { + "id": "Js.Re.result", + "kind": "type", + "name": "result", + "docstrings": [ + "The result of a executing a RegExp on a string." + ], + "signature": "type result" + }, + { + "id": "Js.Re.captures", + "kind": "value", + "name": "captures", + "docstrings": [ + "An `array` of the match and captures, the first is the full match and the\n remaining are the substring captures." + ], + "signature": "let captures: result => array>" + }, + { + "id": "Js.Re.matches", + "kind": "value", + "name": "matches", + "docstrings": [ + "Deprecated. Use `captures` instead." + ], + "signature": "let matches: result => array" + }, + { + "id": "Js.Re.index", + "kind": "value", + "name": "index", + "docstrings": [ + "0-based index of the match in the input string." + ], + "signature": "let index: result => int" + }, + { + "id": "Js.Re.input", + "kind": "value", + "name": "input", + "docstrings": [ + "The original input string." + ], + "signature": "let input: result => string" + }, + { + "id": "Js.Re.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [ + "Constructs a RegExp object (Js.Re.t) from a `string`.\n Regex literals `%re(\"/.../\")` should generally be preferred, but `fromString`\n is useful when you need to dynamically construct a regex using strings,\n exactly like when you do so in JavaScript.\n\n ```rescript\n let firstReScriptFileExtension = (filename, content) => {\n let result = Js.Re.fromString(filename ++ \"\\.(res|resi)\")->Js.Re.exec_(content)\n switch result {\n | Some(r) => Js.Nullable.toOption(Js.Re.captures(r)[1])\n | None => None\n }\n }\n\n // outputs \"res\"\n firstReScriptFileExtension(\"School\", \"School.res School.resi Main.js School.bs.js\")\n ```" + ], + "signature": "let fromString: string => t" + }, + { + "id": "Js.Re.fromStringWithFlags", + "kind": "value", + "name": "fromStringWithFlags", + "docstrings": [ + "Constructs a RegExp object (`Js.Re.t`) from a string with the given flags.\n See `Js.Re.fromString`.\n\n Valid flags:\n\n - **g** global\n - **i** ignore case\n - **m** multiline\n - **u** unicode (es2015)\n - **y** sticky (es2015)" + ], + "signature": "let fromStringWithFlags: (string, ~flags: string) => t" + }, + { + "id": "Js.Re.flags", + "kind": "value", + "name": "flags", + "docstrings": [ + "Returns the enabled flags as a string." + ], + "signature": "let flags: t => string" + }, + { + "id": "Js.Re.global", + "kind": "value", + "name": "global", + "docstrings": [ + "Returns a `bool` indicating whether the global flag is set." + ], + "signature": "let global: t => bool" + }, + { + "id": "Js.Re.ignoreCase", + "kind": "value", + "name": "ignoreCase", + "docstrings": [ + "Returns a `bool` indicating whether the ignoreCase flag is set." + ], + "signature": "let ignoreCase: t => bool" + }, + { + "id": "Js.Re.lastIndex", + "kind": "value", + "name": "lastIndex", + "docstrings": [ + "Returns the index where the next match will start its search. This property\n will be modified when the RegExp object is used, if the global (\"g\") flag is\n set.\n\n ```rescript\n let re = %re(\"/ab*TODO/g\")\n let str = \"abbcdefabh\"\n\n let break = ref(false)\n while !break.contents {\n switch Js.Re.exec_(re, str) {\n | Some(result) => Js.Nullable.iter(Js.Re.captures(result)[0], (. match_) => {\n let next = Belt.Int.toString(Js.Re.lastIndex(re))\n Js.log(\"Found \" ++ (match_ ++ (\". Next match starts at \" ++ next)))\n })\n | None => break := true\n }\n }\n ```\n\n See\n [`RegExp: lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex)\n on MDN." + ], + "signature": "let lastIndex: t => int" + }, + { + "id": "Js.Re.setLastIndex", + "kind": "value", + "name": "setLastIndex", + "docstrings": [ + "Sets the index at which the next match will start its search from." + ], + "signature": "let setLastIndex: (t, int) => unit" + }, + { + "id": "Js.Re.multiline", + "kind": "value", + "name": "multiline", + "docstrings": [ + "Returns a `bool` indicating whether the multiline flag is set." + ], + "signature": "let multiline: t => bool" + }, + { + "id": "Js.Re.source", + "kind": "value", + "name": "source", + "docstrings": [ + "Returns the pattern as a `string`." + ], + "signature": "let source: t => string" + }, + { + "id": "Js.Re.sticky", + "kind": "value", + "name": "sticky", + "docstrings": [ + "Returns a `bool` indicating whether the sticky flag is set." + ], + "signature": "let sticky: t => bool" + }, + { + "id": "Js.Re.unicode", + "kind": "value", + "name": "unicode", + "docstrings": [ + "Returns a `bool` indicating whether the unicode flag is set." + ], + "signature": "let unicode: t => bool" + }, + { + "id": "Js.Re.exec_", + "kind": "value", + "name": "exec_", + "docstrings": [ + "Executes a search on a given string using the given RegExp object.\n Returns `Some(Js.Re.result)` if a match is found, `None` otherwise.\n\n ```rescript\n /* Match \"quick brown\" followed by \"jumps\", ignoring characters in between\n * Remember \"brown\" and \"jumps\"\n * Ignore case\n */\n\n let re = %re(\"/quick\\s(brown).+?(jumps)/ig\")\n let result = Js.Re.exec_(re, \"The Quick Brown Fox Jumps Over The Lazy Dog\")\n ```\n\n See\n [`RegExp.prototype.exec()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec)\n on MDN." + ], + "signature": "let exec_: (t, string) => option" + }, + { + "id": "Js.Re.test_", + "kind": "value", + "name": "test_", + "docstrings": [ + "Tests whether the given RegExp object will match a given `string`.\n Returns true if a match is found, false otherwise.\n\n ```rescript\n /* A simple implementation of Js.String.startsWith */\n\n let str = \"hello world!\"\n\n let startsWith = (target, substring) =>\n Js.Re.fromString(\"^\" ++ substring)->Js.Re.test_(target)\n\n Js.log(str->startsWith(\"hello\")) /* prints \"true\" */\n ```\n\n See\n [`RegExp.prototype.test()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n on MDN." + ], + "signature": "let test_: (t, string) => bool" + } + ] + }, + "js/string2": { + "id": "Js.String2", + "name": "String2", + "docstrings": [ + "Provide bindings to JS string" + ], + "items": [ + { + "id": "Js.String2.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = string" + }, + { + "id": "Js.String2.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(value)` converts the given value to a `string`.\n\n```rescript\nJs.String2.make(3.5) == \"3.5\"\nJs.String2.make([1, 2, 3]) == \"1,2,3\"\n```" + ], + "signature": "let make: 'a => t" + }, + { + "id": "Js.String2.fromCharCode", + "kind": "value", + "name": "fromCharCode", + "docstrings": [ + "`fromCharCode(n)` creates a `string` containing the character corresponding to\nthat number; `n` ranges from 0 to 65535.If out of range, the lower 16 bits of\nthe value are used. Thus, `fromCharCode(0x1F63A)` gives the same result as\n`fromCharCode(0xF63A)`.\n\nSee [`String.fromCharCode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode)\non MDN.\n\n```rescript\nJs.String2.fromCharCode(65) == \"A\"\nJs.String2.fromCharCode(0x3c8) == `ψ`\nJs.String2.fromCharCode(0xd55c) == `한`\nJs.String2.fromCharCode(-64568) == `ψ`\n```" + ], + "signature": "let fromCharCode: int => t" + }, + { + "id": "Js.String2.fromCharCodeMany", + "kind": "value", + "name": "fromCharCodeMany", + "docstrings": [ + "`fromCharCodeMany([n1, n2, n3])` creates a `string` from the characters\ncorresponding to the given numbers, using the same rules as `fromCharCode`.\n\nSee [`String.fromCharCode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode)\non MDN." + ], + "signature": "let fromCharCodeMany: array => t" + }, + { + "id": "Js.String2.fromCodePoint", + "kind": "value", + "name": "fromCodePoint", + "docstrings": [ + "`fromCodePoint(n)` creates a `string` containing the character corresponding to\nthat numeric code point. If the number is not a valid code point, it raises\n`RangeError`. Thus, `fromCodePoint(0x1F63A)` will produce a correct value,\nunlike `fromCharCode(0x1F63A)`, and `fromCodePoint(-5)` will raise a\n`RangeError`.\n\nSee [`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)\non MDN.\n\n```rescript\nJs.String2.fromCodePoint(65) == \"A\"\nJs.String2.fromCodePoint(0x3c8) == `ψ`\nJs.String2.fromCodePoint(0xd55c) == `한`\nJs.String2.fromCodePoint(0x1f63a) == `😺`\n```" + ], + "signature": "let fromCodePoint: int => t" + }, + { + "id": "Js.String2.fromCodePointMany", + "kind": "value", + "name": "fromCodePointMany", + "docstrings": [ + "`fromCodePointMany([n1, n2, n3])` creates a `string` from the characters\ncorresponding to the given code point numbers, using the same rules as\n`fromCodePoint`.\n\nSee [`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)\non MDN.\n\n```rescript\nJs.String2.fromCodePointMany([0xd55c, 0xae00, 0x1f63a]) == `한글😺`\n```" + ], + "signature": "let fromCodePointMany: array => t" + }, + { + "id": "Js.String2.length", + "kind": "value", + "name": "length", + "docstrings": [ + "`length(s)` returns the length of the given `string`.\n\nSee [`String.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length)\non MDN.\n\n```rescript\nJs.String2.length(\"abcd\") == 4\n```" + ], + "signature": "let length: t => int" + }, + { + "id": "Js.String2.get", + "kind": "value", + "name": "get", + "docstrings": [ + "`get(s, n)` returns as a `string` the character at the given index number. If\n`n` is out of range, this function returns `undefined`,so at some point this\nfunction may be modified to return `option(string)`.\n\n```rescript\nJs.String2.get(\"Reason\", 0) == \"R\"\nJs.String2.get(\"Reason\", 4) == \"o\"\nJs.String2.get(`Rẽasöń`, 5) == `ń`\n```" + ], + "signature": "let get: (t, int) => t" + }, + { + "id": "Js.String2.charAt", + "kind": "value", + "name": "charAt", + "docstrings": [ + "`charAt(s, n)` gets the character at index `n` within string `s`. If `n` is\nnegative or greater than the length of `s`, it returns the empty string. If the\nstring contains characters outside the range \\u0000-\\uffff, it will return the\nfirst 16-bit value at that position in the string.\n\nSee [`String.charAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt)\non MDN.\n\n```rescript\nJs.String2.charAt(\"Reason\", 0) == \"R\"\nJs.String2.charAt(\"Reason\", 12) == \"\"\nJs.String2.charAt(`Rẽasöń`, 5) == `ń`\n```" + ], + "signature": "let charAt: (t, int) => t" + }, + { + "id": "Js.String2.charCodeAt", + "kind": "value", + "name": "charCodeAt", + "docstrings": [ + "`charCodeAt(s, n)` returns the character code at position `n` in string `s`;\nthe result is in the range 0-65535, unlke `codePointAt`, so it will not work\ncorrectly for characters with code points greater than or equal to 0x10000. The\nreturn type is `float` because this function returns NaN if `n` is less than\nzero or greater than the length of the string.\n\nSee [`String.charCodeAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt)\non MDN.\n\n```rescript\nJs.String2.charCodeAt(`😺`, 0) == 0xd83d->Belt.Int.toFloat\nJs.String2.codePointAt(`😺`, 0) == Some(0x1f63a)\n```" + ], + "signature": "let charCodeAt: (t, int) => float" + }, + { + "id": "Js.String2.codePointAt", + "kind": "value", + "name": "codePointAt", + "docstrings": [ + "`codePointAt(s, n)` returns the code point at position `n` within string `s` as\na `Some(value)`. The return value handles code points greater than or equal to\n0x10000. If there is no code point at the given position, the function returns\n`None`.\n\nSee [`String.codePointAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt)\non MDN.\n\n```rescript\nJs.String2.codePointAt(`¿😺?`, 1) == Some(0x1f63a)\nJs.String2.codePointAt(\"abc\", 5) == None\n```" + ], + "signature": "let codePointAt: (t, int) => option" + }, + { + "id": "Js.String2.concat", + "kind": "value", + "name": "concat", + "docstrings": [ + "`concat(original, append)` returns a new `string` with `append` added after\n`original`.\n\nSee [`String.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat)\non MDN.\n\n```rescript\nJs.String2.concat(\"cow\", \"bell\") == \"cowbell\"\n```" + ], + "signature": "let concat: (t, t) => t" + }, + { + "id": "Js.String2.concatMany", + "kind": "value", + "name": "concatMany", + "docstrings": [ + "`concatMany(original, arr)` returns a new `string` consisting of each item of an\narray of strings added to the `original` string.\n\nSee [`String.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat)\non MDN.\n\n```rescript\nJs.String2.concatMany(\"1st\", [\"2nd\", \"3rd\", \"4th\"]) == \"1st2nd3rd4th\"\n```" + ], + "signature": "let concatMany: (t, array) => t" + }, + { + "id": "Js.String2.endsWith", + "kind": "value", + "name": "endsWith", + "docstrings": [ + "ES2015: `endsWith(str, substr)` returns `true` if the `str` ends with `substr`,\n`false` otherwise.\n\nSee [`String.endsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith)\non MDN.\n\n```rescript\nJs.String2.endsWith(\"ReScript\", \"Script\") == true\nJs.String2.endsWith(\"C++\", \"Script\") == false\n```" + ], + "signature": "let endsWith: (t, t) => bool" + }, + { + "id": "Js.String2.endsWithFrom", + "kind": "value", + "name": "endsWithFrom", + "docstrings": [ + "`endsWithFrom(str, ending, len)` returns `true` if the first len characters of\n`str` end with `ending`, `false` otherwise. If `len` is greater than or equal\nto the length of `str`, then it works like `endsWith`. (Honestly, this should\nhave been named endsWithAt, but oh well).\n\nSee [`String.endsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith)\non MDN.\n\n```rescript\nJs.String2.endsWithFrom(\"abcd\", \"cd\", 4) == true\nJs.String2.endsWithFrom(\"abcde\", \"cd\", 3) == false\nJs.String2.endsWithFrom(\"abcde\", \"cde\", 99) == true\nJs.String2.endsWithFrom(\"example.dat\", \"ple\", 7) == true\n```" + ], + "signature": "let endsWithFrom: (t, t, int) => bool" + }, + { + "id": "Js.String2.includes", + "kind": "value", + "name": "includes", + "docstrings": [ + "ES2015: `includes(str, searchValue)` returns `true` if `searchValue` is found\nanywhere within `str`, false otherwise.\n\nSee [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes)\non MDN.\n\n```rescript\nJs.String2.includes(\"programmer\", \"gram\") == true\nJs.String2.includes(\"programmer\", \"er\") == true\nJs.String2.includes(\"programmer\", \"pro\") == true\nJs.String2.includes(\"programmer.dat\", \"xyz\") == false\n```" + ], + "signature": "let includes: (t, t) => bool" + }, + { + "id": "Js.String2.includesFrom", + "kind": "value", + "name": "includesFrom", + "docstrings": [ + "ES2015: `includes(str, searchValue start)` returns `true` if `searchValue` is\nfound anywhere within `str` starting at character number `start` (where 0 is\nthe first character), `false` otherwise.\n\nSee [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes)\non MDN.\n\n```rescript\nJs.String2.includesFrom(\"programmer\", \"gram\", 1) == true\nJs.String2.includesFrom(\"programmer\", \"gram\", 4) == false\nJs.String2.includesFrom(`대한민국`, `한`, 1) == true\n```" + ], + "signature": "let includesFrom: (t, t, int) => bool" + }, + { + "id": "Js.String2.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [ + "ES2015: `indexOf(str, searchValue)` returns the position at which `searchValue`\nwas first found within `str`, or -1 if `searchValue` is not in `str`.\n\nSee [`String.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf)\non MDN.\n\n```rescript\nJs.String2.indexOf(\"bookseller\", \"ok\") == 2\nJs.String2.indexOf(\"bookseller\", \"sell\") == 4\nJs.String2.indexOf(\"beekeeper\", \"ee\") == 1\nJs.String2.indexOf(\"bookseller\", \"xyz\") == -1\n```" + ], + "signature": "let indexOf: (t, t) => int" + }, + { + "id": "Js.String2.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [ + "`indexOfFrom(str, searchValue, start)` returns the position at which\n`searchValue` was found within `str` starting at character position `start`, or\n-1 if `searchValue` is not found in that portion of `str`. The return value is\nrelative to the beginning of the string, no matter where the search started\nfrom.\n\nSee [`String.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf)\non MDN.\n\n```rescript\nJs.String2.indexOfFrom(\"bookseller\", \"ok\", 1) == 2\nJs.String2.indexOfFrom(\"bookseller\", \"sell\", 2) == 4\nJs.String2.indexOfFrom(\"bookseller\", \"sell\", 5) == -1\n```" + ], + "signature": "let indexOfFrom: (t, t, int) => int" + }, + { + "id": "Js.String2.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [ + "`lastIndexOf(str, searchValue)` returns the position of the last occurrence of\n`searchValue` within `str`, searching backwards from the end of the string.\nReturns -1 if `searchValue` is not in `str`. The return value is always\nrelative to the beginning of the string.\n\nSee [`String.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf)\non MDN.\n\n```rescript\nJs.String2.lastIndexOf(\"bookseller\", \"ok\") == 2\nJs.String2.lastIndexOf(\"beekeeper\", \"ee\") == 4\nJs.String2.lastIndexOf(\"abcdefg\", \"xyz\") == -1\n```" + ], + "signature": "let lastIndexOf: (t, t) => int" + }, + { + "id": "Js.String2.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [ + "`lastIndexOfFrom(str, searchValue, start)` returns the position of the last\noccurrence of `searchValue` within `str`, searching backwards from the given\nstart position. Returns -1 if `searchValue` is not in `str`. The return value\nis always relative to the beginning of the string.\n\nSee [`String.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf)\non MDN.\n\n```rescript\nJs.String2.lastIndexOfFrom(\"bookseller\", \"ok\", 6) == 2\nJs.String2.lastIndexOfFrom(\"beekeeper\", \"ee\", 8) == 4\nJs.String2.lastIndexOfFrom(\"beekeeper\", \"ee\", 3) == 1\nJs.String2.lastIndexOfFrom(\"abcdefg\", \"xyz\", 4) == -1\n```" + ], + "signature": "let lastIndexOfFrom: (t, t, int) => int" + }, + { + "id": "Js.String2.localeCompare", + "kind": "value", + "name": "localeCompare", + "docstrings": [ + "`localeCompare(reference, comparison)` returns\n- a negative value if reference comes before comparison in sort order\n- zero if reference and comparison have the same sort order\n- a positive value if reference comes after comparison in sort order\n\nSee [`String.localeCompare`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare) on MDN.\n\n```rescript\nJs.String2.localeCompare(\"zebra\", \"ant\") > 0.0\nJs.String2.localeCompare(\"ant\", \"zebra\") < 0.0\nJs.String2.localeCompare(\"cat\", \"cat\") == 0.0\nJs.String2.localeCompare(\"CAT\", \"cat\") > 0.0\n```" + ], + "signature": "let localeCompare: (t, t) => float" + }, + { + "id": "Js.String2.match_", + "kind": "value", + "name": "match_", + "docstrings": [ + "`match(str, regexp)` matches a `string` against the given `regexp`. If there is\nno match, it returns `None`. For regular expressions without the g modifier, if\n there is a match, the return value is `Some(array)` where the array contains:\n- The entire matched string\n- Any capture groups if the regexp had parentheses\nFor regular expressions with the g modifier, a matched expression returns\n`Some(array)` with all the matched substrings and no capture groups.\n\nSee [`String.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match)\non MDN.\n\n```rescript\nJs.String2.match_(\"The better bats\", %re(\"/b[aeiou]t/\")) == Some([\"bet\"])\nJs.String2.match_(\"The better bats\", %re(\"/b[aeiou]t/g\")) == Some([\"bet\", \"bat\"])\nJs.String2.match_(\"Today is 2018-04-05.\", %re(\"/(\\d+)-(\\d+)-(\\d+)/\")) ==\n Some([\"2018-04-05\", \"2018\", \"04\", \"05\"])\nJs.String2.match_(\"The large container.\", %re(\"/b[aeiou]g/\")) == None\n```" + ], + "signature": "let match_: (t, Js_re.t) => option>>" + }, + { + "id": "Js.String2.normalize", + "kind": "value", + "name": "normalize", + "docstrings": [ + "`normalize(str)` returns the normalized Unicode string using Normalization Form\nCanonical (NFC) Composition. Consider the character ã, which can be represented\nas the single codepoint \\u00e3 or the combination of a lower case letter A\n\\u0061 and a combining tilde \\u0303. Normalization ensures that both can be\nstored in an equivalent binary representation.\n\nSee [`String.normalize`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)\non MDN. See also [Unicode technical report\n#15](https://unicode.org/reports/tr15/) for details." + ], + "signature": "let normalize: t => t" + }, + { + "id": "Js.String2.normalizeByForm", + "kind": "value", + "name": "normalizeByForm", + "docstrings": [ + "ES2015: `normalize(str, form)` returns the normalized Unicode string using the\nspecified form of normalization, which may be one of:\n- \"NFC\" — Normalization Form Canonical Composition.\n- \"NFD\" — Normalization Form Canonical Decomposition.\n- \"NFKC\" — Normalization Form Compatibility Composition.\n- \"NFKD\" — Normalization Form Compatibility Decomposition.\n\nSee [`String.normalize`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize) on MDN.\nSee also [Unicode technical report #15](https://unicode.org/reports/tr15/) for details." + ], + "signature": "let normalizeByForm: (t, t) => t" + }, + { + "id": "Js.String2.repeat", + "kind": "value", + "name": "repeat", + "docstrings": [ + "`repeat(str, n)` returns a `string` that consists of `n` repetitions of `str`.\nRaises `RangeError` if `n` is negative.\n\nSee [`String.repeat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat)\non MDN.\n\n```rescript\nJs.String2.repeat(\"ha\", 3) == \"hahaha\"\nJs.String2.repeat(\"empty\", 0) == \"\"\n```" + ], + "signature": "let repeat: (t, int) => t" + }, + { + "id": "Js.String2.replace", + "kind": "value", + "name": "replace", + "docstrings": [ + "ES2015: `replace(str, substr, newSubstr)` returns a new `string` which is\nidentical to `str` except with the first matching instance of `substr` replaced\nby `newSubstr`. `substr` is treated as a verbatim string to match, not a\nregular expression.\n\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)\non MDN.\n\n```rescript\nJs.String2.replace(\"old string\", \"old\", \"new\") == \"new string\"\nJs.String2.replace(\"the cat and the dog\", \"the\", \"this\") == \"this cat and the dog\"\n```" + ], + "signature": "let replace: (t, t, t) => t" + }, + { + "id": "Js.String2.replaceByRe", + "kind": "value", + "name": "replaceByRe", + "docstrings": [ + "`replaceByRe(str, regex, replacement)` returns a new `string` where occurrences\nmatching regex have been replaced by `replacement`.\n\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)\non MDN.\n\n```rescript\nJs.String2.replaceByRe(\"vowels be gone\", %re(\"/[aeiou]/g\"), \"x\") == \"vxwxls bx gxnx\"\nJs.String2.replaceByRe(\"Juan Fulano\", %re(\"/(\\w+) (\\w+)/\"), \"$2, $1\") == \"Fulano, Juan\"\n```" + ], + "signature": "let replaceByRe: (t, Js_re.t, t) => t" + }, + { + "id": "Js.String2.unsafeReplaceBy0", + "kind": "value", + "name": "unsafeReplaceBy0", + "docstrings": [ + "Returns a new `string` with some or all matches of a pattern with no capturing\nparentheses replaced by the value returned from the given function. The\nfunction receives as its parameters the matched string, the offset at which the\nmatch begins, and the whole string being matched.\n\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)\non MDN.\n\n```rescript\nlet str = \"beautiful vowels\"\nlet re = %re(\"/[aeiou]/g\")\nlet matchFn = (matchPart, _offset, _wholeString) => Js.String2.toUpperCase(matchPart)\n\nJs.String2.unsafeReplaceBy0(str, re, matchFn) == \"bEAUtIfUl vOwEls\"\n```" + ], + "signature": "let unsafeReplaceBy0: (t, Js_re.t, (t, int, t) => t) => t" + }, + { + "id": "Js.String2.unsafeReplaceBy1", + "kind": "value", + "name": "unsafeReplaceBy1", + "docstrings": [ + "Returns a new `string` with some or all matches of a pattern with one set of\ncapturing parentheses replaced by the value returned from the given function.\nThe function receives as its parameters the matched string, the captured\nstring, the offset at which the match begins, and the whole string being\nmatched.\n\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)\non MDN.\n\n```rescript\nlet str = \"Jony is 40\"\nlet re = %re(\"/(Jony is )\\d+/g\")\nlet matchFn = (_match, part1, _offset, _wholeString) => {\n part1 ++ \"41\"\n}\n\nJs.String2.unsafeReplaceBy1(str, re, matchFn) == \"Jony is 41\"\n```" + ], + "signature": "let unsafeReplaceBy1: (t, Js_re.t, (t, t, int, t) => t) => t" + }, + { + "id": "Js.String2.unsafeReplaceBy2", + "kind": "value", + "name": "unsafeReplaceBy2", + "docstrings": [ + "Returns a new `string` with some or all matches of a pattern with two sets of\ncapturing parentheses replaced by the value returned from the given function.\nThe function receives as its parameters the matched string, the captured\nstrings, the offset at which the match begins, and the whole string being\nmatched.\n\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)\non MDN.\n\n```rescript\nlet str = \"7 times 6\"\nlet re = %re(\"/(\\d+) times (\\d+)/\")\nlet matchFn = (_match, p1, p2, _offset, _wholeString) => {\n switch (Belt.Int.fromString(p1), Belt.Int.fromString(p2)) {\n | (Some(x), Some(y)) => Belt.Int.toString(x * y)\n | _ => \"???\"\n }\n}\n\nJs.String2.unsafeReplaceBy2(str, re, matchFn) == \"42\"\n```" + ], + "signature": "let unsafeReplaceBy2: (t, Js_re.t, (t, t, t, int, t) => t) => t" + }, + { + "id": "Js.String2.unsafeReplaceBy3", + "kind": "value", + "name": "unsafeReplaceBy3", + "docstrings": [ + "Returns a new `string` with some or all matches of a pattern with three sets of\ncapturing parentheses replaced by the value returned from the given function.\nThe function receives as its parameters the matched string, the captured\nstrings, the offset at which the match begins, and the whole string being\nmatched.\n\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)\non MDN." + ], + "signature": "let unsafeReplaceBy3: (t, Js_re.t, (t, t, t, t, int, t) => t) => t" + }, + { + "id": "Js.String2.search", + "kind": "value", + "name": "search", + "docstrings": [ + "`search(str, regexp)` returns the starting position of the first match of\n`regexp` in the given `str`, or -1 if there is no match.\n\nSee [`String.search`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search)\non MDN.\n\n```rescript\nJs.String2.search(\"testing 1 2 3\", %re(\"/\\d+/\")) == 8\nJs.String2.search(\"no numbers\", %re(\"/\\d+/\")) == -1\n```" + ], + "signature": "let search: (t, Js_re.t) => int" + }, + { + "id": "Js.String2.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`slice(str, from:n1, to_:n2)` returns the substring of `str` starting at\ncharacter `n1` up to but not including `n2`.\n- If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.\n- If `n2` is greater than the length of `str`, then it is treated as `length(str)`.\n- If `n1` is greater than `n2`, slice returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```rescript\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=5) == \"cde\"\nJs.String2.slice(\"abcdefg\", ~from=2, ~to_=9) == \"cdefg\"\nJs.String2.slice(\"abcdefg\", ~from=-4, ~to_=-2) == \"de\"\nJs.String2.slice(\"abcdefg\", ~from=5, ~to_=1) == \"\"\n```" + ], + "signature": "let slice: (t, ~from: int, ~to_: int) => t" + }, + { + "id": "Js.String2.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "docstrings": [ + "`sliceToEnd(str, from:n)` returns the substring of `str` starting at character\n`n` to the end of the string.\n- If `n` is negative, then it is evaluated as `length(str - n)`.\n- If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.\n\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n```rescript\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```" + ], + "signature": "let sliceToEnd: (t, ~from: int) => t" + }, + { + "id": "Js.String2.split", + "kind": "value", + "name": "split", + "docstrings": [ + "`split(str, delimiter)` splits the given `str` at every occurrence of\n`delimiter` and returns an array of the resulting substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```rescript\nJs.String2.split(\"2018-01-02\", \"-\") == [\"2018\", \"01\", \"02\"]\nJs.String2.split(\"a,b,,c\", \",\") == [\"a\", \"b\", \"\", \"c\"]\nJs.String2.split(\"good::bad as great::awful\", \"::\") == [\"good\", \"bad as great\", \"awful\"]\nJs.String2.split(\"has-no-delimiter\", \";\") == [\"has-no-delimiter\"]\n```" + ], + "signature": "let split: (t, t) => array" + }, + { + "id": "Js.String2.splitAtMost", + "kind": "value", + "name": "splitAtMost", + "docstrings": [ + "`splitAtMost delimiter ~limit: n str` splits the given `str` at every occurrence of `delimiter` and returns an array of the first `n` resulting substrings. If `n` is negative or greater than the number of substrings, the array will contain all the substrings.\n\n```\nsplitAtMost \"ant/bee/cat/dog/elk\" \"/\" ~limit: 3 = [|\"ant\"; \"bee\"; \"cat\"|];;\nsplitAtMost \"ant/bee/cat/dog/elk\" \"/\" ~limit: 0 = [| |];;\nsplitAtMost \"ant/bee/cat/dog/elk\" \"/\" ~limit: 9 = [|\"ant\"; \"bee\"; \"cat\"; \"dog\"; \"elk\"|];;\n```" + ], + "signature": "let splitAtMost: (t, t, ~limit: int) => array" + }, + { + "id": "Js.String2.splitByRe", + "kind": "value", + "name": "splitByRe", + "docstrings": [ + "`splitByRe(str, regex)` splits the given `str` at every occurrence of `regex`\nand returns an array of the resulting substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```rescript\nJs.String2.splitByRe(\"art; bed , cog ;dad\", %re(\"/\\s*[,;]\\s*TODO/\")) == [\n Some(\"art\"),\n Some(\"bed\"),\n Some(\"cog\"),\n Some(\"dad\"),\n ]\n```" + ], + "signature": "let splitByRe: (t, Js_re.t) => array>" + }, + { + "id": "Js.String2.splitByReAtMost", + "kind": "value", + "name": "splitByReAtMost", + "docstrings": [ + "`splitByReAtMost(str, regex, ~limit:n)` splits the given `str` at every\noccurrence of `regex` and returns an array of the first `n` resulting\nsubstrings. If `n` is negative or greater than the number of substrings, the\narray will contain all the substrings.\n\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)\non MDN.\n\n```rescript\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=3) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n ]\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=0) == []\n\nJs.String2.splitByReAtMost(\"one: two: three: four\", %re(\"/\\s*:\\s*TODO/\"), ~limit=8) == [\n Some(\"one\"),\n Some(\"two\"),\n Some(\"three\"),\n Some(\"four\"),\n ]\n```" + ], + "signature": "let splitByReAtMost: (t, Js_re.t, ~limit: int) => array>" + }, + { + "id": "Js.String2.startsWith", + "kind": "value", + "name": "startsWith", + "docstrings": [ + "ES2015: `startsWith(str, substr)` returns `true` if the `str` starts with\n`substr`, `false` otherwise.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```rescript\nJs.String2.startsWith(\"ReScript\", \"Re\") == true\nJs.String2.startsWith(\"ReScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Re\") == false\n```" + ], + "signature": "let startsWith: (t, t) => bool" + }, + { + "id": "Js.String2.startsWithFrom", + "kind": "value", + "name": "startsWithFrom", + "docstrings": [ + "ES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts\nwith `substr` starting at position `n`, false otherwise. If `n` is negative,\nthe search starts at the beginning of `str`.\n\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)\non MDN.\n\n```rescript\nJs.String2.startsWithFrom(\"ReScript\", \"Scri\", 2) == true\nJs.String2.startsWithFrom(\"ReScript\", \"\", 2) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Scri\", 2) == false\n```" + ], + "signature": "let startsWithFrom: (t, t, int) => bool" + }, + { + "id": "Js.String2.substr", + "kind": "value", + "name": "substr", + "docstrings": [ + "`substr(str, ~from:n)` returns the substring of `str` from position `n` to the\nend of the string.\n- If `n` is less than zero, the starting position is the length of `str - n`.\n- If `n` is greater than or equal to the length of `str`, returns the empty string.\n\nJavaScript’s `String.substr()` is a legacy function. When possible, use\n`substring()` instead.\n\nSee [`String.substr`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr)\non MDN.\n\n```rescript\nJs.String2.substr(\"abcdefghij\", ~from=3) == \"defghij\"\nJs.String2.substr(\"abcdefghij\", ~from=-3) == \"hij\"\nJs.String2.substr(\"abcdefghij\", ~from=12) == \"\"\n```" + ], + "signature": "let substr: (t, ~from: int) => t" + }, + { + "id": "Js.String2.substrAtMost", + "kind": "value", + "name": "substrAtMost", + "docstrings": [ + "`substrAtMost(str, ~from: pos, ~length: n)` returns the substring of `str` of\nlength `n` starting at position `pos`.\n- If `pos` is less than zero, the starting position is the length of `str - pos`.\n- If `pos` is greater than or equal to the length of `str`, returns the empty string.\n- If `n` is less than or equal to zero, returns the empty string.\n\nJavaScript’s `String.substr()` is a legacy function. When possible, use\n`substring()` instead.\n\nSee [`String.substr`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr)\non MDN.\n\n```rescript\nJs.String2.substrAtMost(\"abcdefghij\", ~from=3, ~length=4) == \"defg\"\nJs.String2.substrAtMost(\"abcdefghij\", ~from=-3, ~length=4) == \"hij\"\nJs.String2.substrAtMost(\"abcdefghij\", ~from=12, ~length=2) == \"\"\n```" + ], + "signature": "let substrAtMost: (t, ~from: int, ~length: int) => t" + }, + { + "id": "Js.String2.substring", + "kind": "value", + "name": "substring", + "docstrings": [ + "`substring(str, ~from: start, ~to_: finish)` returns characters `start` up to\nbut not including finish from `str`.\n- If `start` is less than zero, it is treated as zero.\n- If `finish` is zero or negative, the empty string is returned.\n- If `start` is greater than `finish`, the `start` and `finish` points are swapped.\n\nSee [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.\n\n```rescript\nJs.String2.substring(\"playground\", ~from=3, ~to_=6) == \"ygr\"\nJs.String2.substring(\"playground\", ~from=6, ~to_=3) == \"ygr\"\nJs.String2.substring(\"playground\", ~from=4, ~to_=12) == \"ground\"\n```" + ], + "signature": "let substring: (t, ~from: int, ~to_: int) => t" + }, + { + "id": "Js.String2.substringToEnd", + "kind": "value", + "name": "substringToEnd", + "docstrings": [ + "`substringToEnd(str, ~from: start)` returns the substring of `str` from\nposition `start` to the end.\n- If `start` is less than or equal to zero, the entire string is returned.\n- If `start` is greater than or equal to the length of `str`, the empty string is returned.\n\nSee [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.\n\n```rescript\nJs.String2.substringToEnd(\"playground\", ~from=4) == \"ground\"\nJs.String2.substringToEnd(\"playground\", ~from=-3) == \"playground\"\nJs.String2.substringToEnd(\"playground\", ~from=12) == \"\"\n```" + ], + "signature": "let substringToEnd: (t, ~from: int) => t" + }, + { + "id": "Js.String2.toLowerCase", + "kind": "value", + "name": "toLowerCase", + "docstrings": [ + "`toLowerCase(str)` converts `str` to lower case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\ngive different results depending upon context, for example with the Greek\nletter sigma, which has two different lower case forms; one when it is the last\ncharacter in a string and another when it is not.\n\nSee [`String.toLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase)\non MDN.\n\n```rescript\nJs.String2.toLowerCase(\"ABC\") == \"abc\"\nJs.String2.toLowerCase(`ΣΠ`) == `σπ`\nJs.String2.toLowerCase(`ΠΣ`) == `πς`\n```" + ], + "signature": "let toLowerCase: t => t" + }, + { + "id": "Js.String2.toLocaleLowerCase", + "kind": "value", + "name": "toLocaleLowerCase", + "docstrings": [ + "`toLocaleLowerCase(str)` converts `str` to lower case using the current locale.\nSee [`String.toLocaleLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase)\non MDN." + ], + "signature": "let toLocaleLowerCase: t => t" + }, + { + "id": "Js.String2.toUpperCase", + "kind": "value", + "name": "toUpperCase", + "docstrings": [ + "`toUpperCase(str)` converts `str` to upper case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\nexpand the number of letters in the result; for example the German ß\ncapitalizes to two Ses in a row.\n\nSee [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)\non MDN.\n\n```rescript\nJs.String2.toUpperCase(\"abc\") == \"ABC\"\nJs.String2.toUpperCase(`Straße`) == `STRASSE`\nJs.String2.toUpperCase(`πς`) == `ΠΣ`\n```" + ], + "signature": "let toUpperCase: t => t" + }, + { + "id": "Js.String2.toLocaleUpperCase", + "kind": "value", + "name": "toLocaleUpperCase", + "docstrings": [ + "`toLocaleUpperCase(str)` converts `str` to upper case using the current locale.\nSee [`String.to:LocaleUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase)\non MDN." + ], + "signature": "let toLocaleUpperCase: t => t" + }, + { + "id": "Js.String2.trim", + "kind": "value", + "name": "trim", + "docstrings": [ + "`trim(str)` returns a string that is `str` with whitespace stripped from both\nends. Internal whitespace is not removed.\n\nSee [`String.trim`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim)\non MDN.\n\n```rescript\nJs.String2.trim(\" abc def \") == \"abc def\"\nJs.String2.trim(\"\\n\\r\\t abc def \\n\\n\\t\\r \") == \"abc def\"\n```" + ], + "signature": "let trim: t => t" + }, + { + "id": "Js.String2.anchor", + "kind": "value", + "name": "anchor", + "docstrings": [ + "`anchor(anchorText, anchorName)` creates a string with an HTML `` element\nwith name attribute of `anchorName` and `anchorText` as its content. Please do\nnot use this method, as it has been removed from the relevant web standards.\n\nSee [`String.anchor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/anchor)\non MDN.\n\n```rescript\nJs.String2.anchor(\"Page One\", \"page1\") == \"Page One\"\n```" + ], + "signature": "let anchor: (t, t) => t" + }, + { + "id": "Js.String2.link", + "kind": "value", + "name": "link", + "docstrings": [ + "ES2015: `link(linkText, urlText)` creates a string with an HTML `` element\nwith href attribute of `urlText` and `linkText` as its content. Please do not\nuse this method, as it has been removed from the relevant web standards. See\n[`String.link`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/link)\non MDN.\n\n```rescript\nJs.String2.link(\"Go to page two\", \"page2.html\") == \"Go to page two\"\n```" + ], + "signature": "let link: (t, t) => t" + }, + { + "id": "Js.String2.castToArrayLike", + "kind": "value", + "name": "castToArrayLike", + "docstrings": [ + "Casts its argument to an `array_like` entity that can be processed by functions\nsuch as `Js.Array2.fromMap()`\n\n```rescript\nlet s = \"abcde\"\nlet arr = Js.Array2.fromMap(Js.String2.castToArrayLike(s), x => x)\narr == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```" + ], + "signature": "let castToArrayLike: t => Js_array2.array_like" + } + ] + }, + "js/string": { + "id": "Js.String", + "name": "String", + "docstrings": [ + "Provide bindings to JS string" + ], + "items": [ + { + "id": "Js.String.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = string" + }, + { + "id": "Js.String.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(value)` converts the given value to a `string`.\n\n```rescript\nJs.String2.make(3.5) == \"3.5\"\nJs.String2.make([1, 2, 3]) == \"1,2,3\"\n```" + ], + "signature": "let make: 'a => t" + }, + { + "id": "Js.String.fromCharCode", + "kind": "value", + "name": "fromCharCode", + "docstrings": [ + "`fromCharCode(n)` creates a `string` containing the character corresponding to that number; `n` ranges from 0 to 65535.\nIf out of range, the lower 16 bits of the value are used. Thus, `fromCharCode(0x1F63A)` gives the same result as `fromCharCode(0xF63A)`. See [`String.fromCharCode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode) on MDN.\n\n```rescript\nJs.String2.fromCharCode(65) == \"A\"\nJs.String2.fromCharCode(0x3c8) == `ψ`\nJs.String2.fromCharCode(0xd55c) == `한`\nJs.String2.fromCharCode(-64568) == `ψ`\n```" + ], + "signature": "let fromCharCode: int => t" + }, + { + "id": "Js.String.fromCharCodeMany", + "kind": "value", + "name": "fromCharCodeMany", + "docstrings": [ + "`fromCharCodeMany([n1, n2, n3])` creates a `string` from the characters\ncorresponding to the given numbers, using the same rules as `fromCharCode`. See\n[`String.fromCharCode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode)\non MDN." + ], + "signature": "let fromCharCodeMany: array => t" + }, + { + "id": "Js.String.fromCodePoint", + "kind": "value", + "name": "fromCodePoint", + "docstrings": [ + "`fromCodePoint(n)` creates a `string` containing the character corresponding to\nthat numeric code point. If the number is not a valid code point, it raises\n`RangeError`.Thus, `fromCodePoint(0x1F63A)` will produce a correct value,\nunlike `fromCharCode(0x1F63A)`, and `fromCodePoint(-5)` will raise a\n`RangeError`.\n\nSee [`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)\non MDN.\n\n```rescript\nJs.String2.fromCodePoint(65) == \"A\"\nJs.String2.fromCodePoint(0x3c8) == `ψ`\nJs.String2.fromCodePoint(0xd55c) == `한`\nJs.String2.fromCodePoint(0x1f63a) == `😺`\n```" + ], + "signature": "let fromCodePoint: int => t" + }, + { + "id": "Js.String.fromCodePointMany", + "kind": "value", + "name": "fromCodePointMany", + "docstrings": [ + "`fromCodePointMany([n1, n2, n3])` creates a `string` from the characters\ncorresponding to the given code point numbers, using the same rules as\n`fromCodePoint`.\n\nSee [`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)\non MDN.\n\n```rescript\nJs.String2.fromCodePointMany([0xd55c, 0xae00, 0x1f63a]) == `한글😺`\n```" + ], + "signature": "let fromCodePointMany: array => t" + }, + { + "id": "Js.String.length", + "kind": "value", + "name": "length", + "docstrings": [ + "`length(s)` returns the length of the given `string`. See\n[`String.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length)\non MDN.\n\n```rescript\nJs.String2.length(\"abcd\") == 4\n```" + ], + "signature": "let length: t => int" + }, + { + "id": "Js.String.get", + "kind": "value", + "name": "get", + "docstrings": [ + "`get(s, n)` returns as a `string` the character at the given index number. If\n`n` is out of range, this function returns `undefined`, so at some point this\nfunction may be modified to return `option(string)`.\n\n```rescript\nJs.String2.get(\"Reason\", 0) == \"R\"\nJs.String2.get(\"Reason\", 4) == \"o\"\nJs.String2.get(`Rẽasöń`, 5) == `ń`\n```" + ], + "signature": "let get: (t, int) => t" + }, + { + "id": "Js.String.charAt", + "kind": "value", + "name": "charAt", + "docstrings": [], + "signature": "let charAt: (int, t) => t" + }, + { + "id": "Js.String.charCodeAt", + "kind": "value", + "name": "charCodeAt", + "docstrings": [], + "signature": "let charCodeAt: (int, t) => float" + }, + { + "id": "Js.String.codePointAt", + "kind": "value", + "name": "codePointAt", + "docstrings": [], + "signature": "let codePointAt: (int, t) => option" + }, + { + "id": "Js.String.concat", + "kind": "value", + "name": "concat", + "docstrings": [], + "signature": "let concat: (t, t) => t" + }, + { + "id": "Js.String.concatMany", + "kind": "value", + "name": "concatMany", + "docstrings": [], + "signature": "let concatMany: (array, t) => t" + }, + { + "id": "Js.String.endsWith", + "kind": "value", + "name": "endsWith", + "docstrings": [], + "signature": "let endsWith: (t, t) => bool" + }, + { + "id": "Js.String.endsWithFrom", + "kind": "value", + "name": "endsWithFrom", + "docstrings": [], + "signature": "let endsWithFrom: (t, int, t) => bool" + }, + { + "id": "Js.String.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t, t) => bool" + }, + { + "id": "Js.String.includesFrom", + "kind": "value", + "name": "includesFrom", + "docstrings": [], + "signature": "let includesFrom: (t, int, t) => bool" + }, + { + "id": "Js.String.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t, t) => int" + }, + { + "id": "Js.String.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t, int, t) => int" + }, + { + "id": "Js.String.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t, t) => int" + }, + { + "id": "Js.String.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t, int, t) => int" + }, + { + "id": "Js.String.localeCompare", + "kind": "value", + "name": "localeCompare", + "docstrings": [], + "signature": "let localeCompare: (t, t) => float" + }, + { + "id": "Js.String.match_", + "kind": "value", + "name": "match_", + "docstrings": [], + "signature": "let match_: (Js_re.t, t) => option>>" + }, + { + "id": "Js.String.normalize", + "kind": "value", + "name": "normalize", + "docstrings": [ + "`normalize(str)` returns the normalized Unicode string using Normalization Form\nCanonical (NFC) Composition. Consider the character ã, which can be represented\nas the single codepoint \\u00e3 or the combination of a lower case letter A\n\\u0061 and a combining tilde \\u0303. Normalization ensures that both can be\nstored in an equivalent binary representation.\n\nSee [`String.normalize`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)\non MDN.\n\nSee also [Unicode technical report #15](https://unicode.org/reports/tr15/) for\ndetails." + ], + "signature": "let normalize: t => t" + }, + { + "id": "Js.String.normalizeByForm", + "kind": "value", + "name": "normalizeByForm", + "docstrings": [], + "signature": "let normalizeByForm: (t, t) => t" + }, + { + "id": "Js.String.repeat", + "kind": "value", + "name": "repeat", + "docstrings": [], + "signature": "let repeat: (int, t) => t" + }, + { + "id": "Js.String.replace", + "kind": "value", + "name": "replace", + "docstrings": [], + "signature": "let replace: (t, t, t) => t" + }, + { + "id": "Js.String.replaceByRe", + "kind": "value", + "name": "replaceByRe", + "docstrings": [], + "signature": "let replaceByRe: (Js_re.t, t, t) => t" + }, + { + "id": "Js.String.unsafeReplaceBy0", + "kind": "value", + "name": "unsafeReplaceBy0", + "docstrings": [], + "signature": "let unsafeReplaceBy0: (Js_re.t, (t, int, t) => t, t) => t" + }, + { + "id": "Js.String.unsafeReplaceBy1", + "kind": "value", + "name": "unsafeReplaceBy1", + "docstrings": [], + "signature": "let unsafeReplaceBy1: (Js_re.t, (t, t, int, t) => t, t) => t" + }, + { + "id": "Js.String.unsafeReplaceBy2", + "kind": "value", + "name": "unsafeReplaceBy2", + "docstrings": [], + "signature": "let unsafeReplaceBy2: (Js_re.t, (t, t, t, int, t) => t, t) => t" + }, + { + "id": "Js.String.unsafeReplaceBy3", + "kind": "value", + "name": "unsafeReplaceBy3", + "docstrings": [], + "signature": "let unsafeReplaceBy3: (Js_re.t, (t, t, t, t, int, t) => t, t) => t" + }, + { + "id": "Js.String.search", + "kind": "value", + "name": "search", + "docstrings": [], + "signature": "let search: (Js_re.t, t) => int" + }, + { + "id": "Js.String.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~from: int, ~to_: int, t) => t" + }, + { + "id": "Js.String.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "docstrings": [], + "signature": "let sliceToEnd: (~from: int, t) => t" + }, + { + "id": "Js.String.split", + "kind": "value", + "name": "split", + "docstrings": [], + "signature": "let split: (t, t) => array" + }, + { + "id": "Js.String.splitAtMost", + "kind": "value", + "name": "splitAtMost", + "docstrings": [], + "signature": "let splitAtMost: (t, ~limit: int, t) => array" + }, + { + "id": "Js.String.splitByRe", + "kind": "value", + "name": "splitByRe", + "docstrings": [], + "signature": "let splitByRe: (Js_re.t, t) => array>" + }, + { + "id": "Js.String.splitByReAtMost", + "kind": "value", + "name": "splitByReAtMost", + "docstrings": [], + "signature": "let splitByReAtMost: (Js_re.t, ~limit: int, t) => array>" + }, + { + "id": "Js.String.startsWith", + "kind": "value", + "name": "startsWith", + "docstrings": [], + "signature": "let startsWith: (t, t) => bool" + }, + { + "id": "Js.String.startsWithFrom", + "kind": "value", + "name": "startsWithFrom", + "docstrings": [], + "signature": "let startsWithFrom: (t, int, t) => bool" + }, + { + "id": "Js.String.substr", + "kind": "value", + "name": "substr", + "docstrings": [], + "signature": "let substr: (~from: int, t) => t" + }, + { + "id": "Js.String.substrAtMost", + "kind": "value", + "name": "substrAtMost", + "docstrings": [], + "signature": "let substrAtMost: (~from: int, ~length: int, t) => t" + }, + { + "id": "Js.String.substring", + "kind": "value", + "name": "substring", + "docstrings": [], + "signature": "let substring: (~from: int, ~to_: int, t) => t" + }, + { + "id": "Js.String.substringToEnd", + "kind": "value", + "name": "substringToEnd", + "docstrings": [], + "signature": "let substringToEnd: (~from: int, t) => t" + }, + { + "id": "Js.String.toLowerCase", + "kind": "value", + "name": "toLowerCase", + "docstrings": [ + "`toLowerCase(str)` converts `str` to lower case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\ngive different results depending upon context, for example with the Greek\nletter sigma, which has two different lower case forms; one when it is the last\ncharacter in a string and another when it is not.\n\nSee [`String.toLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase)\non MDN.\n\n```rescript\nJs.String.toLowerCase(\"ABC\") == \"abc\"\nJs.String.toLowerCase(`ΣΠ`) == `σπ`\nJs.String.toLowerCase(`ΠΣ`) == `πς`\n```" + ], + "signature": "let toLowerCase: t => t" + }, + { + "id": "Js.String.toLocaleLowerCase", + "kind": "value", + "name": "toLocaleLowerCase", + "docstrings": [ + "`toLocaleLowerCase(str)` converts `str` to lower case using the current locale.\n\nSee [`String.toLocaleLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase)\non MDN." + ], + "signature": "let toLocaleLowerCase: t => t" + }, + { + "id": "Js.String.toUpperCase", + "kind": "value", + "name": "toUpperCase", + "docstrings": [ + "`toUpperCase(str)` converts `str` to upper case using the locale-insensitive\ncase mappings in the Unicode Character Database. Notice that the conversion can\nexpand the number of letters in the result; for example the German ß\ncapitalizes to two Ses in a row.\n\nSee [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)\non MDN.\n\n```rescript\nJs.String.toUpperCase(\"abc\") == \"ABC\"\nJs.String.toUpperCase(`Straße`) == `STRASSE`\nJs.String.toUpperCase(`πς`) == `ΠΣ`\n```" + ], + "signature": "let toUpperCase: t => t" + }, + { + "id": "Js.String.toLocaleUpperCase", + "kind": "value", + "name": "toLocaleUpperCase", + "docstrings": [ + "`toLocaleUpperCase(str)` converts `str` to upper case using the current locale.\n\nSee [`String.to:LocaleUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase)\non MDN." + ], + "signature": "let toLocaleUpperCase: t => t" + }, + { + "id": "Js.String.trim", + "kind": "value", + "name": "trim", + "docstrings": [ + "`trim(str)` returns a string that is `str` with whitespace stripped from both\nends. Internal whitespace is not removed.\n\nSee [`String.trim`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim)\non MDN.\n\n```rescript\nJs.String.trim(\" abc def \") == \"abc def\"\nJs.String.trim(\"\\n\\r\\t abc def \\n\\n\\t\\r \") == \"abc def\"\n```" + ], + "signature": "let trim: t => t" + }, + { + "id": "Js.String.anchor", + "kind": "value", + "name": "anchor", + "docstrings": [], + "signature": "let anchor: (t, t) => t" + }, + { + "id": "Js.String.link", + "kind": "value", + "name": "link", + "docstrings": [], + "signature": "let link: (t, t) => t" + }, + { + "id": "Js.String.castToArrayLike", + "kind": "value", + "name": "castToArrayLike", + "docstrings": [ + "Casts its argument to an `array_like` entity that can be processed by functions\nsuch as `Js.Array2.fromMap()`\n\n```rescript\nlet s = \"abcde\"\nlet arr = Js.Array2.fromMap(Js.String.castToArrayLike(s), x => x)\narr == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```" + ], + "signature": "let castToArrayLike: t => Js_array2.array_like" + } + ] + }, + "js/array2": { + "id": "Js.Array2", + "name": "Array2", + "docstrings": [ + "Provide bindings to JS array" + ], + "items": [ + { + "id": "Js.Array2.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type used to describe a JavaScript array." + ], + "signature": "type t<'a> = array<'a>" + }, + { + "id": "Js.Array2.array_like", + "kind": "type", + "name": "array_like", + "docstrings": [ + "A type used to describe JavaScript objects that are like an array or are iterable." + ], + "signature": "type array_like<'a>" + }, + { + "id": "Js.Array2.from", + "kind": "value", + "name": "from", + "docstrings": [ + "Creates a shallow copy of an array from an array-like object. See\n[`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)\non MDN.\n\n```rescript\nlet strArr = Js.String.castToArrayLike(\"abcd\")\nJs.Array2.from(strArr) == [\"a\", \"b\", \"c\", \"d\"]\n```" + ], + "signature": "let from: array_like<'a> => array<'a>" + }, + { + "id": "Js.Array2.fromMap", + "kind": "value", + "name": "fromMap", + "docstrings": [ + "Creates a new array by applying a function (the second argument) to each item\nin the `array_like` first argument. See\n[`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)\non MDN.\n\n```rescript\nlet strArr = Js.String.castToArrayLike(\"abcd\")\nlet code = s => Js.String.charCodeAt(0, s)\nJs.Array2.fromMap(strArr, code) == [97.0, 98.0, 99.0, 100.0]\n```" + ], + "signature": "let fromMap: (array_like<'a>, 'a => 'b) => array<'b>" + }, + { + "id": "Js.Array2.isArray", + "kind": "value", + "name": "isArray", + "docstrings": [ + "Returns `true` if its argument is an array; `false` otherwise. This is a runtime check, which is why the second example returns `true`---a list is internally represented as a nested JavaScript array.\n\n```rescript\nJs.Array2.isArray([5, 2, 3, 1, 4]) == true\nJs.Array2.isArray(list{5, 2, 3, 1, 4}) == true\nJs.Array2.isArray(\"abcd\") == false\n```" + ], + "signature": "let isArray: 'a => bool" + }, + { + "id": "Js.Array2.length", + "kind": "value", + "name": "length", + "docstrings": [ + "Returns the number of elements in the array. See\n[`Array.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length)\non MDN." + ], + "signature": "let length: array<'a> => int" + }, + { + "id": "Js.Array2.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [ + "Copies from the first element in the given array to the designated `~to_`\nposition, returning the resulting array. *This function modifies the original\narray.* See\n[`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin)\non MDN.\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\nJs.Array2.copyWithin(arr, ~to_=2) == [100, 101, 100, 101, 102]\narr == [100, 101, 100, 101, 102]\n```" + ], + "signature": "let copyWithin: (t<'a>, ~to_: int) => t<'a>" + }, + { + "id": "Js.Array2.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [ + "Copies starting at element `~from` in the given array to the designated `~to_`\nposition, returning the resulting array. *This function modifies the original\narray.* See\n[`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin)\non MDN.\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\nJs.Array2.copyWithinFrom(arr, ~from=2, ~to_=0) == [102, 103, 104, 103, 104]\narr == [102, 103, 104, 103, 104]\n```" + ], + "signature": "let copyWithinFrom: (t<'a>, ~to_: int, ~from: int) => t<'a>" + }, + { + "id": "Js.Array2.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [ + "Copies starting at element `~start` in the given array up to but not including\n`~end_` to the designated `~to_` position, returning the resulting array. *This\nfunction modifies the original array.* See\n[`Array.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin)\non MDN.\n\n```rescript\nlet arr = [100, 101, 102, 103, 104, 105]\nJs.Array2.copyWithinFromRange(arr, ~start=2, ~end_=5, ~to_=1) == [100, 102, 103, 104, 104, 105]\narr == [100, 102, 103, 104, 104, 105]\n```" + ], + "signature": "let copyWithinFromRange: (t<'a>, ~to_: int, ~start: int, ~end_: int) => t<'a>" + }, + { + "id": "Js.Array2.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [ + "Sets all elements of the given array (the first arumgent) to the designated\nvalue (the secon argument), returning the resulting array. *This function\n modifies the original array.*\n\nSee\n[`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill)\non MDN.\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\nJs.Array2.fillInPlace(arr, 99) == [99, 99, 99, 99, 99]\narr == [99, 99, 99, 99, 99]\n```" + ], + "signature": "let fillInPlace: (t<'a>, 'a) => t<'a>" + }, + { + "id": "Js.Array2.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [ + "Sets all elements of the given array (the first arumgent) from position `~from`\nto the end to the designated value (the second argument), returning the\nresulting array. *This function modifies the original array.* See\n[`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill)\non MDN.\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\nJs.Array2.fillFromInPlace(arr, 99, ~from=2) == [100, 101, 99, 99, 99]\narr == [100, 101, 99, 99, 99]\n```" + ], + "signature": "let fillFromInPlace: (t<'a>, 'a, ~from: int) => t<'a>" + }, + { + "id": "Js.Array2.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [ + "Sets the elements of the given array (the first arumgent) from position\n`~start` up to but not including position `~end_` to the designated value (the\nsecond argument), returning the resulting array. *This function modifies the\noriginal array.* See\n[`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill)\non MDN.\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\nJs.Array2.fillRangeInPlace(arr, 99, ~start=1, ~end_=4) == [100, 99, 99, 99, 104]\narr == [100, 99, 99, 99, 104]\n```" + ], + "signature": "let fillRangeInPlace: (t<'a>, 'a, ~start: int, ~end_: int) => t<'a>" + }, + { + "id": "Js.Array2.pop", + "kind": "value", + "name": "pop", + "docstrings": [ + "If the array is not empty, removes the last element and returns it as\n`Some(value)`; returns `None` if the array is empty. *This function modifies\nthe original array.* See\n[`Array.pop`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop)\non MDN.\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\nJs.Array2.pop(arr) == Some(104)\narr == [100, 101, 102, 103]\n\nlet empty: array = []\nJs.Array2.pop(empty) == None\n```" + ], + "signature": "let pop: t<'a> => option<'a>" + }, + { + "id": "Js.Array2.push", + "kind": "value", + "name": "push", + "docstrings": [ + "Appends the given value to the array, returning the number of elements in the\nupdated array. *This function modifies the original array.* See\n[`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push)\non MDN.\n\n```rescript\nlet arr = [\"ant\", \"bee\", \"cat\"]\nJs.Array2.push(arr, \"dog\") == 4\narr == [\"ant\", \"bee\", \"cat\", \"dog\"]\n```" + ], + "signature": "let push: (t<'a>, 'a) => int" + }, + { + "id": "Js.Array2.pushMany", + "kind": "value", + "name": "pushMany", + "docstrings": [ + "Appends the values from one array (the second argument) to another (the first\nargument), returning the number of elements in the updated array. *This\nfunction modifies the original array.* See\n[`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push)\non MDN.\n\n```rescript\nlet arr = [\"ant\", \"bee\", \"cat\"]\nJs.Array2.pushMany(arr, [\"dog\", \"elk\"]) == 5\narr == [\"ant\", \"bee\", \"cat\", \"dog\", \"elk\"]\n```" + ], + "signature": "let pushMany: (t<'a>, array<'a>) => int" + }, + { + "id": "Js.Array2.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [ + "Returns an array with the elements of the input array in reverse order. *This\nfunction modifies the original array.* See\n[`Array.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse)\non MDN.\n\n```rescript\nlet arr = [\"ant\", \"bee\", \"cat\"]\nJs.Array2.reverseInPlace(arr) == [\"cat\", \"bee\", \"ant\"]\narr == [\"cat\", \"bee\", \"ant\"]\n```" + ], + "signature": "let reverseInPlace: t<'a> => t<'a>" + }, + { + "id": "Js.Array2.shift", + "kind": "value", + "name": "shift", + "docstrings": [ + "If the array is not empty, removes the first element and returns it as\n`Some(value)`; returns `None` if the array is empty. *This function modifies\nthe original array.* See\n[`Array.shift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift)\non MDN.\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\nJs.Array2.shift(arr) == Some(100)\narr == [101, 102, 103, 104]\n\nlet empty: array = []\nJs.Array2.shift(empty) == None\n```" + ], + "signature": "let shift: t<'a> => option<'a>" + }, + { + "id": "Js.Array2.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [ + "Sorts the given array in place and returns the sorted array. JavaScript sorts\nthe array by converting the arguments to UTF-16 strings and sorting them. See\nthe second example with sorting numbers, which does not do a numeric sort.\n*This function modifies the original array.* See\n[`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\non MDN.\n\n```rescript\nlet words = [\"bee\", \"dog\", \"ant\", \"cat\"]\nJs.Array2.sortInPlace(words) == [\"ant\", \"bee\", \"cat\", \"dog\"]\nwords == [\"ant\", \"bee\", \"cat\", \"dog\"]\n\nlet numbers = [3, 30, 10, 1, 20, 2]\nJs.Array2.sortInPlace(numbers) == [1, 10, 2, 20, 3, 30]\nnumbers == [1, 10, 2, 20, 3, 30]\n```" + ], + "signature": "let sortInPlace: t<'a> => t<'a>" + }, + { + "id": "Js.Array2.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [ + "Sorts the given array in place and returns the sorted array. *This function\n modifies the original array.*\n\nThe first argument to `sortInPlaceWith()` is a function that compares two items\nfrom the array and returns:\n\n* an integer less than zero if the first item is less than the second item *\nzero if the items are equal * an integer greater than zero if the first item is\ngreater than the second item\n\nSee\n[`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\non MDN.\n\n```rescript\n// sort by word length\nlet words = [\"horse\", \"aardvark\", \"dog\", \"camel\"]\nlet byLength = (s1, s2) => Js.String.length(s1) - Js.String.length(s2)\n\nJs.Array2.sortInPlaceWith(words, byLength) == [\"dog\", \"horse\", \"camel\", \"aardvark\"]\n\n// sort in reverse numeric order\nlet numbers = [3, 30, 10, 1, 20, 2]\nlet reverseNumeric = (n1, n2) => n2 - n1\nJs.Array2.sortInPlaceWith(numbers, reverseNumeric) == [30, 20, 10, 3, 2, 1]\n```" + ], + "signature": "let sortInPlaceWith: (t<'a>, ('a, 'a) => int) => t<'a>" + }, + { + "id": "Js.Array2.spliceInPlace", + "kind": "value", + "name": "spliceInPlace", + "docstrings": [ + "Starting at position `~pos`, remove `~remove` elements and then add the\nelements from the `~add` array. Returns an array consisting of the removed\nitems. *This function modifies the original array.* See\n[`Array.splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice)\non MDN.\n\n```rescript\nlet arr = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\nJs.Array2.spliceInPlace(arr, ~pos=2, ~remove=2, ~add=[\"x\", \"y\", \"z\"]) == [\"c\", \"d\"]\narr == [\"a\", \"b\", \"x\", \"y\", \"z\", \"e\", \"f\"]\n\nlet arr2 = [\"a\", \"b\", \"c\", \"d\"]\nJs.Array2.spliceInPlace(arr2, ~pos=3, ~remove=0, ~add=[\"x\", \"y\"]) == []\narr2 == [\"a\", \"b\", \"c\", \"x\", \"y\", \"d\"]\n\nlet arr3 = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\nJs.Array2.spliceInPlace(arr3, ~pos=9, ~remove=2, ~add=[\"x\", \"y\", \"z\"]) == []\narr3 == [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"x\", \"y\", \"z\"]\n```" + ], + "signature": "let spliceInPlace: (t<'a>, ~pos: int, ~remove: int, ~add: array<'a>) => t<'a>" + }, + { + "id": "Js.Array2.removeFromInPlace", + "kind": "value", + "name": "removeFromInPlace", + "docstrings": [ + "Removes elements from the given array starting at position `~pos` to the end of\nthe array, returning the removed elements. *This function modifies the original\narray.* See\n[`Array.splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice)\non MDN.\n\n```rescript\nlet arr = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\nJs.Array2.removeFromInPlace(arr, ~pos=4) == [\"e\", \"f\"]\narr == [\"a\", \"b\", \"c\", \"d\"]\n```" + ], + "signature": "let removeFromInPlace: (t<'a>, ~pos: int) => t<'a>" + }, + { + "id": "Js.Array2.removeCountInPlace", + "kind": "value", + "name": "removeCountInPlace", + "docstrings": [ + "Removes `~count` elements from the given array starting at position `~pos`,\nreturning the removed elements. *This function modifies the original array.*\nSee\n[`Array.splice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice)\non MDN.\n\n```rescript\nlet arr = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\nJs.Array2.removeCountInPlace(arr, ~pos=2, ~count=3) == [\"c\", \"d\", \"e\"]\narr == [\"a\", \"b\", \"f\"]\n```" + ], + "signature": "let removeCountInPlace: (t<'a>, ~pos: int, ~count: int) => t<'a>" + }, + { + "id": "Js.Array2.unshift", + "kind": "value", + "name": "unshift", + "docstrings": [ + "Adds the given element to the array, returning the new number of elements in\nthe array. *This function modifies the original array.* See\n[`Array.unshift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift)\non MDN.\n\n```rescript\nlet arr = [\"b\", \"c\", \"d\"]\nJs.Array2.unshift(arr, \"a\") == 4\narr == [\"a\", \"b\", \"c\", \"d\"]\n```" + ], + "signature": "let unshift: (t<'a>, 'a) => int" + }, + { + "id": "Js.Array2.unshiftMany", + "kind": "value", + "name": "unshiftMany", + "docstrings": [ + "Adds the elements in the second array argument at the beginning of the first\narray argument, returning the new number of elements in the array. *This\nfunction modifies the original array.* See\n[`Array.unshift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift)\non MDN.\n\n```rescript\nlet arr = [\"d\", \"e\"]\nJs.Array2.unshiftMany(arr, [\"a\", \"b\", \"c\"]) == 5\narr == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```" + ], + "signature": "let unshiftMany: (t<'a>, array<'a>) => int" + }, + { + "id": "Js.Array2.append", + "kind": "value", + "name": "append", + "docstrings": [], + "signature": "let append: (t<'a>, 'a) => t<'a>" + }, + { + "id": "Js.Array2.concat", + "kind": "value", + "name": "concat", + "docstrings": [ + "Concatenates the second array argument to the first array argument, returning a\nnew array. The original arrays are not modified. See\n[`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat)\non MDN.\n\n```rescript\nJs.Array2.concat([\"a\", \"b\"], [\"c\", \"d\", \"e\"]) == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```" + ], + "signature": "let concat: (t<'a>, t<'a>) => t<'a>" + }, + { + "id": "Js.Array2.concatMany", + "kind": "value", + "name": "concatMany", + "docstrings": [ + "The second argument to `concatMany()` is an array of arrays; these are added at\nthe end of the first argument, returning a new array. See\n[`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat)\non MDN.\n\n```rescript\nJs.Array2.concatMany([\"a\", \"b\", \"c\"], [[\"d\", \"e\"], [\"f\", \"g\", \"h\"]]) == [\n \"a\",\n \"b\",\n \"c\",\n \"d\",\n \"e\",\n \"f\",\n \"g\",\n \"h\",\n ]\n```" + ], + "signature": "let concatMany: (t<'a>, array>) => t<'a>" + }, + { + "id": "Js.Array2.includes", + "kind": "value", + "name": "includes", + "docstrings": [ + "Returns true if the given value is in the array, `false` otherwise. See\n[`Array.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes)\non MDN.\n\n```rescript\nJs.Array2.includes([\"a\", \"b\", \"c\"], \"b\") == true\nJs.Array2.includes([\"a\", \"b\", \"c\"], \"x\") == false\n```" + ], + "signature": "let includes: (t<'a>, 'a) => bool" + }, + { + "id": "Js.Array2.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [ + "Returns the index of the first element in the array that has the given value.\nIf the value is not in the array, returns -1. See\n[`Array.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\non MDN.\n\n```rescript\nJs.Array2.indexOf([100, 101, 102, 103], 102) == 2\nJs.Array2.indexOf([100, 101, 102, 103], 999) == -1\n```" + ], + "signature": "let indexOf: (t<'a>, 'a) => int" + }, + { + "id": "Js.Array2.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [ + "Returns the index of the first element in the array with the given value. The\nsearch starts at position `~from`. See\n[`Array.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\non MDN.\n\n```rescript\nJs.Array2.indexOfFrom([\"a\", \"b\", \"a\", \"c\", \"a\"], \"a\", ~from=2) == 2\nJs.Array2.indexOfFrom([\"a\", \"b\", \"a\", \"c\", \"a\"], \"a\", ~from=3) == 4\nJs.Array2.indexOfFrom([\"a\", \"b\", \"a\", \"c\", \"a\"], \"b\", ~from=2) == -1\n```" + ], + "signature": "let indexOfFrom: (t<'a>, 'a, ~from: int) => int" + }, + { + "id": "Js.Array2.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [ + "This function converts each element of the array to a string (via JavaScript)\nand concatenates them, separated by the string given in the first argument,\ninto a single string. See\n[`Array.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join)\non MDN.\n\n```rescript\nJs.Array2.joinWith([\"ant\", \"bee\", \"cat\"], \"--\") == \"ant--bee--cat\"\nJs.Array2.joinWith([\"door\", \"bell\"], \"\") == \"doorbell\"\nJs.Array2.joinWith([2020, 9, 4], \"/\") == \"2020/9/4\"\nJs.Array2.joinWith([2.5, 3.6, 3e-2], \";\") == \"2.5;3.6;0.03\"\n```" + ], + "signature": "let joinWith: (t<'a>, string) => string" + }, + { + "id": "Js.Array2.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [ + "Returns the index of the last element in the array that has the given value. If\nthe value is not in the array, returns -1. See\n[`Array.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf)\non MDN.\n\n```rescript\nJs.Array2.lastIndexOf([\"a\", \"b\", \"a\", \"c\"], \"a\") == 2\nJs.Array2.lastIndexOf([\"a\", \"b\", \"a\", \"c\"], \"x\") == -1\n```" + ], + "signature": "let lastIndexOf: (t<'a>, 'a) => int" + }, + { + "id": "Js.Array2.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [ + "Returns the index of the last element in the array that has the given value,\nsearching from position `~from` down to the start of the array. If the value is\nnot in the array, returns -1. See\n[`Array.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf)\non MDN.\n\n```rescript\nJs.Array2.lastIndexOfFrom([\"a\", \"b\", \"a\", \"c\", \"a\", \"d\"], \"a\", ~from=3) == 2\nJs.Array2.lastIndexOfFrom([\"a\", \"b\", \"a\", \"c\", \"a\", \"d\"], \"c\", ~from=2) == -1\n```" + ], + "signature": "let lastIndexOfFrom: (t<'a>, 'a, ~from: int) => int" + }, + { + "id": "Js.Array2.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "Returns a shallow copy of the given array from the `~start` index up to but not\nincluding the `~end_` position. Negative numbers indicate an offset from the\nend of the array. See\n[`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)\non MDN.\n\n```rescript\nlet arr = [100, 101, 102, 103, 104, 105, 106]\nJs.Array2.slice(arr, ~start=2, ~end_=5) == [102, 103, 104]\nJs.Array2.slice(arr, ~start=-3, ~end_=-1) == [104, 105]\nJs.Array2.slice(arr, ~start=9, ~end_=10) == []\n```" + ], + "signature": "let slice: (t<'a>, ~start: int, ~end_: int) => t<'a>" + }, + { + "id": "Js.Array2.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "Returns a copy of the entire array. Same as `Js.Array2.Slice(arr, ~start=0,\n~end_=Js.Array2.length(arr))`. See\n[`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)\non MDN." + ], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Js.Array2.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [ + "Returns a shallow copy of the given array from the given index to the end. See\n[`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)\non MDN." + ], + "signature": "let sliceFrom: (t<'a>, int) => t<'a>" + }, + { + "id": "Js.Array2.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Converts the array to a string. Each element is converted to a string using\nJavaScript. Unlike the JavaScript `Array.toString()`, all elements in a\nReasonML array must have the same type. See\n[`Array.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString)\non MDN.\n\n```rescript\nJs.Array2.toString([3.5, 4.6, 7.8]) == \"3.5,4.6,7.8\"\nJs.Array2.toString([\"a\", \"b\", \"c\"]) == \"a,b,c\"\n```" + ], + "signature": "let toString: t<'a> => string" + }, + { + "id": "Js.Array2.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [ + "Converts the array to a string using the conventions of the current locale.\nEach element is converted to a string using JavaScript. Unlike the JavaScript\n`Array.toLocaleString()`, all elements in a ReasonML array must have the same\ntype. See\n[`Array.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString)\non MDN.\n\n```rescript\nJs.Array2.toLocaleString([Js.Date.make()])\n// returns \"3/19/2020, 10:52:11 AM\" for locale en_US.utf8\n// returns \"2020-3-19 10:52:11\" for locale de_DE.utf8\n```" + ], + "signature": "let toLocaleString: t<'a> => string" + }, + { + "id": "Js.Array2.every", + "kind": "value", + "name": "every", + "docstrings": [ + "The first argument to `every()` is an array. The second argument is a predicate\nfunction that returns a boolean. The `every()` function returns `true` if the\npredicate function is true for all items in the given array. If given an empty\narray, returns `true`. See\n[`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every)\non MDN.\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\nJs.Array2.every([6, 22, 8, 4], isEven) == true\nJs.Array2.every([6, 22, 7, 4], isEven) == false\n```" + ], + "signature": "let every: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Js.Array2.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [ + "The first argument to `everyi()` is an array. The second argument is a\npredicate function with two arguments: an array element and that element’s\nindex; it returns a boolean. The `everyi()` function returns `true` if the\npredicate function is true for all items in the given array. If given an empty\narray, returns `true`. See\n[`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every)\non MDN.\n\n```rescript\n// determine if all even-index items are positive\nlet evenIndexPositive = (item, index) => mod(index, 2) == 0 ? item > 0 : true\n\nJs.Array2.everyi([6, -3, 5, 8], evenIndexPositive) == true\nJs.Array2.everyi([6, 3, -5, 8], evenIndexPositive) == false\n```" + ], + "signature": "let everyi: (t<'a>, ('a, int) => bool) => bool" + }, + { + "id": "Js.Array2.filter", + "kind": "value", + "name": "filter", + "docstrings": [ + "Applies the given predicate function (the second argument) to each element in\nthe array; the result is an array of those elements for which the predicate\nfunction returned `true`. See\n[`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\non MDN.\n\n```rescript\nlet nonEmpty = s => s != \"\"\nJs.Array2.filter([\"abc\", \"\", \"\", \"def\", \"ghi\"], nonEmpty) == [\"abc\", \"def\", \"ghi\"]\n```" + ], + "signature": "let filter: (t<'a>, 'a => bool) => t<'a>" + }, + { + "id": "Js.Array2.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [ + "Each element of the given array are passed to the predicate function. The\nreturn value is an array of all those elements for which the predicate function\nreturned `true`.\n\nSee\n[`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\non MDN.\n\n```rescript\n// keep only positive elements at odd indices\nlet positiveOddElement = (item, index) => mod(index, 2) == 1 && item > 0\n\nJs.Array2.filteri([6, 3, 5, 8, 7, -4, 1], positiveOddElement) == [3, 8]\n```" + ], + "signature": "let filteri: (t<'a>, ('a, int) => bool) => t<'a>" + }, + { + "id": "Js.Array2.find", + "kind": "value", + "name": "find", + "docstrings": [ + "Returns `Some(value)` for the first element in the array that satisifies the\ngiven predicate function, or `None` if no element satisifies the predicate. See\n[`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\non MDN.\n\n```rescript\n// find first negative element\nJs.Array2.find([33, 22, -55, 77, -44], x => x < 0) == Some(-55)\nJs.Array2.find([33, 22, 55, 77, 44], x => x < 0) == None\n```" + ], + "signature": "let find: (t<'a>, 'a => bool) => option<'a>" + }, + { + "id": "Js.Array2.findi", + "kind": "value", + "name": "findi", + "docstrings": [ + "Returns `Some(value)` for the first element in the array that satisifies the\ngiven predicate function, or `None` if no element satisifies the predicate. The\npredicate function takes an array element and an index as its parameters. See\n[`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\non MDN.\n\n```rescript\n// find first positive item at an odd index\nlet positiveOddElement = (item, index) => mod(index, 2) == 1 && item > 0\n\nJs.Array2.findi([66, -33, 55, 88, 22], positiveOddElement) == Some(88)\nJs.Array2.findi([66, -33, 55, -88, 22], positiveOddElement) == None\n```" + ], + "signature": "let findi: (t<'a>, ('a, int) => bool) => option<'a>" + }, + { + "id": "Js.Array2.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [ + "Returns the index of the first element in the array that satisifies the given\npredicate function, or -1 if no element satisifies the predicate. See\n[`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\non MDN.\n\n```rescript\nJs.Array2.findIndex([33, 22, -55, 77, -44], x => x < 0) == 2\nJs.Array2.findIndex([33, 22, 55, 77, 44], x => x < 0) == -1\n```" + ], + "signature": "let findIndex: (t<'a>, 'a => bool) => int" + }, + { + "id": "Js.Array2.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [ + "Returns `Some(value)` for the first element in the array that satisifies the\ngiven predicate function, or `None` if no element satisifies the predicate. The\npredicate function takes an array element and an index as its parameters. See\n[`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\non MDN.\n\n```rescript\n// find index of first positive item at an odd index\nlet positiveOddElement = (item, index) => mod(index, 2) == 1 && item > 0\n\nJs.Array2.findIndexi([66, -33, 55, 88, 22], positiveOddElement) == 3\nJs.Array2.findIndexi([66, -33, 55, -88, 22], positiveOddElement) == -1\n```" + ], + "signature": "let findIndexi: (t<'a>, ('a, int) => bool) => int" + }, + { + "id": "Js.Array2.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "The `forEach()` function applies the function given as the second argument to\neach element in the array. The function you provide returns `unit`, and the\n`forEach()` function also returns `unit`. You use `forEach()` when you need to\nprocess each element in the array but not return any new array or value; for\nexample, to print the items in an array. See\n[`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\non MDN.\n\n```rescript\n// display all elements in an array\nJs.Array2.forEach([\"a\", \"b\", \"c\"], x => Js.log(x)) == ()\n```" + ], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Js.Array2.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [ + "The `forEachi()` function applies the function given as the second argument to\neach element in the array. The function you provide takes an item in the array\nand its index number, and returns `unit`. The `forEachi()` function also\nreturns `unit`. You use `forEachi()` when you need to process each element in\nthe array but not return any new array or value; for example, to print the\nitems in an array. See\n[`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\non MDN.\n\n```rescript\n// display all elements in an array as a numbered list\nJs.Array2.forEachi([\"a\", \"b\", \"c\"], (item, index) => Js.log2(index + 1, item)) == ()\n```" + ], + "signature": "let forEachi: (t<'a>, ('a, int) => unit) => unit" + }, + { + "id": "Js.Array2.map", + "kind": "value", + "name": "map", + "docstrings": [ + "Applies the function (the second argument) to each item in the array, returning\na new array. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```rescript\nJs.Array2.map([12, 4, 8], x => x * x) == [144, 16, 64]\nJs.Array2.map([\"animal\", \"vegetable\", \"mineral\"], Js.String.length) == [6, 9, 7]\n```" + ], + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Js.Array2.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [ + "Applies the function (the second argument) to each item in the array, returning\na new array. The function acceps two arguments: an item from the array and its\nindex number. The result array does not have to have elements of the same type\nas the input array. See\n[`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\non MDN.\n\n```rescript\n// multiply each item in array by its position\nlet product = (item, index) => item * index\nJs.Array2.mapi([10, 11, 12], product) == [0, 11, 24]\n```" + ], + "signature": "let mapi: (t<'a>, ('a, int) => 'b) => t<'b>" + }, + { + "id": "Js.Array2.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "The `reduce()` function takes three parameters: an array, a *reducer function*,\nand a beginning accumulator value. The reducer function has two parameters: an\naccumulated value and an element of the array.\n\n`reduce()` first calls the reducer function with the beginning value and the\nfirst element in the array. The result becomes the new accumulator value, which\nis passed in to the reducer function along with the second element in the\narray. `reduce()` proceeds through the array, passing in the result of each\nstage as the accumulator to the reducer function.\n\nWhen all array elements are processed, the final value of the accumulator\nbecomes the return value of `reduce()`. See\n[`Array.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\non MDN.\n\n```rescript\nlet sumOfSquares = (accumulator, item) => accumulator + item * item\n\nJs.Array2.reduce([10, 2, 4], sumOfSquares, 0) == 120\nJs.Array2.reduce([10, 2, 4], \"*\", 1) == 80\nJs.Array2.reduce(\n [\"animal\", \"vegetable\", \"mineral\"],\n (acc, item) => acc + Js.String.length(item),\n 0,\n) == 22 // 6 + 9 + 7\nJs.Array2.reduce([2.0, 4.0], (acc, item) => item /. acc, 1.0) == 2.0 // 4.0 / (2.0 / 1.0)\n```" + ], + "signature": "let reduce: (t<'a>, ('b, 'a) => 'b, 'b) => 'b" + }, + { + "id": "Js.Array2.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [ + "The `reducei()` function takes three parameters: an array, a *reducer\nfunction*, and a beginning accumulator value. The reducer function has three\nparameters: an accumulated value, an element of the array, and the index of\nthat element.\n\n`reducei()` first calls the reducer function with the beginning value, the\nfirst element in the array, and zero (its index). The result becomes the new\naccumulator value, which is passed to the reducer function along with the\nsecond element in the array and one (its index). `reducei()` proceeds from left\nto right through the array, passing in the result of each stage as the\naccumulator to the reducer function.\n\nWhen all array elements are processed, the final value of the accumulator\nbecomes the return value of `reducei()`. See\n[`Array.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\non MDN.\n\n```rescript\n// find sum of even-index elements in array\nlet sumOfEvens = (accumulator, item, index) =>\n if mod(index, 2) == 0 {\n accumulator + item\n } else {\n accumulator\n }\n\nJs.Array2.reducei([2, 5, 1, 4, 3], sumOfEvens, 0) == 6\n```" + ], + "signature": "let reducei: (t<'a>, ('b, 'a, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.Array2.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [ + "The `reduceRight()` function takes three parameters: an array, a *reducer\nfunction*, and a beginning accumulator value. The reducer function has two\nparameters: an accumulated value and an element of the array.\n\n`reduceRight()` first calls the reducer function with the beginning value and\nthe last element in the array. The result becomes the new accumulator value,\nwhich is passed in to the reducer function along with the next-to-last element\nin the array. `reduceRight()` proceeds from right to left through the array,\npassing in the result of each stage as the accumulator to the reducer function.\n\nWhen all array elements are processed, the final value of the accumulator\nbecomes the return value of `reduceRight()`. See\n[`Array.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight)\non MDN.\n\n**NOTE:** In many cases, `reduce()` and `reduceRight()` give the same result.\nHowever, see the last example here and compare it to the example from\n`reduce()`, where order makes a difference.\n\n```rescript\nlet sumOfSquares = (accumulator, item) => accumulator + item * item\n\nJs.Array2.reduceRight([10, 2, 4], sumOfSquares, 0) == 120\nJs.Array2.reduceRight([2.0, 4.0], (acc, item) => item /. acc, 1.0) == 0.5 // 2.0 / (4.0 / 1.0)\n```" + ], + "signature": "let reduceRight: (t<'a>, ('b, 'a) => 'b, 'b) => 'b" + }, + { + "id": "Js.Array2.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [ + "The `reduceRighti()` function takes three parameters: an array, a *reducer\nfunction*, and a beginning accumulator value. The reducer function has three\nparameters: an accumulated value, an element of the array, and the index of\nthat element. `reduceRighti()` first calls the reducer function with the\nbeginning value, the last element in the array, and its index (length of array\nminus one). The result becomes the new accumulator value, which is passed in to\nthe reducer function along with the second element in the array and one (its\nindex). `reduceRighti()` proceeds from right to left through the array, passing\nin the result of each stage as the accumulator to the reducer function.\n\nWhen all array elements are processed, the final value of the accumulator\nbecomes the return value of `reduceRighti()`. See\n[`Array.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight)\non MDN.\n\n**NOTE:** In many cases, `reducei()` and `reduceRighti()` give the same result.\nHowever, there are cases where the order in which items are processed makes a\ndifference.\n\n```rescript\n// find sum of even-index elements in array\nlet sumOfEvens = (accumulator, item, index) =>\n if mod(index, 2) == 0 {\n accumulator + item\n } else {\n accumulator\n }\n\nJs.Array2.reduceRighti([2, 5, 1, 4, 3], sumOfEvens, 0) == 6\n```" + ], + "signature": "let reduceRighti: (t<'a>, ('b, 'a, int) => 'b, 'b) => 'b" + }, + { + "id": "Js.Array2.some", + "kind": "value", + "name": "some", + "docstrings": [ + "Returns `true` if the predicate function given as the second argument to\n`some()` returns `true` for any element in the array; `false` otherwise.\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nJs.Array2.some([3, 7, 5, 2, 9], isEven) == true\nJs.Array2.some([3, 7, 5, 1, 9], isEven) == false\n```" + ], + "signature": "let some: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Js.Array2.somei", + "kind": "value", + "name": "somei", + "docstrings": [ + "Returns `true` if the predicate function given as the second argument to\n`somei()` returns `true` for any element in the array; `false` otherwise. The\npredicate function has two arguments: an item from the array and the index\nvalue\n\n```rescript\n// Does any string in the array\n// have the same length as its index?\n\nlet sameLength = (str, index) => Js.String.length(str) == index\n\n// \"ef\" has length 2 and is it at index 2\nJs.Array2.somei([\"ab\", \"cd\", \"ef\", \"gh\"], sameLength) == true\n// no item has the same length as its index\nJs.Array2.somei([\"a\", \"bc\", \"def\", \"gh\"], sameLength) == false\n```" + ], + "signature": "let somei: (t<'a>, ('a, int) => bool) => bool" + }, + { + "id": "Js.Array2.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [ + "Returns the value at the given position in the array if the position is in\nbounds; returns the JavaScript value `undefined` otherwise.\n\n```rescript\nlet arr = [100, 101, 102, 103]\nJs.Array2.unsafe_get(arr, 3) == 103\nJs.Array2.unsafe_get(arr, 4) // returns undefined\n```" + ], + "signature": "let unsafe_get: (array<'a>, int) => 'a" + }, + { + "id": "Js.Array2.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [ + "Sets the value at the given position in the array if the position is in bounds.\nIf the index is out of bounds, well, “here there be dragons.“\n\n*This function modifies the original array.*\n\n```rescript\nlet arr = [100, 101, 102, 103]\nJs.Array2.unsafe_set(arr, 3, 99)\n// result is [100, 101, 102, 99];\n\nJs.Array2.unsafe_set(arr, 4, 88)\n// result is [100, 101, 102, 99, 88]\n\nJs.Array2.unsafe_set(arr, 6, 77)\n// result is [100, 101, 102, 99, 88, <1 empty item>, 77]\n\nJs.Array2.unsafe_set(arr, -1, 66)\n// you don't want to know.\n```" + ], + "signature": "let unsafe_set: (array<'a>, int, 'a) => unit" + } + ] + }, + "js/array": { + "id": "Js.Array", + "name": "Array", + "docstrings": [ + "Provide bindings to JS array" + ], + "items": [ + { + "id": "Js.Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type used to describe a JavaScript array." + ], + "signature": "type t<'a> = array<'a>" + }, + { + "id": "Js.Array.array_like", + "kind": "type", + "name": "array_like", + "docstrings": [ + "A type used to describe JavaScript objects that are like an array or are iterable." + ], + "signature": "type array_like<'a> = Js_array2.array_like<'a>" + }, + { + "id": "Js.Array.from", + "kind": "value", + "name": "from", + "docstrings": [ + "Creates a shallow copy of an array from an array-like object. See [`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) on MDN.\n\n ```rescript\n let strArr = Js.String.castToArrayLike(\"abcd\")\n Js.Array.from(strArr) == [\"a\", \"b\", \"c\", \"d\"]\n ```" + ], + "signature": "let from: array_like<'a> => array<'a>" + }, + { + "id": "Js.Array.fromMap", + "kind": "value", + "name": "fromMap", + "docstrings": [ + "Creates a new array by applying a function (the second argument) to each item\n in the `array_like` first argument. See\n [`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)\n on MDN.\n\n ```rescript\n let strArr = Js.String.castToArrayLike(\"abcd\")\n let code = s => Js.String.charCodeAt(0, s)\n Js.Array.fromMap(strArr, code) == [97.0, 98.0, 99.0, 100.0]\n ```" + ], + "signature": "let fromMap: (array_like<'a>, 'a => 'b) => array<'b>" + }, + { + "id": "Js.Array.isArray", + "kind": "value", + "name": "isArray", + "docstrings": [], + "signature": "let isArray: 'a => bool" + }, + { + "id": "Js.Array.length", + "kind": "value", + "name": "length", + "docstrings": [ + "Returns the number of elements in the array. See [`Array.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length) on MDN." + ], + "signature": "let length: array<'a> => int" + }, + { + "id": "Js.Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (~to_: int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "docstrings": [], + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "docstrings": [], + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "docstrings": [], + "signature": "let fillInPlace: ('a, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "docstrings": [], + "signature": "let fillFromInPlace: ('a, ~from: int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "docstrings": [], + "signature": "let fillRangeInPlace: ('a, ~start: int, ~end_: int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.pop", + "kind": "value", + "name": "pop", + "docstrings": [ + "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.\n\n ```rescript\n let arr = [100, 101, 102, 103, 104]\n Js.Array.pop(arr) == Some(104)\n arr == [100, 101, 102, 103]\n\n let empty: array = []\n Js.Array.pop(empty) == None\n ```" + ], + "signature": "let pop: t<'a> => option<'a>" + }, + { + "id": "Js.Array.push", + "kind": "value", + "name": "push", + "docstrings": [], + "signature": "let push: ('a, t<'a>) => int" + }, + { + "id": "Js.Array.pushMany", + "kind": "value", + "name": "pushMany", + "docstrings": [], + "signature": "let pushMany: (array<'a>, t<'a>) => int" + }, + { + "id": "Js.Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "docstrings": [ + "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.\n\n ```rescript\n let arr = [\"ant\", \"bee\", \"cat\"]\n Js.Array.reverseInPlace(arr) == [\"cat\", \"bee\", \"ant\"]\n arr == [\"cat\", \"bee\", \"ant\"]\n ```" + ], + "signature": "let reverseInPlace: t<'a> => t<'a>" + }, + { + "id": "Js.Array.shift", + "kind": "value", + "name": "shift", + "docstrings": [ + "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.\n\n ```rescript\n let arr = [100, 101, 102, 103, 104]\n Js.Array.shift(arr) == Some(100)\n arr == [101, 102, 103, 104]\n\n let empty: array = []\n Js.Array.shift(empty) == None\n ```" + ], + "signature": "let shift: t<'a> => option<'a>" + }, + { + "id": "Js.Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "docstrings": [ + "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.\n\n ```rescript\n let words = [\"bee\", \"dog\", \"ant\", \"cat\"]\n Js.Array.sortInPlace(words) == [\"ant\", \"bee\", \"cat\", \"dog\"]\n words == [\"ant\", \"bee\", \"cat\", \"dog\"]\n\n let numbers = [3, 30, 10, 1, 20, 2]\n Js.Array.sortInPlace(numbers) == [1, 10, 2, 20, 3, 30]\n numbers == [1, 10, 2, 20, 3, 30]\n ```" + ], + "signature": "let sortInPlace: t<'a> => t<'a>" + }, + { + "id": "Js.Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "docstrings": [], + "signature": "let sortInPlaceWith: (('a, 'a) => int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.spliceInPlace", + "kind": "value", + "name": "spliceInPlace", + "docstrings": [], + "signature": "let spliceInPlace: (~pos: int, ~remove: int, ~add: array<'a>, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.removeFromInPlace", + "kind": "value", + "name": "removeFromInPlace", + "docstrings": [], + "signature": "let removeFromInPlace: (~pos: int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.removeCountInPlace", + "kind": "value", + "name": "removeCountInPlace", + "docstrings": [], + "signature": "let removeCountInPlace: (~pos: int, ~count: int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.unshift", + "kind": "value", + "name": "unshift", + "docstrings": [], + "signature": "let unshift: ('a, t<'a>) => int" + }, + { + "id": "Js.Array.unshiftMany", + "kind": "value", + "name": "unshiftMany", + "docstrings": [], + "signature": "let unshiftMany: (array<'a>, t<'a>) => int" + }, + { + "id": "Js.Array.concat", + "kind": "value", + "name": "concat", + "docstrings": [], + "signature": "let concat: (t<'a>, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.concatMany", + "kind": "value", + "name": "concatMany", + "docstrings": [], + "signature": "let concatMany: (array>, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: ('a, t<'a>) => bool" + }, + { + "id": "Js.Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: ('a, t<'a>) => int" + }, + { + "id": "Js.Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: ('a, ~from: int, t<'a>) => int" + }, + { + "id": "Js.Array.join", + "kind": "value", + "name": "join", + "docstrings": [ + "@deprecated: Use `joinWith` instead." + ], + "signature": "let join: t<'a> => string" + }, + { + "id": "Js.Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (string, t<'a>) => string" + }, + { + "id": "Js.Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: ('a, t<'a>) => int" + }, + { + "id": "Js.Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: ('a, ~from: int, t<'a>) => int" + }, + { + "id": "Js.Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (~start: int, ~end_: int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "Returns a copy of the entire array. Same as `Js.Array.Slice(~start=0,\n ~end_=Js.Array.length(arr), arr)`. See\n [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)\n on MDN." + ], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Js.Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "docstrings": [], + "signature": "let sliceFrom: (int, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Converts the array to a string. Each element is converted to a string using\n JavaScript. Unlike the JavaScript `Array.toString()`, all elements in a\n ReasonML array must have the same type. See\n [`Array.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString)\n on MDN.\n\n ```rescript\n Js.Array.toString([3.5, 4.6, 7.8]) == \"3.5,4.6,7.8\"\n Js.Array.toString([\"a\", \"b\", \"c\"]) == \"a,b,c\"\n ```" + ], + "signature": "let toString: t<'a> => string" + }, + { + "id": "Js.Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [ + "Converts the array to a string using the conventions of the current locale.\n Each element is converted to a string using JavaScript. Unlike the JavaScript\n `Array.toLocaleString()`, all elements in a ReasonML array must have the same\ntype. See\n[`Array.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString)\non MDN.\n\n ```rescript\n Js.Array.toLocaleString([Js.Date.make()])\n // returns \"3/19/2020, 10:52:11 AM\" for locale en_US.utf8\n // returns \"2020-3-19 10:52:11\" for locale de_DE.utf8\n ```" + ], + "signature": "let toLocaleString: t<'a> => string" + }, + { + "id": "Js.Array.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: ('a => bool, t<'a>) => bool" + }, + { + "id": "Js.Array.everyi", + "kind": "value", + "name": "everyi", + "docstrings": [], + "signature": "let everyi: (('a, int) => bool, t<'a>) => bool" + }, + { + "id": "Js.Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: ('a => bool, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.filteri", + "kind": "value", + "name": "filteri", + "docstrings": [], + "signature": "let filteri: (('a, int) => bool, t<'a>) => t<'a>" + }, + { + "id": "Js.Array.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: ('a => bool, t<'a>) => option<'a>" + }, + { + "id": "Js.Array.findi", + "kind": "value", + "name": "findi", + "docstrings": [], + "signature": "let findi: (('a, int) => bool, t<'a>) => option<'a>" + }, + { + "id": "Js.Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: ('a => bool, t<'a>) => int" + }, + { + "id": "Js.Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "docstrings": [], + "signature": "let findIndexi: (('a, int) => bool, t<'a>) => int" + }, + { + "id": "Js.Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: ('a => unit, t<'a>) => unit" + }, + { + "id": "Js.Array.forEachi", + "kind": "value", + "name": "forEachi", + "docstrings": [], + "signature": "let forEachi: (('a, int) => unit, t<'a>) => unit" + }, + { + "id": "Js.Array.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: ('a => 'b, t<'a>) => t<'b>" + }, + { + "id": "Js.Array.mapi", + "kind": "value", + "name": "mapi", + "docstrings": [], + "signature": "let mapi: (('a, int) => 'b, t<'a>) => t<'b>" + }, + { + "id": "Js.Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (('a, 'b) => 'a, 'a, t<'b>) => 'a" + }, + { + "id": "Js.Array.reducei", + "kind": "value", + "name": "reducei", + "docstrings": [], + "signature": "let reducei: (('a, 'b, int) => 'a, 'a, t<'b>) => 'a" + }, + { + "id": "Js.Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (('a, 'b) => 'a, 'a, t<'b>) => 'a" + }, + { + "id": "Js.Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "docstrings": [], + "signature": "let reduceRighti: (('a, 'b, int) => 'a, 'a, t<'b>) => 'a" + }, + { + "id": "Js.Array.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: ('a => bool, t<'a>) => bool" + }, + { + "id": "Js.Array.somei", + "kind": "value", + "name": "somei", + "docstrings": [], + "signature": "let somei: (('a, int) => bool, t<'a>) => bool" + }, + { + "id": "Js.Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "docstrings": [ + "Returns the value at the given position in the array if the position is in\nbounds; returns the JavaScript value `undefined` otherwise.\n\n```rescript\nlet arr = [100, 101, 102, 103]\nJs.Array.unsafe_get(arr, 3) == 103\nJs.Array.unsafe_get(arr, 4) // returns undefined\n```" + ], + "signature": "let unsafe_get: (array<'a>, int) => 'a" + }, + { + "id": "Js.Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "docstrings": [ + "Sets the value at the given position in the array if the position is in bounds.\nIf the index is out of bounds, well, “here there be dragons.“ *This function\n modifies the original array.*\n\n```rescript\nlet arr = [100, 101, 102, 103]\nJs.Array.unsafe_set(arr, 3, 99)\n// result is [100, 101, 102, 99]\n\nJs.Array.unsafe_set(arr, 4, 88)\n// result is [100, 101, 102, 99, 88]\n\nJs.Array.unsafe_set(arr, 6, 77)\n// result is [100, 101, 102, 99, 88, <1 empty item>, 77]\n\nJs.Array.unsafe_set(arr, -1, 66)\n// you don't want to know.\n```" + ], + "signature": "let unsafe_set: (array<'a>, int, 'a) => unit" + } + ] + }, + "js/exn": { + "id": "Js.Exn", + "name": "Exn", + "docstrings": [ + "Provide utilities for dealing with Js exceptions" + ], + "items": [ + { + "id": "Js.Exn.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Represents a JS exception" + ], + "signature": "type t" + }, + { + "id": "Js.Exn.asJsExn", + "kind": "value", + "name": "asJsExn", + "docstrings": [], + "signature": "let asJsExn: exn => option" + }, + { + "id": "Js.Exn.stack", + "kind": "value", + "name": "stack", + "docstrings": [], + "signature": "let stack: t => option" + }, + { + "id": "Js.Exn.message", + "kind": "value", + "name": "message", + "docstrings": [], + "signature": "let message: t => option" + }, + { + "id": "Js.Exn.name", + "kind": "value", + "name": "name", + "docstrings": [], + "signature": "let name: t => option" + }, + { + "id": "Js.Exn.fileName", + "kind": "value", + "name": "fileName", + "docstrings": [], + "signature": "let fileName: t => option" + }, + { + "id": "Js.Exn.isCamlExceptionOrOpenVariant", + "kind": "value", + "name": "isCamlExceptionOrOpenVariant", + "docstrings": [ + "internal use only" + ], + "signature": "let isCamlExceptionOrOpenVariant: 'a => bool" + }, + { + "id": "Js.Exn.anyToExnInternal", + "kind": "value", + "name": "anyToExnInternal", + "docstrings": [ + "`anyToExnInternal obj` will take any value `obj` and wrap it\n in a Js.Exn.Error if given value is not an exn already. If\n `obj` is an exn, it will return `obj` without any changes.\n\n This function is mostly useful for cases where you want to unify a type of a value\n that potentially is either exn, a JS error, or any other JS value really (e.g. for\n a value passed to a Promise.catch callback)\n\n **IMPORTANT**: This is an internal API and may be changed / removed any time in the future.\n\n ```rescript\n switch (Js.Exn.unsafeAnyToExn(\"test\")) {\n | Js.Exn.Error(v) =>\n switch(Js.Exn.message(v)) {\n | Some(str) => Js.log(\"We won't end up here\")\n | None => Js.log2(\"We will land here: \", v)\n }\n }\n ```" + ], + "signature": "let anyToExnInternal: 'a => exn" + }, + { + "id": "Js.Exn.raiseError", + "kind": "value", + "name": "raiseError", + "docstrings": [ + "Raise Js exception Error object with stacktrace" + ], + "signature": "let raiseError: string => 'a" + }, + { + "id": "Js.Exn.raiseEvalError", + "kind": "value", + "name": "raiseEvalError", + "docstrings": [], + "signature": "let raiseEvalError: string => 'a" + }, + { + "id": "Js.Exn.raiseRangeError", + "kind": "value", + "name": "raiseRangeError", + "docstrings": [], + "signature": "let raiseRangeError: string => 'a" + }, + { + "id": "Js.Exn.raiseReferenceError", + "kind": "value", + "name": "raiseReferenceError", + "docstrings": [], + "signature": "let raiseReferenceError: string => 'a" + }, + { + "id": "Js.Exn.raiseSyntaxError", + "kind": "value", + "name": "raiseSyntaxError", + "docstrings": [], + "signature": "let raiseSyntaxError: string => 'a" + }, + { + "id": "Js.Exn.raiseTypeError", + "kind": "value", + "name": "raiseTypeError", + "docstrings": [], + "signature": "let raiseTypeError: string => 'a" + }, + { + "id": "Js.Exn.raiseUriError", + "kind": "value", + "name": "raiseUriError", + "docstrings": [], + "signature": "let raiseUriError: string => 'a" + } + ] + }, + "js/null_undefined": { + "id": "Js.Null_undefined", + "name": "Null_undefined", + "docstrings": [ + "@deprecated please use `Js.Nullable`" + ], + "items": [ + { + "id": "Js.Null_undefined.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Local alias for `Js.null_undefined('a)`." + ], + "signature": "type t<'a> = Js.nullable<'a> = Value('a) | Null | Undefined" + }, + { + "id": "Js.Null_undefined.return", + "kind": "value", + "name": "return", + "docstrings": [ + "Constructs a value of `Js.null_undefined('a)` containing a value of `'a`." + ], + "signature": "let return: 'a => t<'a>" + }, + { + "id": "Js.Null_undefined.isNullable", + "kind": "value", + "name": "isNullable", + "docstrings": [ + "Returns `true` if the given value is null or undefined, `false` otherwise." + ], + "signature": "let isNullable: t<'a> => bool" + }, + { + "id": "Js.Null_undefined.null", + "kind": "value", + "name": "null", + "docstrings": [ + "The null value of type `Js.null_undefined('a)`." + ], + "signature": "let null: t<'a>" + }, + { + "id": "Js.Null_undefined.undefined", + "kind": "value", + "name": "undefined", + "docstrings": [ + "The undefined value of type `Js.null_undefined('a)`." + ], + "signature": "let undefined: t<'a>" + }, + { + "id": "Js.Null_undefined.bind", + "kind": "value", + "name": "bind", + "docstrings": [ + "Maps the contained value using the given function.\n\nIf `Js.null_undefined('a)` contains a value, that value is unwrapped, mapped to\na `'b` using the given function `a' => 'b`, then wrapped back up and returned\nas `Js.null_undefined('b)`.\n\n```rescript\nlet maybeGreetWorld = (maybeGreeting: Js.null_undefined) =>\n Js.Null_undefined.bind(maybeGreeting, (. greeting) => greeting ++ \" world!\")\n```" + ], + "signature": "let bind: (t<'a>, (. 'a) => 'b) => t<'b>" + }, + { + "id": "Js.Null_undefined.iter", + "kind": "value", + "name": "iter", + "docstrings": [ + "Iterates over the contained value with the given function.\nIf `Js.null_undefined('a)` contains a value, that value is unwrapped and applied to the given function.\n\n```rescript\nlet maybeSay = (maybeMessage: Js.null_undefined) =>\n Js.Null_undefined.iter(maybeMessage, (. message) => Js.log(message))\n```" + ], + "signature": "let iter: (t<'a>, (. 'a) => unit) => unit" + }, + { + "id": "Js.Null_undefined.fromOption", + "kind": "value", + "name": "fromOption", + "docstrings": [ + "Maps `option('a)` to `Js.null_undefined('a)`.\n`Some(a)` => `a`\n`None` => `undefined`" + ], + "signature": "let fromOption: option<'a> => t<'a>" + }, + { + "id": "Js.Null_undefined.from_opt", + "kind": "value", + "name": "from_opt", + "docstrings": [], + "signature": "let from_opt: option<'a> => t<'a>" + }, + { + "id": "Js.Null_undefined.toOption", + "kind": "value", + "name": "toOption", + "docstrings": [ + "Maps `Js.null_undefined('a)` to `option('a)`.\n`a` => `Some(a)`\n`undefined` => `None`\n`null` => `None`" + ], + "signature": "let toOption: t<'a> => option<'a>" + }, + { + "id": "Js.Null_undefined.to_opt", + "kind": "value", + "name": "to_opt", + "docstrings": [], + "signature": "let to_opt: t<'a> => option<'a>" + } + ] + }, + "js/nullable": { + "id": "Js.Nullable", + "name": "Nullable", + "docstrings": [ + "Provide utilities for `Js.null_undefined`" + ], + "items": [ + { + "id": "Js.Nullable.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Local alias for `Js.null_undefined('a)`." + ], + "signature": "type t<'a> = Js.nullable<'a> = Value('a) | Null | Undefined" + }, + { + "id": "Js.Nullable.return", + "kind": "value", + "name": "return", + "docstrings": [ + "Constructs a value of `Js.null_undefined('a)` containing a value of `'a`." + ], + "signature": "let return: 'a => t<'a>" + }, + { + "id": "Js.Nullable.isNullable", + "kind": "value", + "name": "isNullable", + "docstrings": [ + "Returns `true` if the given value is null or undefined, `false` otherwise." + ], + "signature": "let isNullable: t<'a> => bool" + }, + { + "id": "Js.Nullable.null", + "kind": "value", + "name": "null", + "docstrings": [ + "The null value of type `Js.null_undefined('a)`." + ], + "signature": "let null: t<'a>" + }, + { + "id": "Js.Nullable.undefined", + "kind": "value", + "name": "undefined", + "docstrings": [ + "The undefined value of type `Js.null_undefined('a)`." + ], + "signature": "let undefined: t<'a>" + }, + { + "id": "Js.Nullable.bind", + "kind": "value", + "name": "bind", + "docstrings": [ + "Maps the contained value using the given function.\n\nIf `Js.null_undefined('a)` contains a value, that value is unwrapped, mapped to\na `'b` using the given function `a' => 'b`, then wrapped back up and returned\nas `Js.null_undefined('b)`.\n\n```rescript\nlet maybeGreetWorld = (maybeGreeting: Js.null_undefined) =>\n Js.Null_undefined.bind(maybeGreeting, (. greeting) => greeting ++ \" world!\")\n```" + ], + "signature": "let bind: (t<'a>, (. 'a) => 'b) => t<'b>" + }, + { + "id": "Js.Nullable.iter", + "kind": "value", + "name": "iter", + "docstrings": [ + "Iterates over the contained value with the given function.\nIf `Js.null_undefined('a)` contains a value, that value is unwrapped and applied to the given function.\n\n```rescript\nlet maybeSay = (maybeMessage: Js.null_undefined) =>\n Js.Null_undefined.iter(maybeMessage, (. message) => Js.log(message))\n```" + ], + "signature": "let iter: (t<'a>, (. 'a) => unit) => unit" + }, + { + "id": "Js.Nullable.fromOption", + "kind": "value", + "name": "fromOption", + "docstrings": [ + "Maps `option('a)` to `Js.null_undefined('a)`.\n`Some(a)` => `a`\n`None` => `undefined`" + ], + "signature": "let fromOption: option<'a> => t<'a>" + }, + { + "id": "Js.Nullable.from_opt", + "kind": "value", + "name": "from_opt", + "docstrings": [], + "signature": "let from_opt: option<'a> => t<'a>" + }, + { + "id": "Js.Nullable.toOption", + "kind": "value", + "name": "toOption", + "docstrings": [ + "Maps `Js.null_undefined('a)` to `option('a)`.\n`a` => `Some(a)`\n`undefined` => `None`\n`null` => `None`" + ], + "signature": "let toOption: t<'a> => option<'a>" + }, + { + "id": "Js.Nullable.to_opt", + "kind": "value", + "name": "to_opt", + "docstrings": [], + "signature": "let to_opt: t<'a> => option<'a>" + } + ] + }, + "js/undefined": { + "id": "Js.Undefined", + "name": "Undefined", + "docstrings": [ + "Provide utilities for `Js.undefined<'a>`" + ], + "items": [ + { + "id": "Js.Undefined.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Local alias for `Js.undefined('a)`" + ], + "signature": "type t<'a> = Js.undefined<'a>" + }, + { + "id": "Js.Undefined.return", + "kind": "value", + "name": "return", + "docstrings": [ + "Constructs a value of `Js.undefined('a)` containing a value of `'a`." + ], + "signature": "let return: 'a => t<'a>" + }, + { + "id": "Js.Undefined.test", + "kind": "value", + "name": "test", + "docstrings": [ + "Returns `true` if the given value is empty (undefined), `false` otherwise." + ], + "signature": "let test: t<'a> => bool" + }, + { + "id": "Js.Undefined.testAny", + "kind": "value", + "name": "testAny", + "docstrings": [ + "Returns `true` if the given value is empty (undefined).\n\n**since 1.6.1**" + ], + "signature": "let testAny: 'a => bool" + }, + { + "id": "Js.Undefined.empty", + "kind": "value", + "name": "empty", + "docstrings": [ + "The empty value, `undefined`" + ], + "signature": "let empty: t<'a>" + }, + { + "id": "Js.Undefined.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [], + "signature": "let getUnsafe: t<'a> => 'a" + }, + { + "id": "Js.Undefined.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: t<'a> => 'a" + }, + { + "id": "Js.Undefined.bind", + "kind": "value", + "name": "bind", + "docstrings": [ + "Maps the contained value using the given function.\nIf `Js.undefined('a)` contains a value, that value is unwrapped, mapped to a\n`'b` using the given function `a' => 'b`, then wrapped back up and returned as\n`Js.undefined('b)`.\n\n```rescript\nlet maybeGreetWorld = (maybeGreeting: Js.undefined) =>\n Js.Undefined.bind(maybeGreeting, (. greeting) => greeting ++ \" world!\")\n```" + ], + "signature": "let bind: (t<'a>, (. 'a) => 'b) => t<'b>" + }, + { + "id": "Js.Undefined.iter", + "kind": "value", + "name": "iter", + "docstrings": [ + "Iterates over the contained value with the given function. If\n`Js.undefined('a)` contains a value, that value is unwrapped and applied to the\ngiven function.\n\n```rescript\nlet maybeSay = (maybeMessage: Js.undefined) =>\n Js.Undefined.iter(maybeMessage, (. message) => Js.log(message))\n```" + ], + "signature": "let iter: (t<'a>, (. 'a) => unit) => unit" + }, + { + "id": "Js.Undefined.fromOption", + "kind": "value", + "name": "fromOption", + "docstrings": [ + "Maps `option('a)` to `Js.undefined('a)`.\n`Some(a)` => `a`\n`None` => `empty`" + ], + "signature": "let fromOption: option<'a> => t<'a>" + }, + { + "id": "Js.Undefined.from_opt", + "kind": "value", + "name": "from_opt", + "docstrings": [], + "signature": "let from_opt: option<'a> => t<'a>" + }, + { + "id": "Js.Undefined.toOption", + "kind": "value", + "name": "toOption", + "docstrings": [ + "Maps `Js.undefined('a)` to `option('a)`\n`a` => `Some(a)`\n`empty` => `None`" + ], + "signature": "let toOption: t<'a> => option<'a>" + }, + { + "id": "Js.Undefined.to_opt", + "kind": "value", + "name": "to_opt", + "docstrings": [], + "signature": "let to_opt: t<'a> => option<'a>" + } + ] + }, + "js/null": { + "id": "Js.Null", + "name": "Null", + "docstrings": [ + "Provide utilities for `Js.null<'a>`" + ], + "items": [ + { + "id": "Js.Null.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Local alias for `Js.null('a)`" + ], + "signature": "type t<'a> = Js.null<'a> = Value('a) | Null" + }, + { + "id": "Js.Null.return", + "kind": "value", + "name": "return", + "docstrings": [ + "Constructs a value of `Js.null('a)` containing a value of `'a`." + ], + "signature": "let return: 'a => t<'a>" + }, + { + "id": "Js.Null.test", + "kind": "value", + "name": "test", + "docstrings": [ + "Returns `true` if the given value is empty (`null`), `false` otherwise." + ], + "signature": "let test: t<'a> => bool" + }, + { + "id": "Js.Null.empty", + "kind": "value", + "name": "empty", + "docstrings": [ + "The empty value, `null`" + ], + "signature": "let empty: t<'a>" + }, + { + "id": "Js.Null.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [], + "signature": "let getUnsafe: t<'a> => 'a" + }, + { + "id": "Js.Null.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [], + "signature": "let getExn: t<'a> => 'a" + }, + { + "id": "Js.Null.bind", + "kind": "value", + "name": "bind", + "docstrings": [ + "Maps the contained value using the given function.\n\nIf `Js.null('a)` contains a value, that value is unwrapped, mapped to a `'b`\nusing the given function `'a => 'b`, then wrapped back up and returned as\n`Js.null('b)`.\n\n```rescript\nlet maybeGreetWorld = (maybeGreeting: Js.null) =>\n Js.Null.bind(maybeGreeting, (. greeting) => greeting ++ \" world!\")\n```" + ], + "signature": "let bind: (t<'a>, (. 'a) => 'b) => t<'b>" + }, + { + "id": "Js.Null.iter", + "kind": "value", + "name": "iter", + "docstrings": [ + "Iterates over the contained value with the given function.\nIf `Js.null('a)` contains a value, that value is unwrapped and applied to the given function.\n\n```rescript\nlet maybeSay = (maybeMessage: Js.null) =>\n Js.Null.iter(maybeMessage, (. message) => Js.log(message))\n```" + ], + "signature": "let iter: (t<'a>, (. 'a) => unit) => unit" + }, + { + "id": "Js.Null.fromOption", + "kind": "value", + "name": "fromOption", + "docstrings": [ + "Maps `option('a)` to `Js.null('a)`.\n`Some(a)` => `a`\n`None` => `empty`" + ], + "signature": "let fromOption: option<'a> => t<'a>" + }, + { + "id": "Js.Null.from_opt", + "kind": "value", + "name": "from_opt", + "docstrings": [], + "signature": "let from_opt: option<'a> => t<'a>" + }, + { + "id": "Js.Null.toOption", + "kind": "value", + "name": "toOption", + "docstrings": [ + "Maps `Js.null('a)` to `option('a)`.\n`a` => `Some(a)`\n`empty` => `None`" + ], + "signature": "let toOption: t<'a> => option<'a>" + }, + { + "id": "Js.Null.to_opt", + "kind": "value", + "name": "to_opt", + "docstrings": [], + "signature": "let to_opt: t<'a> => option<'a>" + } + ] + }, + "js/internal": { + "id": "Js.Internal", + "name": "Internal", + "docstrings": [], + "items": [ + { + "id": "Js.Internal.opaqueFullApply", + "kind": "value", + "name": "opaqueFullApply", + "docstrings": [], + "signature": "let opaqueFullApply: 'a => 'a" + }, + { + "id": "Js.Internal.run", + "kind": "value", + "name": "run", + "docstrings": [], + "signature": "let run: ((. unit) => 'a) => 'a" + }, + { + "id": "Js.Internal.opaque", + "kind": "value", + "name": "opaque", + "docstrings": [], + "signature": "let opaque: 'a => 'a" + } + ] + }, + "js/mapperrt": { + "id": "Js.MapperRt", + "name": "MapperRt", + "docstrings": [], + "items": [ + { + "id": "Js.MapperRt.raiseWhenNotFound", + "kind": "value", + "name": "raiseWhenNotFound", + "docstrings": [], + "signature": "let raiseWhenNotFound: 'a => 'a" + }, + { + "id": "Js.MapperRt.fromInt", + "kind": "value", + "name": "fromInt", + "docstrings": [ + "`fromInt len array int`\n return the mapped `enum`" + ], + "signature": "let fromInt: (int, array, int) => option" + }, + { + "id": "Js.MapperRt.fromIntAssert", + "kind": "value", + "name": "fromIntAssert", + "docstrings": [], + "signature": "let fromIntAssert: (int, array, int) => int" + } + ] + } +} \ No newline at end of file diff --git a/package.json b/package.json index 858a91798..2ea6b318c 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "build": "rescript clean -with-deps && rescript && npm run update-index && next build", "test": "node scripts/test-examples.mjs && node scripts/test-hrefs.mjs", "reanalyze": "reanalyze -all-cmt .", - "update-index": "node scripts/extract-indices.mjs && node scripts/extract-tocs.mjs && node scripts/extract-syntax.mjs && node scripts/generate_feed.mjs > public/blog/feed.xml" + "update-index": "node scripts/extract-indices.mjs && node scripts/extract-tocs.mjs && node scripts/extract-syntax.mjs && node scripts/generate_feed.mjs > public/blog/feed.xml && node scripts/build_doc.mjs" }, "devDependencies": { "autoprefixer": "^10.2.6", diff --git a/scripts/build_doc.mjs b/scripts/build_doc.mjs index 8a99e154f..4ed38d6e2 100644 --- a/scripts/build_doc.mjs +++ b/scripts/build_doc.mjs @@ -1,5 +1,6 @@ // Generated by ReScript, PLEASE EDIT WITH CARE +import * as Fs from "fs"; import * as Path from "path"; import * as Docgen from "../src/other/Docgen.mjs"; import * as Js_dict from "rescript/lib/es6/js_dict.js"; @@ -108,8 +109,8 @@ var docs = docsDecoded.map(function (doc) { ]; }); -docs.forEach(function (param) { - Js_dict.fromArray(param[1].map(function (mod) { +var allModules = docs.map(function (param) { + var submodules = Js_dict.fromArray(param[1].map(function (mod) { var items = Belt_Array.keepMap(mod.items, (function (item) { switch (item.TAG | 0) { case /* Value */0 : @@ -183,12 +184,28 @@ docs.forEach(function (param) { ] ]); return [ - mod.id.toLowerCase(), + mod.id.split(".").join("/").toLowerCase(), rest ]; })); + return [ + param[0], + submodules + ]; + }); + +allModules.forEach(function (param) { + Fs.writeFileSync("data/" + param[0].toLowerCase() + ".json", JSON.stringify(param[1], null, 2), "utf8"); }); +var json = allModules.reduce((function (acc, param) { + return Object.keys(param[1]).concat(acc); + }), []).map(function (path) { + return path; + }); + +Fs.writeFileSync("data/api_module_paths.json", JSON.stringify(json), "utf8"); + export { args , argsLen , @@ -198,5 +215,6 @@ export { entryPointLibs , docsDecoded , docs , + allModules , } /* args Not a pure module */ diff --git a/scripts/build_doc.res b/scripts/build_doc.res index cec9ce593..6cbfc6655 100644 --- a/scripts/build_doc.res +++ b/scripts/build_doc.res @@ -47,11 +47,11 @@ let docsDecoded = entryPointLibs->Js.Array2.map(libFile => { ->Node.Buffer.toString ->Js.String2.trim - let writeFile = false - if writeFile { - let name = libFile->Js.String2.split(".")->Js.Array2.unsafe_get(0) - Node.Fs.writeFileAsUtf8Sync(`data/api_${name}.json`, output) - } + // let writeFile = false + // if writeFile { + // let name = libFile->Js.String2.split(".")->Js.Array2.unsafe_get(0) + // Node.Fs.writeFileAsUtf8Sync(`data/api_${name}.json`, output) + // } output->Js.Json.parseExn->Docgen.decodeFromJson }) @@ -93,7 +93,7 @@ let docs = docsDecoded->Js.Array2.map(doc => { // } }) -let () = { +let allModules = { let encodeItem = (docItem: Docgen.item) => { open Js.Json switch docItem { @@ -123,7 +123,7 @@ let () = { } } - docs->Js.Array2.forEach(((topLevelName, modules)) => { + docs->Js.Array2.map(((topLevelName, modules)) => { let submodules = modules ->Js.Array2.map(mod => { @@ -134,70 +134,55 @@ let () = { ("docstrings", mod.docstrings->Js.Json.stringArray), ("items", items), ]) - (mod.id->Js.String2.toLowerCase, rest->Js.Json.object_) + ( + mod.id->Js.String2.split(".")->Js.Array2.joinWith("/")->Js.String2.toLowerCase, + rest->Js.Json.object_, + ) }) ->Js.Dict.fromArray - // let topLevelItems = - // doc.topLevelItems->Belt.Array.keepMap(item => encodeItem(item))->Js.Json.array - - let json = Js.Json.object_(submodules) - - // let json = - // Js.Dict.fromArray([ - // ("name", doc.name->Js.Json.string), - // ("docstrings", doc.docstrings->Js.Json.stringArray), - // ("topLevelItems", topLevelItems), - // ("submodules", submodules->Js.Json.object_), - // ])->Js.Json.object_ - - if !true { - Node.Fs.writeFileAsUtf8Sync( - `index_data/${topLevelName->Js.String2.toLowerCase}.json`, - json->Js.Json.stringifyWithSpace(2), - ) - } + (topLevelName, submodules) }) } -type toctree = {name: string} -// Generate TOC modules let () = { - // let r = docs->Js.Array2.map(((topLevelName, docs)) => { - // let a = docs->Js.Array2.map(mod => { - // mod.id - // }) - // a->Belt.List.fromArray - // }) - - // let rec getModules = (lst: list, moduleNames: list) => - // switch lst { - // | list{Module({id, name, items}) | ModuleAlias({id, name, items}), ...rest} => - // getModules(list{...rest, ...Belt.List.fromArray(items)}, list{{name: name}, ...moduleNames}) - // | list{Type(_) | Value(_), ...rest} => getModules(rest, moduleNames) - // | list{} => moduleNames - // } - - // let a = docsDecoded->Js.Array2.map(doc => getModules(doc.items->Belt.List.fromArray, list{})) - // Js.log(a->Js.Json.stringifyAny) - () + allModules->Js.Array2.forEach(((topLevelName, mod)) => { + let json = Js.Json.object_(mod) + + Node.Fs.writeFileAsUtf8Sync( + `data/${topLevelName->Js.String2.toLowerCase}.json`, + json->Js.Json.stringifyWithSpace(2), + ) + }) } -// Generate the modules_paths.json +// type toctree = {name: string} +// Generate TOC modules // let () = { -// let modulePathsIndexData = docs->Js.Array2.reduce((acc, doc) => { -// let paths = doc.submodules->Js.Array2.map(({id}) => { -// let paths = id->Js.String2.split(".") -// let result = -// paths -// ->Js.Array2.sliceFrom(1) -// ->Js.Array2.map(id => Js.String2.toLowerCase(id)->Js.Json.string) -// result->Js.Json.array +// let r = docs->Js.Array2.map(((topLevelName, docs)) => { +// let a = docs->Js.Array2.map(mod => { +// mod.id // }) -// acc->Js.Dict.set(doc.name->Js.String2.toLowerCase, paths->Js.Json.array) -// acc -// }, Js.Dict.empty()) - -// let json = modulePathsIndexData->Js.Json.object_->Js.Json.stringify -// Node.Fs.writeFileAsUtf8Sync(`index_data/modules_paths.json`, json) +// a->Belt.List.fromArray +// }) + +// let rec getModules = (lst: list, moduleNames: list) => +// switch lst { +// | list{Module({id, name, items}) | ModuleAlias({id, name, items}), ...rest} => +// getModules(list{...rest, ...Belt.List.fromArray(items)}, list{{name: name}, ...moduleNames}) +// | list{Type(_) | Value(_), ...rest} => getModules(rest, moduleNames) +// | list{} => moduleNames +// } + +// let a = docsDecoded->Js.Array2.map(doc => getModules(doc.items->Belt.List.fromArray, list{})) +// Js.log(a->Js.Json.stringifyAny) // } + +// Generate the modules_paths.json +let () = { + let json = allModules->Js.Array2.reduce((acc, (_, mod)) => { + Js.Array2.concat(mod->Js.Dict.keys, acc) + }, [])->Js.Array2.map(path => path->Js.Json.string)->Js.Json.array + + Node.Fs.writeFileAsUtf8Sync(`data/api_module_paths.json`, json->Js.Json.stringify) +} diff --git a/src/ApiDocs.res b/src/ApiDocs.res index 711d9d3f6..499cce4f1 100644 --- a/src/ApiDocs.res +++ b/src/ApiDocs.res @@ -1,12 +1,9 @@ type apiIndex = Js.Dict.t -let apiJs: apiIndex = %raw("require('index_data/js.json')") -let apiBelt: apiIndex = %raw("require('index_data/belt.json')") -let apiDom: apiIndex = %raw("require('index_data/dom.json')") - -let modulePaths: Js.Dict.t>> = %raw("require('index_data/modules_paths.json')") - -// type mod = Belt(Docgen.doc) | DOM(Docgen.doc) | JS(Docgen.doc) +let apiJs: apiIndex = %raw("require('data/js.json')") +let apiBelt: apiIndex = %raw("require('data/belt.json')") +let apiDom: apiIndex = %raw("require('data/dom.json')") +let modulePaths: array = %raw("require('data/api_module_paths.json')") type params = {slug: array} @@ -14,8 +11,6 @@ type props = {doc: Js.Json.t} let default = (props: props) => { let overlayState = React.useState(() => false) - // let router = Next.Router.useRouter() - // let route = router.route let {doc} = props @@ -100,22 +95,8 @@ let default = (props: props) => {
- // sidebar
item - //width of the right content part - // {content.name->React.string} - //

{content.docstrings->Js.Array2.joinWith("\n")->React.string}

- // {content.docstring->Js.Array2.joinWith("\n")->React.string} - // {content.items - // ->Js.Array2.map(item => { - // <> - // {item.name->React.string} - // - // }) - // ->React.array} - // {items->React.array} - // {pcontent.na->Js.Array2.joinWith("/")->React.string}
{switch valuesAndTypes { | Some(elemets) => @@ -144,7 +125,7 @@ let getStaticProps: Next.GetStaticProps.t = async ctx => { let slug = params.slug - let moduleId = slug->Js.Array2.joinWith(".") + let moduleId = slug->Js.Array2.joinWith("/") let topLevelModule = slug->Js.Array2.unsafe_get(0) let apiContent = switch topLevelModule { @@ -163,25 +144,14 @@ let getStaticProps: Next.GetStaticProps.t = async ctx => { {"props": props} } -@send external flat: array> => array<'t> = "flat" - let getStaticPaths: Next.GetStaticPaths.t = async () => { open Next.GetStaticPaths - let paths = - modulePaths - ->Js.Dict.keys - ->Js.Array2.map(name => { - let submodulesPaths = - Js.Dict.unsafeGet(modulePaths, name)->Js.Array2.map(i => Js.Array2.concat([name], i)) - Js.Array2.concat([[name]], submodulesPaths) - }) - ->flat - ->Js.Array2.map(slug => { - params: { - slug: slug, - }, - }) + let paths = modulePaths->Js.Array2.map(slug => { + params: { + slug: slug->Js.String2.split("/"), + }, + }) {paths, fallback: false} } diff --git a/src/common/App.res b/src/common/App.res index 4bd435a23..18ba8fbe7 100644 --- a/src/common/App.res +++ b/src/common/App.res @@ -79,15 +79,15 @@ let make = (props: props): React.element => { | _ => React.null } | Version("next") => content - // switch (Belt.Array.length(pagepath), Belt.Array.get(pagepath, 1)) { - // | (1, _) => content - // | (2, Some("js")) => content - // | (2, Some("belt")) => content - // | (_, Some("js")) => content - // | (_, Some("belt")) => content - // | (_, Some("dom")) => content - // | _ => React.null - // } + // switch (Belt.Array.length(pagepath), Belt.Array.get(pagepath, 1)) { + // | (1, _) => content + // | (2, Some("js")) => content + // | (2, Some("belt")) => content + // | (_, Some("js")) => content + // | (_, Some("belt")) => content + // | (_, Some("dom")) => content + // | _ => React.null + // } | _ => content } | _ =>