From e6837b5e4410287a69a1702315ab3b5981bee925 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Tue, 11 Jun 2024 03:02:02 -0300 Subject: [PATCH 001/124] highlight inline code with link (#881) --- styles/main.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/styles/main.css b/styles/main.css index fe6efc915..fb53b271b 100644 --- a/styles/main.css +++ b/styles/main.css @@ -22,6 +22,9 @@ body { background: transparent; /* Chrome/Safari/Webkit */ } +a > code { + @apply text-fire !important; +} @tailwind utilities; From fd3cd5604b3eae47eb3cdafd3280d4540e09a8c0 Mon Sep 17 00:00:00 2001 From: Florian Verdonck Date: Wed, 12 Jun 2024 15:21:15 +0200 Subject: [PATCH 002/124] Add something about React events (#882) * Remove Belt from array-and-keys.mdx * Add introduction block of rendering arrays. * Initial attempt to add something about events --- bun.lockb | Bin 0 -> 432671 bytes pages/docs/react/latest/arrays-and-keys.mdx | 41 ++++++++++++++------ pages/docs/react/latest/events.mdx | 37 ++++++++++++++++++ 3 files changed, 67 insertions(+), 11 deletions(-) create mode 100755 bun.lockb create mode 100644 pages/docs/react/latest/events.mdx diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..649ecfebddfc4ce4d03acf1189ed1de86c2d20cd GIT binary patch literal 432671 zcmeF41yo$g_Vt^%yApRL?n)Tq?k-3ZNC*%lfhcizcXxN4crtN!clTuC^6ky76MFat zxVQVi*1Wgg)S6~fb?aB>)G4{ux0_6kY=wgY{0qB!`4l$$bj#`*%hm%69#Wk4{K+8arK)rlC&Hi420bV{H-d-I&123aK?Y2Vua(@Qj-1^N3>+PR1ywBzX#K(|cU6KVdRM3~7RMxNK* z0s_ndZYI+nlr!(=8xV*x(>ZjO{T+dFw&&yGBCGsIIUA)zcF*ia0FQ?%1WwObp?dR@%^9nHl|CMj>o;Qh@(0dy@Tg2{fJ zhaxngS<`6a=A`Podv~KbQx)Z>o2PGQFLxJzj{tKwvrk}vzuCpz-OJyv8G=hc)1}kq zi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(geu_CK$O0H%^Xo1Wq<@=CdQ{3SZH>K65Hb6oOf9 zclwWM^rft;&NQOUF7>j>2+Ti>>)EH_t^0z5@Q9VZynC8qGJi~gP$(E@6 Kf&Wkc_x}J21Dw$S literal 0 HcmV?d00001 diff --git a/pages/docs/react/latest/arrays-and-keys.mdx b/pages/docs/react/latest/arrays-and-keys.mdx index 56be3f290..f7b46621e 100644 --- a/pages/docs/react/latest/arrays-and-keys.mdx +++ b/pages/docs/react/latest/arrays-and-keys.mdx @@ -12,15 +12,34 @@ Whenever we are transforming data into an array of elements and put it in our Re -## Keys & Rendering Arrays +## Rendering Arrays + +Arrays require a special function `React.array` to convert an `array` to render as `Jsx.element`. + +```res +type todo = {id: string, text: string} + +@react.component +let make = () => { + let todos = [{id: "todo1", text: "Todo 1"}, {id: "todo2", text: "Todo 2"}] + + let items = Array.map(todos, todo => { +
  • {React.string(todo.text)}
  • + }) + +
      {React.array(items)}
    +} +``` + +## Keys Keys help React identify which elements have been changed, added, or removed throughout each render. Keys should be given to elements inside the array to give the elements a stable identity: ```res let numbers = [1, 2, 3, 4, 5]; -let items = Belt.Array.map(numbers, (number) => { -
  • {React.int(number)}
  • +let items = Array.map(numbers, (number) => { +
  • {React.int(number)}
  • }) ``` @@ -34,7 +53,7 @@ let todos = [ {id: "todo2", text: "Todo 2"} ] -let items = Belt.Array.map(todos, todo => { +let items = Array.map(todos, todo => {
  • {React.string(todo.text)}
  • }) ``` @@ -42,9 +61,9 @@ let items = Belt.Array.map(todos, todo => { If you don’t have stable IDs for rendered items, you may use the item index as a key as a last resort: ```res {1..3} -let items = Belt.Array.mapWithIndex(todos, (i, todo) => { +let items = Array.mapWithIndex(todos, (i, todo) => { // Only do this if items have no stable id -
  • +
  • {todo.text}
  • }); @@ -63,7 +82,7 @@ module Blog = { let sidebar =
      { - Belt.Array.map(posts, (post) => { + Array.map(posts, (post) => {
    • {React.string(post.title)}
    • @@ -71,7 +90,7 @@ module Blog = { }
    - let content = Belt.Array.map(posts, (post) => { + let content = Array.map(posts, (post) => {

    {React.string(post.title)}

    {React.string(post.content)}

    @@ -111,8 +130,8 @@ let make = () => { let items = todoList - ->Belt.List.toArray - ->Belt.Array.map(todo => { + ->List.toArray + ->Array.map(todo => {
  • {React.string(todo.text)}
  • }) @@ -121,7 +140,7 @@ let make = () => { ``` -We use `Belt.List.toArray` to convert our list to an array before creating our `array`. Please note that using `list` has performance impact due to extra conversion costs. +We use `List.toArray` to convert our list to an array before creating our `array`. Please note that using `list` has performance impact due to extra conversion costs. 99% of the time you'll want to use arrays (seamless interop, faster JS code), but in some cases it might make sense to use a `list` to leverage advanced pattern matching features etc. diff --git a/pages/docs/react/latest/events.mdx b/pages/docs/react/latest/events.mdx new file mode 100644 index 000000000..5000cd988 --- /dev/null +++ b/pages/docs/react/latest/events.mdx @@ -0,0 +1,37 @@ +--- +title: Events +description: "Event handlers for React elements" +canonical: "/docs/react/latest/events" +--- + +# Events + +React lets you add event handlers to your JSX. Event handlers are your own functions that will be triggered in response to interactions like clicking, hovering, focusing form inputs, and so on. + +## Capture the input value onChange + +Depending on the event handler, the callback function will have a different type. +Due to the dynamic nature of JavaScript, we cannot anticipate the target type on the event. +So, we need a leap of faith to grab the input value as string. + +```res +module App = { + @react.component + let make = () => { + let (value, setValue) = React.useState(_ => "") + +
    + { + let target = JsxEvent.Form.target(ev) + let value: string = target["value"] + setValue(_prevValue => value) + }} + /> +

    {React.string(value)}

    +
    + } +} +``` From 9f5934856b79c1bef4f22e03e6bc000cb3dda21b Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Wed, 12 Jun 2024 10:21:51 -0300 Subject: [PATCH 003/124] Document built-in exceptions (#880) * Document built-in exceptions * requested changes * add link to result api * fix typos --- pages/docs/manual/latest/exception.mdx | 280 +++++++++++++++++++++++-- 1 file changed, 257 insertions(+), 23 deletions(-) diff --git a/pages/docs/manual/latest/exception.mdx b/pages/docs/manual/latest/exception.mdx index d3e2cea9b..f68c2d1d7 100644 --- a/pages/docs/manual/latest/exception.mdx +++ b/pages/docs/manual/latest/exception.mdx @@ -6,9 +6,36 @@ canonical: "/docs/manual/latest/exception" # Exception -Exceptions are just a special kind of variant, thrown in **exceptional** cases (don't abuse them!). +Exceptions are just a special kind of variant, thrown in **exceptional** cases (don't abuse them!). Consider using the [`option`](null-undefined-option.mdx) or [`result`](api/core/result) type for recoverable errors. -## Usage +You can create your own exceptions like you'd make a variant (exceptions need to be capitalized too). + + + +```res example +exception InputClosed(string) +// later on +raise(InputClosed("The stream has closed!")) +``` +```js +import * as Caml_exceptions from "./stdlib/caml_exceptions.js"; + +var InputClosed = /* @__PURE__ */Caml_exceptions.create("Playground.InputClosed"); + +throw { + RE_EXN_ID: InputClosed, + _1: "The stream has closed!", + Error: new Error() + }; +``` + + + +## Built-in Exceptions + +ReScript has some built-in exceptions: + +### `Not_found` @@ -29,16 +56,16 @@ let result = } ``` ```js -var Caml_js_exceptions = require("./stdlib/caml_js_exceptions.js"); +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; function getItem(item) { if (item === 3) { return 1; } throw { - RE_EXN_ID: "Not_found", - Error: new Error() - }; + RE_EXN_ID: "Not_found", + Error: new Error() + }; } var result; @@ -71,17 +98,15 @@ switch list{1, 2, 3}->List.getExn(4) { } ``` ```js -var List = require("./stdlib/list.js"); -var Caml_js_exceptions = require("./stdlib/caml_js_exceptions.js"); +import * as Core__List from "./stdlib/core__List.js"; +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; var exit = 0; var item; try { - item = List.find((function (i) { - return i === 4; - }), { + item = Core__List.getExn({ hd: 1, tl: { hd: 2, @@ -90,7 +115,7 @@ try { tl: /* [] */0 } } - }); + }, 4); exit = 1; } catch (raw_exn){ @@ -109,25 +134,234 @@ if (exit === 1) { -You can also make your own exceptions like you'd make a variant (exceptions need to be capitalized too). +### `Invalid_argument` + +Used to check if argument is valid. This exception takes a string. + + +```res example +let divide = (a, b) => + if b == 0 { + raise(Invalid_argument("Denominator is zero")) + } else { + a / b + } + +// catch error +try divide(2, 0)->Console.log catch { +| Invalid_argument(msg) => Console.log(msg) // Denominator is zero +} +``` + +```js +import * as Caml_int32 from "./stdlib/caml_int32.js"; +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +function divide(a, b) { + if (b === 0) { + throw { + RE_EXN_ID: "Invalid_argument", + _1: "Denominator is zero", + Error: new Error() + }; + } + return Caml_int32.div(a, b); +} + +try { + console.log(divide(2, 0)); +} +catch (raw_msg){ + var msg = Caml_js_exceptions.internalToOCamlException(raw_msg); + if (msg.RE_EXN_ID === "Invalid_argument") { + console.log(msg._1); + } else { + throw msg; + } +} +``` + + + +### `Assert_failure` + +Raise when you use `assert(condition)` and `condition` is false. The arguments +are the location of the `assert` in the source code (file name, line number, column number). ```res example -exception InputClosed(string) -// later on -raise(InputClosed("The stream has closed!")) +let decodeUser = (json: JSON.t) => + switch json { + | Object(userDict) => + switch (userDict->Dict.get("name"), userDict->Dict.get("age")) { + | (Some(String(name)), Some(Number(age))) => (name, age->Float.toInt) + | _ => assert(false) + } + | _ => assert(false) + } + + +try decodeUser(%raw("{}"))->Console.log catch { +| Assert_failure(loc) => Console.log(loc) // ("filename", line, col) +} ``` + ```js -var Caml_exceptions = require("./stdlib/caml_exceptions.js"); +mport * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +function decodeUser(json) { + if (!Array.isArray(json) && (json === null || typeof json !== "object") && typeof json !== "number" && typeof json !== "string" && typeof json !== "boolean") { + throw { + RE_EXN_ID: "Assert_failure", + _1: [ + "playground.res", + 8, + 9 + ], + Error: new Error() + }; + } + if (typeof json === "object" && !Array.isArray(json)) { + var match = json["name"]; + var match$1 = json["age"]; + if (match !== undefined && !(!Array.isArray(match) && (match === null || typeof match !== "object") && typeof match !== "number" && typeof match !== "string" && typeof match !== "boolean") && typeof match === "string" && match$1 !== undefined && !(!Array.isArray(match$1) && (match$1 === null || typeof match$1 !== "object") && typeof match$1 !== "number" && typeof match$1 !== "string" && typeof match$1 !== "boolean") && typeof match$1 === "number") { + return [ + match, + match$1 | 0 + ]; + } + throw { + RE_EXN_ID: "Assert_failure", + _1: [ + "playground.res", + 6, + 11 + ], + Error: new Error() + }; + } + throw { + RE_EXN_ID: "Assert_failure", + _1: [ + "playground.res", + 8, + 9 + ], + Error: new Error() + }; +} + +try { + console.log(decodeUser({})); +} +catch (raw_loc){ + var loc = Caml_js_exceptions.internalToOCamlException(raw_loc); + if (loc.RE_EXN_ID === "Assert_failure") { + console.log(loc._1); + } else { + throw loc; + } +} +``` + + -var InputClosed = Caml_exceptions.create("MyFile.InputClosed"); +### `Failure` -throw { - RE_EXN_ID: InputClosed, - _1: "The stream has closed!", - Error: new Error() -}; +Exception raised to signal that the given arguments do not make sense. This +exception takes a string as an argument. + + + +```res example +let isValidEmail = email => { + let hasAtSign = String.includes(email, "@") + let hasDot = String.includes(email, ".") + if !(hasAtSign && hasDot) { + raise(Failure("Invalid email address")) + } else { + true + } +} + + +let isValid = try isValidEmail("rescript.org") catch { +| Failure(msg) => { + Console.error(msg) + false + } +} +``` + +```js +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +function isValidEmail(email) { + var hasAtSign = email.includes("@"); + var hasDot = email.includes("."); + if (hasAtSign && hasDot) { + return true; + } + throw { + RE_EXN_ID: "Failure", + _1: "Invalid email address", + Error: new Error() + }; +} + +var isValid; + +try { + isValid = isValidEmail("rescript.org"); +} +catch (raw_msg){ + var msg = Caml_js_exceptions.internalToOCamlException(raw_msg); + if (msg.RE_EXN_ID === "Failure") { + console.error(msg._1); + isValid = false; + } else { + throw msg; + } +} +``` + + + +### `Division_by_zero` + +Exception raised by integer division and remainder operations when their second argument is zero. + + + +```res example +// ReScript raise `Division_by_zero` if the denominator is zero +let result = try Some(10 / 0) catch { +| Division_by_zero => None +} + +Console.log(result) // None +``` + +```js +import * as Caml_int32 from "./stdlib/caml_int32.js"; +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +var result; + +try { + result = Caml_int32.div(10, 0); +} +catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Division_by_zero") { + result = undefined; + } else { + throw exn; + } +} + +console.log(result); ``` From e6ff25c5578f183f4bc7a9f1f3530701626eb3af Mon Sep 17 00:00:00 2001 From: Florian Verdonck Date: Wed, 12 Jun 2024 15:39:28 +0200 Subject: [PATCH 004/124] Add events to menu (#883) --- data/sidebar_react_latest.json | 1 + 1 file changed, 1 insertion(+) diff --git a/data/sidebar_react_latest.json b/data/sidebar_react_latest.json index 73db47d37..3a2d32fda 100644 --- a/data/sidebar_react_latest.json +++ b/data/sidebar_react_latest.json @@ -9,6 +9,7 @@ "rendering-elements", "components-and-props", "arrays-and-keys", + "events", "refs-and-the-dom", "context", "styling", From 2cea486e090fe5c3a9be1b8abc389dad8fcd0f99 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Wed, 12 Jun 2024 17:54:48 +0200 Subject: [PATCH 005/124] Update json.mdx --- pages/docs/manual/latest/json.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/docs/manual/latest/json.mdx b/pages/docs/manual/latest/json.mdx index 6f56d93de..030154601 100644 --- a/pages/docs/manual/latest/json.mdx +++ b/pages/docs/manual/latest/json.mdx @@ -34,7 +34,7 @@ Where `data` can be any type you assume the JSON is. As you can see, this compil ## Stringify -Use `Json.stringify`: +Use `JSON.stringify`: @@ -52,4 +52,4 @@ console.log(JSON.stringify([ ## Advanced -The [Json](api/core/json) module provides slightly safer, low-level building blocks for power users who want to parse JSON on a per-field basis. See the examples in the API docs. +Thanks to untagged variants, JSON can be encoded and decoded idiomatically. Check it out on [the variants page](/variant#decoding-and-encoding-json-idiomatically). From ff31a05fb888bcfc5c7f46bfd4bda5cd78571ec9 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Wed, 12 Jun 2024 18:05:53 +0200 Subject: [PATCH 006/124] Modernize JSON docs some more --- pages/docs/manual/latest/json.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/docs/manual/latest/json.mdx b/pages/docs/manual/latest/json.mdx index 030154601..9b1fe29a9 100644 --- a/pages/docs/manual/latest/json.mdx +++ b/pages/docs/manual/latest/json.mdx @@ -34,12 +34,12 @@ Where `data` can be any type you assume the JSON is. As you can see, this compil ## Stringify -Use `JSON.stringify`: +Use [`JSON.stringify`](api/core/json#value-stringify): ```res example -Console.log(JSON.stringifyAny(["Amy", "Joe"])) +Console.log(JSON.stringify(["Amy", "Joe"])) ``` ```js console.log(JSON.stringify([ @@ -52,4 +52,4 @@ console.log(JSON.stringify([ ## Advanced -Thanks to untagged variants, JSON can be encoded and decoded idiomatically. Check it out on [the variants page](/variant#decoding-and-encoding-json-idiomatically). +Thanks to untagged variants, JSON can be encoded and decoded idiomatically. Check it out on [the variants page](variant#decoding-and-encoding-json-idiomatically). From f5ec8978e5087e29116d02c8eecf0931bcbbb9c0 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Wed, 12 Jun 2024 18:15:21 +0200 Subject: [PATCH 007/124] Document JSON import --- pages/docs/manual/latest/json.mdx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pages/docs/manual/latest/json.mdx b/pages/docs/manual/latest/json.mdx index 9b1fe29a9..3ae0d91f3 100644 --- a/pages/docs/manual/latest/json.mdx +++ b/pages/docs/manual/latest/json.mdx @@ -50,6 +50,33 @@ console.log(JSON.stringify([ +### Import a JSON file + +Use the `@module` attribute to import JSON files directly. + + + +```res example +@module external studentNames: JSON.t = "./students.json" +Console.log(studentNames) +``` +```js +import * as StudentsJson from "./students.json"; + +var studentNames = StudentsJson; + +console.log(studentNames); +``` +```js +var StudentsJson = require("./students.json"); + +var studentNames = StudentsJson; + +console.log(studentNames); +``` + + + ## Advanced Thanks to untagged variants, JSON can be encoded and decoded idiomatically. Check it out on [the variants page](variant#decoding-and-encoding-json-idiomatically). From 5a894fbefe7284289f5321538a3f16ad0aeb6334 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Wed, 12 Jun 2024 18:20:38 +0200 Subject: [PATCH 008/124] Small heading fix --- pages/docs/manual/latest/json.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/docs/manual/latest/json.mdx b/pages/docs/manual/latest/json.mdx index 3ae0d91f3..fecb239c5 100644 --- a/pages/docs/manual/latest/json.mdx +++ b/pages/docs/manual/latest/json.mdx @@ -50,7 +50,7 @@ console.log(JSON.stringify([ -### Import a JSON file +## Import a JSON file Use the `@module` attribute to import JSON files directly. From 6eb48c02df484516b3123d6d5866eb5427fbdea2 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Thu, 13 Jun 2024 05:06:16 -0300 Subject: [PATCH 009/124] Playground: Switch to babel-parser (#877) * Switch to babel parser * remove acorn * improv function printer on js side * handle more than one property --- package-lock.json | 471 +++++++++++++++++++++++++++++++++++- package.json | 4 +- src/RenderPanel.res | 14 +- src/bindings/AcornParse.res | 7 - src/bindings/Babel.res | 85 +++++++ src/common/EvalIFrame.res | 2 +- src/ffi/acorn-parse.js | 62 ----- 7 files changed, 566 insertions(+), 79 deletions(-) delete mode 100644 src/bindings/AcornParse.res create mode 100644 src/bindings/Babel.res delete mode 100644 src/ffi/acorn-parse.js diff --git a/package-lock.json b/package-lock.json index ffaac814c..c6870b164 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,15 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@babel/generator": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/traverse": "^7.24.7", "@docsearch/react": "^3.5.2", "@headlessui/react": "^1.2.0", "@mdx-js/loader": "^2.3.0", "@rescript/core": "^1.4.0", "@rescript/react": "^0.12.0-alpha.3", "@rescript/tools": "^0.5.0", - "acorn": "^8.11.3", "codemirror": "^5.54.0", "docson": "^2.1.0", "escodegen": "^2.1.0", @@ -230,6 +232,182 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/runtime": { "version": "7.22.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", @@ -241,6 +419,81 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/traverse/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@csstools/selector-resolve-nested": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-1.1.0.tgz", @@ -5773,6 +6026,17 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -13070,6 +13334,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "engines": { + "node": ">=4" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -14167,6 +14439,136 @@ "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", "dev": true }, + "@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "requires": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + } + }, + "@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "requires": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "requires": { + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "requires": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "requires": { + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "requires": { + "@babel/types": "^7.24.7" + } + }, + "@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==" + }, + "@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==" + }, + "@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "requires": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==" + }, "@babel/runtime": { "version": "7.22.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", @@ -14175,6 +14577,63 @@ "regenerator-runtime": "^0.13.11" } }, + "@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + } + }, + "@babel/traverse": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "dependencies": { + "debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "requires": { + "ms": "2.1.2" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "requires": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + } + }, "@csstools/selector-resolve-nested": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@csstools/selector-resolve-nested/-/selector-resolve-nested-1.1.0.tgz", @@ -18032,6 +18491,11 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" + }, "json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -22759,6 +23223,11 @@ "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==" }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==" + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/package.json b/package.json index 8257742c4..836ba4a14 100644 --- a/package.json +++ b/package.json @@ -17,13 +17,15 @@ } }, "dependencies": { + "@babel/generator": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/traverse": "^7.24.7", "@docsearch/react": "^3.5.2", "@headlessui/react": "^1.2.0", "@mdx-js/loader": "^2.3.0", "@rescript/core": "^1.4.0", "@rescript/react": "^0.12.0-alpha.3", "@rescript/tools": "^0.5.0", - "acorn": "^8.11.3", "codemirror": "^5.54.0", "docson": "^2.1.0", "escodegen": "^2.1.0", diff --git a/src/RenderPanel.res b/src/RenderPanel.res index c8cea5cf0..afd14106d 100644 --- a/src/RenderPanel.res +++ b/src/RenderPanel.res @@ -12,13 +12,13 @@ let make = (~compilerState: CompilerManagerHook.state, ~clearLogs, ~runOutput) = switch compilerState { | CompilerManagerHook.Ready({result: Comp(Success({js_code}))}) => clearLogs() - let ast = AcornParse.parse(js_code) - let transpiled = AcornParse.removeImportsAndExports(ast) - let isValidReact = AcornParse.hasEntryPoint(ast) - isValidReact - ? transpiled->wrapReactApp->EvalIFrame.sendOutput - : EvalIFrame.sendOutput(transpiled) - setValidReact(_ => isValidReact) + open Babel + + let ast = Parser.parse(js_code, {sourceType: "module"}) + let {entryPointExists, code} = PlaygroundValidator.validate(ast) + + entryPointExists ? code->wrapReactApp->EvalIFrame.sendOutput : EvalIFrame.sendOutput(code) + setValidReact(_ => entryPointExists) | _ => () } } diff --git a/src/bindings/AcornParse.res b/src/bindings/AcornParse.res deleted file mode 100644 index 5871ed420..000000000 --- a/src/bindings/AcornParse.res +++ /dev/null @@ -1,7 +0,0 @@ -type t -@module("../ffi/acorn-parse.js") external parse: string => t = "parse" - -@module("../ffi/acorn-parse.js") external hasEntryPoint: t => bool = "hasEntryPoint" - -@module("../ffi/acorn-parse.js") -external removeImportsAndExports: t => string = "removeImportsAndExports" diff --git a/src/bindings/Babel.res b/src/bindings/Babel.res new file mode 100644 index 000000000..2726555e4 --- /dev/null +++ b/src/bindings/Babel.res @@ -0,0 +1,85 @@ +module Ast = { + type t + + @tag("type") + type lval = Identifier({name: string}) + + @tag("type") + type objectProperties = ObjectProperty({key: lval, value: lval}) + + @tag("type") + type expression = ObjectExpression({properties: array}) + + type variableDeclarator = { + @as("type") type_: string, + id: lval, + init?: Null.t, + } + @tag("type") + type node = VariableDeclaration({kind: string, declarations: array}) + type nodePath = {node: node} +} + +module Parser = { + type options = {sourceType?: string} + @module("@babel/parser") external parse: (string, options) => Ast.t = "parse" +} + +module Traverse = { + @module("@babel/traverse") external traverse: (Ast.t, {..}) => unit = "default" +} + +module Generator = { + @send external remove: Ast.nodePath => unit = "remove" + + type t = {code: string} + @module("@babel/generator") external generator: Ast.t => t = "default" +} + +module PlaygroundValidator = { + type validator = { + entryPointExists: bool, + code: string, + } + + let validate = ast => { + let entryPoint = ref(false) + + let remove = nodePath => Generator.remove(nodePath) + Traverse.traverse( + ast, + { + "ImportDeclaration": remove, + "ExportNamedDeclaration": remove, + "VariableDeclaration": (nodePath: Ast.nodePath) => { + switch nodePath.node { + | VariableDeclaration({declarations}) if Array.length(declarations) > 0 => + let firstDeclaration = Array.getUnsafe(declarations, 0) + + switch (firstDeclaration.id, firstDeclaration.init) { + | (Identifier({name}), Some(init)) if name === "App" => + switch init->Null.toOption { + | Some(ObjectExpression({properties})) => + let foundEntryPoint = properties->Array.find(property => { + switch property { + | ObjectProperty({ + key: Identifier({name: "make"}), + value: Identifier({name: "Playground$App"}), + }) => true + | _ => false + } + }) + entryPoint.contents = Option.isSome(foundEntryPoint) + | _ => () + } + | _ => () + } + | _ => () + } + }, + }, + ) + + {entryPointExists: entryPoint.contents, code: Generator.generator(ast).code} + } +} diff --git a/src/common/EvalIFrame.res b/src/common/EvalIFrame.res index 21acdd280..99e3e5bd4 100644 --- a/src/common/EvalIFrame.res +++ b/src/common/EvalIFrame.res @@ -53,7 +53,7 @@ let srcDoc = ` else if (typeof arg === 'object') { return JSON.stringify(arg, Object.getOwnPropertyNames(arg)); } else if (typeof arg === 'function') { - return '[function]'; + return arg.toString() } return arg; }); diff --git a/src/ffi/acorn-parse.js b/src/ffi/acorn-parse.js deleted file mode 100644 index 638ac211c..000000000 --- a/src/ffi/acorn-parse.js +++ /dev/null @@ -1,62 +0,0 @@ -import * as acorn from "acorn"; -import { walk } from "estree-walker"; -import * as escodegen from "escodegen"; - -export function hasEntryPoint(ast) { - let existsApp = false; - - walk(ast, { - enter(node) { - const isAppVar = node?.type === "VariableDeclaration" && - node?.declarations[0]?.type === "VariableDeclarator" && - node?.declarations[0]?.id.name === "App" && - node?.declarations[0]?.id.type === "Identifier"; - - if (isAppVar) { - const isObject = node?.declarations[0].init.type === "ObjectExpression" - if (isObject) { - const hasMake = [...node?.declarations[0].init.properties].some( - p => p?.type === "Property" && p?.key?.type === "Identifier" && p?.key?.name === "make" - ) - existsApp = hasMake - } - } - } - }) - - return existsApp -} - -export function parse(code) { - return acorn.parse(code, { - ecmaVersion: 9, - sourceType: "module" - }); -} - -export function removeImportsAndExports(ast) { - walk(ast, { - enter(node) { - const isImport = - node?.type === "ImportDeclaration" || - (node?.type === "VariableDeclaration" && - node?.declarations[0]?.init?.type === "CallExpression" && - node?.declarations[0]?.init?.callee?.name === "require"); - const isExport = - node?.type === "ExportDefaultDeclaration" || - node?.type === "ExportNamedDeclaration" || - node?.type === "ExportAllDeclaration" || - (node?.type === "ExpressionStatement" && - node?.expression?.type === "AssignmentExpression" && - node?.expression?.operator === "=" && - (node?.expression?.left?.object?.name === "exports" || - (node?.expression?.left?.object?.name === "module" && - node?.expression?.left?.property?.name === "exports"))); - if (isImport || isExport) { - this.remove(); - } - }, - }); - - return escodegen.generate(ast); -} From b860b4f11fc5df94054916ff4b213481b0c00db2 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Thu, 13 Jun 2024 10:19:24 +0200 Subject: [PATCH 010/124] Fix JSON example --- pages/docs/manual/latest/json.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/docs/manual/latest/json.mdx b/pages/docs/manual/latest/json.mdx index fecb239c5..cc6d5cec0 100644 --- a/pages/docs/manual/latest/json.mdx +++ b/pages/docs/manual/latest/json.mdx @@ -34,12 +34,12 @@ Where `data` can be any type you assume the JSON is. As you can see, this compil ## Stringify -Use [`JSON.stringify`](api/core/json#value-stringify): +Use [`JSON.stringify`](api/core/json#value-stringify) if your data is of type `JSON.t` or [`JSON.stringifyAny`](api/core/json#value-stringifyAny) if it is not. ```res example -Console.log(JSON.stringify(["Amy", "Joe"])) +Console.log(JSON.stringifyAny(["Amy", "Joe"])) ``` ```js console.log(JSON.stringify([ From f0a7e1186db7ed3b90cfb8157339e84a45d731a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:26:00 +0200 Subject: [PATCH 011/124] Bump braces from 3.0.2 to 3.0.3 (#885) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 75 +++++++++-------------------------------------- 1 file changed, 14 insertions(+), 61 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6870b164..6b2b000d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2829,11 +2829,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -3167,25 +3167,6 @@ "node": ">= 0.6" } }, - "node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/content-type": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", @@ -4650,9 +4631,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -12840,18 +12821,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -16227,11 +16196,11 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browserslist": { @@ -16451,13 +16420,6 @@ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "requires": { "safe-buffer": "5.2.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } } }, "content-type": { @@ -17541,9 +17503,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "requires": { "to-regex-range": "^5.0.1" } @@ -22898,15 +22860,6 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } } } }, From 9e95c50ec68e5b64b25664233f67b98839f2aad0 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Fri, 14 Jun 2024 14:36:23 -0300 Subject: [PATCH 012/124] update docs API (#887) Core: 1.5.0 Compiler: 11.0_release branch --- data/api/latest/core.json | 59 ++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/data/api/latest/core.json b/data/api/latest/core.json index 37bb7d056..e4621e6f6 100644 --- a/data/api/latest/core.json +++ b/data/api/latest/core.json @@ -254,7 +254,7 @@ "docstrings": [ "Type representing the result of a `RegExp` execution." ], - "signature": "type t = array" + "signature": "type t = array>" }, { "id": "Core.Re.Result.fullMatch", @@ -1233,7 +1233,7 @@ "kind": "type", "name": "formatMatcher", "docstrings": [], - "signature": "type formatMatcher = [#basic | #bestFit]" + "signature": "type formatMatcher = [#basic | #\"best fit\"]" }, { "id": "Core.Intl.DateTimeFormat.fractionalSecondDigits", @@ -1436,7 +1436,7 @@ "kind": "type", "name": "localeMatcher", "docstrings": [], - "signature": "type localeMatcher = [#bestFit | #lookup]" + "signature": "type localeMatcher = [#\"best fit\" | #lookup]" }, { "id": "Core.Intl.Common.calendar", @@ -1862,7 +1862,7 @@ "docstrings": [ "Type representing the result of a `RegExp` execution." ], - "signature": "type t = array" + "signature": "type t = array>" }, { "id": "Core.RegExp.Result.fullMatch", @@ -1993,10 +1993,19 @@ "kind": "value", "name": "floor", "docstrings": [ - "floor(v) returns the largest `int` less than or equal to the argument; \n the result is pinned to the range of the `int` data type: -2147483648 to 2147483647. \n See [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.floor(3.7) == 3\n Math.Int.floor(3.0) == 3\n Math.Int.floor(-3.1) == -4\n Math.Int.floor(-1.0e15) == -2147483648\n Math.Int.floor(1.0e15) == 2147483647\n ```" + "floor(v) returns the largest `int` less than or equal to the argument; \n See [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.floor(3.7) == 3\n Math.Int.floor(3.0) == 3\n Math.Int.floor(-3.1) == -4\n ```" ], "signature": "let floor: float => int" }, + { + "id": "Core.Math.Int.ceil", + "kind": "value", + "name": "ceil", + "docstrings": [ + "ceil(v) returns the smallest `int` greater than or equal to the argument;\n See [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.ceil(3.7) == 4\n Math.Int.ceil(3.0) == 3\n Math.Int.ceil(-3.1) == -3\n ```" + ], + "signature": "let ceil: float => int" + }, { "id": "Core.Math.Int.random", "kind": "value", @@ -3176,6 +3185,15 @@ ], "signature": "let lastIndex: t => int" }, + { + "id": "Core.Re.setLastIndex", + "kind": "value", + "name": "setLastIndex", + "docstrings": [ + "`setLastIndex(regexp, index)` set the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nregexp->RegExp.setLastIndex(4)\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `10` to the console\n```" + ], + "signature": "let setLastIndex: (t, int) => unit" + }, { "id": "Core.Re.ignoreCase", "kind": "value", @@ -5401,6 +5419,15 @@ ], "signature": "let get: (string, int) => option" }, + { + "id": "Core.String.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [ + "`getUnsafe(str, index)` returns an `string` at the given `index` number.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `string`.\n\nUse `String.getUnsafe` only when you are sure the `index` exists.\n## Examples\n\n```rescript\nString.getUnsafe(\"ReScript\", 0) == \"R\"\nString.getUnsafe(\"Hello\", 4) == \"o\"\n```" + ], + "signature": "let getUnsafe: (string, int) => string" + }, { "id": "Core.String.charAt", "kind": "value", @@ -5541,7 +5568,7 @@ "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\nthere 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.\nSee [`String.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) on MDN.\n\n## Examples\n\n```rescript\nString.match(\"The better bats\", %re(\"/b[aeiou]t/\")) == Some([\"bet\"])\nString.match(\"The better bats\", %re(\"/b[aeiou]t/g\")) == Some([\"bet\", \"bat\"])\nString.match(\"Today is 2018-04-05.\", %re(\"/(\\d+)-(\\d+)-(\\d+)/\")) ==\n Some([\"2018-04-05\", \"2018\", \"04\", \"05\"])\nString.match(\"The large container.\", %re(\"/b[aeiou]g/\")) == None\n```" + "`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\nthere 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.\nSee [`String.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) on MDN.\n\n## Examples\n\n```rescript\nString.match(\"The better bats\", %re(\"/b[aeiou]t/\")) == Some([Some(\"bet\")])\nString.match(\"The better bats\", %re(\"/b[aeiou]t/g\")) == Some([Some(\"bet\"), Some(\"bat\")])\nString.match(\"Today is 2018-04-05.\", %re(\"/(\\d+)-(\\d+)-(\\d+)/\")) ==\n Some([Some(\"2018-04-05\"), Some(\"2018\"), Some(\"04\"), Some(\"05\")])\nString.match(\"The optional example\", %re(\"/(foo)?(example)/\")) == Some([Some(\"example\"), None, Some(\"example\")])\nString.match(\"The large container.\", %re(\"/b[aeiou]g/\")) == None\n```" ], "signature": "let match: (string, Core__RegExp.t) => option" }, @@ -5933,6 +5960,15 @@ ], "signature": "let lastIndex: t => int" }, + { + "id": "Core.RegExp.setLastIndex", + "kind": "value", + "name": "setLastIndex", + "docstrings": [ + "`setLastIndex(regexp, index)` set the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nregexp->RegExp.setLastIndex(4)\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `10` to the console\n```" + ], + "signature": "let setLastIndex: (t, int) => unit" + }, { "id": "Core.RegExp.ignoreCase", "kind": "value", @@ -6523,6 +6559,15 @@ ], "signature": "let undefined: t<'a>" }, + { + "id": "Core.Nullable.isNullable", + "kind": "value", + "name": "isNullable", + "docstrings": [ + "`isNullable(a)` returns `true` if `a` is null or undefined, `false` otherwise.\n\n## Examples\n\n```rescript\nlet myStr = \"Hello\"\nlet asNullable = myStr->Nullable.make\n\n// Can't do the below because we're now forced to check for nullability\n// myStr == asNullable\n\n// Check if asNullable is not null or undefined\nswitch asNullable->Nullable.isNullable {\n| true => assert(false)\n| false => assert(true)\n}\n```" + ], + "signature": "let isNullable: t<'a> => bool" + }, { "id": "Core.Nullable.make", "kind": "value", @@ -9782,7 +9827,7 @@ "kind": "value", "name": "every", "docstrings": [ - "`every(array, predicate)` returns true if `predicate` returns true for all items in `array`.\n\nSee [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN.\n\n## Examples\n```rescript\nlet array = [1, 2, 3, 4]\n\nConsole.log(array->Array.every(num => num > 4)) // true\nConsole.log(array->Array.every(num => num === 1)) // false\n```" + "`every(array, predicate)` returns true if `predicate` returns true for all items in `array`.\n\nSee [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN.\n\n## Examples\n```rescript\nlet array = [1, 2, 3, 4]\n\nConsole.log(array->Array.every(num => num <= 4)) // true\nConsole.log(array->Array.every(num => num === 1)) // false\n```" ], "signature": "let every: (array<'a>, 'a => bool) => bool" }, From f831d591d215c65a634decbd1a7da21909551796 Mon Sep 17 00:00:00 2001 From: Florian Verdonck Date: Mon, 17 Jun 2024 09:40:30 +0200 Subject: [PATCH 013/124] Add React interopt guide (#886) * Add React interopt guide * Rename to interop * Use CodeTab * Rename interop to import-export-reactjs --- data/sidebar_react_latest.json | 3 +- .../latest/import-from-export-to-js.mdx | 2 + .../react/latest/import-export-reactjs.mdx | 189 ++++++++++++++++++ 3 files changed, 193 insertions(+), 1 deletion(-) create mode 100644 pages/docs/react/latest/import-export-reactjs.mdx diff --git a/data/sidebar_react_latest.json b/data/sidebar_react_latest.json index 3a2d32fda..21827eb9d 100644 --- a/data/sidebar_react_latest.json +++ b/data/sidebar_react_latest.json @@ -14,7 +14,8 @@ "context", "styling", "router", - "lazy-components" + "lazy-components", + "import-export-reactjs" ], "Hooks & State Management": [ "hooks-overview", diff --git a/pages/docs/manual/latest/import-from-export-to-js.mdx b/pages/docs/manual/latest/import-from-export-to-js.mdx index 4922ec456..6328666c1 100644 --- a/pages/docs/manual/latest/import-from-export-to-js.mdx +++ b/pages/docs/manual/latest/import-from-export-to-js.mdx @@ -8,6 +8,8 @@ canonical: "/docs/manual/latest/import-from-export-to-js" You've seen how ReScript's idiomatic [Import & Export](import-export.md) works. This section describes how we work with importing stuff from JavaScript and exporting stuff for JavaScript consumption. +If you're looking for react-specific interop guidance, check out the [React JS Interop guide](../../react/latest/import-export-reactjs.mdx). + **Note**: due to JS ecosystem's module compatibility issues, our advice of keeping your ReScript file's compiled JS output open in a tab applies here **more than ever**, as you don't want to subtly output the wrong JS module import/export code, on top of having to deal with Babel/Webpack/Jest/Node's CommonJS \<-> JavaScript module compatibility shims. In short: **make sure your bindings below output what you'd have manually written in JS**. diff --git a/pages/docs/react/latest/import-export-reactjs.mdx b/pages/docs/react/latest/import-export-reactjs.mdx new file mode 100644 index 000000000..dc4717af7 --- /dev/null +++ b/pages/docs/react/latest/import-export-reactjs.mdx @@ -0,0 +1,189 @@ +--- +title: Import / Export ReactJS +description: "Reusing existing React components" +canonical: "/docs/react/latest/import-export-reactjs" +--- + +# Import / Export ReactJS + +Reusing existing React components in ReScript is straightforward. +This guide will walk you through the steps required to import and use React components within ReScript, +including defining component props and handling various import scenarios. + +## Basic Example + +To reuse a React component in ReScript, create a new module, specify the component's location, and define its props. + + + +```res +module Confetti = { + @module("react-confetti") @react.component + external make: (~width: int, ~height: int) => React.element = "default" +} + +// Assuming we are in App.res +@react.component +let make = () => { + +} +``` + +```js +import ReactConfetti from "react-confetti"; +import * as JsxRuntime from "react/jsx-runtime"; + +var Confetti = {}; + +function Playground(props) { + return JsxRuntime.jsx(ReactConfetti, { + width: 300, + height: 300 + }); +} +``` + + + +## Importing from Relative Paths + +You can import components from relative file paths using the `@module` attribute. +Use "default" to indicate the default export, or specify a named export if needed. + +### Named Export Example + + + +```res +// Equivalent of import { Foo } from "bar" +module Foo = { + @module("bar") @react.component + external make: unit => React.element = "Foo" +} +``` + + + +## Defining Props Types + +You can define a separate type for your component's props within the module. + +### Props Type Example + + + +```res +module Confetti = { + type confettiProps = { + width: int, + height: int, + } + + @module("react-confetti") @react.component(: confettiProps) + external make: confettiProps => React.element = "default" +} + +@react.component +let make = () => { + +} +``` + +```js +import ReactConfetti from "react-confetti"; +import * as JsxRuntime from "react/jsx-runtime"; + +var Confetti = {}; + +function Playground(props) { + return JsxRuntime.jsx(ReactConfetti, { + width: 300, + height: 300 + }); +} +``` + + + +## Optional Props + +To define optional props, use the `?` symbol. + + + +```res +module Confetti = { + type confettiProps = { + width: int, + height: int, + initialVelocityX?: int, + initialVelocityY?: int, + } + + @module("react-confetti") @react.component(: confettiProps) + external make: confettiProps => React.element = "default" +} + +@react.component +let make = () => { + +} +``` + +```js +import ReactConfetti from "react-confetti"; +import * as JsxRuntime from "react/jsx-runtime"; + +var Confetti = {}; + +function Playground(props) { + return JsxRuntime.jsx(ReactConfetti, { + width: 300, + height: 300 + }); +} +``` + + + +## Extending Built-in DOM Nodes + +To accept existing DOM props for a component, extend the `JsxDOM.domProps` type. + + + +```res +module Foo = { + type fooProps = { + ...JsxDOM.domProps, + customProp: string, + } + + @module("foo") @react.component(: fooProps) + external make: fooProps => React.element = "default" +} + +@react.component +let make = () => { + +} +``` + +```js +import Foo from "foo"; +import * as JsxRuntime from "react/jsx-runtime"; + +var Foo$1 = {}; + +function Playground(props) { + return JsxRuntime.jsx(Foo, { + height: "300px", + width: "300px", + customProp: "bar" + }); +} +``` + + + +In this example `width` and `height` can be set because `JsxDOM.domProps` was spread into `fooProps`. From 9df10a02fd704af82d003d2110ccb79a043e6ea8 Mon Sep 17 00:00:00 2001 From: Florian Verdonck Date: Wed, 19 Jun 2024 15:10:21 +0200 Subject: [PATCH 014/124] Add page about React.memo (#889) * Add page about React.memo * Simplify arePropsEqual sample * Uppercase description start. * Show options to use memoCustomCompareProps --- data/sidebar_react_latest.json | 1 + pages/docs/react/latest/memo.mdx | 133 +++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 pages/docs/react/latest/memo.mdx diff --git a/data/sidebar_react_latest.json b/data/sidebar_react_latest.json index 21827eb9d..758517284 100644 --- a/data/sidebar_react_latest.json +++ b/data/sidebar_react_latest.json @@ -12,6 +12,7 @@ "events", "refs-and-the-dom", "context", + "memo", "styling", "router", "lazy-components", diff --git a/pages/docs/react/latest/memo.mdx b/pages/docs/react/latest/memo.mdx new file mode 100644 index 000000000..34b05a8c4 --- /dev/null +++ b/pages/docs/react/latest/memo.mdx @@ -0,0 +1,133 @@ +--- +title: memo +description: "Using React.memo" +canonical: "/docs/react/latest/memo" +--- + +# memo + +`React.memo` lets you skip re-rendering a component when its props are unchanged. + +Wrap a component in memo to get a memoized version of that component. +This memoized version of your component will usually not be re-rendered when its parent component is re-rendered as long as its props have not changed. + +But React may still re-render it: memoization is a performance optimization, not a guarantee. + + + +```res +@react.component +let make = React.memo((~a: int, ~b: string) => { +
    + {React.int(a)} +
    + {React.string(b)} +
    +}) +``` + +```js +import * as React from "react"; +import * as JsxRuntime from "react/jsx-runtime"; + +var make = React.memo(function (props) { + return JsxRuntime.jsxs("div", { + children: [ + props.a, + JsxRuntime.jsx("br", {}), + props.b + ] + }); + }); +``` + +
    + +## arePropsEqual + +In React, memo can accept an optional argument called "arePropsEqual". This function takes two arguments: the previous props and the new props of the component. +It should return true if the old and new props are the same, meaning the component will produce the same output and behavior with the new props as it did with the old ones. + +In ReScript, you can use the `arePropsEqual` function with the `React.memoCustomCompareProps` binding. However, `React.memoCustomCompareProps` cannot be combined with `@react.component`. + +To work around this, you can redefine the make binding: + + + +```res +@react.component +let make = (~disabled, ~onClick) => { + +} + +let make = React.memoCustomCompareProps(make, (p1, p2) => + p1.disabled == p2.disabled +) +``` + +```js +import * as React from "react"; +import * as JsxRuntime from "react/jsx-runtime"; + +function Playground(props) { + var onClick = props.onClick; + return JsxRuntime.jsx("button", { + children: "My button", + disabled: props.disabled, + onClick: (function (ev) { + onClick((ev.preventDefault(), undefined)); + }) + }); +} + +var make = React.memo(Playground, (function (p1, p2) { + return p1.disabled === p2.disabled; + })); +``` + + + + +Another approach is to use a custom prop type and remove the `@react.component` annotation. + + + +```res +type props = { + disabled: bool, + onClick: JsxEvent.Mouse.t => unit, +} + +let make = React.memoCustomCompareProps( + ({disabled, onClick}) => { + + }, + (p1, p2) => p1.disabled == p2.disabled, +) +``` + +```js +import * as React from "react"; +import * as JsxRuntime from "react/jsx-runtime"; + +var make = React.memo((function (param) { + var onClick = param.onClick; + return JsxRuntime.jsx("button", { + children: "My button", + disabled: param.disabled, + onClick: (function (ev) { + onClick(ev); + }) + }); + }), (function (p1, p2) { + return p1.disabled === p2.disabled; + })); +``` + + From 9924ef05d5f4cd619319aab00d5feadc74e442fe Mon Sep 17 00:00:00 2001 From: Shinya Fujino Date: Thu, 20 Jun 2024 01:19:30 +0900 Subject: [PATCH 015/124] Add semicolon for consistency (#890) --- pages/docs/manual/latest/overview.mdx | 2 +- pages/docs/manual/v10.0.0/overview.mdx | 2 +- pages/docs/manual/v8.0.0/overview.mdx | 2 +- pages/docs/manual/v9.0.0/overview.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/docs/manual/latest/overview.mdx b/pages/docs/manual/latest/overview.mdx index cf0307e01..9ffd6bbc4 100644 --- a/pages/docs/manual/latest/overview.mdx +++ b/pages/docs/manual/latest/overview.mdx @@ -127,7 +127,7 @@ canonical: "/docs/manual/latest/overview" const myFun = (x, y) => { const doubleX = x + x; const doubleY = y + y; - return doubleX + doubleY + return doubleX + doubleY; }; ``` diff --git a/pages/docs/manual/v10.0.0/overview.mdx b/pages/docs/manual/v10.0.0/overview.mdx index 5f9daa169..b48e20d11 100644 --- a/pages/docs/manual/v10.0.0/overview.mdx +++ b/pages/docs/manual/v10.0.0/overview.mdx @@ -125,7 +125,7 @@ canonical: "/docs/manual/latest/overview"
    {`const myFun = (x, y) => {
       const doubleX = x + x;
       const doubleY = y + y;
    -  return doubleX + doubleY
    +  return doubleX + doubleY;
     };`}
    diff --git a/pages/docs/manual/v8.0.0/overview.mdx b/pages/docs/manual/v8.0.0/overview.mdx index 38daaa8ca..3554e38c0 100644 --- a/pages/docs/manual/v8.0.0/overview.mdx +++ b/pages/docs/manual/v8.0.0/overview.mdx @@ -117,7 +117,7 @@ canonical: "/docs/manual/latest/overview" const myFun = (x, y) => { const doubleX = x + x; const doubleY = y + y; - return doubleX + doubleY + return doubleX + doubleY; }; ``` diff --git a/pages/docs/manual/v9.0.0/overview.mdx b/pages/docs/manual/v9.0.0/overview.mdx index fde4317ba..7fc914fd8 100644 --- a/pages/docs/manual/v9.0.0/overview.mdx +++ b/pages/docs/manual/v9.0.0/overview.mdx @@ -115,7 +115,7 @@ canonical: "/docs/manual/latest/overview" const myFun = (x, y) => { const doubleX = x + x; const doubleY = y + y; - return doubleX + doubleY + return doubleX + doubleY; }; ``` From b8a4eed4df1966763346d7485acac6d8dbbb2303 Mon Sep 17 00:00:00 2001 From: Shinya Fujino Date: Thu, 20 Jun 2024 18:03:44 +0900 Subject: [PATCH 016/124] Fix grammar in let-binding.mdx (#891) --- pages/docs/manual/latest/let-binding.mdx | 2 +- pages/docs/manual/v10.0.0/let-binding.mdx | 2 +- pages/docs/manual/v8.0.0/let-binding.mdx | 2 +- pages/docs/manual/v9.0.0/let-binding.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/docs/manual/latest/let-binding.mdx b/pages/docs/manual/latest/let-binding.mdx index 4cebf15e9..9372c9fae 100644 --- a/pages/docs/manual/latest/let-binding.mdx +++ b/pages/docs/manual/latest/let-binding.mdx @@ -181,5 +181,5 @@ Still, `%%private` is useful in the following scenarios: - **Code generators.** Some code generators want to hide some values but it is sometimes very hard or time consuming for code generators to synthesize the types for public fields. -- **Quick prototyping.** During prototyping, we still want to hide some values, but the interface file is not stable yet, `%%private` provide you such convenience. +- **Quick prototyping.** During prototyping, we still want to hide some values, but the interface file is not stable yet. `%%private` provides you such convenience. diff --git a/pages/docs/manual/v10.0.0/let-binding.mdx b/pages/docs/manual/v10.0.0/let-binding.mdx index ed4c15782..fda3bfcd7 100644 --- a/pages/docs/manual/v10.0.0/let-binding.mdx +++ b/pages/docs/manual/v10.0.0/let-binding.mdx @@ -181,5 +181,5 @@ Still, `%%private` is useful in the following scenarios: - **Code generators.** Some code generators want to hide some values but it is sometimes very hard or time consuming for code generators to synthesize the types for public fields. -- **Quick prototyping.** During prototyping, we still want to hide some values, but the interface file is not stable yet, `%%private` provides you such convenience. +- **Quick prototyping.** During prototyping, we still want to hide some values, but the interface file is not stable yet. `%%private` provides you such convenience. diff --git a/pages/docs/manual/v8.0.0/let-binding.mdx b/pages/docs/manual/v8.0.0/let-binding.mdx index 32450fb48..834509559 100644 --- a/pages/docs/manual/v8.0.0/let-binding.mdx +++ b/pages/docs/manual/v8.0.0/let-binding.mdx @@ -217,5 +217,5 @@ Still, `%private` is useful in the following scenarios: - Code generators. Some code generators want to hide some values but it is sometimes very hard or time consuming for code generators to synthesize the types for public fields. -- Quick prototyping. During prototyping, we still want to hide some values, but the interface file is not stable yet, `%private` provide you such convenience. +- Quick prototyping. During prototyping, we still want to hide some values, but the interface file is not stable yet. `%private` provides you such convenience. diff --git a/pages/docs/manual/v9.0.0/let-binding.mdx b/pages/docs/manual/v9.0.0/let-binding.mdx index d1fe612c9..f746be3ab 100644 --- a/pages/docs/manual/v9.0.0/let-binding.mdx +++ b/pages/docs/manual/v9.0.0/let-binding.mdx @@ -181,5 +181,5 @@ Still, `%private` is useful in the following scenarios: - Code generators. Some code generators want to hide some values but it is sometimes very hard or time consuming for code generators to synthesize the types for public fields. -- Quick prototyping. During prototyping, we still want to hide some values, but the interface file is not stable yet, `%private` provide you such convenience. +- Quick prototyping. During prototyping, we still want to hide some values, but the interface file is not stable yet. `%private` provides you such convenience. From cc5fbee60ee4f5b609c17e8af25d51cf179245b1 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Fri, 28 Jun 2024 15:34:00 +0200 Subject: [PATCH 017/124] Syntax lookup: labeled and optional args (#888) * Syntax Lookup: Add labeled args * Syntax Lookup: Add optional args * Syntax Lookup: Make send.pipe deprecated * Syntax Lookup: Default labeled args * Syntax Lookup: Mention partial application and order of labeled args --- misc_docs/syntax/decorator_send_pipe.mdx | 1 + .../syntax/language_labeled_argument.mdx | 69 +++++++++++++++ .../language_optional_labeled_argument.mdx | 85 +++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 misc_docs/syntax/language_labeled_argument.mdx create mode 100644 misc_docs/syntax/language_optional_labeled_argument.mdx diff --git a/misc_docs/syntax/decorator_send_pipe.mdx b/misc_docs/syntax/decorator_send_pipe.mdx index c3f4b8125..f42035863 100644 --- a/misc_docs/syntax/decorator_send_pipe.mdx +++ b/misc_docs/syntax/decorator_send_pipe.mdx @@ -4,6 +4,7 @@ keywords: ["send", "pipe", "decorator"] name: "@bs.send.pipe" summary: "This is the `@bs.send.pipe` decorator." category: "decorators" +status: "deprecated" --- > Removed since compiler version 10.0. Use the [@send](https://rescript-lang.org/docs/manual/latest/bind-to-js-function) decorator instead. diff --git a/misc_docs/syntax/language_labeled_argument.mdx b/misc_docs/syntax/language_labeled_argument.mdx new file mode 100644 index 000000000..c775614f4 --- /dev/null +++ b/misc_docs/syntax/language_labeled_argument.mdx @@ -0,0 +1,69 @@ +--- +id: "labeled-argument" +keywords: ["labeled", "argument"] +name: "~arg" +summary: "This is a `labeled argument`." +category: "languageconstructs" +--- + +When declaring a function, arguments can be prefixed with `~` which means that they can and need to be called by their name, not the argument position. This is especially useful to differentiate them more easily if they are of the same type. + +### Example + + + +```res prelude +let calculateDistance = (~x1, ~y1, ~x2, ~y2) => { + Math.sqrt((x1 -. x2) ** 2. +. (y1 -. y2) ** 2.) +} + +calculateDistance(~x1=6., ~y1=8., ~x2=3., ~y2=4.) +``` + +```js +function calculateDistance(x1, y1, x2, y2) { + return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); +} + +calculateDistance(6, 8, 3, 4); +``` + + + +Labeled arguments can be provided in any order: + + + +```res example +calculateDistance(~x1=6., ~x2=3., ~y1=8., ~y2=4.) +``` + +```js +calculateDistance(6, 8, 3, 4); +``` + + + +This also works together with partial application: + + + +```res example +let calcY = calculateDistance(~x1=6., ~x2=3., ...) +calcY(~y1=8., ~y2=4.) +``` + +```js +function calcY(none, extra) { + return calculateDistance(6, none, 3, extra); +} + +calcY(8, 4); +``` + + + +### References + +* [Labeled Arguments](/docs/manual/latest/function#labeled-arguments) +* [Function Syntax Cheatsheet](/docs/manual/latest/function#tips--tricks) diff --git a/misc_docs/syntax/language_optional_labeled_argument.mdx b/misc_docs/syntax/language_optional_labeled_argument.mdx new file mode 100644 index 000000000..e4e7e7540 --- /dev/null +++ b/misc_docs/syntax/language_optional_labeled_argument.mdx @@ -0,0 +1,85 @@ +--- +id: "optional-labeled-argument" +keywords: ["optional", "labeled", "argument"] +name: "~arg=?" +summary: "This is an `optional labeled argument`." +category: "languageconstructs" +--- + +Labeled arguments, i.e. arguments that are prefixed with `~`, can be suffixed with `=?` to denote that they are optional. Thus, they can be +omitted when calling the function. + +### Example + + + +```res example +let print = (text, ~logLevel=?) => { + switch logLevel { + | Some(#error) => Console.error(text) + | _ => Console.log(text) + } +} + +print("An info") +print("An error", ~logLevel=#error) +``` + +```js +function print(text, logLevel) { + if (logLevel === "error") { + console.error(text); + } else { + console.log(text); + } +} + +print("An info", undefined); + +print("An error", "error"); +``` + + + +Optional labeled arguments can also hold a default value. + + + +```res example +let print = (text, ~logLevel=#info) => { + switch logLevel { + | #error => Console.error(text) + | #warn => Console.warn(text) + | #info => Console.log(text) + } +} + +print("An info") +print("A warning", ~logLevel=#warn) +``` + +```js +function print(text, logLevelOpt) { + var logLevel = logLevelOpt !== undefined ? logLevelOpt : "info"; + if (logLevel === "warn") { + console.warn(text); + } else if (logLevel === "error") { + console.error(text); + } else { + console.log(text); + } +} + +print("An info", undefined); + +print("A warning", "warn"); +``` + + + +### References + +* [Labeled Arguments](/docs/manual/latest/function#labeled-arguments) +* [Optional Labeled Arguments](/docs/manual/latest/function#optional-labeled-arguments) +* [Labeled Argument with Default Value](/docs/manual/latest/function#optional-with-default-value) +* [Function Syntax Cheatsheet](/docs/manual/latest/function#tips--tricks) From 64a4ab03831831fb84663db7373b2ca6e477ffc1 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 30 Jun 2024 17:36:12 -0300 Subject: [PATCH 018/124] Update docs api (#894) * update docs api Core: 1.5.2 Compiler: 11.0_release branch (64dbabdfd) * fix tests --- data/api/latest/belt.json | 16 +- data/api/latest/core.json | 195 ------------------ data/api/latest/toc_tree.json | 2 +- .../syntax/extension_regular_expression.mdx | 2 +- pages/docs/manual/latest/primitive-types.mdx | 2 +- 5 files changed, 11 insertions(+), 206 deletions(-) diff --git a/data/api/latest/belt.json b/data/api/latest/belt.json index 32ad01f8d..86bc0c43e 100644 --- a/data/api/latest/belt.json +++ b/data/api/latest/belt.json @@ -3687,7 +3687,7 @@ "name": "String", "docstrings": [ "Specialized when value type is `string`, more efficient than the generic type,\nits compare behavior is fixed using the built-in comparison", - "This module is [`Belt.Set`]() specialized with value type to be a primitive type.\nIt is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,\nand identity is not needed(using the built-in one)\n\n**See** [`Belt.Set`]()" + "This module is [`Belt.Set`]() specialized with value type to be a primitive type.\n It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,\n and identity is not needed(using the built-in one)\n\n **See** [`Belt.Set`]()" ], "items": [ { @@ -3867,7 +3867,7 @@ "kind": "value", "name": "every", "docstrings": [ - "`every(p, s)` checks if all elements of the set satisfy the predicate `p`.\nOrder unspecified." + "`every(p, s)` checks if all elements of the set satisfy the predicate `p`. Order\nunspecified." ], "signature": "let every: (t, value => bool) => bool" }, @@ -3915,7 +3915,7 @@ "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\npredicate `p`, and `s2` is the set of all the elements of\n`s` that do not satisfy `p`." + "`partition(p, s)` returns a pair of sets `(s1, s2)`, where `s1` is the set of\nall the elements of `s` that satisfy the predicate `p`, and `s2` is the set of\nall the elements of `s` that do not satisfy `p`." ], "signature": "let partition: (t, value => bool) => (t, t)" }, @@ -3996,7 +3996,7 @@ "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\nstrictly less than `x`;\n`r` is the set of elements of `s` that are\nstrictly greater than `x`;\n`present` is `false` if `s` contains no element equal to `x`,\nor `true` if `s` contains an element equal to `x`." + "`split(x, s)` returns a triple `(l, present, r)`, where `l` is the set of\nelements of `s` that are strictly less than `x`;`r` is the set of elements of\n`s` that are strictly greater than `x`; `present` is `false` if `s` contains no\nelement equal to `x`, or `true` if `s` contains an element equal to `x`." ], "signature": "let split: (t, value) => ((t, t), bool)" }, @@ -4016,7 +4016,7 @@ "name": "Int", "docstrings": [ "Specialized when value type is `int`, more efficient than the generic type, its\ncompare behavior is fixed using the built-in comparison", - "This module is [`Belt.Set`]() specialized with value type to be a primitive type.\nIt is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,\nand identity is not needed(using the built-in one)\n\n**See** [`Belt.Set`]()" + "This module is [`Belt.Set`]() specialized with value type to be a primitive type.\n It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,\n and identity is not needed(using the built-in one)\n\n **See** [`Belt.Set`]()" ], "items": [ { @@ -4077,7 +4077,7 @@ "kind": "value", "name": "add", "docstrings": [ - "`add(s, x)` if `x` was already in `s`, `s` is returned unchanged." + "`add(s, x)` If `x` was already in `s`, `s` is returned unchanged." ], "signature": "let add: (t, value) => t" }, @@ -4093,7 +4093,7 @@ "kind": "value", "name": "remove", "docstrings": [ - "`remove(m, x)` if `x` was not in `m`, `m` is returned reference unchanged." + "`remove(m, x)` If `x` was not in `m`, `m` is returned reference unchanged." ], "signature": "let remove: (t, value) => t" }, @@ -4325,7 +4325,7 @@ "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\nstrictly less than `x`;\n`r` is the set of elements of `s` that are\nstrictly greater than `x`;\n`present` is `false` if `s` contains no element equal to `x`,\nor `true` if `s` contains an element equal to `x`." + "`split(x, s)` returns a triple `(l, present, r)`, where `l` is the set of\nelements of `s` that are strictly less than `x`;`r` is the set of elements of\n`s` that are strictly greater than `x`; `present` is `false` if `s` contains no\nelement equal to `x`, or `true` if `s` contains an element equal to `x`." ], "signature": "let split: (t, value) => ((t, t), bool)" }, diff --git a/data/api/latest/core.json b/data/api/latest/core.json index e4621e6f6..ab511e0aa 100644 --- a/data/api/latest/core.json +++ b/data/api/latest/core.json @@ -163,13 +163,6 @@ ], "signature": "let import: 'a => promise<'a>" }, - { - "id": "Core.t", - "kind": "type", - "name": "t", - "docstrings": [], - "signature": "type t<'a> = Js.t<'a>\n constraint 'a = {..}" - }, { "id": "Core.null", "kind": "type", @@ -242,56 +235,6 @@ } ] }, - "core/re/result": { - "id": "Core.Re.Result", - "name": "Result", - "docstrings": [], - "items": [ - { - "id": "Core.Re.Result.t", - "kind": "type", - "name": "t", - "docstrings": [ - "Type representing the result of a `RegExp` execution." - ], - "signature": "type t = array>" - }, - { - "id": "Core.Re.Result.fullMatch", - "kind": "value", - "name": "fullMatch", - "docstrings": [ - "`fullMatch(regExpResult)` returns the full string that matched in this result.\n\n ## Examples\n ```rescript\n // Match the first two words separated by a space\n let regexp = RegExp.fromString(\"(\\\\w+) (\\\\w+)\")\n\n switch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n | None => Console.log(\"Nope, no match...\")\n | Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints the full string that matched, \"ReScript is\"\n }\n ```" - ], - "signature": "let fullMatch: t => string" - }, - { - "id": "Core.Re.Result.matches", - "kind": "value", - "name": "matches", - "docstrings": [ - "`matches(regExpResult)` returns all matches for `regExpResult`.\n\n ## Examples\n ```rescript\n // Match the first two words separated by a space\n let regexp = RegExp.fromString(\"(\\\\w+) (\\\\w+)\")\n\n // This below will log \"ReScript\" and \"is\" to the console.\n switch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n | None => Console.log(\"Nope, no match...\")\n | Some(result) => switch result->RegExp.Result.matches {\n | [firstWord, secondWord] => Console.log2(firstWord, secondWord)\n | _ => Console.log(\"Didn't find exactly two words...\")\n }\n }\n ```" - ], - "signature": "let matches: t => array" - }, - { - "id": "Core.Re.Result.index", - "kind": "value", - "name": "index", - "docstrings": [], - "signature": "let index: t => int" - }, - { - "id": "Core.Re.Result.input", - "kind": "value", - "name": "input", - "docstrings": [ - "`input(regExpResult)` returns the full input string that was passed to what produced the `RegExp.Result.t`.\n\n ## Examples\n ```rescript\n // Match the first two words separated by a space\n let regexp = RegExp.fromString(\"(\\\\w+) (\\\\w+)\")\n\n // This below will log the full input string \"ReScript is pretty cool, right?\" to the console.\n switch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n | None => Console.log(\"Nope, no match...\")\n | Some(result) => Console.log(result->RegExp.Result.input)\n }\n ```" - ], - "signature": "let input: t => string" - } - ] - }, "core/intl/segments": { "id": "Core.Intl.Segments", "name": "Segments", @@ -3124,144 +3067,6 @@ "docstrings": [], "items": [] }, - "core/re": { - "id": "Core.Re", - "name": "Re", - "docstrings": [ - "Functions for handling RegExp's in ReScript.\n\nSee [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) on MDN." - ], - "items": [ - { - "id": "Core.Re.t", - "kind": "type", - "name": "t", - "docstrings": [ - "Type representing an instantiated `RegExp`." - ], - "signature": "type t = Js.Re.t" - }, - { - "id": "Core.Re.fromString", - "kind": "value", - "name": "fromString", - "docstrings": [ - "`fromString(string)` creates a `RegExp.t` from the provided string. This can then be used to match on strings using `RegExp.exec`.\n\nSee [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```" - ], - "signature": "let fromString: string => t" - }, - { - "id": "Core.Re.fromStringWithFlags", - "kind": "value", - "name": "fromStringWithFlags", - "docstrings": [ - "`fromStringWithFlags(string)` creates a `RegExp.t` from the provided string, using the provided `flags`. This can then be used to match on strings using `RegExp.exec`.\n\nSee [`RegExp parameters`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp#parameters) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```" - ], - "signature": "let fromStringWithFlags: (string, ~flags: string) => t" - }, - { - "id": "Core.Re.test", - "kind": "value", - "name": "test", - "docstrings": [ - "`test(regexp, string)` tests whether the provided `regexp` matches on the provided string.\n\nSee [`RegExp.test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nif regexp->RegExp.test(\"ReScript is cool!\") {\n Console.log(\"Yay, there's a word in there.\")\n}\n```" - ], - "signature": "let test: (t, string) => bool" - }, - { - "id": "Core.Re.exec", - "kind": "value", - "name": "exec", - "docstrings": [ - "`exec(regexp, string)` executes the provided regexp on the provided string, optionally returning a `RegExp.Result.t` if the regexp matches on the string.\n\nSee [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```" - ], - "signature": "let exec: (t, string) => option" - }, - { - "id": "Core.Re.lastIndex", - "kind": "value", - "name": "lastIndex", - "docstrings": [ - "`lastIndex(regexp)` returns the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `0` to the console\n\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `4` to the console\n```" - ], - "signature": "let lastIndex: t => int" - }, - { - "id": "Core.Re.setLastIndex", - "kind": "value", - "name": "setLastIndex", - "docstrings": [ - "`setLastIndex(regexp, index)` set the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nregexp->RegExp.setLastIndex(4)\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `10` to the console\n```" - ], - "signature": "let setLastIndex: (t, int) => unit" - }, - { - "id": "Core.Re.ignoreCase", - "kind": "value", - "name": "ignoreCase", - "docstrings": [ - "`ignoreCase(regexp)` returns whether the ignore case (`i`) flag is set on this `RegExp`.\n\nSee [`RegExp.ignoreCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.ignoreCase) // Logs `false`, since `i` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.ignoreCase) // Logs `true`, since `i` is set\n```" - ], - "signature": "let ignoreCase: t => bool" - }, - { - "id": "Core.Re.global", - "kind": "value", - "name": "global", - "docstrings": [ - "`global(regexp)` returns whether the global (`g`) flag is set on this `RegExp`.\n\nSee [`RegExp.global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/global) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.global) // Logs `true`, since `g` is set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.global) // Logs `false`, since `g` is not set\n```" - ], - "signature": "let global: t => bool" - }, - { - "id": "Core.Re.multiline", - "kind": "value", - "name": "multiline", - "docstrings": [ - "`multiline(regexp)` returns whether the multiline (`m`) flag is set on this `RegExp`.\n\nSee [`RegExp.multiline`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.multiline) // Logs `false`, since `m` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mi\")\nConsole.log(regexp2->RegExp.multiline) // Logs `true`, since `m` is set\n```" - ], - "signature": "let multiline: t => bool" - }, - { - "id": "Core.Re.source", - "kind": "value", - "name": "source", - "docstrings": [ - "`source(regexp)` returns the source text for this `RegExp`, without the two forward slashes (if present), and without any set flags.\n\nSee [`RegExp.source`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source) on MDN.\n\n## Examples\n```rescript\nlet regexp = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp->RegExp.source) // Logs `\\w+`, the source text of the `RegExp`\n```" - ], - "signature": "let source: t => string" - }, - { - "id": "Core.Re.sticky", - "kind": "value", - "name": "sticky", - "docstrings": [ - "`sticky(regexp)` returns whether the sticky (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `y` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"my\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `y` is set\n```" - ], - "signature": "let sticky: t => bool" - }, - { - "id": "Core.Re.unicode", - "kind": "value", - "name": "unicode", - "docstrings": [ - "`unicode(regexp)` returns whether the unicode (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.unicode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `u` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mu\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `u` is set\n```" - ], - "signature": "let unicode: t => bool" - } - ] - }, - "core/internal": { - "id": "Core.Internal", - "name": "Internal", - "docstrings": [], - "items": [] - }, - "core/mapperrt": { - "id": "Core.MapperRt", - "name": "MapperRt", - "docstrings": [], - "items": [] - }, "core/intl": { "id": "Core.Intl", "name": "Intl", diff --git a/data/api/latest/toc_tree.json b/data/api/latest/toc_tree.json index 47d99b61f..faf8bb122 100644 --- a/data/api/latest/toc_tree.json +++ b/data/api/latest/toc_tree.json @@ -1 +1 @@ -{"js":{"name":"Js","path":["js"],"children":[{"name":"WeakMap","path":["js","weakmap"],"children":[]},{"name":"Map","path":["js","map"],"children":[]},{"name":"WeakSet","path":["js","weakset"],"children":[]},{"name":"Set","path":["js","set"],"children":[]},{"name":"Console","path":["js","console"],"children":[]},{"name":"Vector","path":["js","vector"],"children":[]},{"name":"List","path":["js","list"],"children":[]},{"name":"Result","path":["js","result"],"children":[]},{"name":"Option","path":["js","option"],"children":[]},{"name":"Blob","path":["js","blob"],"children":[]},{"name":"File","path":["js","file"],"children":[]},{"name":"BigInt","path":["js","bigint"],"children":[]},{"name":"Int","path":["js","int"],"children":[]},{"name":"Float","path":["js","float"],"children":[]},{"name":"Types","path":["js","types"],"children":[]},{"name":"TypedArray2","path":["js","typedarray2"],"children":[{"name":"DataView","path":["js","typedarray2","dataview"],"children":[]},{"name":"Float64Array","path":["js","typedarray2","float64array"],"children":[]},{"name":"Float32Array","path":["js","typedarray2","float32array"],"children":[]},{"name":"Uint32Array","path":["js","typedarray2","uint32array"],"children":[]},{"name":"Int32Array","path":["js","typedarray2","int32array"],"children":[]},{"name":"Uint16Array","path":["js","typedarray2","uint16array"],"children":[]},{"name":"Int16Array","path":["js","typedarray2","int16array"],"children":[]},{"name":"Uint8ClampedArray","path":["js","typedarray2","uint8clampedarray"],"children":[]},{"name":"Uint8Array","path":["js","typedarray2","uint8array"],"children":[]},{"name":"Int8Array","path":["js","typedarray2","int8array"],"children":[]},{"name":"ArrayBuffer","path":["js","typedarray2","arraybuffer"],"children":[]}]},{"name":"Typed_array","path":["js","typed_array"],"children":[{"name":"DataView","path":["js","typed_array","dataview"],"children":[]},{"name":"Float64_array","path":["js","typed_array","float64_array"],"children":[]},{"name":"Float64Array","path":["js","typed_array","float64array"],"children":[]},{"name":"Float32_array","path":["js","typed_array","float32_array"],"children":[]},{"name":"Float32Array","path":["js","typed_array","float32array"],"children":[]},{"name":"Uint32Array","path":["js","typed_array","uint32array"],"children":[]},{"name":"Int32_array","path":["js","typed_array","int32_array"],"children":[]},{"name":"Int32Array","path":["js","typed_array","int32array"],"children":[]},{"name":"Uint16Array","path":["js","typed_array","uint16array"],"children":[]},{"name":"Int16Array","path":["js","typed_array","int16array"],"children":[]},{"name":"Uint8ClampedArray","path":["js","typed_array","uint8clampedarray"],"children":[]},{"name":"Uint8Array","path":["js","typed_array","uint8array"],"children":[]},{"name":"Int8Array","path":["js","typed_array","int8array"],"children":[]},{"name":"S","path":["js","typed_array","s"],"children":[]},{"name":"ArrayBuffer","path":["js","typed_array","arraybuffer"],"children":[]},{"name":"Type","path":["js","typed_array","type"],"children":[]}]},{"name":"Obj","path":["js","obj"],"children":[]},{"name":"Math","path":["js","math"],"children":[]},{"name":"Json","path":["js","json"],"children":[{"name":"Kind","path":["js","json","kind"],"children":[]}]},{"name":"Global","path":["js","global"],"children":[]},{"name":"Dict","path":["js","dict"],"children":[]},{"name":"Date","path":["js","date"],"children":[]},{"name":"Promise2","path":["js","promise2"],"children":[]},{"name":"Promise","path":["js","promise"],"children":[]},{"name":"Re","path":["js","re"],"children":[]},{"name":"String2","path":["js","string2"],"children":[]},{"name":"String","path":["js","string"],"children":[]},{"name":"Array2","path":["js","array2"],"children":[]},{"name":"Array","path":["js","array"],"children":[]},{"name":"Exn","path":["js","exn"],"children":[]},{"name":"Null_undefined","path":["js","null_undefined"],"children":[]},{"name":"Nullable","path":["js","nullable"],"children":[]},{"name":"Undefined","path":["js","undefined"],"children":[]},{"name":"Null","path":["js","null"],"children":[]}]},"belt":{"name":"Belt","path":["belt"],"children":[{"name":"Float","path":["belt","float"],"children":[]},{"name":"Int","path":["belt","int"],"children":[]},{"name":"Result","path":["belt","result"],"children":[]},{"name":"Option","path":["belt","option"],"children":[]},{"name":"HashMap","path":["belt","hashmap"],"children":[{"name":"String","path":["belt","hashmap","string"],"children":[]},{"name":"Int","path":["belt","hashmap","int"],"children":[]}]},{"name":"HashSet","path":["belt","hashset"],"children":[{"name":"String","path":["belt","hashset","string"],"children":[]},{"name":"Int","path":["belt","hashset","int"],"children":[]}]},{"name":"MutableMap","path":["belt","mutablemap"],"children":[{"name":"String","path":["belt","mutablemap","string"],"children":[]},{"name":"Int","path":["belt","mutablemap","int"],"children":[]}]},{"name":"MutableSet","path":["belt","mutableset"],"children":[{"name":"String","path":["belt","mutableset","string"],"children":[]},{"name":"Int","path":["belt","mutableset","int"],"children":[]}]},{"name":"Map","path":["belt","map"],"children":[{"name":"Dict","path":["belt","map","dict"],"children":[]},{"name":"String","path":["belt","map","string"],"children":[]},{"name":"Int","path":["belt","map","int"],"children":[]}]},{"name":"Set","path":["belt","set"],"children":[{"name":"Dict","path":["belt","set","dict"],"children":[]},{"name":"String","path":["belt","set","string"],"children":[]},{"name":"Int","path":["belt","set","int"],"children":[]}]},{"name":"Range","path":["belt","range"],"children":[]},{"name":"List","path":["belt","list"],"children":[]},{"name":"MutableStack","path":["belt","mutablestack"],"children":[]},{"name":"MutableQueue","path":["belt","mutablequeue"],"children":[]},{"name":"SortArray","path":["belt","sortarray"],"children":[{"name":"String","path":["belt","sortarray","string"],"children":[]},{"name":"Int","path":["belt","sortarray","int"],"children":[]}]},{"name":"Array","path":["belt","array"],"children":[]},{"name":"Id","path":["belt","id"],"children":[{"name":"MakeHashable","path":["belt","id","makehashable"],"children":[]},{"name":"MakeHashableU","path":["belt","id","makehashableu"],"children":[]},{"name":"MakeComparable","path":["belt","id","makecomparable"],"children":[]},{"name":"MakeComparableU","path":["belt","id","makecomparableu"],"children":[]}]}]},"dom":{"name":"Dom","path":["dom"],"children":[{"name":"Storage2","path":["dom","storage2"],"children":[]},{"name":"Storage","path":["dom","storage"],"children":[]}]},"core":{"name":"Core","path":["core"],"children":[{"name":"Result","path":["core","result"],"children":[]},{"name":"List","path":["core","list"],"children":[]},{"name":"Option","path":["core","option"],"children":[]},{"name":"Exn","path":["core","exn"],"children":[]},{"name":"Re","path":["core","re"],"children":[{"name":"Result","path":["core","re","result"],"children":[]}]},{"name":"Internal","path":["core","internal"],"children":[]},{"name":"MapperRt","path":["core","mapperrt"],"children":[]},{"name":"Intl","path":["core","intl"],"children":[{"name":"Segments","path":["core","intl","segments"],"children":[]},{"name":"Segmenter","path":["core","intl","segmenter"],"children":[]},{"name":"RelativeTimeFormat","path":["core","intl","relativetimeformat"],"children":[]},{"name":"PluralRules","path":["core","intl","pluralrules"],"children":[]},{"name":"NumberFormat","path":["core","intl","numberformat"],"children":[{"name":"Grouping","path":["core","intl","numberformat","grouping"],"children":[]}]},{"name":"Locale","path":["core","intl","locale"],"children":[]},{"name":"ListFormat","path":["core","intl","listformat"],"children":[]},{"name":"DateTimeFormat","path":["core","intl","datetimeformat"],"children":[]},{"name":"Collator","path":["core","intl","collator"],"children":[]},{"name":"Common","path":["core","intl","common"],"children":[]}]},{"name":"BigUint64Array","path":["core","biguint64array"],"children":[{"name":"Constants","path":["core","biguint64array","constants"],"children":[]}]},{"name":"BigInt64Array","path":["core","bigint64array"],"children":[{"name":"Constants","path":["core","bigint64array","constants"],"children":[]}]},{"name":"Uint8ClampedArray","path":["core","uint8clampedarray"],"children":[{"name":"Constants","path":["core","uint8clampedarray","constants"],"children":[]}]},{"name":"Uint32Array","path":["core","uint32array"],"children":[{"name":"Constants","path":["core","uint32array","constants"],"children":[]}]},{"name":"Uint16Array","path":["core","uint16array"],"children":[{"name":"Constants","path":["core","uint16array","constants"],"children":[]}]},{"name":"Uint8Array","path":["core","uint8array"],"children":[{"name":"Constants","path":["core","uint8array","constants"],"children":[]}]},{"name":"Int32Array","path":["core","int32array"],"children":[{"name":"Constants","path":["core","int32array","constants"],"children":[]}]},{"name":"Int16Array","path":["core","int16array"],"children":[{"name":"Constants","path":["core","int16array","constants"],"children":[]}]},{"name":"Int8Array","path":["core","int8array"],"children":[{"name":"Constants","path":["core","int8array","constants"],"children":[]}]},{"name":"Float64Array","path":["core","float64array"],"children":[{"name":"Constants","path":["core","float64array","constants"],"children":[]}]},{"name":"Float32Array","path":["core","float32array"],"children":[{"name":"Constants","path":["core","float32array","constants"],"children":[]}]},{"name":"TypedArray","path":["core","typedarray"],"children":[]},{"name":"ArrayBuffer","path":["core","arraybuffer"],"children":[]},{"name":"WeakSet","path":["core","weakset"],"children":[]},{"name":"Set","path":["core","set"],"children":[]},{"name":"WeakMap","path":["core","weakmap"],"children":[]},{"name":"Map","path":["core","map"],"children":[]},{"name":"AsyncIterator","path":["core","asynciterator"],"children":[]},{"name":"Iterator","path":["core","iterator"],"children":[]},{"name":"JSON","path":["core","json"],"children":[{"name":"Decode","path":["core","json","decode"],"children":[]},{"name":"Encode","path":["core","json","encode"],"children":[]},{"name":"Classify","path":["core","json","classify"],"children":[]}]},{"name":"Type","path":["core","type"],"children":[{"name":"Classify","path":["core","type","classify"],"children":[]}]},{"name":"Symbol","path":["core","symbol"],"children":[]},{"name":"String","path":["core","string"],"children":[]},{"name":"RegExp","path":["core","regexp"],"children":[{"name":"Result","path":["core","regexp","result"],"children":[]}]},{"name":"Promise","path":["core","promise"],"children":[]},{"name":"Ordering","path":["core","ordering"],"children":[]},{"name":"Object","path":["core","object"],"children":[]},{"name":"Nullable","path":["core","nullable"],"children":[]},{"name":"Null","path":["core","null"],"children":[]},{"name":"Math","path":["core","math"],"children":[{"name":"Int","path":["core","math","int"],"children":[]},{"name":"Constants","path":["core","math","constants"],"children":[]}]},{"name":"BigInt","path":["core","bigint"],"children":[]},{"name":"Int","path":["core","int"],"children":[{"name":"Constants","path":["core","int","constants"],"children":[]}]},{"name":"Float","path":["core","float"],"children":[{"name":"Constants","path":["core","float","constants"],"children":[]}]},{"name":"Error","path":["core","error"],"children":[{"name":"URIError","path":["core","error","urierror"],"children":[]},{"name":"TypeError","path":["core","error","typeerror"],"children":[]},{"name":"SyntaxError","path":["core","error","syntaxerror"],"children":[]},{"name":"ReferenceError","path":["core","error","referenceerror"],"children":[]},{"name":"RangeError","path":["core","error","rangeerror"],"children":[]},{"name":"EvalError","path":["core","error","evalerror"],"children":[]}]},{"name":"Dict","path":["core","dict"],"children":[]},{"name":"Date","path":["core","date"],"children":[{"name":"UTC","path":["core","date","utc"],"children":[]}]},{"name":"DataView","path":["core","dataview"],"children":[]},{"name":"Console","path":["core","console"],"children":[]},{"name":"Array","path":["core","array"],"children":[]}]}} \ No newline at end of file +{"js":{"name":"Js","path":["js"],"children":[{"name":"WeakMap","path":["js","weakmap"],"children":[]},{"name":"Map","path":["js","map"],"children":[]},{"name":"WeakSet","path":["js","weakset"],"children":[]},{"name":"Set","path":["js","set"],"children":[]},{"name":"Console","path":["js","console"],"children":[]},{"name":"Vector","path":["js","vector"],"children":[]},{"name":"List","path":["js","list"],"children":[]},{"name":"Result","path":["js","result"],"children":[]},{"name":"Option","path":["js","option"],"children":[]},{"name":"Blob","path":["js","blob"],"children":[]},{"name":"File","path":["js","file"],"children":[]},{"name":"BigInt","path":["js","bigint"],"children":[]},{"name":"Int","path":["js","int"],"children":[]},{"name":"Float","path":["js","float"],"children":[]},{"name":"Types","path":["js","types"],"children":[]},{"name":"TypedArray2","path":["js","typedarray2"],"children":[{"name":"DataView","path":["js","typedarray2","dataview"],"children":[]},{"name":"Float64Array","path":["js","typedarray2","float64array"],"children":[]},{"name":"Float32Array","path":["js","typedarray2","float32array"],"children":[]},{"name":"Uint32Array","path":["js","typedarray2","uint32array"],"children":[]},{"name":"Int32Array","path":["js","typedarray2","int32array"],"children":[]},{"name":"Uint16Array","path":["js","typedarray2","uint16array"],"children":[]},{"name":"Int16Array","path":["js","typedarray2","int16array"],"children":[]},{"name":"Uint8ClampedArray","path":["js","typedarray2","uint8clampedarray"],"children":[]},{"name":"Uint8Array","path":["js","typedarray2","uint8array"],"children":[]},{"name":"Int8Array","path":["js","typedarray2","int8array"],"children":[]},{"name":"ArrayBuffer","path":["js","typedarray2","arraybuffer"],"children":[]}]},{"name":"Typed_array","path":["js","typed_array"],"children":[{"name":"DataView","path":["js","typed_array","dataview"],"children":[]},{"name":"Float64_array","path":["js","typed_array","float64_array"],"children":[]},{"name":"Float64Array","path":["js","typed_array","float64array"],"children":[]},{"name":"Float32_array","path":["js","typed_array","float32_array"],"children":[]},{"name":"Float32Array","path":["js","typed_array","float32array"],"children":[]},{"name":"Uint32Array","path":["js","typed_array","uint32array"],"children":[]},{"name":"Int32_array","path":["js","typed_array","int32_array"],"children":[]},{"name":"Int32Array","path":["js","typed_array","int32array"],"children":[]},{"name":"Uint16Array","path":["js","typed_array","uint16array"],"children":[]},{"name":"Int16Array","path":["js","typed_array","int16array"],"children":[]},{"name":"Uint8ClampedArray","path":["js","typed_array","uint8clampedarray"],"children":[]},{"name":"Uint8Array","path":["js","typed_array","uint8array"],"children":[]},{"name":"Int8Array","path":["js","typed_array","int8array"],"children":[]},{"name":"S","path":["js","typed_array","s"],"children":[]},{"name":"ArrayBuffer","path":["js","typed_array","arraybuffer"],"children":[]},{"name":"Type","path":["js","typed_array","type"],"children":[]}]},{"name":"Obj","path":["js","obj"],"children":[]},{"name":"Math","path":["js","math"],"children":[]},{"name":"Json","path":["js","json"],"children":[{"name":"Kind","path":["js","json","kind"],"children":[]}]},{"name":"Global","path":["js","global"],"children":[]},{"name":"Dict","path":["js","dict"],"children":[]},{"name":"Date","path":["js","date"],"children":[]},{"name":"Promise2","path":["js","promise2"],"children":[]},{"name":"Promise","path":["js","promise"],"children":[]},{"name":"Re","path":["js","re"],"children":[]},{"name":"String2","path":["js","string2"],"children":[]},{"name":"String","path":["js","string"],"children":[]},{"name":"Array2","path":["js","array2"],"children":[]},{"name":"Array","path":["js","array"],"children":[]},{"name":"Exn","path":["js","exn"],"children":[]},{"name":"Null_undefined","path":["js","null_undefined"],"children":[]},{"name":"Nullable","path":["js","nullable"],"children":[]},{"name":"Undefined","path":["js","undefined"],"children":[]},{"name":"Null","path":["js","null"],"children":[]}]},"belt":{"name":"Belt","path":["belt"],"children":[{"name":"Float","path":["belt","float"],"children":[]},{"name":"Int","path":["belt","int"],"children":[]},{"name":"Result","path":["belt","result"],"children":[]},{"name":"Option","path":["belt","option"],"children":[]},{"name":"HashMap","path":["belt","hashmap"],"children":[{"name":"String","path":["belt","hashmap","string"],"children":[]},{"name":"Int","path":["belt","hashmap","int"],"children":[]}]},{"name":"HashSet","path":["belt","hashset"],"children":[{"name":"String","path":["belt","hashset","string"],"children":[]},{"name":"Int","path":["belt","hashset","int"],"children":[]}]},{"name":"MutableMap","path":["belt","mutablemap"],"children":[{"name":"String","path":["belt","mutablemap","string"],"children":[]},{"name":"Int","path":["belt","mutablemap","int"],"children":[]}]},{"name":"MutableSet","path":["belt","mutableset"],"children":[{"name":"String","path":["belt","mutableset","string"],"children":[]},{"name":"Int","path":["belt","mutableset","int"],"children":[]}]},{"name":"Map","path":["belt","map"],"children":[{"name":"Dict","path":["belt","map","dict"],"children":[]},{"name":"String","path":["belt","map","string"],"children":[]},{"name":"Int","path":["belt","map","int"],"children":[]}]},{"name":"Set","path":["belt","set"],"children":[{"name":"Dict","path":["belt","set","dict"],"children":[]},{"name":"String","path":["belt","set","string"],"children":[]},{"name":"Int","path":["belt","set","int"],"children":[]}]},{"name":"Range","path":["belt","range"],"children":[]},{"name":"List","path":["belt","list"],"children":[]},{"name":"MutableStack","path":["belt","mutablestack"],"children":[]},{"name":"MutableQueue","path":["belt","mutablequeue"],"children":[]},{"name":"SortArray","path":["belt","sortarray"],"children":[{"name":"String","path":["belt","sortarray","string"],"children":[]},{"name":"Int","path":["belt","sortarray","int"],"children":[]}]},{"name":"Array","path":["belt","array"],"children":[]},{"name":"Id","path":["belt","id"],"children":[{"name":"MakeHashable","path":["belt","id","makehashable"],"children":[]},{"name":"MakeHashableU","path":["belt","id","makehashableu"],"children":[]},{"name":"MakeComparable","path":["belt","id","makecomparable"],"children":[]},{"name":"MakeComparableU","path":["belt","id","makecomparableu"],"children":[]}]}]},"dom":{"name":"Dom","path":["dom"],"children":[{"name":"Storage2","path":["dom","storage2"],"children":[]},{"name":"Storage","path":["dom","storage"],"children":[]}]},"core":{"name":"Core","path":["core"],"children":[{"name":"Result","path":["core","result"],"children":[]},{"name":"List","path":["core","list"],"children":[]},{"name":"Option","path":["core","option"],"children":[]},{"name":"Exn","path":["core","exn"],"children":[]},{"name":"Intl","path":["core","intl"],"children":[{"name":"Segments","path":["core","intl","segments"],"children":[]},{"name":"Segmenter","path":["core","intl","segmenter"],"children":[]},{"name":"RelativeTimeFormat","path":["core","intl","relativetimeformat"],"children":[]},{"name":"PluralRules","path":["core","intl","pluralrules"],"children":[]},{"name":"NumberFormat","path":["core","intl","numberformat"],"children":[{"name":"Grouping","path":["core","intl","numberformat","grouping"],"children":[]}]},{"name":"Locale","path":["core","intl","locale"],"children":[]},{"name":"ListFormat","path":["core","intl","listformat"],"children":[]},{"name":"DateTimeFormat","path":["core","intl","datetimeformat"],"children":[]},{"name":"Collator","path":["core","intl","collator"],"children":[]},{"name":"Common","path":["core","intl","common"],"children":[]}]},{"name":"BigUint64Array","path":["core","biguint64array"],"children":[{"name":"Constants","path":["core","biguint64array","constants"],"children":[]}]},{"name":"BigInt64Array","path":["core","bigint64array"],"children":[{"name":"Constants","path":["core","bigint64array","constants"],"children":[]}]},{"name":"Uint8ClampedArray","path":["core","uint8clampedarray"],"children":[{"name":"Constants","path":["core","uint8clampedarray","constants"],"children":[]}]},{"name":"Uint32Array","path":["core","uint32array"],"children":[{"name":"Constants","path":["core","uint32array","constants"],"children":[]}]},{"name":"Uint16Array","path":["core","uint16array"],"children":[{"name":"Constants","path":["core","uint16array","constants"],"children":[]}]},{"name":"Uint8Array","path":["core","uint8array"],"children":[{"name":"Constants","path":["core","uint8array","constants"],"children":[]}]},{"name":"Int32Array","path":["core","int32array"],"children":[{"name":"Constants","path":["core","int32array","constants"],"children":[]}]},{"name":"Int16Array","path":["core","int16array"],"children":[{"name":"Constants","path":["core","int16array","constants"],"children":[]}]},{"name":"Int8Array","path":["core","int8array"],"children":[{"name":"Constants","path":["core","int8array","constants"],"children":[]}]},{"name":"Float64Array","path":["core","float64array"],"children":[{"name":"Constants","path":["core","float64array","constants"],"children":[]}]},{"name":"Float32Array","path":["core","float32array"],"children":[{"name":"Constants","path":["core","float32array","constants"],"children":[]}]},{"name":"TypedArray","path":["core","typedarray"],"children":[]},{"name":"ArrayBuffer","path":["core","arraybuffer"],"children":[]},{"name":"WeakSet","path":["core","weakset"],"children":[]},{"name":"Set","path":["core","set"],"children":[]},{"name":"WeakMap","path":["core","weakmap"],"children":[]},{"name":"Map","path":["core","map"],"children":[]},{"name":"AsyncIterator","path":["core","asynciterator"],"children":[]},{"name":"Iterator","path":["core","iterator"],"children":[]},{"name":"JSON","path":["core","json"],"children":[{"name":"Decode","path":["core","json","decode"],"children":[]},{"name":"Encode","path":["core","json","encode"],"children":[]},{"name":"Classify","path":["core","json","classify"],"children":[]}]},{"name":"Type","path":["core","type"],"children":[{"name":"Classify","path":["core","type","classify"],"children":[]}]},{"name":"Symbol","path":["core","symbol"],"children":[]},{"name":"String","path":["core","string"],"children":[]},{"name":"RegExp","path":["core","regexp"],"children":[{"name":"Result","path":["core","regexp","result"],"children":[]}]},{"name":"Promise","path":["core","promise"],"children":[]},{"name":"Ordering","path":["core","ordering"],"children":[]},{"name":"Object","path":["core","object"],"children":[]},{"name":"Nullable","path":["core","nullable"],"children":[]},{"name":"Null","path":["core","null"],"children":[]},{"name":"Math","path":["core","math"],"children":[{"name":"Int","path":["core","math","int"],"children":[]},{"name":"Constants","path":["core","math","constants"],"children":[]}]},{"name":"BigInt","path":["core","bigint"],"children":[]},{"name":"Int","path":["core","int"],"children":[{"name":"Constants","path":["core","int","constants"],"children":[]}]},{"name":"Float","path":["core","float"],"children":[{"name":"Constants","path":["core","float","constants"],"children":[]}]},{"name":"Error","path":["core","error"],"children":[{"name":"URIError","path":["core","error","urierror"],"children":[]},{"name":"TypeError","path":["core","error","typeerror"],"children":[]},{"name":"SyntaxError","path":["core","error","syntaxerror"],"children":[]},{"name":"ReferenceError","path":["core","error","referenceerror"],"children":[]},{"name":"RangeError","path":["core","error","rangeerror"],"children":[]},{"name":"EvalError","path":["core","error","evalerror"],"children":[]}]},{"name":"Dict","path":["core","dict"],"children":[]},{"name":"Date","path":["core","date"],"children":[{"name":"UTC","path":["core","date","utc"],"children":[]}]},{"name":"DataView","path":["core","dataview"],"children":[]},{"name":"Console","path":["core","console"],"children":[]},{"name":"Array","path":["core","array"],"children":[]}]}} \ No newline at end of file diff --git a/misc_docs/syntax/extension_regular_expression.mdx b/misc_docs/syntax/extension_regular_expression.mdx index a45ce5e9d..c4ba1f3ad 100644 --- a/misc_docs/syntax/extension_regular_expression.mdx +++ b/misc_docs/syntax/extension_regular_expression.mdx @@ -26,4 +26,4 @@ var result = regex.test("hello world"); * [Regular Expressions](/docs/manual/latest/primitive-types#regular-expression) * [Extension Point Attributes](/docs/manual/latest/attribute#extension-point) -* [Re API](/docs/manual/latest/api/core/re) +* [RegExp API](/docs/manual/latest/api/core/regexp) diff --git a/pages/docs/manual/latest/primitive-types.mdx b/pages/docs/manual/latest/primitive-types.mdx index 2ca143d4c..7c5843bb7 100644 --- a/pages/docs/manual/latest/primitive-types.mdx +++ b/pages/docs/manual/latest/primitive-types.mdx @@ -120,7 +120,7 @@ var r = /b/g;
    -A regular expression like the above has the type `Re.t`. The [Re](api/core/re) module contains the regular expression helpers you have seen in JS. +A regular expression like the above has the type `Re.t`. The [RegExp](api/core/regexp) module contains the regular expression helpers you have seen in JS. ## Boolean From c239a11249ebb67a29911d9ae648cb7189d4d006 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Sun, 30 Jun 2024 23:24:34 +0200 Subject: [PATCH 019/124] React docs updates (#892) * Add react examples to compilation tests and fix them * Remove warn banner * Fix closing tag --- pages/docs/react/latest/arrays-and-keys.mdx | 229 +++++++++++++++--- pages/docs/react/latest/beyond-jsx.mdx | 81 +++++-- .../react/latest/components-and-props.mdx | 33 ++- pages/docs/react/latest/context.mdx | 8 +- pages/docs/react/latest/elements-and-jsx.mdx | 26 +- pages/docs/react/latest/events.mdx | 2 +- .../docs/react/latest/extensions-of-props.mdx | 37 ++- pages/docs/react/latest/forwarding-refs.mdx | 6 +- pages/docs/react/latest/hooks-context.mdx | 2 +- pages/docs/react/latest/hooks-custom.mdx | 34 +-- pages/docs/react/latest/hooks-effect.mdx | 129 +++++----- pages/docs/react/latest/hooks-overview.mdx | 6 +- pages/docs/react/latest/hooks-reducer.mdx | 6 +- pages/docs/react/latest/hooks-ref.mdx | 6 +- pages/docs/react/latest/hooks-state.mdx | 34 +-- .../react/latest/import-export-reactjs.mdx | 10 +- pages/docs/react/latest/lazy-components.mdx | 2 +- pages/docs/react/latest/memo.mdx | 6 +- pages/docs/react/latest/migrate-react.mdx | 12 +- pages/docs/react/latest/refs-and-the-dom.mdx | 14 +- .../docs/react/latest/rendering-elements.mdx | 4 +- pages/docs/react/latest/styling.mdx | 25 +- scripts/test-examples.mjs | 2 +- src/layouts/ReactDocsLayout.res | 31 --- 24 files changed, 461 insertions(+), 284 deletions(-) diff --git a/pages/docs/react/latest/arrays-and-keys.mdx b/pages/docs/react/latest/arrays-and-keys.mdx index f7b46621e..869804f28 100644 --- a/pages/docs/react/latest/arrays-and-keys.mdx +++ b/pages/docs/react/latest/arrays-and-keys.mdx @@ -16,7 +16,9 @@ Whenever we are transforming data into an array of elements and put it in our Re Arrays require a special function `React.array` to convert an `array` to render as `Jsx.element`. -```res + + +```res example type todo = {id: string, text: string} @react.component @@ -31,21 +33,68 @@ let make = () => { } ``` +```js +function Playground(props) { + var todos = [ + { + id: "todo1", + text: "Todo 1" + }, + { + id: "todo2", + text: "Todo 2" + } + ]; + var items = todos.map(function (todo) { + return JsxRuntime.jsx("li", { + children: todo.text + }, todo.id); + }); + return JsxRuntime.jsx("ul", { + children: items + }); +} +``` + + + ## Keys Keys help React identify which elements have been changed, added, or removed throughout each render. Keys should be given to elements inside the array to give the elements a stable identity: -```res -let numbers = [1, 2, 3, 4, 5]; + + +```res example +let numbers = [1, 2, 3, 4, 5] let items = Array.map(numbers, (number) => {
  • {React.int(number)}
  • }) ``` +```js +var numbers = [ + 1, + 2, + 3, + 4, + 5 +]; + +var items = numbers.map(function (number) { + return JsxRuntime.jsx("li", { + children: number + }, number.toString()); + }); +``` + +
    + The best way to pick a key is to use a string that uniquely identifies a list item among its siblings. Most often you would use IDs from your data as keys: -```res + + +```res prelude type todo = {id: string, text: string} let todos = [ @@ -58,22 +107,58 @@ let items = Array.map(todos, todo => { }) ``` +```js +var todos = [ + { + id: "todo1", + text: "Todo 1" + }, + { + id: "todo2", + text: "Todo 2" + } +]; + +var items = todos.map(function (todo) { + return JsxRuntime.jsx("li", { + children: todo.text + }, todo.id); + }); +``` + + + If you don’t have stable IDs for rendered items, you may use the item index as a key as a last resort: -```res {1..3} -let items = Array.mapWithIndex(todos, (i, todo) => { + + +```res example {1..3} +let items = Array.mapWithIndex(todos, (todo, i) => { // Only do this if items have no stable id
  • - {todo.text} + {React.string(todo.text)}
  • -}); +}) ``` +```js +var items = todos.map(function (todo, i) { + return JsxRuntime.jsx("li", { + children: todo.text + }, i.toString()); + }); +``` + +
    + + ### Keys Must Only Be Unique Among Siblings Keys used within arrays should be unique among their siblings. However they don’t need to be globally unique. We can use the same keys when we produce two different arrays: -```res {6,10,17,18,25,27} + + +```res example {6,10,17,18,25,27} type post = {id: string, title: string, content: string} module Blog = { @@ -81,23 +166,19 @@ module Blog = { let make = (~posts: array) => { let sidebar =
      - { - Array.map(posts, (post) => { -
    • - {React.string(post.title)} -
    • - })->React.array - } + {Array.map(posts, post => { +
    • {React.string(post.title)}
    • + })->React.array}
    - let content = Array.map(posts, (post) => { -
    -

    {React.string(post.title)}

    -

    {React.string(post.content)}

    -
    - }); - -
    + let content = Array.map(posts, post => { +
    +

    {React.string(post.title)}

    +

    {React.string(post.content)}

    +
    + }) + +
    {sidebar}
    {React.array(content)} @@ -106,19 +187,84 @@ module Blog = { } let posts = [ - {id: "1", title: "Hello World", content: "Welcome to learning ReScript & React!"}, - {id: "2", title: "Installation", content: "You can install reason-react from npm."} + { + id: "1", + title: "Hello World", + content: "Welcome to learning ReScript & React!", + }, + { + id: "2", + title: "Installation", + content: "You can install reason-react from npm.", + }, ] -let blog = +let blog = +``` + +```js +function Playground$Blog(props) { + var posts = props.posts; + var sidebar = JsxRuntime.jsx("ul", { + children: posts.map(function (post) { + return JsxRuntime.jsx("li", { + children: post.title + }, post.id); + }) + }); + var content = posts.map(function (post) { + return JsxRuntime.jsxs("div", { + children: [ + JsxRuntime.jsx("h3", { + children: post.title + }), + JsxRuntime.jsx("p", { + children: post.content + }) + ] + }, post.id); + }); + return JsxRuntime.jsxs("div", { + children: [ + sidebar, + JsxRuntime.jsx("hr", {}), + content + ] + }); +} + +var Blog = { + make: Playground$Blog +}; + +var posts = [ + { + id: "1", + title: "Hello World", + content: "Welcome to learning ReScript & React!" + }, + { + id: "2", + title: "Installation", + content: "You can install reason-react from npm." + } +]; + +var blog = JsxRuntime.jsx(Playground$Blog, { + posts: posts + }); ``` + + ## Rendering `list` Values In case you ever want to render a `list` of items, you can do something like this: -```res + + +```res example type todo = {id: string, text: string} @react.component @@ -140,6 +286,33 @@ let make = () => { ``` +```js +function Playground(props) { + var items = Core__List.toArray({ + hd: { + id: "todo1", + text: "Todo 1" + }, + tl: { + hd: { + id: "todo2", + text: "Todo 2" + }, + tl: /* [] */0 + } + }).map(function (todo) { + return JsxRuntime.jsx("li", { + children: todo.text + }, todo.id); + }); + return JsxRuntime.jsx("div", { + children: items + }); +} +``` + + + We use `List.toArray` to convert our list to an array before creating our `array`. Please note that using `list` has performance impact due to extra conversion costs. 99% of the time you'll want to use arrays (seamless interop, faster JS code), but in some cases it might make sense to use a `list` to leverage advanced pattern matching features etc. diff --git a/pages/docs/react/latest/beyond-jsx.mdx b/pages/docs/react/latest/beyond-jsx.mdx index add3c766b..01816cb0d 100644 --- a/pages/docs/react/latest/beyond-jsx.mdx +++ b/pages/docs/react/latest/beyond-jsx.mdx @@ -22,7 +22,7 @@ A plain React component is defined as a `('props) => React.element` function. Yo Here are some examples on how to define your own component types (often useful when interoping with existing JS code, or passing around components): -```res +```res example // Plain function type type friend = {name: string, online: bool} type friendComp = friend => React.element @@ -38,9 +38,24 @@ The types above are pretty low level (basically the JS representation of a React A ReScript React component needs to be a (sub-)module with a `make` function and `props` type to be usable in JSX. To make things easier, we provide a `@react.component` decorator to create those functions for you: - +
    -```res +```res prelude +module Friend = { + @react.component + let make = (~name: string, ~age: int) => {React.string(name ++ ", " ++ age->Int.toString)} +} +module Container = { + @react.component + let make = (~width: int, ~children) => {<> {React.string(width->Int.toString)} children } +} +``` + +
    + + + +```res example module Friend = { @react.component let make = (~name: string, ~children) => { @@ -51,7 +66,7 @@ module Friend = { } } ``` -```res +```res example module Friend = { type props<'name, 'children> = { name: 'name, @@ -63,6 +78,20 @@ module Friend = { } } ``` +```js +function Playground$Friend(props) { + return JsxRuntime.jsxs("div", { + children: [ + props.name, + props.children + ] + }); +} + +var Friend = { + make: Playground$Friend +}; +``` @@ -98,10 +127,9 @@ type props<'className, 'children, 'ref> = { } let make = ( - {?className, children, _}: props<'className, 'children, ReactRef.currentDomRef>, - ref: Nullable.t, -) => - make(~className, ~children, ~ref, ()) + {?className, children, _}: props<'className, 'children, ReactDOM.Ref.currentDomRef>, + ref: Nullable.t, +) => make(~className, ~children, ~ref, ()) ```
    @@ -116,10 +144,10 @@ Whenever we are using JSX with a custom component ("capitalized JSX"), we are ac -```res - +```res example +let _ = ``` -```res +```res example // classic React.createElement(Friend.make, {name: "Fred", age:20}) @@ -127,7 +155,7 @@ React.createElement(Friend.make, {name: "Fred", age:20}) React.jsx(Friend.make, {name: "Fred", age: 20}) ``` ```js -React.createElement(Playground$Friend, { name: "Fred", age: 20 }); +JsxRuntime.jsx(Playground$Friend, { name: "Fred", age: 20 }); ``` @@ -136,14 +164,14 @@ As you can see, it uses `Friend.make` to call the `React.createElement` API. In -```res +```res example {React.string("Hello")} {React.string("World")} ``` -```res +```res example // classic React.createElementVariadic( Container.make, @@ -159,7 +187,7 @@ React.jsxs( ``` ```js -React.createElement(Container, { width: 200, children: null }, "Hello", "World"); +JsxRuntime.jsx(Container, { width: 200, children: null }, "Hello", "World"); ``` @@ -173,11 +201,11 @@ Note that the `children: React.null` field has no relevance since React will onl -```res +```res example
    ``` -```res +```res example // classic ReactDOM.createDOMElementVariadic("div", ~props={title: "test"}, []) @@ -186,22 +214,22 @@ ReactDOM.jsx("div", {title: "test"}) ``` ```js -React.createElement("div", { title: "test" }); +JsxRuntime.jsx("div", { title: "test" }); ``` The same goes for uncapitalized JSX with children: - + -```res +```res example
    ``` -```res +```res example // classic ReactDOM.createDOMElementVariadic( "div", @@ -214,7 +242,16 @@ ReactDOM.jsx("div", {title: "test", children: ?ReactDOM.someElement(ReactDOM.jsx ``` ```js -React.createElement("div", { title: "test" }, React.createElement("span", undefined)); +JsxRuntime.jsx("div", { + children: JsxRuntime.jsx("span", {}), + title: "test" + }); +``` + +```js +React.createElement("div", { + title: "test" + }, React.createElement("span", undefined)); ```
    diff --git a/pages/docs/react/latest/components-and-props.mdx b/pages/docs/react/latest/components-and-props.mdx index 7d21b1d68..58ddd7750 100644 --- a/pages/docs/react/latest/components-and-props.mdx +++ b/pages/docs/react/latest/components-and-props.mdx @@ -26,7 +26,7 @@ Let's start with a first example to see how a ReScript React component looks lik -```res +```res example // src/Greeting.res @react.component let make = () => { @@ -59,7 +59,7 @@ In ReactJS, props are usually described as a single `props` record. In ReScript, -```res +```res example // src/Article.res @react.component let make = (~title: string, ~visitorCount: int, ~children: React.element) => { @@ -90,7 +90,7 @@ We can leverage the full power of labeled arguments to define optional props as -```res +```res example // Greeting.res @react.component let make = (~name: option=?) => { @@ -116,9 +116,20 @@ function Greeting(props) { In JSX, you can apply optional props with some special syntax: +
    + +```res prelude +module Greeting = { + @react.component + let make = (~name: option=?) => {React.string(name->Option.getOr(""))} +} +``` + +
    + -```res +```res example let name = Some("Andrea") @@ -162,7 +173,7 @@ as a `React.element`: -```res +```res example module MyList = { @react.component let make = (~children: React.element) => { @@ -219,7 +230,7 @@ module StringChildren = { **Component with an optional `React.element` as children:** -```res +```res example module OptionalChildren = { @react.component let make = (~children: option=?) => { @@ -268,7 +279,7 @@ The ReScript type system is really good at inferring the prop types just by look For simple cases, well-scoped usage, or experimentation, it's still fine to omit type annotations: -```res +```res example // Button.res @react.component @@ -290,7 +301,7 @@ Every ReScript component can be used in JSX. For example, if we want to use our -```res +```res example // src/App.res @react.component @@ -324,7 +335,7 @@ For example: -```res +```res example module Link = { type props = {href: string, children: React.element}; @@ -365,7 +376,7 @@ More details on the `@react.component` decorator and its generated interface can We can also represent React components as submodules, which makes it very convenient to build more complex UI without the need to create multiple files for each composite component (that's probably only used by the parent component anyways): -```res +```res example // src/Button.res module Label = { @react.component @@ -412,7 +423,7 @@ module Nested = { // will be named `File$Nested` in dev tools @react.component let make = ... -}; +} ``` If you need a dynamic name for higher-order components or you would like to set your own name you can use `React.setDisplayName(make, "NameThatShouldBeInDevTools")`. diff --git a/pages/docs/react/latest/context.mdx b/pages/docs/react/latest/context.mdx index 66eef63a4..6b3874670 100644 --- a/pages/docs/react/latest/context.mdx +++ b/pages/docs/react/latest/context.mdx @@ -25,9 +25,9 @@ Context is designed to share data that can be considered “global” for a tree -```res +```res example // src/App.res -type theme = Light | Dark; +type theme = Light | Dark module Button = { @react.component @@ -35,7 +35,7 @@ module Button = { let className = switch theme { | Light => "theme-light" | Dark => "theme-black" - }; + } } } @@ -97,7 +97,7 @@ Using context, we can avoid passing props through intermediate elements: -```res +```res example // src/App.res module ThemeContext = { diff --git a/pages/docs/react/latest/elements-and-jsx.mdx b/pages/docs/react/latest/elements-and-jsx.mdx index aca2954ff..4ac84a02e 100644 --- a/pages/docs/react/latest/elements-and-jsx.mdx +++ b/pages/docs/react/latest/elements-and-jsx.mdx @@ -18,7 +18,7 @@ Elements are the smallest building blocks of React apps. This page will explain Let's start out by creating our first React element. -```res +```res example let element =

    {React.string("Hello World")}

    ``` @@ -26,7 +26,7 @@ The binding `element` and the expression `{React.string("Hello World")}` are bot Let's say you want to create a function that handles another React element, such as `children`, you can annotate it as `React.element`: -```res +```res example let wrapChildren = (children: React.element) => {

    {React.string("Overview")}

    @@ -45,9 +45,9 @@ Fortunately our React bindings bring all necessary functionality to represent al You can compose elements into more complex structures by using JSX: -```res +```res example let greeting = React.string("Hello ") -let name = React.string("Stranger"); +let name = React.string("Stranger") // element is also of type React.element @@ -64,7 +64,7 @@ Sometimes, when doing a lot of interop with existing ReactJS codebases, you'll f Apart from using JSX to create our React elements or React components, the `React` module offers various functions to create elements from primitive data types: -```res +```res example React.string("Hello") // new element representing "Hello" React.int(1) // new element representing "1" @@ -74,7 +74,7 @@ React.float(1.0) // new element representing "1.0" It also offers `React.array` to represent multiple elements as one single element (useful for rendering a list of data, or passing children): -```res +```res example let element = React.array([ React.string("element 1"), React.string("element 2"), @@ -91,7 +91,7 @@ ReScript doesn't allow `element || null` constraints due to it's strongly typed -```res +```res example let name = Some("Andrea") let element = switch name { @@ -121,7 +121,7 @@ React.createElement("div", undefined, element); Sometimes it's necessary to pass around component functions to have more control over `React.element` creation. Use the `React.createElement` function to instantiate your elements: -```res +```res example type props = {name: string} let render = (myComp: props => React.element) => { @@ -131,7 +131,7 @@ let render = (myComp: props => React.element) => { This feature is often used when interacting with existing JS / ReactJS code. In pure ReScript React applications, you would rather pass a function that does the rendering for you (also called a "render prop"): -```res +```res example let render = (renderMyComp: (~name: string) => React.element) => {
    {renderMyComp(~name="Franz")}
    } @@ -143,7 +143,7 @@ There is also a `React.createElementVariadic` function, which takes an array of -```res +```res example type props = {title: string, children: React.element} let render = (article: props => React.element) => { @@ -183,7 +183,7 @@ This function is mostly used by our JSX transformations, so usually you want to To create DOM elements (`
    `, ``, etc.), use `ReactDOM.createDOMElementVariadic`: -```res +```res example ReactDOM.createDOMElementVariadic("div", ~props={className: "card"}, []) ``` @@ -197,11 +197,11 @@ Sometimes it's required to clone an existing element to set, overwrite or add pr -```res +```res example let original =
    // Will return a new React.element with className set to "world" -React.cloneElement(original, {"className": "world", "data-name": "some name"}); +React.cloneElement(original, {"className": "world", "data-name": "some name"}) ``` ```js var original = React.createElement("div", { diff --git a/pages/docs/react/latest/events.mdx b/pages/docs/react/latest/events.mdx index 5000cd988..de9fc930a 100644 --- a/pages/docs/react/latest/events.mdx +++ b/pages/docs/react/latest/events.mdx @@ -14,7 +14,7 @@ Depending on the event handler, the callback function will have a different type Due to the dynamic nature of JavaScript, we cannot anticipate the target type on the event. So, we need a leap of faith to grab the input value as string. -```res +```res example module App = { @react.component let make = () => { diff --git a/pages/docs/react/latest/extensions-of-props.mdx b/pages/docs/react/latest/extensions-of-props.mdx index 0419fe3f0..adda00760 100644 --- a/pages/docs/react/latest/extensions-of-props.mdx +++ b/pages/docs/react/latest/extensions-of-props.mdx @@ -12,16 +12,27 @@ canonical: "/docs/react/latest/spread-props" JSX props spread is supported now, but in a stricter way than in JS. +
    + +```res prelude +module Comp = { + type props = {a?: string, b?: string} + external make: React.component = "default" +} +``` + +
    + -```res +```res example +let props = {Comp.b: "b"} ``` ```js -React.createElement(Comp, { - a: "a", - b: "b" -}); +var props = {b: "b"}; +var newrecord = Caml_obj.obj_dup(props); +return JsxRuntime.jsx(default, (newrecord.a = "a", newrecord)); ``` @@ -52,17 +63,17 @@ You can control the definition of the `props` type by passing as argument to `@r -```res -type sharedprops<'x, 'y> = {x: 'x, y: 'y, z:string} +```res example +type sharedProps<'x, 'y> = {x: 'x, y: 'y, z:string} module C1 = { @react.component(:sharedProps<'a, 'b>) - let make = (~x, ~y) => React.string(x ++ y ++ z) + let make = (~x, ~y, ~z) => React.string(x ++ y ++ z) } module C2 = { @react.component(:sharedProps) - let make = (~x, ~y) => React.string(x ++ y ++ z) + let make = (~x, ~y, ~z) => React.string(x ++ y ++ z) } module C3 = { @@ -72,17 +83,17 @@ module C3 = { } ``` -```res -type sharedprops<'x, 'y> = {x: 'x, y: 'y, z: string} +```res example +type sharedProps<'x, 'y> = {x: 'x, y: 'y, z: string} module C1 = { type props<'a, 'b> = sharedProps<'a, 'b> - let make = ({x, y, _}: props<_>) => React.string(x ++ y ++ z) + let make = ({x, y, z}: props<_>) => React.string(x ++ y ++ z) } module C2 = { type props<'b> = sharedProps - let make = ({x, y, _}: props<_>) => React.string(x ++ y ++ z) + let make = ({x, y, z}: props<_>) => React.string(x ++ y ++ z) } module C3 = { diff --git a/pages/docs/react/latest/forwarding-refs.mdx b/pages/docs/react/latest/forwarding-refs.mdx index 76431c114..617198278 100644 --- a/pages/docs/react/latest/forwarding-refs.mdx +++ b/pages/docs/react/latest/forwarding-refs.mdx @@ -16,7 +16,7 @@ Ref forwarding is a technique for automatically passing a [React.ref](./refs-and Consider a FancyButton component that renders the native button DOM element: -```res +```res example // FancyButton.res @react.component @@ -43,7 +43,7 @@ A `React.ref` can be passed down like any other prop. The component will take ca In the example below, `FancyInput` defines a prop `inputRef` that will be forwarded to its `input` element: -```res +```res example // App.res module FancyInput = { @@ -84,7 +84,7 @@ This is how the previous example would look like with the `React.forwardRef` app -```res +```res example // App.res module FancyInput = { diff --git a/pages/docs/react/latest/hooks-context.mdx b/pages/docs/react/latest/hooks-context.mdx index 8af68ddfe..df3cdd133 100644 --- a/pages/docs/react/latest/hooks-context.mdx +++ b/pages/docs/react/latest/hooks-context.mdx @@ -30,7 +30,7 @@ Accepts a `React.Context.t` (the value returned from `React.createContext`) and -```res +```res example // App.res module ThemeContext = { let context = React.createContext("light") diff --git a/pages/docs/react/latest/hooks-custom.mdx b/pages/docs/react/latest/hooks-custom.mdx index 42a1eac02..1176591b0 100644 --- a/pages/docs/react/latest/hooks-custom.mdx +++ b/pages/docs/react/latest/hooks-custom.mdx @@ -20,17 +20,17 @@ Let's go back to a previous example from our [React.useEffect section](./hooks-e -```res {16-31} +```res example {16-31} // FriendStatus.res module ChatAPI = { // Imaginary globally available ChatAPI for demo purposes - type status = { isOnline: bool }; - @val external subscribeToFriendStatus: (string, status => unit) => unit = "subscribeToFriendStatus"; - @val external unsubscribeFromFriendStatus: (string, status => unit) => unit = "unsubscribeFromFriendStatus"; + type status = { isOnline: bool } + @val external subscribeToFriendStatus: (string, status => unit) => unit = "subscribeToFriendStatus" + @val external unsubscribeFromFriendStatus: (string, status => unit) => unit = "unsubscribeFromFriendStatus" } -type state = Offline | Loading | Online; +type state = Offline | Loading | Online @react.component let make = (~friendId: string) => { @@ -43,15 +43,15 @@ let make = (~friendId: string) => { }) } - ChatAPI.subscribeToFriendStatus(friendId, handleStatusChange); - setState(_ => Loading); + ChatAPI.subscribeToFriendStatus(friendId, handleStatusChange) + setState(_ => Loading) let cleanup = () => { ChatAPI.unsubscribeFromFriendStatus(friendId, handleStatusChange) } Some(cleanup) - }) + }, [friendId]) let text = switch(state) { | Offline => friendId ++ " is offline" @@ -117,14 +117,14 @@ Now let’s say that our chat application also has a contact list, and we want t ```res {15-30} // FriendListItem.res -type state = Offline | Loading | Online; +type state = Offline | Loading | Online // module ChatAPI = {...} type friend = { id: string, name: string -}; +} @react.component let make = (~friend: friend) => { @@ -137,8 +137,8 @@ let make = (~friend: friend) => { }) } - ChatAPI.subscribeToFriendStatus(friend.id, handleStatusChange); - setState(_ => Loading); + ChatAPI.subscribeToFriendStatus(friend.id, handleStatusChange) + setState(_ => Loading) let cleanup = () => { ChatAPI.unsubscribeFromFriendStatus(friend.id, handleStatusChange) @@ -292,7 +292,7 @@ The purpose of our `useFriendStatus` Hook is to subscribe us to a friend’s sta ```res let useFriendStatus = (friendId: string): status { - let (state, setState) = React.useState(_ => Offline); + let (state, setState) = React.useState(_ => Offline) // ... @@ -315,11 +315,11 @@ Now that we’ve extracted this logic to a useFriendStatus hook, we can just use ```res {6} // FriendStatus.res -type friend = { id: string }; +type friend = { id: string } @react.component let make = (~friend: friend) => { - let onlineState = FriendStatusHook.useFriendStatus(friend.id); + let onlineState = FriendStatusHook.useFriendStatus(friend.id) let status = switch(onlineState) { | FriendStatusHook.Online => "Online" @@ -327,7 +327,7 @@ let make = (~friend: friend) => { | Offline => "Offline" } - React.string(status); + React.string(status) } ``` ```js @@ -363,7 +363,7 @@ function FriendStatus(Props) { // FriendListItem.res @react.component let make = (~friend: friend) => { - let onlineState = FriendStatusHook.useFriendStatus(friend.id); + let onlineState = FriendStatusHook.useFriendStatus(friend.id) let color = switch(onlineState) { | Offline => "red" diff --git a/pages/docs/react/latest/hooks-effect.mdx b/pages/docs/react/latest/hooks-effect.mdx index 0899df691..404c26cae 100644 --- a/pages/docs/react/latest/hooks-effect.mdx +++ b/pages/docs/react/latest/hooks-effect.mdx @@ -23,39 +23,38 @@ There are two common kinds of side effects in React components: those that don -```res +```res example // Runs after every completed render -React.useEffect(() => { +React.useEffectOnEveryRender(() => { // Run effects None // or Some(() => {}) }) // Runs only once right after mounting the component -React.useEffect0(() => { +React.useEffect(() => { // Run effects None // or Some(() => {}) -}) +}, []) + +// Dummy props +let prop1 = 1 and prop2 = 2 and prop3 = 3 // Runs everytime `prop1` has changed -React.useEffect1(() => { +React.useEffect(() => { // Run effects based on prop1 None }, [prop1]) // Runs everytime `prop1` or `prop2` has changed -React.useEffect2(() => { +React.useEffect(() => { // Run effects based on prop1 / prop2 None }, (prop1, prop2)) -React.useEffect3(() => { +React.useEffect(() => { None -}, (prop1, prop2, prop3)); - -// useEffect4...7 with according dependency -// tuple just like useEffect3 - +}, (prop1, prop2, prop3)) ``` ```js @@ -70,11 +69,11 @@ React.useEffect((function () { }), [ prop1, prop2, prop3 ]); `React.useEffect` receives a function that contains imperative, possibly effectful code, and returns a value `option unit>` as a potential cleanup function. -A `useEffect` call may receive an additional array of dependencies (see `React.useEffect1` / `React.useEffect2...7`). The effect function will run whenever one of the provided dependencies has changed. More details on why this is useful [down below](#effect-dependencies). +A `useEffect` call may receive an additional array of dependencies. The effect function will run whenever one of the provided dependencies has changed. More details on why this is useful [down below](#effect-dependencies). -**Note:** You probably wonder why `React.useEffect1` receives an `array`, and `useEffect2` etc require a `tuple` (e.g. `(prop1, prop2)`) for the dependency list. That's because a tuple can receive multiple values of different types, whereas an `array` only accepts values of identical types. It's possible to replicate `useEffect2` by doing `React.useEffect1(fn, [1, 2])`, on other hand the type checker wouldn't allow `React.useEffect1(fn, [1, "two"])`. +**Note:** You probably wonder why the `React.useEffect` with only one dependency receives an `array`, while `useEffect`'s with multiple dependencies require a `tuple` (e.g. `(prop1, prop2)`) for the dependency list. That's because a tuple can receive multiple values of different types, whereas an `array` only accepts values of identical types. It's possible to replicate a `useEffect` with multiple dependencies by doing `React.useEffect(fn, [1, 2])`, on other hand the type checker wouldn't allow `React.useEffect(fn, [1, "two"])`. -`React.useEffect` will run its function after every completed render, while `React.useEffect0` will only run the effect on the first render (when the component has mounted). +`React.useEffectOnEveryRender` will run its function after every completed render, while `React.useEffect` will only run the effect on the first render (when the component has mounted). ## Examples @@ -85,29 +84,32 @@ Sometimes, we want to run some additional code after React has updated the DOM. As an example, let's write a counter component that updates `document.title` on every render: - - -```res +```res prelude // Counter.res module Document = { - type t; - @val external document: t = "document"; + type t + @val external document: t = "document" @set external setTitle: (t, string) => unit = "title" } +``` + + + +```res example @react.component let make = () => { - let (count, setCount) = React.useState(_ => 0); + let (count, setCount) = React.useState(_ => 0) - React.useEffect(() => { - open Document + React.useEffectOnEveryRender(() => { + open! Document document->setTitle(`You clicked ${Belt.Int.toString(count)} times!`) None - }, ); + }) let onClick = (_evt) => { setCount(prev => prev + 1) - }; + } let msg = "You clicked" ++ Belt.Int.toString(count) ++ "times" @@ -147,11 +149,11 @@ function Counter(Props) { In case we want to make the effects dependent on `count`, we can just use following `useEffect` call instead: ```res - React.useEffect1(() => { - open Document + React.useEffect(() => { + open! Document document->setTitle(`You clicked ${Belt.Int.toString(count)} times!`) None - }, [count]); + }, [count]) ``` Now instead of running an effect on every render, it will only run when `count` has a different value than in the render before. @@ -162,33 +164,34 @@ Earlier, we looked at how to express side effects that don’t require any clean Let's look at an example that gracefully subscribes, and later on unsubscribes from some subscription API: - - -```res -// FriendStatus.res - +```res prelude module ChatAPI = { // Imaginary globally available ChatAPI for demo purposes - type status = { isOnline: bool }; - @val external subscribeToFriendStatus: (string, status => unit) => unit = "subscribeToFriendStatus"; - @val external unsubscribeFromFriendStatus: (string, status => unit) => unit = "unsubscribeFromFriendStatus"; + type status = { isOnline: bool } + @val external subscribeToFriendStatus: (string, status => unit) => unit = "subscribeToFriendStatus" + @val external unsubscribeFromFriendStatus: (string, status => unit) => unit = "unsubscribeFromFriendStatus" } -type state = Offline | Loading | Online; +type state = Offline | Loading | Online +``` + + +```res example +// FriendStatus.res @react.component let make = (~friendId: string) => { let (state, setState) = React.useState(_ => Offline) - React.useEffect(() => { + React.useEffectOnEveryRender(() => { let handleStatusChange = (status) => { setState(_ => { status.ChatAPI.isOnline ? Online : Offline }) } - ChatAPI.subscribeToFriendStatus(friendId, handleStatusChange); - setState(_ => Loading); + ChatAPI.subscribeToFriendStatus(friendId, handleStatusChange) + setState(_ => Loading) let cleanup = () => { ChatAPI.unsubscribeFromFriendStatus(friendId, handleStatusChange) @@ -260,41 +263,45 @@ In some cases, cleaning up or applying the effect after every render might creat ```res // from a previous example above -React.useEffect1(() => { - open Document +React.useEffect(() => { + open! Document document->setTitle(`You clicked ${Belt.Int.toString(count)} times!`) - None; -}, [count]); + None +}, [count]) ``` -Here, we pass `[count]` to `useEffect1` as a dependency. What does this mean? If the `count` is 5, and then our component re-renders with count still equal to 5, React will compare `[5]` from the previous render and `[5]` from the next render. Because all items within the array are the same (5 === 5), React would skip the effect. That’s our optimization. +Here, we pass `[count]` to `useEffect` as a dependency. What does this mean? If the `count` is 5, and then our component re-renders with count still equal to 5, React will compare `[5]` from the previous render and `[5]` from the next render. Because all items within the array are the same (5 === 5), React would skip the effect. That’s our optimization. When we render with count updated to 6, React will compare the items in the `[5]` array from the previous render to items in the `[6]` array from the next render. This time, React will re-apply the effect because `5 !== 6`. If there are multiple items in the array, React will re-run the effect even if just one of them is different. This also works for effects that have a cleanup phase: -```res -// from a previous example above -React.useEffect1(() => { - let handleStatusChange = (status) => { - setState(_ => { - status.ChatAPI.isOnline ? Online : Offline - }) - } +```res example +@react.component +let make = (~friendId: string) => { + let (state, setState) = React.useState(_ => Offline) + // from a previous example above + React.useEffect(() => { + let handleStatusChange = (status) => { + setState(_ => { + status.ChatAPI.isOnline ? Online : Offline + }) + } - ChatAPI.subscribeToFriendStatus(friendId, handleStatusChange); - setState(_ => Loading); + ChatAPI.subscribeToFriendStatus(friendId, handleStatusChange) + setState(_ => Loading) - let cleanup = () => { - ChatAPI.unsubscribeFromFriendStatus(friendId, handleStatusChange) - } + let cleanup = () => { + ChatAPI.unsubscribeFromFriendStatus(friendId, handleStatusChange) + } - Some(cleanup) -}, [friendId]) // Only re-subscribe if friendId changes + Some(cleanup) + }, [friendId]) // Only re-subscribe if friendId changes +} ``` **Important:** If you use this optimization, make sure the array includes all values from the component scope (such as props and state) that change over time and that are used by the effect. Otherwise, your code will reference stale values from previous renders -If you want to run an effect and clean it up only once (on mount and unmount), use `React.useEffect0`. +If you want to run an effect and clean it up only once (on mount and unmount), use `React.useEffect` with an empty dependency array `[]`. If you are interested in more performance optmization related topics, have a look at the ReactJS [Performance Optimization Docs](https://reactjs.org/docs/hooks-faq.html#performance-optimizations) for more detailed infos. diff --git a/pages/docs/react/latest/hooks-overview.mdx b/pages/docs/react/latest/hooks-overview.mdx index 1b05ca23a..1e4fc52be 100644 --- a/pages/docs/react/latest/hooks-overview.mdx +++ b/pages/docs/react/latest/hooks-overview.mdx @@ -26,15 +26,15 @@ Just for a quick look, here is an example of a `Counter` component that allows a -```res +```res example // Counter.res @react.component let make = () => { - let (count, setCount) = React.useState(_ => 0); + let (count, setCount) = React.useState(_ => 0) let onClick = (_evt) => { setCount(prev => prev + 1) - }; + } let msg = "You clicked" ++ Belt.Int.toString(count) ++ "times" diff --git a/pages/docs/react/latest/hooks-reducer.mdx b/pages/docs/react/latest/hooks-reducer.mdx index 8b36747ca..2584e6351 100644 --- a/pages/docs/react/latest/hooks-reducer.mdx +++ b/pages/docs/react/latest/hooks-reducer.mdx @@ -38,7 +38,7 @@ An alternative to [useState](./hooks-state). Accepts a reducer of type `(state, -```res +```res example // Counter.res type action = Inc | Dec @@ -103,7 +103,7 @@ You can leverage the full power of variants to express actions with data payload -```res +```res example // TodoApp.res type todo = { @@ -278,7 +278,7 @@ It lets you extract the logic for calculating the initial state outside the redu -```res +```res example // Counter.res type action = Inc | Dec | Reset(int) diff --git a/pages/docs/react/latest/hooks-ref.mdx b/pages/docs/react/latest/hooks-ref.mdx index 053d632df..b6afb2dd5 100644 --- a/pages/docs/react/latest/hooks-ref.mdx +++ b/pages/docs/react/latest/hooks-ref.mdx @@ -17,7 +17,7 @@ The `useRef` hooks creates and manages mutable containers inside your React comp ```res -let refContainer = React.useRef(initialValue); +let refContainer = React.useRef(initialValue) ``` ```js @@ -49,7 +49,7 @@ More infos on direct DOM manipulation can be found in the [Refs and the DOM](./r -```res +```res example // TextInputWithFocusButton.res @send external focus: Dom.element => unit = "focus" @@ -94,7 +94,7 @@ Reusing the example from our [Refs and the DOM](./refs-and-the-dom#callback-refs -```res +```res example // CustomTextInput.res @send external focus: Dom.element => unit = "focus" diff --git a/pages/docs/react/latest/hooks-state.mdx b/pages/docs/react/latest/hooks-state.mdx index a3a9793c9..7099fe408 100644 --- a/pages/docs/react/latest/hooks-state.mdx +++ b/pages/docs/react/latest/hooks-state.mdx @@ -41,7 +41,7 @@ The `setState` function can be passed down to other components as well, which is ### Using State for a Text Input -```res +```res example @react.component let make = () => { let (text, setText) = React.useState(_ => ""); @@ -65,7 +65,7 @@ In this example, we are creating a `ThemeContainer` component that manages a `da -```res +```res example // ThemeContainer.res module ControlPanel = { @react.component @@ -131,32 +131,4 @@ function ThemeContainer(Props) { -Note that whenever `setDarkmode` is returning a new value (e.g. switching from `true` -> `false`), it will cause a re-render for `ThemeContainer`'s `className` and the toggle text of its nested `ControlPanel`. - - -## Uncurried Version - -For cleaner JS output, you can use `React.Uncurried.useState` instead: - - - -```res -let (state, setState) = React.Uncurried.useState(_ => 0) - -setState(. prev => prev + 1) -``` - -```js -var match = React.useState(function () { - return 0; - }); - -var setState = match[1]; - -setState(function (prev) { - return prev + 1 | 0; - }); -``` - - - +Note that whenever `setDarkmode` is returning a new value (e.g. switching from `true` -> `false`), it will cause a re-render for `ThemeContainer`'s `className` and the toggle text of its nested `ControlPanel`. \ No newline at end of file diff --git a/pages/docs/react/latest/import-export-reactjs.mdx b/pages/docs/react/latest/import-export-reactjs.mdx index dc4717af7..52d47464c 100644 --- a/pages/docs/react/latest/import-export-reactjs.mdx +++ b/pages/docs/react/latest/import-export-reactjs.mdx @@ -16,7 +16,7 @@ To reuse a React component in ReScript, create a new module, specify the compone -```res +```res example module Confetti = { @module("react-confetti") @react.component external make: (~width: int, ~height: int) => React.element = "default" @@ -54,7 +54,7 @@ Use "default" to indicate the default export, or specify a named export if neede -```res +```res example // Equivalent of import { Foo } from "bar" module Foo = { @module("bar") @react.component @@ -72,7 +72,7 @@ You can define a separate type for your component's props within the module. -```res +```res example module Confetti = { type confettiProps = { width: int, @@ -111,7 +111,7 @@ To define optional props, use the `?` symbol. -```res +```res example module Confetti = { type confettiProps = { width: int, @@ -152,7 +152,7 @@ To accept existing DOM props for a component, extend the `JsxDOM.domProps` type. -```res +```res example module Foo = { type fooProps = { ...JsxDOM.domProps, diff --git a/pages/docs/react/latest/lazy-components.mdx b/pages/docs/react/latest/lazy-components.mdx index 87c6a1c00..519464dfb 100644 --- a/pages/docs/react/latest/lazy-components.mdx +++ b/pages/docs/react/latest/lazy-components.mdx @@ -20,7 +20,7 @@ ReScript comes with APIs for doing dynamic imports both for single values and fo Let's look at a small example. First we'll define a simple component: -```rescript +```res example // Title.res @react.component let make = (~text) => { diff --git a/pages/docs/react/latest/memo.mdx b/pages/docs/react/latest/memo.mdx index 34b05a8c4..4e6d6c119 100644 --- a/pages/docs/react/latest/memo.mdx +++ b/pages/docs/react/latest/memo.mdx @@ -15,7 +15,7 @@ This memoized version of your component will usually not be re-rendered when its -```res +```res example @react.component let make = React.memo((~a: int, ~b: string) => {
    @@ -54,7 +54,7 @@ To work around this, you can redefine the make binding: -```res +```res example @react.component let make = (~disabled, ~onClick) => {
    Date: Wed, 6 Nov 2024 16:16:23 +0100 Subject: [PATCH 029/124] Remove accidentally committed bun.lockb (#928) --- bun.lockb | Bin 432671 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 bun.lockb diff --git a/bun.lockb b/bun.lockb deleted file mode 100755 index 649ecfebddfc4ce4d03acf1189ed1de86c2d20cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 432671 zcmeF41yo$g_Vt^%yApRL?n)Tq?k-3ZNC*%lfhcizcXxN4crtN!clTuC^6ky76MFat zxVQVi*1Wgg)S6~fb?aB>)G4{ux0_6kY=wgY{0qB!`4l$$bj#`*%hm%69#Wk4{K+8arK)rlC&Hi420bV{H-d-I&123aK?Y2Vua(@Qj-1^N3>+PR1ywBzX#K(|cU6KVdRM3~7RMxNK* z0s_ndZYI+nlr!(=8xV*x(>ZjO{T+dFw&&yGBCGsIIUA)zcF*ia0FQ?%1WwObp?dR@%^9nHl|CMj>o;Qh@(0dy@Tg2{fJ zhaxngS<`6a=A`Podv~KbQx)Z>o2PGQFLxJzj{tKwvrk}vzuCpz-OJyv8G=hc)1}kq ziP&}V3Bf#f^K|j=7}icvv_n4*VP2wYs6Pgob~^?5`jkYCUC1*&u3jArbwV6|M?Lmu zHI(xy6DC7u=r?66kKP|k<3Q1Y8m zkMny8ly)#VT)bV}&2HXaK@9kDOfvc*?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c994396834e2841d5e0969eb743c2d69380 Mon Sep 17 00:00:00 2001 From: Dal Yoon Date: Thu, 7 Nov 2024 00:17:16 +0900 Subject: [PATCH 030/124] Add "Cardoc" Logo (#925) --- public/static/lp/cardoc.svg | 15 +++++++++++++++ src/common/OurUsers.res | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 public/static/lp/cardoc.svg diff --git a/public/static/lp/cardoc.svg b/public/static/lp/cardoc.svg new file mode 100644 index 000000000..6eb3ae74d --- /dev/null +++ b/public/static/lp/cardoc.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/common/OurUsers.res b/src/common/OurUsers.res index 998d302b5..01d7386b3 100644 --- a/src/common/OurUsers.res +++ b/src/common/OurUsers.res @@ -189,4 +189,9 @@ let companies = [ url: "https://resmume.com/", path: "/static/lp/resmume.svg", }), + Logo({ + name: "Cardoc", + url: "https://www.cardoc.co.kr/", + path: "/static/lp/cardoc.svg", + }), ] From 55020b1a5ff649f86de4c7ec3e524b6b863b80a5 Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Thu, 7 Nov 2024 00:36:18 +0900 Subject: [PATCH 031/124] allow static export on master (#929) --- next.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/next.config.mjs b/next.config.mjs index df28aa2e5..a2d4e8df0 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -14,6 +14,7 @@ const { ProvidePlugin } = webpack; const transpileModules = ["rescript"].concat(bsconfig["bs-dependencies"]); const config = { + output: process.env.BUILD_STATIC === 'true' ? 'export' : undefined, pageExtensions: ["jsx", "js", "bs.js", "mdx", "mjs"], env: { ENV: process.env.NODE_ENV, From 04d15220c67940e6af18b5865b16a30d86a2c795 Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Thu, 7 Nov 2024 01:14:15 +0900 Subject: [PATCH 032/124] avoid ISR on output=export mode (#930) --- src/Packages.res | 5 ++++- src/bindings/Next.res | 2 +- src/bindings/Next.resi | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Packages.res b/src/Packages.res index 8d66633b0..74cb1972f 100644 --- a/src/Packages.res +++ b/src/Packages.res @@ -611,6 +611,9 @@ let getStaticProps: Next.GetStaticProps.revalidate = async _ctx => { "props": props, - "revalidate": 43200, + "revalidate": switch Node.Process.env->Dict.get("BUILD_STATIC") { + | Some("true") => Nullable.undefined + | _ => Nullable.make(43200) + }, } } diff --git a/src/bindings/Next.res b/src/bindings/Next.res index 87e65dc8f..d836daeed 100644 --- a/src/bindings/Next.res +++ b/src/bindings/Next.res @@ -34,7 +34,7 @@ module GetStaticProps = { type revalidate<'props, 'params> = context<'props, 'params> => promise<{ "props": 'props, - "revalidate": int, + "revalidate": Nullable.t, }> } diff --git a/src/bindings/Next.resi b/src/bindings/Next.resi index d5a0e8b19..2af334399 100644 --- a/src/bindings/Next.resi +++ b/src/bindings/Next.resi @@ -34,7 +34,7 @@ module GetStaticProps: { type revalidate<'props, 'params> = context<'props, 'params> => promise<{ "props": 'props, - "revalidate": int, + "revalidate": Nullable.t, }> } From 4af52a534ee9958c69687608add87cce960bc1ca Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Thu, 7 Nov 2024 01:29:01 +0900 Subject: [PATCH 033/124] fix format --- src/Packages.res | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Packages.res b/src/Packages.res index 74cb1972f..00d2ffe0d 100644 --- a/src/Packages.res +++ b/src/Packages.res @@ -612,8 +612,8 @@ let getStaticProps: Next.GetStaticProps.revalidate = async _ctx => { "props": props, "revalidate": switch Node.Process.env->Dict.get("BUILD_STATIC") { - | Some("true") => Nullable.undefined - | _ => Nullable.make(43200) + | Some("true") => Nullable.undefined + | _ => Nullable.make(43200) }, } } From 7b8d7522607252c062e2a4e417d573ba9b5ecdaf Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Thu, 7 Nov 2024 01:44:07 +0900 Subject: [PATCH 034/124] specify Node.js version (#931) --- .node-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .node-version diff --git a/.node-version b/.node-version new file mode 100644 index 000000000..7af24b7dd --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +22.11.0 From cd486eb425d341229f4590985f9d1f1b4ea22a5d Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Thu, 7 Nov 2024 02:05:17 +0900 Subject: [PATCH 035/124] fix the community tab nav to be not rely on redirection (#933) --- src/components/Navigation.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Navigation.res b/src/components/Navigation.res index 7cdc506cf..6c8fc6189 100644 --- a/src/components/Navigation.res +++ b/src/components/Navigation.res @@ -546,7 +546,7 @@ let make = (~fixed=true, ~isOverlayOpen: bool, ~setOverlayOpen: (bool => bool) = {React.string("Blog")} {React.string("Community")} From 641821ead06af4cdb160bda93faf73e28c2cd457 Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Thu, 7 Nov 2024 02:06:43 +0900 Subject: [PATCH 036/124] Migrate redirect entries to Cloudflare Pages (#932) --- public/_redirects | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 public/_redirects diff --git a/public/_redirects b/public/_redirects new file mode 100644 index 000000000..b156785b6 --- /dev/null +++ b/public/_redirects @@ -0,0 +1,10 @@ +/community /community/overview 308 + +/bucklescript-rebranding /blog/bucklescript-is-rebranding 308 + +/docs/manual/latest/migrate-from-bucklescript-reason /docs/manual/v10.0.0/migrate-from-bucklescript-reason 308 +/docs/manual/latest/unboxed /docs/manual/v10.0.0/unboxed 308 +/docs/gentype/latest/introduction /docs/manual/latest/typescript-integration 308 +/docs/gentype/latest/getting-started /docs/manual/latest/typescript-integration 308 +/docs/gentype/latest/usage /docs/manual/latest/typescript-integration 308 +/docs/gentype/latest/supported-types /docs/manual/latest/typescript-integration 308 From 4e4f9520f6fc7a0376db82a0a6db52211e8a8187 Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Thu, 7 Nov 2024 16:42:32 +0200 Subject: [PATCH 037/124] Update `gentype_tests` references (#935) Signed-off-by: Emmanuel Ferdman --- pages/docs/manual/latest/typescript-integration.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/docs/manual/latest/typescript-integration.mdx b/pages/docs/manual/latest/typescript-integration.mdx index 4ebb5ca9d..7bbcccdf9 100644 --- a/pages/docs/manual/latest/typescript-integration.mdx +++ b/pages/docs/manual/latest/typescript-integration.mdx @@ -198,7 +198,7 @@ In case of the TypeScript project using `Bundler` module resolution, `allowImpor ## Testing the Whole Setup -Open any relevant `*.res` file and add `@genType` annotations to any bindings / values / functions to be used from JavaScript. If an annotated value uses a type, the type must be annotated too. See e.g. [Hooks.res](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/src/Hooks.res). +Open any relevant `*.res` file and add `@genType` annotations to any bindings / values / functions to be used from JavaScript. If an annotated value uses a type, the type must be annotated too. See e.g. [Hooks.res](https://github.com/rescript-lang/rescript-compiler/blob/master/tests/gentype_tests/typescript-react-example/src/Hooks.res). Save the file and rebuild the project via `npm run res:build` or similar. You should now see a `*.gen.tsx` file with the same name (e.g. `MyComponent.res` -> `MyComponent.gen.tsx`). @@ -251,7 +251,7 @@ and add relevant `.shim.ts` files in a directory which is visible by ReScript e. Here are some examples: ```ts -// Excerpt from https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/src/shims/Js.shim.ts +// Excerpt from https://github.com/rescript-lang/rescript-compiler/blob/master/tests/gentype_tests/typescript-react-example/src/shims/Js.shim.ts export type Json_t = unknown; export type t = unknown; ``` From 35024aaa94aa0f2d83f500434201cfbcd5b4b0e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Tue, 12 Nov 2024 15:51:22 +0100 Subject: [PATCH 038/124] Automatically sync playground URL (#937) * remove useless interface file (Next.res is now pure bindings) * use history replaceState for shallow replace on create share link * update playground URL continuously * track module system in playground url * on compiler switch use esmodule by default --- src/Playground.res | 39 ++------ src/bindings/Next.resi | 135 ---------------------------- src/bindings/Webapi.res | 11 +++ src/common/CompilerManagerHook.res | 31 ++++++- src/common/CompilerManagerHook.resi | 3 + 5 files changed, 49 insertions(+), 170 deletions(-) delete mode 100644 src/bindings/Next.resi diff --git a/src/Playground.res b/src/Playground.res index 77fc39eef..e14932207 100644 --- a/src/Playground.res +++ b/src/Playground.res @@ -1102,7 +1102,7 @@ module ControlPanel = { | CopySuccess @react.component - let make = (~createShareLink: unit => string, ~actionIndicatorKey: string) => { + let make = (~actionIndicatorKey: string) => { let (state, setState) = React.useState(() => Init) React.useEffect(() => { @@ -1112,8 +1112,7 @@ module ControlPanel = { let onClick = evt => { ReactEvent.Mouse.preventDefault(evt) - let url = createShareLink() - let ret = copyToClipboard(url) + let ret = copyToClipboard(Webapi.Window.Location.href) if ret { setState(_ => CopySuccess) } @@ -1134,7 +1133,6 @@ module ControlPanel = { } } - @val @scope(("window", "location")) external origin: string = "origin" @react.component let make = ( ~actionIndicatorKey: string, @@ -1144,46 +1142,22 @@ module ControlPanel = { ~runOutput, ~toggleRunOutput, ) => { - let router = Next.Router.useRouter() - let children = switch state { | Init => React.string("Initializing...") | SwitchingCompiler(_ready, _version) => React.string("Switching Compiler...") - | Compiling(ready, _) - | Ready(ready) => + | Compiling(_, _) + | Ready(_) => let onFormatClick = evt => { ReactEvent.Mouse.preventDefault(evt) dispatch(Format(editorCode.current)) } - let createShareLink = () => { - let params = switch ready.targetLang { - | Res => [] - | lang => [("ext", Api.Lang.toExt(lang))] - } - - let version = ready.selected.compilerVersion - - Array.push(params, ("version", "v" ++ version))->ignore - - Array.push( - params, - ("code", editorCode.current->LzString.compressToEncodedURIComponent), - )->ignore - - let querystring = params->Array.map(((key, value)) => key ++ "=" ++ value)->Array.join("&") - - let url = origin ++ router.route ++ "?" ++ querystring - Next.Router.replace(router, url) - url - } -
    toggleRunOutput()}> {React.string("Auto-run")} - +
    | _ => React.null } @@ -1455,6 +1429,8 @@ let make = (~versions: array) => { | _ => Api.Lang.Res } + let initialModuleSystem = Dict.get(router.query, "module") + let initialContent = switch (Dict.get(router.query, "code"), initialLang) { | (Some(compressedCode), _) => LzString.decompressToEncodedURIComponent(compressedCode) | (None, Reason) => initialReContent @@ -1473,6 +1449,7 @@ let make = (~versions: array) => { let onAction = _ => setActionCount(prev => prev > 1000000 ? 0 : prev + 1) let (compilerState, compilerDispatch) = useCompilerManager( ~initialVersion?, + ~initialModuleSystem?, ~initialLang, ~onAction, ~versions, diff --git a/src/bindings/Next.resi b/src/bindings/Next.resi deleted file mode 100644 index 2af334399..000000000 --- a/src/bindings/Next.resi +++ /dev/null @@ -1,135 +0,0 @@ -module GetServerSideProps: { - module Req: { - type t - } - - module Res: { - type t - - let setHeader: (t, string, string) => unit - let write: (t, string) => unit - let end_: t => unit - } - - // See: https://github.com/zeit/next.js/blob/canary/packages/next/types/index.d.ts - type context<'props, 'params> = { - params: 'params, - query: Dict.t, - req: Req.t, - res: Res.t, - } - - type t<'props, 'params> = context<'props, 'params> => promise<{"props": 'props}> -} - -module GetStaticProps: { - // See: https://github.com/zeit/next.js/blob/canary/packages/next/types/index.d.ts - type context<'props, 'params> = { - params: 'params, - query: Dict.t, - req: Nullable.t<'props>, - } - - type t<'props, 'params> = context<'props, 'params> => promise<{"props": 'props}> - - type revalidate<'props, 'params> = context<'props, 'params> => promise<{ - "props": 'props, - "revalidate": Nullable.t, - }> -} - -module GetStaticPaths: { - // 'params: dynamic route params used in dynamic routing paths - // Example: pages/[id].js would result in a 'params = { id: string } - type path<'params> = {params: 'params} - - type return<'params> = { - paths: array>, - fallback: bool, - } - - type t<'params> = unit => promise> -} - -module Link: { - @react.component - let make: ( - ~href: string, - ~_as: string=?, - ~prefetch: bool=?, - ~replace: bool=?, - ~shallow: bool=?, - ~passHref: bool=?, - ~children: React.element, - ~className: string=?, - ~target: string=?, - ) => React.element -} - -module Router: { - /* - Make sure to only register events via a useEffect hook! - */ - module Events: { - type t - - let on: ( - t, - [ - | #routeChangeStart(string => unit) - | #routeChangeComplete(string => unit) - | #hashChangeComplete(string => unit) - ], - ) => unit - - let off: ( - t, - [ - | #routeChangeStart(string => unit) - | #routeChangeComplete(string => unit) - | #hashChangeComplete(string => unit) - ], - ) => unit - } - - type router = { - route: string, - asPath: string, - events: Events.t, - pathname: string, - query: Dict.t, - } - - type pathObj = { - pathname: string, - query: Dict.t, - } - - let push: (router, string) => unit - let pushObj: (router, pathObj) => unit - - let useRouter: unit => router - - let replace: (router, string) => unit - let replaceObj: (router, pathObj) => unit -} - -module Head: { - @react.component - let make: (~children: React.element) => React.element -} - -module Error: { - @react.component - let make: (~statusCode: int, ~children: React.element) => React.element -} - -module Dynamic: { - type options = {ssr?: bool, loading?: unit => React.element} - - @module("next/dynamic") - external dynamic: (unit => promise<'a>, options) => 'a = "default" - - @val - external import: string => promise<'a> = "import" -} diff --git a/src/bindings/Webapi.res b/src/bindings/Webapi.res index a3a053279..c25856ec2 100644 --- a/src/bindings/Webapi.res +++ b/src/bindings/Webapi.res @@ -48,6 +48,17 @@ module Window = { @scope("window") @val external innerWidth: int = "innerWidth" @scope("window") @val external innerHeight: int = "innerHeight" @scope("window") @val external scrollY: int = "scrollY" + + module History = { + @scope(("window", "history")) @val + external pushState: (nullable<'a>, @as(json`""`) _, ~url: string=?) => unit = "pushState" + @scope(("window", "history")) @val + external replaceState: (nullable<'a>, @as(json`""`) _, ~url: string=?) => unit = "replaceState" + } + + module Location = { + @scope(("window", "location")) @val external href: string = "href" + } } module Fetch = { diff --git a/src/common/CompilerManagerHook.res b/src/common/CompilerManagerHook.res index bebf9634a..ddff4b789 100644 --- a/src/common/CompilerManagerHook.res +++ b/src/common/CompilerManagerHook.res @@ -242,6 +242,21 @@ type action = | CompileCode(Lang.t, string) | UpdateConfig(Config.t) +let createUrl = (pathName, ready) => { + let params = switch ready.targetLang { + | Res => [] + | lang => [("ext", RescriptCompilerApi.Lang.toExt(lang))] + } + Array.push(params, ("version", "v" ++ ready.selected.compilerVersion)) + Array.push(params, ("module", ready.selected.config.module_system)) + Array.push(params, ("code", ready.code->LzString.compressToEncodedURIComponent)) + let querystring = params->Array.map(((key, value)) => key ++ "=" ++ value)->Array.join("&") + let url = pathName ++ "?" ++ querystring + url +} + +let defaultModuleSystem = "esmodule" + // ~initialLang: // The target language the compiler should be set to during // playground initialization. If the compiler doesn't support the language, it @@ -255,12 +270,14 @@ type action = // cases where the output didn't visually change) let useCompilerManager = ( ~initialVersion: option=?, + ~initialModuleSystem=defaultModuleSystem, ~initialLang: Lang.t=Res, ~onAction: option unit>=?, ~versions: array, (), ) => { let (state, setState) = React.useState(_ => Init) + let router = Next.Router.useRouter() // Dispatch method for the public interface let dispatch = (action: action): unit => { @@ -417,7 +434,7 @@ let useCompilerManager = ( // internal compiler state with our playground state. let config = { ...instance->Compiler.getConfig, - module_system: "esmodule", + module_system: initialModuleSystem, ?open_modules, } instance->Compiler.setConfig(config) @@ -470,7 +487,11 @@ let useCompilerManager = ( let apiVersion = apiVersion->Version.fromString let open_modules = getOpenModules(~apiVersion, ~libraries) - let config = {...instance->Compiler.getConfig, ?open_modules} + let config = { + ...instance->Compiler.getConfig, + module_system: defaultModuleSystem, + ?open_modules, + } instance->Compiler.setConfig(config) let selected = { @@ -528,8 +549,10 @@ let useCompilerManager = ( } setState(_ => Ready({...ready, result: FinalResult.Comp(compResult)})) - | SetupFailed(_) - | Ready(_) => () + | SetupFailed(_) => () + | Ready(ready) => + let url = createUrl(router.route, ready) + Webapi.Window.History.replaceState(null, ~url) } } diff --git a/src/common/CompilerManagerHook.resi b/src/common/CompilerManagerHook.resi index ac29d6e4d..f2880d321 100644 --- a/src/common/CompilerManagerHook.resi +++ b/src/common/CompilerManagerHook.resi @@ -59,8 +59,11 @@ type action = let useCompilerManager: ( ~initialVersion: Semver.t=?, + ~initialModuleSystem: string=?, ~initialLang: Lang.t=?, ~onAction: action => unit=?, ~versions: array, unit, ) => (state, action => unit) + +let createUrl: (string, ready) => string From 2935fab1ea714c74e4f6c7a75ad220e83d2d450f Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Thu, 14 Nov 2024 14:05:35 +0100 Subject: [PATCH 039/124] Update social links and logos (#938) --- src/common/Constants.res | 5 +++++ src/components/Footer.res | 11 +++++++---- src/components/Icon.res | 17 ++++++++++++++--- src/components/Icon.resi | 6 +++++- src/components/Navigation.res | 31 ++++++++++++++++--------------- 5 files changed, 47 insertions(+), 23 deletions(-) diff --git a/src/common/Constants.res b/src/common/Constants.res index 72b5b1371..445270367 100644 --- a/src/common/Constants.res +++ b/src/common/Constants.res @@ -25,3 +25,8 @@ let ecosystem = [ ] let tools = [("Syntax Lookup", "/syntax-lookup")] + +let githubHref = "https://github.com/rescript-lang/rescript-compiler" +let xHref = "https://x.com/rescriptlang" +let blueSkyHref = "https://bsky.app/profile/rescript-lang.org" +let discourseHref = "https://forum.rescript-lang.org/" diff --git a/src/components/Footer.res b/src/components/Footer.res index b75cddfde..17dbe1ffa 100644 --- a/src/components/Footer.res +++ b/src/components/Footer.res @@ -59,13 +59,16 @@ let make = () => {
    diff --git a/src/components/Icon.res b/src/components/Icon.res index 30f2176a4..be805c0a7 100644 --- a/src/components/Icon.res +++ b/src/components/Icon.res @@ -31,12 +31,23 @@ module Npm = { } } -module Twitter = { +module X = { @react.component let make = (~className: string) => - + + +} + +module BlueSky = { + @react.component + let make = (~className: string) => + + diff --git a/src/components/Icon.resi b/src/components/Icon.resi index 1c97af5ea..0930f6916 100644 --- a/src/components/Icon.resi +++ b/src/components/Icon.resi @@ -7,7 +7,11 @@ module Npm: { @react.component let make: (~className: string) => React.element } -module Twitter: { +module X: { + @react.component + let make: (~className: string) => React.element +} +module BlueSky: { @react.component let make: (~className: string) => React.element } diff --git a/src/components/Navigation.res b/src/components/Navigation.res index 6c8fc6189..6b817a53b 100644 --- a/src/components/Navigation.res +++ b/src/components/Navigation.res @@ -16,10 +16,6 @@ let linkOrActiveApiSubroute = (~route) => { } } -let githubHref = "https://github.com/rescript-lang/rescript-compiler" -//let twitterHref = "https://twitter.com/rescriptlang" -let discourseHref = "https://forum.rescript-lang.org/" - module CollapsibleLink = { // KeepOpen = Menu has been opened and should stay open type state = @@ -392,17 +388,22 @@ module MobileNav = { */
  • - - {React.string("Twitter")} + + {React.string("X")}
  • - + + {React.string("BlueSky")} + +
  • +
  • + {React.string("GitHub")}
  • - + {React.string("Forum")}
  • @@ -554,16 +555,16 @@ let make = (~fixed=true, ~isOverlayOpen: bool, ~setOverlayOpen: (bool => bool) =
    From 3ba7d0f70bae9f65a7fbe544123f6ee7fb2b730c Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Thu, 14 Nov 2024 15:15:31 +0100 Subject: [PATCH 040/124] Update some links and extend community page (#939) * Update community page * Update more links --- .github/ISSUE_TEMPLATE/config.yml | 6 ++--- README.md | 2 +- _blogposts/2020-09-25-release-8-3.mdx | 4 +-- _blogposts/2020-12-07-release-8-4.mdx | 9 +++---- _blogposts/2021-02-09-release-9-0.mdx | 8 +++--- _blogposts/2021-05-07-release-9-1.mdx | 4 +-- _blogposts/2022-08-25-release-10-0-0.mdx | 10 +++---- _blogposts/2023-02-02-release-10-1.mdx | 8 +++--- ...-05-first-class-dynamic-import-support.mdx | 2 +- _blogposts/2023-09-18-uncurried-mode.mdx | 2 +- _blogposts/2024-01-11-release-11-0-0.mdx | 16 ++++++------ _blogposts/2024-02-01-release-11-1-0.mdx | 4 +-- pages/community/overview.mdx | 13 ++++++---- pages/community/roadmap.mdx | 2 +- pages/docs/manual/latest/async-await.mdx | 2 +- .../manual/latest/build-configuration.mdx | 2 +- pages/docs/manual/latest/migrate-to-v11.mdx | 26 +++++++++---------- .../manual/latest/typescript-integration.mdx | 10 +++---- pages/docs/manual/v10.0.0/async-await.mdx | 2 +- .../manual/v10.0.0/build-configuration.mdx | 2 +- .../manual/v8.0.0/build-configuration.mdx | 14 +++++----- .../manual/v9.0.0/build-configuration.mdx | 4 +-- pages/docs/react/latest/elements-and-jsx.mdx | 2 +- pages/docs/react/latest/forwarding-refs.mdx | 2 +- pages/docs/react/v0.10.0/forwarding-refs.mdx | 2 +- pages/docs/react/v0.11.0/elements-and-jsx.mdx | 2 +- pages/docs/react/v0.11.0/forwarding-refs.mdx | 2 +- src/Blog.res | 2 +- src/BlogArticle.res | 2 +- src/common/BlogFrontmatter.res | 18 ++++++------- src/common/Constants.res | 2 +- src/components/Docson.res | 2 +- 32 files changed, 95 insertions(+), 93 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index dc9017105..2931b7fef 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,11 +1,11 @@ blank_issues_enabled: false contact_links: - name: 🚀 rescript-compiler - url: https://github.com/rescript-lang/rescript-compiler/issues - about: Please report problems about the ReScript compiler and build system here. + url: https://github.com/rescript-lang/rescript/issues + about: Please report problems about the ReScript compiler, build system and tools here. - name: 💻 rescript-vscode url: https://github.com/rescript-lang/rescript-vscode/issues - about: VSCode language support, LSP, tools + about: VSCode language support, LSP - name: 📦 create-rescript-app url: https://github.com/rescript-lang/create-rescript-app/issues about: ReScript's project generator diff --git a/README.md b/README.md index 60d321eac..48b2e84bd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is the official documentation platform for the [ReScript](https://rescript-lang.org) programming language. -**Please report any technical issues with ReScript to the [compiler repository](https://github.com/rescript-lang/rescript-compiler).** +**Please report any technical issues with ReScript to the [compiler repository](https://github.com/rescript-lang/rescript).** **In case you are missing some specific documentation:** diff --git a/_blogposts/2020-09-25-release-8-3.mdx b/_blogposts/2020-09-25-release-8-3.mdx index a3a629be9..5975e6678 100644 --- a/_blogposts/2020-09-25-release-8-3.mdx +++ b/_blogposts/2020-09-25-release-8-3.mdx @@ -17,7 +17,7 @@ It's focused on type safety, performance and JS interop. It used to be called Bu npm i bs-platform@8.3.0 ``` -The changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes. +The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#83), this is a large release, and we will go through some highlighted changes. @@ -122,7 +122,7 @@ Now user can pick up their js file extension support per module format: ## More flexible filename support -To have better integration with other [JS infrastructures](https://github.com/rescript-lang/rescript-compiler/issues/4624), +To have better integration with other [JS infrastructures](https://github.com/rescript-lang/rescript/issues/4624), for example, Next.js/React Native, we allow file names like `404.res`, `Button.Android.res` so that it can just be picked up by those tools diff --git a/_blogposts/2020-12-07-release-8-4.mdx b/_blogposts/2020-12-07-release-8-4.mdx index a51a0dfe0..bc7484feb 100644 --- a/_blogposts/2020-12-07-release-8-4.mdx +++ b/_blogposts/2020-12-07-release-8-4.mdx @@ -19,7 +19,7 @@ It's focused on type safety, performance and JS interop. It used to be called Bu npm i bs-platform@8.4.2 ``` -The changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#841). +The changes are listed [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#841). We will go through some highlighted changes. @@ -33,11 +33,10 @@ In this release, we fix the integrity of `bsb -make-world` which allows user to The fix is well implemented that people who don't do such modifications will not pay for it. This is one of the highest desired feature request based on the -[user feedback](https://github.com/rescript-lang/rescript-compiler/issues/4361#issuecomment-739538789), so we will expand a bit here why it is tricky -to implement it without compromising performance. +[user feedback](https://github.com/rescript-lang/rescript/issues/4361#issuecomment-739538789), so we will expand a bit here why it is tricky to implement it without compromising performance. In ReScript compilation scheme, dependencies as packages are treated as a black box, -changes of dependencies should be *transitive*. The is due to that we have cross module +changes of dependencies should be _transitive_. The is due to that we have cross module optimizations and the binary interface itself is a hash of its dependencies. So for a package dependency chain: A -> B -> C, if A changes and B does not change, C still needs get rebuilt. Because the intermediate output of B may still change due to the change of A. @@ -68,6 +67,6 @@ of such stale outptu, such stale `List.cmi` file will break the integrity of the In this release, we introduced a more robust algorithm that will always remove stale output before the build so that such integrity is not broken. -Last but not the least, we continue improving the readability, debuggability of the [generated output](https://github.com/rescript-lang/rescript-compiler/pull/4858) : ) +Last but not the least, we continue improving the readability, debuggability of the [generated output](https://github.com/rescript-lang/rescript/pull/4858) : ) Happy Hacking! -- Hongbo Zhang diff --git a/_blogposts/2021-02-09-release-9-0.mdx b/_blogposts/2021-02-09-release-9-0.mdx index 3a220ed93..0ae1f049c 100644 --- a/_blogposts/2021-02-09-release-9-0.mdx +++ b/_blogposts/2021-02-09-release-9-0.mdx @@ -22,13 +22,13 @@ npm install bs-platform@9.0.1 You can also try our new release in the [Online Playground](/try). -In this post we will highlight the most notable changes. The full changelog for this release can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/master/Changes.md#90). +In this post we will highlight the most notable changes. The full changelog for this release can be found [here](https://github.com/rescript-lang/rescript/blob/master/Changes.md#90). ## Compiler Improvements ### New External Stdlib Configuration -This is a long-awaited [feature request](https://github.com/rescript-lang/rescript-compiler/pull/2171). +This is a long-awaited [feature request](https://github.com/rescript-lang/rescript/pull/2171). Our compiler comes with a set of stdlib modules (such as `Belt`, `Pervasives`, etc.) for core functionality. Compiled ReScript code relies on the JS runtime version of these stdlib modules. @@ -47,7 +47,7 @@ We made a small [demo repo](https://github.com/bobzhang/zero-cost-rescript) and ### Improved Code Generation for Pattern Matching -We fine-tuned our pattern matching engine to optimize the JS output even more. Here is an example of a pretty substantial optimization, based on [this issue](https://github.com/rescript-lang/rescript-compiler/issues/4924): +We fine-tuned our pattern matching engine to optimize the JS output even more. Here is an example of a pretty substantial optimization, based on [this issue](https://github.com/rescript-lang/rescript/issues/4924): ```res type test = @@ -87,7 +87,7 @@ function test(x) { As you can see, the 9.0 compiler removes all the unnecessary `typeof` checks! -This is possible because our optimizer will try to analyze several predicates and get rid of redundant ones. More diffs can be found [here](https://github.com/rescript-lang/rescript-compiler/pull/4927/files?file-filters%5B%5D=.js). +This is possible because our optimizer will try to analyze several predicates and get rid of redundant ones. More diffs can be found [here](https://github.com/rescript-lang/rescript/pull/4927/files?file-filters%5B%5D=.js). Another important improvement is that we fixed the pattern match offset issue, which lead to the consequence that magic numbers will not be generated for complex pattern matches anymore. diff --git a/_blogposts/2021-05-07-release-9-1.mdx b/_blogposts/2021-05-07-release-9-1.mdx index e5573cf00..75f021180 100644 --- a/_blogposts/2021-05-07-release-9-1.mdx +++ b/_blogposts/2021-05-07-release-9-1.mdx @@ -10,7 +10,7 @@ description: | ## Exciting Improvements in ReScript 9.1 -Our recent few releases of ReScript contains [lots of improvements](https://github.com/rescript-lang/rescript-compiler/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91), among which are a few standout features we'd like to further promote. Hope you're as excited as we are about these! It goes without saying, our [updated editor plugin](https://forum.rescript-lang.org/t/ann-rescript-vscode-1-1-1-released/1542/3) works with the new releases. +Our recent few releases of ReScript contains [lots of improvements](https://github.com/rescript-lang/rescript/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91), among which are a few standout features we'd like to further promote. Hope you're as excited as we are about these! It goes without saying, our [updated editor plugin](https://forum.rescript-lang.org/t/ann-rescript-vscode-1-1-1-released/1542/3) works with the new releases. ### New NPM Package @@ -159,6 +159,6 @@ let helloUnicode = (x) =>{ ## Conclusion -Don't miss our various other improvements in [our changelog](https://github.com/rescript-lang/rescript-compiler/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91). As always we try to keep our changes performant, lean and robust. We hope you'll enjoy these. +Don't miss our various other improvements in [our changelog](https://github.com/rescript-lang/rescript/blob/3134392a364b70c9c172aa6c1dbaa1ac6580265d/Changes.md#91). As always we try to keep our changes performant, lean and robust. We hope you'll enjoy these. See you next time! diff --git a/_blogposts/2022-08-25-release-10-0-0.mdx b/_blogposts/2022-08-25-release-10-0-0.mdx index 0cd4ef112..b66493af2 100644 --- a/_blogposts/2022-08-25-release-10-0-0.mdx +++ b/_blogposts/2022-08-25-release-10-0-0.mdx @@ -14,7 +14,7 @@ ReScript version 10 is available! Version 10 is a culmination of over a year's w npm install rescript@10 ``` -All changes are listed [here](https://github.com/rescript-lang/rescript-compiler/blob/10.0_release/CHANGELOG.md). Let's take a tour of a few of the features we're extra excited about. +All changes are listed [here](https://github.com/rescript-lang/rescript/blob/10.0_release/CHANGELOG.md). Let's take a tour of a few of the features we're extra excited about. ## Faster builds with native M1 support Users with M1 chips should see a notable speedup, as the new ReScript version has full native support for M1. @@ -27,9 +27,9 @@ let str = "Σ" You can also pattern match on Unicode characters: ```res -switch someCharacter { - | 'Σ' => "what a fine Unicode char" - | _ => "Unicode is fun" +switch someCharacter { + | 'Σ' => "what a fine Unicode char" + | _ => "Unicode is fun" } ``` @@ -79,7 +79,7 @@ Version 10 brings the building blocks needed for a number of exciting new featur ## Upgrade guide -Please see the detailed [changelog](https://github.com/rescript-lang/rescript-compiler/blob/10.0_release/CHANGELOG.md) for a list of breaking changes. +Please see the detailed [changelog](https://github.com/rescript-lang/rescript/blob/10.0_release/CHANGELOG.md) for a list of breaking changes. Each breaking change lists suggestions on how to upgrade your project. This can be out of your control in case of dependencies. In that case, please raise issues with the maintainers of those libraries. diff --git a/_blogposts/2023-02-02-release-10-1.mdx b/_blogposts/2023-02-02-release-10-1.mdx index cfe3cefe3..cce653a2e 100644 --- a/_blogposts/2023-02-02-release-10-1.mdx +++ b/_blogposts/2023-02-02-release-10-1.mdx @@ -27,7 +27,7 @@ This version comes with two major language improvements we've all been waiting f Alongside the major changes, there have been many bugfixes and other improvements that won't be covered in this post. -Feel free to check the [Changelog](https://github.com/rescript-lang/rescript-compiler/blob/master/CHANGELOG.md#1011) for all the details. +Feel free to check the [Changelog](https://github.com/rescript-lang/rescript/blob/master/CHANGELOG.md#1011) for all the details. ## New `async` / `await` syntax @@ -293,16 +293,16 @@ Our contributors are already one step ahead and are currently working on improve - New tooling to generate markdown from docstrings (module, type and value level). This will be super simple, but very effective. - Explorations for a [localized documentation page](https://forum.rescript-lang.org/t/translation-project-rescript-lang-org/4022) (currently in a slowed-down exploration phase, but we will be getting there) -Check out the [v11](https://github.com/rescript-lang/rescript-compiler/issues?q=is%3Aopen+is%3Aissue+milestone%3Av11.0) milestone on our `rescript-lang` repo for more details on future improvements. +Check out the [v11](https://github.com/rescript-lang/rescript/issues?q=is%3Aopen+is%3Aissue+milestone%3Av11.0) milestone on our `rescript-lang` repo for more details on future improvements. ## Acknowledgements -As always, we want to thank our [contributors](https://github.com/rescript-lang/rescript-compiler/graphs/contributors?from=2019-11-24&to=2023-02-02&type=c) for building an amazing platform. Special thanks go out to [mununki](https://github.com/mununki) for building the new JSX v4 syntax. Amazing work! +As always, we want to thank our [contributors](https://github.com/rescript-lang/rescript/graphs/contributors?from=2019-11-24&to=2023-02-02&type=c) for building an amazing platform. Special thanks go out to [mununki](https://github.com/mununki) for building the new JSX v4 syntax. Amazing work! ## That's it We hope you enjoy the newest improvements as much as we do. -In case there's any issues / problems, make sure to report bugs to [rescript-lang/rescript-compiler](https://github.com/rescript-lang/rescript-compiler) (language / syntax / jsx), [rescript-lang/rescript-react](https://github.com/rescript-lang/rescript-react) (React 16 / 18 binding) or [rescript-association/rescript-lang.org](https://github.com/rescript-lang/rescript-lang.org) (documentation) repositories. +In case there's any issues / problems, make sure to report bugs to [rescript-lang/rescript](https://github.com/rescript-lang/rescript) (language / syntax / jsx), [rescript-lang/rescript-react](https://github.com/rescript-lang/rescript-react) (React 16 / 18 binding) or [rescript-association/rescript-lang.org](https://github.com/rescript-lang/rescript-lang.org) (documentation) repositories. Also feel free to visit the [ReScript forum](https://forum.rescript-lang.org/) to ask questions and connect with other ReScripters. diff --git a/_blogposts/2023-06-05-first-class-dynamic-import-support.mdx b/_blogposts/2023-06-05-first-class-dynamic-import-support.mdx index 19c2ca484..0baf66778 100644 --- a/_blogposts/2023-06-05-first-class-dynamic-import-support.mdx +++ b/_blogposts/2023-06-05-first-class-dynamic-import-support.mdx @@ -138,6 +138,6 @@ The most important take away of the new dynamic imports functionality in ReScrip We hope that it will help shipping software with better end-user experience with faster load times and quicker app interaction, especially on slower network connections. -As always, we're eager to hear about your experiences with our new features. Feel free to share your thoughts and feedback with us on our [issue tracker](https://github.com/rescript-lang/rescript-compiler/issues) or on the [forum](https://forum.rescript-lang.org). +As always, we're eager to hear about your experiences with our new features. Feel free to share your thoughts and feedback with us on our [issue tracker](https://github.com/rescript-lang/rescript/issues) or on the [forum](https://forum.rescript-lang.org). Happy hacking! diff --git a/_blogposts/2023-09-18-uncurried-mode.mdx b/_blogposts/2023-09-18-uncurried-mode.mdx index 050c280df..f448e73b7 100644 --- a/_blogposts/2023-09-18-uncurried-mode.mdx +++ b/_blogposts/2023-09-18-uncurried-mode.mdx @@ -145,6 +145,6 @@ Many thoughts have led to this decision, but we think this change is a great fit We hope that this new way of writing ReScript will make it both easier for beginners and also more enjoyable for the seasoned developers. -As always, we're eager to hear about your experiences with our new features. Feel free to share your thoughts and feedback with us on our [issue tracker](https://github.com/rescript-lang/rescript-compiler/issues) or on the [forum](https://forum.rescript-lang.org). +As always, we're eager to hear about your experiences with our new features. Feel free to share your thoughts and feedback with us on our [issue tracker](https://github.com/rescript-lang/rescript/issues) or on the [forum](https://forum.rescript-lang.org). Happy hacking! diff --git a/_blogposts/2024-01-11-release-11-0-0.mdx b/_blogposts/2024-01-11-release-11-0-0.mdx index 513cffb3f..eef0dd5de 100644 --- a/_blogposts/2024-01-11-release-11-0-0.mdx +++ b/_blogposts/2024-01-11-release-11-0-0.mdx @@ -18,7 +18,7 @@ npm install rescript@11 To upgrade your project or to find out if there are any breaking changes that affect you, please follow the [migration guide](/docs/manual/latest/migrate-to-v11). -The complete list of changes can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/v11.0.0/CHANGELOG.md). Let's have a look at the most notable improvements. +The complete list of changes can be found [here](https://github.com/rescript-lang/rescript/blob/v11.0.0/CHANGELOG.md). Let's have a look at the most notable improvements. ## Highlights @@ -123,15 +123,15 @@ npx rescript-language-server --stdio As we now finish up the work on v11, we're looking forward to working on the next ReScript version. Here are some of the features we're planning to focus on in upcoming versions: - Make JSX usable beyond React: - - [Generic JSX transform](https://github.com/rescript-lang/rescript-compiler/issues/6408) - - [JSX preserve mode](https://github.com/rescript-lang/rescript-compiler/issues/6197) + - [Generic JSX transform](https://github.com/rescript-lang/rescript/issues/6408) + - [JSX preserve mode](https://github.com/rescript-lang/rescript/issues/6197) - Integrate the Rescript Core standard library into the compiler - remove the OCaml standard library - remove `Belt` but keep it available as external package -- Make maintaining TS libraries with ReScript a breeze, [thanks to genType](https://github.com/rescript-lang/rescript-compiler/issues/6210) -- Support [tagged template literals](https://github.com/rescript-lang/rescript-compiler/pull/6250) -- [Dedicated syntax for creating Dicts](https://github.com/rescript-lang/rescript-compiler/issues/6545) -- [Array spread syntax](https://github.com/rescript-lang/rescript-compiler/issues/6546) +- Make maintaining TS libraries with ReScript a breeze, [thanks to genType](https://github.com/rescript-lang/rescript/issues/6210) +- Support [tagged template literals](https://github.com/rescript-lang/rescript/pull/6250) +- [Dedicated syntax for creating Dicts](https://github.com/rescript-lang/rescript/issues/6545) +- [Array spread syntax](https://github.com/rescript-lang/rescript/issues/6546) - A [new custom build system](https://github.com/rolandpeelen/rewatch) with better support for workspaces / monorepos - More improvements to the type system @@ -145,7 +145,7 @@ We hope you enjoy the newest improvements as much as we do. In case of issues / problems, make sure to report bugs to one of the following repositories: -- [rescript-lang/rescript-compiler](https://github.com/rescript-lang/rescript-compiler) (language / syntax / jsx) +- [rescript-lang/rescript](https://github.com/rescript-lang/rescript) (language / syntax / jsx) - [rescript-lang/rescript-react](https://github.com/rescript-lang/rescript-react) (React bindings) - [rescript-lang/rescript-vscode](https://github.com/rescript-lang/rescript-vscode) (VSCode language support, LSP, tools) - [rescript-lang/create-rescript-app](https://github.com/rescript-lang/create-rescript-app) (project generator) or diff --git a/_blogposts/2024-02-01-release-11-1-0.mdx b/_blogposts/2024-02-01-release-11-1-0.mdx index 5a916fedd..868ef6619 100644 --- a/_blogposts/2024-02-01-release-11-1-0.mdx +++ b/_blogposts/2024-02-01-release-11-1-0.mdx @@ -236,7 +236,7 @@ See ["Compile with stricter errors in CI"](/docs/manual/latest/build-overview#co ## Other changes -Of course we also got a bunch of other changes and bug fixes in this release. Check out the [compiler changelog](https://github.com/rescript-lang/rescript-compiler/blob/11.0_release/CHANGELOG.md#1110-rc1) if you are interested. +Of course we also got a bunch of other changes and bug fixes in this release. Check out the [compiler changelog](https://github.com/rescript-lang/rescript/blob/11.0_release/CHANGELOG.md#1110-rc1) if you are interested. ## v12 is next @@ -254,4 +254,4 @@ We hope you enjoy the newest improvements as much as we do. If you find any problems with this new release, make sure to report them here: -- [rescript-lang/rescript-compiler](https://github.com/rescript-lang/rescript-compiler/issues/new/choose) +- [rescript-lang/rescript](https://github.com/rescript-lang/rescript/issues/new/choose) diff --git a/pages/community/overview.mdx b/pages/community/overview.mdx index 60b312676..019eaacce 100644 --- a/pages/community/overview.mdx +++ b/pages/community/overview.mdx @@ -9,29 +9,32 @@ canonical: "/community/overview" ## Official Channels - This website -- [Twitter](https://twitter.com/rescriptlang) +- [X (previously Twitter)](https://x.com/rescriptlang) +- [BlueSky](https://bsky.app/profile/rescript-lang.org) - [Forum](https://forum.rescript-lang.org) - [ReScript GitHub Org](https://github.com/rescript-lang/) +- [ReScript YouTube Channel](https://www.youtube.com/@rescriptlang) - [ReScript Online Meetup on Guild](https://guild.host/rescript-online-meetup) - [ReScript Online Meetup YouTube Channel](https://www.youtube.com/@ReScriptOnlineMeetup) -News are broadcasted on this site's blog and on Twitter. Some extra, less important news are also posted on the forum's [Announcements category](https://forum.rescript-lang.org/c/announcements/). +News are broadcasted on this site's blog, on BlueSky and X. Some extra, less important news are also posted on the forum's [Announcements category](https://forum.rescript-lang.org/c/announcements/). **We don't use any other channel to communicate officially**. Any announcement made by users on Reddit, Discord, Medium and others don't necessarily represent our intent. ## Articles -- [Getting rid of your dead code in ReScript](https://dev.to/zth/getting-rid-of-your-dead-code-in-rescript-3mba) +- [Getting rid of your dead code in ReScript](https://dev.to/zth/getting-rid-of-your-dead-code-in-rescript-3mba) - [Speeding up ReScript compilation using interface files](https://dev.to/zth/speeding-up-rescript-compilation-using-interface-files-4fgn) - Articles in [awesome-rescript](https://github.com/fhammerschmidt/awesome-rescript#readme) ## Questions Your questions can go on: + - [The General category](https://forum.rescript-lang.org/c/general/) of the forum. - Various GitHub repositories in our [GitHub org](https://github.com/rescript-lang/). - [Stack Overflow's `rescript` tag](https://stackoverflow.com/questions/tagged/rescript) (not frequently monitored). > We stand for inclusivity and good behavior. Please read our [Code of -Conduct](/community/code-of-conduct) and help us keeping our community healthy and -friendly! +> Conduct](/community/code-of-conduct) and help us keeping our community healthy and +> friendly! diff --git a/pages/community/roadmap.mdx b/pages/community/roadmap.mdx index 2d192f62e..bc4c0a0f7 100644 --- a/pages/community/roadmap.mdx +++ b/pages/community/roadmap.mdx @@ -12,7 +12,7 @@ For latest development updates, please check out the [ReScript forum](https://fo ## Current focus -Major v12.0 release (see [v12 milestone](https://github.com/rescript-lang/rescript-compiler/milestone/16)). +Major v12.0 release (see [v12 milestone](https://github.com/rescript-lang/rescript/milestone/16)). - Move the [Rescript Core](https://github.com/rescript-lang/rescript-core) standard library into the compiler / remove the OCaml standard library - A new build system tailored to ReScript's needs ([rewatch](https://github.com/teamwalnut/rewatch)) for better monorepo support and even faster compilation speed diff --git a/pages/docs/manual/latest/async-await.mdx b/pages/docs/manual/latest/async-await.mdx index fa481f8c3..5688e41b3 100644 --- a/pages/docs/manual/latest/async-await.mdx +++ b/pages/docs/manual/latest/async-await.mdx @@ -109,7 +109,7 @@ let fetchData: string => promise = async (userId: string): string { } ``` -**Note:** In a practical scenario you'd either use a type signature, or inline types, not both at the same time. In case you are interested in the design decisions, check out [this discussion](https://github.com/rescript-lang/rescript-compiler/pull/5913#issuecomment-1359003870). +**Note:** In a practical scenario you'd either use a type signature, or inline types, not both at the same time. In case you are interested in the design decisions, check out [this discussion](https://github.com/rescript-lang/rescript/pull/5913#issuecomment-1359003870). ### Promises don't auto-collapse in async functions diff --git a/pages/docs/manual/latest/build-configuration.mdx b/pages/docs/manual/latest/build-configuration.mdx index 6cf0f91d1..99543ffc0 100644 --- a/pages/docs/manual/latest/build-configuration.mdx +++ b/pages/docs/manual/latest/build-configuration.mdx @@ -240,4 +240,4 @@ When `NINJA_ANSI_FORCED` is set to `1`: `rescript` produces color. When `NINJA_ANSI_FORCED` is set to `0`: `rescript` doesn't produce color. When `NINJA_ANSI_FORCED` is not set: `rescript` might or might not produce color, depending on a smart detection of where it's outputted. -> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163). +> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript/issues/2984#issuecomment-410669163). diff --git a/pages/docs/manual/latest/migrate-to-v11.mdx b/pages/docs/manual/latest/migrate-to-v11.mdx index dfa1ef2dc..81faf323b 100644 --- a/pages/docs/manual/latest/migrate-to-v11.mdx +++ b/pages/docs/manual/latest/migrate-to-v11.mdx @@ -100,32 +100,32 @@ Below is an excerpt from the compiler changelog about all the breaking changes o ### Language and Compiler -- Add smart printer for pipe chains. https://github.com/rescript-lang/rescript-compiler/pull/6411 (the formatter will reformat existing code in certain cases) -- Parse `assert` as a regular function. `assert` is no longer a unary expression. Example: before `assert 1 == 2` is parsed as `(assert 1) == 2`, now it is parsed as `assert(1 == 2)`. https://github.com/rescript-lang/rescript-compiler/pull/6180 +- Add smart printer for pipe chains. https://github.com/rescript-lang/rescript/pull/6411 (the formatter will reformat existing code in certain cases) +- Parse `assert` as a regular function. `assert` is no longer a unary expression. Example: before `assert 1 == 2` is parsed as `(assert 1) == 2`, now it is parsed as `assert(1 == 2)`. https://github.com/rescript-lang/rescript/pull/6180 - Remove support for the legacy Reason syntax. Existing Reason code can be converted to ReScript syntax using ReScript 9 as follows: - `npx rescript@9 convert ` - Curried after uncurried is not fused anymore: `(. x) => y => 3` is not equivalent to `(. x, y) => 3` anymore. It's instead equivalent to `(. x) => { y => 3 }`. Also, `(. int) => string => bool` is not equivalen to `(. int, string) => bool` anymore. These are only breaking changes for unformatted code. - Exponentiation operator `**` is now right-associative. `2. ** 3. ** 2.` now compile to `Math.pow(2, Math.pow(3, 2))` and not anymore `Math.pow(Math.pow(2, 3), 2)`. Parentheses can be used to change precedence. -- Stop mangling object field names. If you had objects with field names containing "\__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. https://github.com/rescript-lang/rescript-compiler/pull/6354 -- `$$default` is no longer exported from the generated JavaScript when using default exports. https://github.com/rescript-lang/rescript-compiler/pull/6328 -- `-bs-super-errors` flag has been deprecated along with Super_errors. https://github.com/rescript-lang/rescript-compiler/pull/6243 -- Remove unsafe `` j`$(a)$(b)` `` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068 -- `@deriving(jsConverter)` not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088 -- New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript-compiler/pull/6088 +- Stop mangling object field names. If you had objects with field names containing "\__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. https://github.com/rescript-lang/rescript/pull/6354 +- `$$default` is no longer exported from the generated JavaScript when using default exports. https://github.com/rescript-lang/rescript/pull/6328 +- `-bs-super-errors` flag has been deprecated along with Super_errors. https://github.com/rescript-lang/rescript/pull/6243 +- Remove unsafe `` j`$(a)$(b)` `` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript/pull/6068 +- `@deriving(jsConverter)` not supported anymore for variant types https://github.com/rescript-lang/rescript/pull/6088 +- New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript/pull/6088 ### Compiler Libraries -- Fixed name collision between the newly defined Js.Json.t and the variant constructor in the existing Js.Json.kind type. To address this, the usage of the existing Js.Json.kind type can be updated to Js.Json.Kind.t. https://github.com/rescript-lang/rescript-compiler/pull/6317 -- Remove rudimentary node bindings and undocumented `%node` extension. https://github.com/rescript-lang/rescript-compiler/pull/6285 -- `@rescript/react` >= 0.12.0-alpha.2 is now required because of the React.fragment's children type fix. https://github.com/rescript-lang/rescript-compiler/pull/6238 +- Fixed name collision between the newly defined Js.Json.t and the variant constructor in the existing Js.Json.kind type. To address this, the usage of the existing Js.Json.kind type can be updated to Js.Json.Kind.t. https://github.com/rescript-lang/rescript/pull/6317 +- Remove rudimentary node bindings and undocumented `%node` extension. https://github.com/rescript-lang/rescript/pull/6285 +- `@rescript/react` >= 0.12.0-alpha.2 is now required because of the React.fragment's children type fix. https://github.com/rescript-lang/rescript/pull/6238 - Remove deprecated module `Printexc` ### Build System and Tools -- Update watcher rules to recompile only on config and `*.res`/`*.resi`/`*.ml`/`.mli` file changes. Solves the issue of unnecessary recompiles on `.css`, `.ts`, and other unrelated file changes. https://github.com/rescript-lang/rescript-compiler/pull/6420 +- Update watcher rules to recompile only on config and `*.res`/`*.resi`/`*.ml`/`.mli` file changes. Solves the issue of unnecessary recompiles on `.css`, `.ts`, and other unrelated file changes. https://github.com/rescript-lang/rescript/pull/6420 - Made pinned dependencies transitive: if _a_ is a pinned dependency of _b_ and _b_ is a pinned dependency of _c_, then _a_ is implicitly a pinned dependency of _c_. This change is only breaking if your build process assumes non-transitivity. - Remove obsolete built-in project templates and the "rescript init" functionality. This is replaced by [create-rescript-app](https://github.com/rescript-lang/create-rescript-app) which is maintained separately. - Do not attempt to build ReScript from source on npm postinstall for platforms without prebuilt binaries anymore. -- GenType: removed support for `@genType.as` for records and variants which has become unnecessary. Use the language's `@as` instead to channge the runtime representation without requiring any runtime conversion during FFI. https://github.com/rescript-lang/rescript-compiler/pull/6099 https://github.com/rescript-lang/rescript-compiler/pull/6101 +- GenType: removed support for `@genType.as` for records and variants which has become unnecessary. Use the language's `@as` instead to channge the runtime representation without requiring any runtime conversion during FFI. https://github.com/rescript-lang/rescript/pull/6099 https://github.com/rescript-lang/rescript/pull/6101 diff --git a/pages/docs/manual/latest/typescript-integration.mdx b/pages/docs/manual/latest/typescript-integration.mdx index 7bbcccdf9..193683cec 100644 --- a/pages/docs/manual/latest/typescript-integration.mdx +++ b/pages/docs/manual/latest/typescript-integration.mdx @@ -198,7 +198,7 @@ In case of the TypeScript project using `Bundler` module resolution, `allowImpor ## Testing the Whole Setup -Open any relevant `*.res` file and add `@genType` annotations to any bindings / values / functions to be used from JavaScript. If an annotated value uses a type, the type must be annotated too. See e.g. [Hooks.res](https://github.com/rescript-lang/rescript-compiler/blob/master/tests/gentype_tests/typescript-react-example/src/Hooks.res). +Open any relevant `*.res` file and add `@genType` annotations to any bindings / values / functions to be used from JavaScript. If an annotated value uses a type, the type must be annotated too. See e.g. [Hooks.res](https://github.com/rescript-lang/rescript/blob/master/tests/gentype_tests/typescript-react-example/src/Hooks.res). Save the file and rebuild the project via `npm run res:build` or similar. You should now see a `*.gen.tsx` file with the same name (e.g. `MyComponent.res` -> `MyComponent.gen.tsx`). @@ -251,17 +251,17 @@ and add relevant `.shim.ts` files in a directory which is visible by ReScript e. Here are some examples: ```ts -// Excerpt from https://github.com/rescript-lang/rescript-compiler/blob/master/tests/gentype_tests/typescript-react-example/src/shims/Js.shim.ts +// Excerpt from https://github.com/rescript-lang/rescript/blob/master/tests/gentype_tests/typescript-react-example/src/shims/Js.shim.ts export type Json_t = unknown; export type t = unknown; ``` ```ts -// Excerpt from https://github.com/rescript-lang/rescript-compiler/tree/master/jscomp/gentype_tests/typescript-react-example/src/shims +// Excerpt from https://github.com/rescript-lang/rescript/tree/master/tests/gentype_tests/typescript-react-example/src/shims/JsxEvent.shim.ts export type inputFocusEvent = React.FocusEvent; ``` -More complete example shims can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/src/shims/). +More complete example shims can be found [here](https://github.com/rescript-lang/rescript/blob/master/tests/gentype_tests/typescript-react-example/src/shims/). ## Deprecated features @@ -272,7 +272,7 @@ Features related to generating runtimes were deprecated since v11 and should no - **`@genType.import`** - TypeScript Shims -genType does not generate anything runtime-related, and in the near future it generates definition files (`*.d.ts`) directly (See the [roadmap](https://github.com/rescript-lang/rescript-compiler/issues/6196)). +genType does not generate anything runtime-related, and in the near future it generates definition files (`*.d.ts`) directly (See the [roadmap](https://github.com/rescript-lang/rescript/issues/6196)). If any runtime code is required for interoperability with JavaScript / TypeScript projects, it can be written by hand, or request a relevant features (e.g. `@deriving`) to the compiler. diff --git a/pages/docs/manual/v10.0.0/async-await.mdx b/pages/docs/manual/v10.0.0/async-await.mdx index d5ae72fde..0f53753f4 100644 --- a/pages/docs/manual/v10.0.0/async-await.mdx +++ b/pages/docs/manual/v10.0.0/async-await.mdx @@ -111,7 +111,7 @@ let fetchData: string => promise = async (userId: string): string { } ``` -**Note:** In a practical scenario you'd either use a type signature, or inline types, not both at the same time. In case you are interested in the design decisions, check out [this discussion](https://github.com/rescript-lang/rescript-compiler/pull/5913#issuecomment-1359003870). +**Note:** In a practical scenario you'd either use a type signature, or inline types, not both at the same time. In case you are interested in the design decisions, check out [this discussion](https://github.com/rescript-lang/rescript/pull/5913#issuecomment-1359003870). ### `async` uncurried functions diff --git a/pages/docs/manual/v10.0.0/build-configuration.mdx b/pages/docs/manual/v10.0.0/build-configuration.mdx index f91bd0c20..cf73a1da4 100644 --- a/pages/docs/manual/v10.0.0/build-configuration.mdx +++ b/pages/docs/manual/v10.0.0/build-configuration.mdx @@ -197,4 +197,4 @@ When `NINJA_ANSI_FORCED` is set to `1`: `rescript` produces color. When `NINJA_ANSI_FORCED` is set to `0`: `rescript` doesn't produce color. When `NINJA_ANSI_FORCED` is not set: `rescript` might or might not produce color, depending on a smart detection of where it's outputted. -> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163). +> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript/issues/2984#issuecomment-410669163). diff --git a/pages/docs/manual/v8.0.0/build-configuration.mdx b/pages/docs/manual/v8.0.0/build-configuration.mdx index e7df22881..4d7938592 100644 --- a/pages/docs/manual/v8.0.0/build-configuration.mdx +++ b/pages/docs/manual/v8.0.0/build-configuration.mdx @@ -33,6 +33,7 @@ Your source files need to be specified explicitly (we don't want to accidentally "sources": ["src", "examples"] } ``` + ```json { "sources": { @@ -58,9 +59,9 @@ You can mark your directories as dev-only (for e.g. tests). These won't be built ```json { - "sources" : { - "dir" : "test", - "type" : "dev" + "sources": { + "dir": "test", + "type": "dev" } } ``` @@ -77,7 +78,7 @@ Note that only sources marked with `"type":"dev"` will be able to resolve module ```json { - "reason": {"react-jsx": 3}, + "reason": { "react-jsx": 3 }, "refmt": 3 } ``` @@ -171,9 +172,8 @@ When `NINJA_ANSI_FORCED` is set to `1`: `bsb` produces color. When `NINJA_ANSI_FORCED` is set to `0`: `bsb` doesn't produce color. When `NINJA_ANSI_FORCED` is not set: `bsb` might or might not produce color, depending on a smart detection of where it's outputted. -> Note that bsc, the barebone compiler, will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163). +> Note that bsc, the barebone compiler, will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript/issues/2984#issuecomment-410669163). ### BS_VSCODE error output adapted for VSCODE -If you run bsb under VSCODE task runner like [this](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/bsb/templates/basic-reason/.vscode/tasks.json#L6), it is recommended to have BS_VSCODE set - +If you run bsb under VSCODE task runner like [this](https://github.com/rescript-lang/rescript/blob/master/jscomp/bsb/templates/basic-reason/.vscode/tasks.json#L6), it is recommended to have BS_VSCODE set diff --git a/pages/docs/manual/v9.0.0/build-configuration.mdx b/pages/docs/manual/v9.0.0/build-configuration.mdx index 6848c7dda..8cf9d0f23 100644 --- a/pages/docs/manual/v9.0.0/build-configuration.mdx +++ b/pages/docs/manual/v9.0.0/build-configuration.mdx @@ -16,7 +16,7 @@ canonical: "/docs/manual/latest/build-configuration" If you're using an editor like VSCode, put the following code as your first field in `bsconfig.json` to get schema autocompletion! ```json -"$schema": "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json" +"$schema": "https://raw.githubusercontent.com/rescript-lang/rescript/master/docs/docson/build-schema.json" ``` ## name, namespace @@ -193,4 +193,4 @@ When `NINJA_ANSI_FORCED` is set to `1`: `bsb` produces color. When `NINJA_ANSI_FORCED` is set to `0`: `bsb` doesn't produce color. When `NINJA_ANSI_FORCED` is not set: `bsb` might or might not produce color, depending on a smart detection of where it's outputted. -> Note that bsc, the barebone compiler, will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163). +> Note that bsc, the barebone compiler, will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript/issues/2984#issuecomment-410669163). diff --git a/pages/docs/react/latest/elements-and-jsx.mdx b/pages/docs/react/latest/elements-and-jsx.mdx index 4ac84a02e..d357b964b 100644 --- a/pages/docs/react/latest/elements-and-jsx.mdx +++ b/pages/docs/react/latest/elements-and-jsx.mdx @@ -187,7 +187,7 @@ To create DOM elements (`
    `, ``, etc.), use `ReactDOM.createDOMElement ReactDOM.createDOMElementVariadic("div", ~props={className: "card"}, []) ``` -ReScript can make sure that we are only passing valid dom props. You can find an exhaustive list of all available props in the [JsxDOM](https://github.com/rescript-lang/rescript-compiler/blob/3bc159f33a3534280bbc26be88fa37ea2114dafe/jscomp/others/jsxDOM.res#L31) module. +ReScript can make sure that we are only passing valid dom props. You can find an exhaustive list of all available props in the [JsxDOM](https://github.com/rescript-lang/rescript/blob/3bc159f33a3534280bbc26be88fa37ea2114dafe/jscomp/others/jsxDOM.res#L31) module. ### Cloning Elements diff --git a/pages/docs/react/latest/forwarding-refs.mdx b/pages/docs/react/latest/forwarding-refs.mdx index 617198278..ad1997534 100644 --- a/pages/docs/react/latest/forwarding-refs.mdx +++ b/pages/docs/react/latest/forwarding-refs.mdx @@ -76,7 +76,7 @@ We use the `ReactDOM.domRef` type to represent our `inputRef`. We pass our ref i ## [Discouraged] React.forwardRef -**Note:** We discourage this method since it [will likely go away](https://twitter.com/dan_abramov/status/1173372190395445251) at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. +**Note:** We discourage this method since it will likely go away at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. `React.forwardRef` offers a way to "emulate a `ref` prop" within custom components. Internally the component will forward the passed `ref` value to the target DOM element instead. diff --git a/pages/docs/react/v0.10.0/forwarding-refs.mdx b/pages/docs/react/v0.10.0/forwarding-refs.mdx index 9c3f3c1a8..30433be4a 100644 --- a/pages/docs/react/v0.10.0/forwarding-refs.mdx +++ b/pages/docs/react/v0.10.0/forwarding-refs.mdx @@ -78,7 +78,7 @@ We use the `ReactDOM.domRef` type to represent our `inputRef`. We pass our ref i ## [Discouraged] React.forwardRef -**Note:** We discourage this method since it [will likely go away](https://twitter.com/dan_abramov/status/1173372190395445251) at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. +**Note:** We discourage this method since it will likely go away at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. `React.forwardRef` offers a way to "emulate a `ref` prop" within custom components. Internally the component will forward the passed `ref` value to the target DOM element instead. diff --git a/pages/docs/react/v0.11.0/elements-and-jsx.mdx b/pages/docs/react/v0.11.0/elements-and-jsx.mdx index 571f7b966..8597a5d62 100644 --- a/pages/docs/react/v0.11.0/elements-and-jsx.mdx +++ b/pages/docs/react/v0.11.0/elements-and-jsx.mdx @@ -187,7 +187,7 @@ To create DOM elements (`
    `, ``, etc.), use `ReactDOM.createDOMElement ReactDOM.createDOMElementVariadic("div", ~props={className: "card"}, []) ``` -ReScript can make sure that we are only passing valid dom props. You can find an exhaustive list of all available props in the [JsxDOM](https://github.com/rescript-lang/rescript-compiler/blob/3bc159f33a3534280bbc26be88fa37ea2114dafe/jscomp/others/jsxDOM.res#L31) module. +ReScript can make sure that we are only passing valid dom props. You can find an exhaustive list of all available props in the [JsxDOM](https://github.com/rescript-lang/rescript/blob/3bc159f33a3534280bbc26be88fa37ea2114dafe/jscomp/others/jsxDOM.res#L31) module. ### Cloning Elements diff --git a/pages/docs/react/v0.11.0/forwarding-refs.mdx b/pages/docs/react/v0.11.0/forwarding-refs.mdx index b1fe51949..56990b368 100644 --- a/pages/docs/react/v0.11.0/forwarding-refs.mdx +++ b/pages/docs/react/v0.11.0/forwarding-refs.mdx @@ -78,7 +78,7 @@ We use the `ReactDOM.domRef` type to represent our `inputRef`. We pass our ref i ## [Discouraged] React.forwardRef -**Note:** We discourage this method since it [will likely go away](https://twitter.com/dan_abramov/status/1173372190395445251) at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. +**Note:** We discourage this method since it will likely go away at some point, and doesn't yield any obvious advantages over the previously mentioned ref prop passing. `React.forwardRef` offers a way to "emulate a `ref` prop" within custom components. Internally the component will forward the passed `ref` value to the target DOM element instead. diff --git a/src/Blog.res b/src/Blog.res index eea39c33f..0c1a99416 100644 --- a/src/Blog.res +++ b/src/Blog.res @@ -170,7 +170,7 @@ module FeatureCard = {
    {React.string(author.fullname)} diff --git a/src/BlogArticle.res b/src/BlogArticle.res index 9e8d0bb42..cde9c4ba4 100644 --- a/src/BlogArticle.res +++ b/src/BlogArticle.res @@ -39,7 +39,7 @@ module AuthorBox = {
    authorImg
    {React.string(author.fullname)} diff --git a/src/common/BlogFrontmatter.res b/src/common/BlogFrontmatter.res index cd40a7064..c54e06c35 100644 --- a/src/common/BlogFrontmatter.res +++ b/src/common/BlogFrontmatter.res @@ -3,7 +3,7 @@ type author = { fullname: string, role: string, imgUrl: string, - twitter: string, + xHandle: string, } let authors = [ @@ -12,56 +12,56 @@ let authors = [ fullname: "Hongbo Zhang", role: "Compiler & Build System", imgUrl: "https://pbs.twimg.com/profile_images/1369548222314598400/E2y46vrB_400x400.jpg", - twitter: "bobzhang1988", + xHandle: "bobzhang1988", }, { username: "chenglou", fullname: "Cheng Lou", role: "Syntax & Tools", imgUrl: "https://pbs.twimg.com/profile_images/554199709909131265/Y5qUDaCB_400x400.jpeg", - twitter: "_chenglou", + xHandle: "_chenglou", }, { username: "maxim", fullname: "Maxim Valcke", role: "Syntax Lead", imgUrl: "https://pbs.twimg.com/profile_images/970271048812974080/Xrr8Ob6J_400x400.jpg", - twitter: "_binary_search", + xHandle: "_binary_search", }, { username: "ryyppy", fullname: "Patrick Ecker", role: "Documentation", imgUrl: "https://pbs.twimg.com/profile_images/1388426717006544897/B_a7D4GF_400x400.jpg", - twitter: "ryyppy", + xHandle: "ryyppy", }, { username: "rickyvetter", fullname: "Ricky Vetter", role: "ReScript & React", imgUrl: "https://pbs.twimg.com/profile_images/541111032207273984/DGsZmmfr_400x400.jpeg", - twitter: "rickyvetter", + xHandle: "rickyvetter", }, { username: "made_by_betty", fullname: "Bettina Steinbrecher", role: "Brand / UI / UX", imgUrl: "https://pbs.twimg.com/profile_images/1366785342704136195/3IGyRhV1_400x400.jpg", - twitter: "made_by_betty", + xHandle: "made_by_betty", }, { username: "rescript-team", fullname: "ReScript Team", role: "Core Development", imgUrl: "https://pbs.twimg.com/profile_images/1358354824660541440/YMKNWE1V_400x400.png", - twitter: "rescriptlang", + xHandle: "rescriptlang", }, { username: "rescript-association", fullname: "ReScript Association", role: "Foundation", imgUrl: "https://pbs.twimg.com/profile_images/1045362176117100545/MioTQoTp_400x400.jpg", - twitter: "ReScriptAssoc", + xHandle: "ReScriptAssoc", }, ] diff --git a/src/common/Constants.res b/src/common/Constants.res index 445270367..dd9386857 100644 --- a/src/common/Constants.res +++ b/src/common/Constants.res @@ -26,7 +26,7 @@ let ecosystem = [ let tools = [("Syntax Lookup", "/syntax-lookup")] -let githubHref = "https://github.com/rescript-lang/rescript-compiler" +let githubHref = "https://github.com/rescript-lang/rescript" let xHref = "https://x.com/rescriptlang" let blueSkyHref = "https://bsky.app/profile/rescript-lang.org" let discourseHref = "https://forum.rescript-lang.org/" diff --git a/src/components/Docson.res b/src/components/Docson.res index a7456d0fa..94b118b7a 100644 --- a/src/components/Docson.res +++ b/src/components/Docson.res @@ -12,7 +12,7 @@ let make = (~tag) => { let element = React.useRef(Nullable.null) React.useEffect(() => { - let segment = `https://raw.githubusercontent.com/rescript-lang/rescript-compiler/${tag}/docs/docson/build-schema.json` + let segment = `https://raw.githubusercontent.com/rescript-lang/rescript/${tag}/docs/docson/build-schema.json` // The api for docson is a little bit funky, so you need to check out the source to understand what it's doing // See: https://github.com/lbovet/docson/blob/master/src/index.js From 773baf4c87b57f7f0d6a91b475ef5821b82376d4 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Thu, 14 Nov 2024 15:37:32 +0100 Subject: [PATCH 041/124] It's Bluesky, not BlueSky (#941) --- pages/community/overview.mdx | 4 ++-- src/components/Footer.res | 2 +- src/components/Icon.res | 2 +- src/components/Icon.resi | 2 +- src/components/Navigation.res | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/community/overview.mdx b/pages/community/overview.mdx index 019eaacce..debfbe2c7 100644 --- a/pages/community/overview.mdx +++ b/pages/community/overview.mdx @@ -10,14 +10,14 @@ canonical: "/community/overview" - This website - [X (previously Twitter)](https://x.com/rescriptlang) -- [BlueSky](https://bsky.app/profile/rescript-lang.org) +- [Bluesky](https://bsky.app/profile/rescript-lang.org) - [Forum](https://forum.rescript-lang.org) - [ReScript GitHub Org](https://github.com/rescript-lang/) - [ReScript YouTube Channel](https://www.youtube.com/@rescriptlang) - [ReScript Online Meetup on Guild](https://guild.host/rescript-online-meetup) - [ReScript Online Meetup YouTube Channel](https://www.youtube.com/@ReScriptOnlineMeetup) -News are broadcasted on this site's blog, on BlueSky and X. Some extra, less important news are also posted on the forum's [Announcements category](https://forum.rescript-lang.org/c/announcements/). +News are broadcasted on this site's blog, on Bluesky and X. Some extra, less important news are also posted on the forum's [Announcements category](https://forum.rescript-lang.org/c/announcements/). **We don't use any other channel to communicate officially**. Any announcement made by users on Reddit, Discord, Medium and others don't necessarily represent our intent. diff --git a/src/components/Footer.res b/src/components/Footer.res index 17dbe1ffa..dc4c88fc5 100644 --- a/src/components/Footer.res +++ b/src/components/Footer.res @@ -66,7 +66,7 @@ let make = () => { - + diff --git a/src/components/Icon.res b/src/components/Icon.res index be805c0a7..f49812fb5 100644 --- a/src/components/Icon.res +++ b/src/components/Icon.res @@ -42,7 +42,7 @@ module X = { } -module BlueSky = { +module Bluesky = { @react.component let make = (~className: string) => diff --git a/src/components/Icon.resi b/src/components/Icon.resi index 0930f6916..4087c13b6 100644 --- a/src/components/Icon.resi +++ b/src/components/Icon.resi @@ -11,7 +11,7 @@ module X: { @react.component let make: (~className: string) => React.element } -module BlueSky: { +module Bluesky: { @react.component let make: (~className: string) => React.element } diff --git a/src/components/Navigation.res b/src/components/Navigation.res index 6b817a53b..e3ac14a0a 100644 --- a/src/components/Navigation.res +++ b/src/components/Navigation.res @@ -394,7 +394,7 @@ module MobileNav = {
  • - {React.string("BlueSky")} + {React.string("Bluesky")}
  • @@ -562,7 +562,7 @@ let make = (~fixed=true, ~isOverlayOpen: bool, ~setOverlayOpen: (bool => bool) = - + From 56b2426f7088632f6848e001a2ce23f6f3a80b20 Mon Sep 17 00:00:00 2001 From: Henrikh Kantuni Date: Mon, 18 Nov 2024 04:45:21 -0500 Subject: [PATCH 042/124] Remove Portolab (#942) * Remove Portolab logo Inappropriate content * Delete Portolab logo --- public/static/lp/portolab.svg | 19 ------------------- src/common/OurUsers.res | 5 ----- 2 files changed, 24 deletions(-) delete mode 100644 public/static/lp/portolab.svg diff --git a/public/static/lp/portolab.svg b/public/static/lp/portolab.svg deleted file mode 100644 index 6661b48ee..000000000 --- a/public/static/lp/portolab.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/common/OurUsers.res b/src/common/OurUsers.res index 01d7386b3..21e066ff1 100644 --- a/src/common/OurUsers.res +++ b/src/common/OurUsers.res @@ -59,11 +59,6 @@ let companies = [ url: "https://usestencil.com/", path: "/static/lp/stencil.svg", }), - Logo({ - name: "Portolab", - url: "https://portolab.com.br/", - path: "/static/lp/portolab.svg", - }), Logo({ name: "Tiny", url: "https://tiny.cloud/", From a84d5e50834a28c5ee0711d5a0e5aacaf36a6b30 Mon Sep 17 00:00:00 2001 From: Josh Derocher-Vlk <60623931+jderochervlk@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:26:47 -0300 Subject: [PATCH 043/124] docs: replace usage of functor with module functions (#858) * docs: replace usage of functor with module functions * create module-functions page * add example for module functions * docs - add js output to module function example * add another example * more module function examples * one less react example * editing pass --- data/sidebar_manual_latest.json | 3 +- pages/docs/manual/latest/module-functions.mdx | 311 ++++++++++++++++++ pages/docs/manual/latest/module.mdx | 28 +- 3 files changed, 327 insertions(+), 15 deletions(-) create mode 100644 pages/docs/manual/latest/module-functions.mdx diff --git a/data/sidebar_manual_latest.json b/data/sidebar_manual_latest.json index d783a4eb3..6e6c86255 100644 --- a/data/sidebar_manual_latest.json +++ b/data/sidebar_manual_latest.json @@ -37,7 +37,8 @@ ], "Advanced Features": [ "extensible-variant", - "scoped-polymorphic-types" + "scoped-polymorphic-types", + "module-functions" ], "JavaScript Interop": [ "interop-cheatsheet", diff --git a/pages/docs/manual/latest/module-functions.mdx b/pages/docs/manual/latest/module-functions.mdx new file mode 100644 index 000000000..04c6ff458 --- /dev/null +++ b/pages/docs/manual/latest/module-functions.mdx @@ -0,0 +1,311 @@ +--- +title: "Module Functions" +description: "Module Functions in ReScript" +canonical: "/docs/manual/latest/module-functions" +--- + +# Module Functions + +Module functions can be used to create modules based on types, values, or functions from other modules. +This is a powerful tool that can be used to create abstractions and reusable code that might not be possible with functions, or might have a runtime cost if done with functions. + +This is an advanced part of ReScript and you can generally get by with normal values and functions. + +## Quick example +Next.js has a `useParams` hook that returns an unknown type, +and it's up to the developer in TypeScript to add a type annotation for the parameters returned by the hook. +```TS +const params = useParams<{ tag: string; item: string }>() +``` + +In ReScript we can create a module function that will return a typed response for the `useParams` hook. + +```res example +module Next = { + // define our module function + module MakeParams = (Params: { type t }) => { + @module("next/navigation") + external useParams: unit => Params.t = "useParams" + /* You can use values from the function parameter, such as Params.t */ + } +} + +module Component: { + @react.component + let make: unit => Jsx.element +} = { + // Create a module that matches the module type expected by Next.MakeParams + module P = { + type t = { + tag: string, + item: string, + } + } + + // Create a new module using the Params module we created and the Next.MakeParams module function + module Params = Next.MakeParams(P) + + @react.component + let make = () => { + // Use the functions, values, or types created by the module function + let params = Params.useParams() +
    +

    + {React.string("Tag: " ++ params.tag /* params is fully typed! */)} +

    +

    {React.string("Item: " ++ params.item)}

    +
    + } +} +``` +```js +// Generated by ReScript, PLEASE EDIT WITH CARE + +import * as $$Navigation from "next/navigation"; +import * as JsxRuntime from "react/jsx-runtime"; + +function MakeParams(Params) { + return {}; +} + +var Next = { + MakeParams: MakeParams +}; + +function Playground$Component(props) { + var params = $$Navigation.useParams(); + return JsxRuntime.jsxs("div", { + children: [ + JsxRuntime.jsx("p", { + children: "Tag: " + params.tag + }), + JsxRuntime.jsx("p", { + children: "Item: " + params.item + }) + ] + }); +} + +var Component = { + make: Playground$Component +}; + +export { + Next , + Component , +} +/* next/navigation Not a pure module */ + +``` + + +## Sharing a type with an external binding +This becomes incredibly useful when you need to have types that are unique to a project but shared across multiple components. +Let's say you want to create a library with a `getEnv` function to load in environment variables found in `import.meta.env`. +```res +@val external env: 'a = "import.meta.env" + +let getEnv = () => { + env +} +``` +It's not possible to define types for this that will work for every project, so we just set it as 'a and the consumer of our library can define the return type. +```res +type t = {"LOG_LEVEL": string} + +let values: t = getEnv() +``` +This isn't great and it doesn't take advantage of ReScript's type system and ability to use types without type definitions, and it can't be easily shared across our application. + +We can instead create a module function that can return a module that has contains a `getEnv` function that has a typed response. +```res +module MakeEnv = ( + E: { + type t + }, +) => { + @val external env: E.t = "import.meta.env" + + let getEnv = () => { + env + } +} +``` +And now consumers of our library can define the types and create a custom version of the hook for their application. +Notice that in the JavaScript output that the `import.meta.env` is used directly and doesn't require any function calls or runtime overhead. + + +```res +module Env = MakeEnv({ + type t = {"LOG_LEVEL": string} +}) + +let values = Env.getEnv() +``` +```js +var Env = { + getEnv: getEnv +}; + +var values = import.meta.env; +``` + + +## Shared functions +You might want to share functions across modules, like a way to log a value or render it in React. +Here's an example of module function that takes in a type and a transform to string function. + +```res +module MakeDataModule = ( + T: { + type t + let toString: t => string + }, +) => { + type t = T.t + let log = a => Console.log("The value is " ++ T.toString(a)) + + module Render = { + @react.component + let make = (~value) => value->T.toString->React.string + } +} +``` +You can now take a module with a type of `t` and a `toString` function and create a new module that has the `log` function and the `Render` component. + +```res +module Person = { + type t = { firstName: string, lastName: string } + let toString = person => person.firstName ++ person.lastName +} + +module PersonData = MakeDataModule(Person) +``` + +```js +// Notice that none of the JS output references the MakeDataModule function + +function toString(person) { + return person.firstName + person.lastName; +} + +var Person = { + toString: toString +}; + +function log(a) { + console.log("The value is " + toString(a)); +} + +function Person$MakeDataModule$Render(props) { + return toString(props.value); +} + +var Render = { + make: Person$MakeDataModule$Render +}; + +var PersonData = { + log: log, + Render: Render +}; +``` + + +Now the `PersonData` module has the functions from the `MakeDataModule`. + +```res +@react.component +let make = (~person) => { + let handleClick = _ => PersonData.log(person) +
    + {React.string("Hello ")} + + +
    +} +``` +```js +function Person$1(props) { + var person = props.person; + var handleClick = function (param) { + log(person); + }; + return JsxRuntime.jsxs("div", { + children: [ + "Hello ", + JsxRuntime.jsx(Person$MakeDataModule$Render, { + value: person + }), + JsxRuntime.jsx("button", { + children: "Log value to console", + onClick: handleClick + }) + ] + }); +} +``` +
    + +## Dependency injection +Module functions can be used for dependency injection. +Here's an example of injecting in some config values into a set of functions to access a database. + +```res +module type DbConfig = { + let host: string + let database: string + let username: string + let password: string +} + +module MakeDbConnection = (Config: DbConfig) => { + type client = { + write: string => unit, + read: string => string, + } + @module("database.js") + external makeClient: (string, string, string, string) => client = "makeClient" + + let client = makeClient(Config.host, Config.database, Config.username, Config.password) +} + +module Db = MakeDbConnection({ + let host = "localhost" + let database = "mydb" + let username = "root" + let password = "password" +}) + +let updateDb = Db.client.write("new value") +``` +```js +// Generated by ReScript, PLEASE EDIT WITH CARE + +import * as DatabaseJs from "database.js"; + +function MakeDbConnection(Config) { + var client = DatabaseJs.makeClient(Config.host, Config.database, Config.username, Config.password); + return { + client: client + }; +} + +var client = DatabaseJs.makeClient("localhost", "mydb", "root", "password"); + +var Db = { + client: client +}; + +var updateDb = client.write("new value"); + +export { + MakeDbConnection , + Db , + updateDb , +} +/* client Not a pure module */ +``` + \ No newline at end of file diff --git a/pages/docs/manual/latest/module.mdx b/pages/docs/manual/latest/module.mdx index 3dbf4dfe1..018785b5d 100644 --- a/pages/docs/manual/latest/module.mdx +++ b/pages/docs/manual/latest/module.mdx @@ -413,22 +413,22 @@ type state = int let render: string => string ``` -## Module Functions (functors) +## Module Functions Modules can be passed to functions! It would be the equivalent of passing a file as a first-class item. However, modules are at a different "layer" of the language than other common concepts, so we can't pass them to *regular* -functions. Instead, we pass them to special functions called "functors". +functions. Instead, we pass them to special functions called module functions. -The syntax for defining and using functors is very much like the syntax +The syntax for defining and using module functions is very much like the syntax for defining and using regular functions. The primary differences are: -- Functors use the `module` keyword instead of `let`. -- Functors take modules as arguments and return a module. -- Functors *require* annotating arguments. -- Functors must start with a capital letter (just like modules/signatures). +- Module functions use the `module` keyword instead of `let`. +- Module functions take modules as arguments and return a module. +- Module functions *require* annotating arguments. +- Module functions must start with a capital letter (just like modules/signatures). -Here's an example `MakeSet` functor, that takes in a module of the type +Here's an example `MakeSet` module function, that takes in a module of the type `Comparable` and returns a new set that can contain such comparable items. @@ -482,7 +482,7 @@ function MakeSet(Item) { -Functors can be applied using function application syntax. In this case, we're +Module functions can be applied using function application syntax. In this case, we're creating a set, whose items are pairs of integers. @@ -525,12 +525,12 @@ var SetOfIntPairs = { ### Module functions types -Like with module types, functor types also act to constrain and hide what we may -assume about functors. The syntax for functor types are consistent with those +Like with module types, module function types also act to constrain and hide what we may +assume about module functions. The syntax for module function types are consistent with those for function types, but with types capitalized to represent the signatures of -modules the functor accepts as arguments and return values. In the +modules the module functions accepts as arguments and return values. In the previous example, we're exposing the backing type of a set; by giving `MakeSet` -a functor signature, we can hide the underlying data structure! +a module function signature, we can hide the underlying data structure! @@ -566,4 +566,4 @@ Please note that modules with an exotic filename will not be accessible from oth ## Tips & Tricks -Modules and functors are at a different "layer" of language than the rest (functions, let bindings, data structures, etc.). For example, you can't easily pass them into a tuple or record. Use them judiciously, if ever! Lots of times, just a record or a function is enough. +Modules and module functions are at a different "layer" of language than the rest (functions, let bindings, data structures, etc.). For example, you can't easily pass them into a tuple or record. Use them judiciously, if ever! Lots of times, just a record or a function is enough. From fb5e9d2241aea67b15ec55ebf35bbf27d5390371 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:12:32 +0100 Subject: [PATCH 044/124] Bump micromatch from 4.0.5 to 4.0.8 (#908) Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8. - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8) --- updated-dependencies: - dependency-name: micromatch dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6b2b000d8..0d13f5422 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9142,11 +9142,11 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -20375,11 +20375,11 @@ "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==" }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, From 0bb04ee8c832e9dc34d00f23929ba64e6f9480db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:12:58 +0100 Subject: [PATCH 045/124] Bump path-to-regexp and express (#912) Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together. Updates `path-to-regexp` from 0.1.7 to 0.1.10 - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.7...v0.1.10) Updates `express` from 4.18.2 to 4.20.0 - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/4.18.2...4.20.0) --- updated-dependencies: - dependency-name: path-to-regexp dependency-type: indirect - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 486 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 364 insertions(+), 122 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d13f5422..1e268f025 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2767,20 +2767,20 @@ } }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", + "qs": "6.13.0", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -2802,6 +2802,20 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -2910,12 +2924,18 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3176,9 +3196,9 @@ } }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } @@ -3458,6 +3478,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-lazy-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", @@ -3780,6 +3816,25 @@ "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", @@ -4479,36 +4534,36 @@ } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.20.0.tgz", + "integrity": "sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", "finalhandler": "1.2.0", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.0", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -4527,6 +4582,14 @@ "ms": "2.0.0" } }, + "node_modules/express/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -4808,9 +4871,12 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.5", @@ -4864,14 +4930,18 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5161,11 +5231,11 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5207,6 +5277,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hast-util-has-property": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-2.0.1.tgz", @@ -8545,9 +8626,12 @@ } }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/merge-stream": { "version": "2.0.0", @@ -9871,9 +9955,12 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -10139,9 +10226,9 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" }, "node_modules/path-type": { "version": "4.0.0", @@ -10937,9 +11024,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -12510,9 +12597,9 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -12625,9 +12712,9 @@ } }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.0.tgz", + "integrity": "sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA==", "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -12638,6 +12725,58 @@ "node": ">= 0.8.0" } }, + "node_modules/serve-static/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-static/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/serve-static/node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -12663,13 +12802,17 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -16139,20 +16282,20 @@ "dev": true }, "body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "requires": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", + "qs": "6.13.0", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -16169,6 +16312,14 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "requires": { + "side-channel": "^1.0.6" + } } } }, @@ -16242,12 +16393,15 @@ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" }, "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" } }, "callsites": { @@ -16428,9 +16582,9 @@ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" }, "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==" }, "cookie-signature": { "version": "1.0.6", @@ -16635,6 +16789,16 @@ "untildify": "^4.0.0" } }, + "define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "requires": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + } + }, "define-lazy-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", @@ -16874,6 +17038,19 @@ "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" }, + "es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "requires": { + "get-intrinsic": "^1.2.4" + } + }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, "es-module-lexer": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", @@ -17369,36 +17546,36 @@ } }, "express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.20.0.tgz", + "integrity": "sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", "finalhandler": "1.2.0", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", "qs": "6.11.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.0", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -17414,6 +17591,11 @@ "ms": "2.0.0" } }, + "encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -17635,9 +17817,9 @@ "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "function.prototype.name": { "version": "1.1.5", @@ -17672,14 +17854,15 @@ "dev": true }, "get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" } }, "get-own-enumerable-property-symbols": { @@ -17886,11 +18069,11 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "requires": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" } }, "has-proto": { @@ -17911,6 +18094,14 @@ "has-symbols": "^1.0.2" } }, + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "requires": { + "function-bind": "^1.1.2" + } + }, "hast-util-has-property": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-2.0.1.tgz", @@ -20032,9 +20223,9 @@ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" }, "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==" }, "merge-stream": { "version": "2.0.0", @@ -20878,9 +21069,9 @@ "dev": true }, "object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==" }, "object-keys": { "version": "1.1.1", @@ -21067,9 +21258,9 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" }, "path-type": { "version": "4.0.0", @@ -21548,9 +21739,9 @@ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "requires": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -22606,9 +22797,9 @@ } }, "send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "requires": { "debug": "2.6.9", "depd": "2.0.0", @@ -22712,14 +22903,64 @@ } }, "serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.0.tgz", + "integrity": "sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", "send": "0.18.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + } + } + }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + } + } + } + }, + "set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" } }, "setprototypeof": { @@ -22741,13 +22982,14 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" }, "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" } }, "signal-exit": { From e69eb2a20ecffb3464ff10fbd09e2ebd86d39356 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:19:02 +0100 Subject: [PATCH 046/124] Bump next from 14.2.2 to 14.2.10 (#917) Bumps [next](https://github.com/vercel/next.js) from 14.2.2 to 14.2.10. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v14.2.2...v14.2.10) --- updated-dependencies: - dependency-name: next dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 176 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e268f025..6536ae6d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "highlight.js": "^11.9.0", "highlightjs-rescript": "^0.2.2", "lz-string": "^1.4.4", - "next": "^14.2.2", + "next": "^14.2.10", "next-mdx-remote": "^4.4.1", "prettier": "^1.18.2", "react": "^18.2.0", @@ -1606,9 +1606,9 @@ } }, "node_modules/@next/env": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.2.tgz", - "integrity": "sha512-sk72qRfM1Q90XZWYRoJKu/UWlTgihrASiYw/scb15u+tyzcze3bOuJ/UV6TBOQEeUaxOkRqGeuGUdiiuxc5oqw==" + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.10.tgz", + "integrity": "sha512-dZIu93Bf5LUtluBXIv4woQw2cZVZ2DJTjax5/5DOs3lzEOeKLy7GxRSr4caK9/SCPdaW6bCgpye6+n4Dh9oJPw==" }, "node_modules/@next/eslint-plugin-next": { "version": "13.4.12", @@ -1638,9 +1638,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.2.tgz", - "integrity": "sha512-3iPgMhzbalizGwHNFUcGnDhFPSgVBHQ8aqSTAMxB5BvJG0oYrDf1WOJZlbXBgunOEj/8KMVbejEur/FpvFsgFQ==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.10.tgz", + "integrity": "sha512-V3z10NV+cvMAfxQUMhKgfQnPbjw+Ew3cnr64b0lr8MDiBJs3eLnM6RpGC46nhfMZsiXgQngCJKWGTC/yDcgrDQ==", "cpu": [ "arm64" ], @@ -1653,9 +1653,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.2.tgz", - "integrity": "sha512-x7Afi/jt0ZBRUZHTi49yyej4o8znfIMHO4RvThuoc0P+uli8Jd99y5GKjxoYunPKsXL09xBXEM1+OQy2xEL0Ag==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.10.tgz", + "integrity": "sha512-Y0TC+FXbFUQ2MQgimJ/7Ina2mXIKhE7F+GUe1SgnzRmwFY3hX2z8nyVCxE82I2RicspdkZnSWMn4oTjIKz4uzA==", "cpu": [ "x64" ], @@ -1668,9 +1668,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.2.tgz", - "integrity": "sha512-zbfPtkk7L41ODMJwSp5VbmPozPmMMQrzAc0HAUomVeVIIwlDGs/UCqLJvLNDt4jpWgc21SjjyIn762lNGrMaUA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.10.tgz", + "integrity": "sha512-ZfQ7yOy5zyskSj9rFpa0Yd7gkrBnJTkYVSya95hX3zeBG9E55Z6OTNPn1j2BTFWvOVVj65C3T+qsjOyVI9DQpA==", "cpu": [ "arm64" ], @@ -1683,9 +1683,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.2.tgz", - "integrity": "sha512-wPbS3pI/JU16rm3XdLvvTmlsmm1nd+sBa2ohXgBZcShX4TgOjD4R+RqHKlI1cjo/jDZKXt6OxmcU0Iys0OC/yg==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.10.tgz", + "integrity": "sha512-n2i5o3y2jpBfXFRxDREr342BGIQCJbdAUi/K4q6Env3aSx8erM9VuKXHw5KNROK9ejFSPf0LhoSkU/ZiNdacpQ==", "cpu": [ "arm64" ], @@ -1698,9 +1698,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.2.tgz", - "integrity": "sha512-NqWOHqqq8iC9tuHvZxjQ2tX+jWy2X9y8NX2mcB4sj2bIccuCxbIZrU/ThFPZZPauygajZuVQ6zediejQHwZHwQ==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.10.tgz", + "integrity": "sha512-GXvajAWh2woTT0GKEDlkVhFNxhJS/XdDmrVHrPOA83pLzlGPQnixqxD8u3bBB9oATBKB//5e4vpACnx5Vaxdqg==", "cpu": [ "x64" ], @@ -1713,9 +1713,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.2.tgz", - "integrity": "sha512-lGepHhwb9sGhCcU7999+iK1ZZT+6rrIoVg40MP7DZski9GIZP80wORSbt5kJzh9v2x2ev2lxC6VgwMQT0PcgTA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.10.tgz", + "integrity": "sha512-opFFN5B0SnO+HTz4Wq4HaylXGFV+iHrVxd3YvREUX9K+xfc4ePbRrxqOuPOFjtSuiVouwe6uLeDtabjEIbkmDA==", "cpu": [ "x64" ], @@ -1728,9 +1728,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.2.tgz", - "integrity": "sha512-TZSh/48SfcLEQ4rD25VVn2kdIgUWmMflRX3OiyPwGNXn3NiyPqhqei/BaqCYXViIQ+6QsG9R0C8LftMqy8JPMA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.10.tgz", + "integrity": "sha512-9NUzZuR8WiXTvv+EiU/MXdcQ1XUvFixbLIMNQiVHuzs7ZIFrJDLJDaOF1KaqttoTujpcxljM/RNAOmw1GhPPQQ==", "cpu": [ "arm64" ], @@ -1743,9 +1743,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.2.tgz", - "integrity": "sha512-M0tBVNMEBJN2ZNQWlcekMn6pvLria7Sa2Fai5znm7CCJz4pP3lrvlSxhKdkCerk0D9E0bqx5yAo3o2Q7RrD4gA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.10.tgz", + "integrity": "sha512-fr3aEbSd1GeW3YUMBkWAu4hcdjZ6g4NBl1uku4gAn661tcxd1bHs1THWYzdsbTRLcCKLjrDZlNp6j2HTfrw+Bg==", "cpu": [ "ia32" ], @@ -1758,9 +1758,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.2.tgz", - "integrity": "sha512-a/20E/wtTJZ3Ykv3f/8F0l7TtgQa2LWHU2oNB9bsu0VjqGuGGHmm/q6waoUNQYTVPYrrlxxaHjJcDV6aiSTt/w==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.10.tgz", + "integrity": "sha512-UjeVoRGKNL2zfbcQ6fscmgjBAS/inHBh63mjIlfPg/NG8Yn2ztqylXt5qilYb6hoHIwaU2ogHknHWWmahJjgZQ==", "cpu": [ "x64" ], @@ -9358,11 +9358,11 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/next": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.2.tgz", - "integrity": "sha512-oGwUaa2bCs47FbuxWMpOoXtBMPYpvTPgdZr3UAo+pu7Ns00z9otmYpoeV1HEiYL06AlRQQIA/ypK526KjJfaxg==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.10.tgz", + "integrity": "sha512-sDDExXnh33cY3RkS9JuFEKaS4HmlWmDKP1VJioucCG6z5KuA008DPsDZOzi8UfqEk3Ii+2NCQSJrfbEWtZZfww==", "dependencies": { - "@next/env": "14.2.2", + "@next/env": "14.2.10", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -9377,15 +9377,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.2", - "@next/swc-darwin-x64": "14.2.2", - "@next/swc-linux-arm64-gnu": "14.2.2", - "@next/swc-linux-arm64-musl": "14.2.2", - "@next/swc-linux-x64-gnu": "14.2.2", - "@next/swc-linux-x64-musl": "14.2.2", - "@next/swc-win32-arm64-msvc": "14.2.2", - "@next/swc-win32-ia32-msvc": "14.2.2", - "@next/swc-win32-x64-msvc": "14.2.2" + "@next/swc-darwin-arm64": "14.2.10", + "@next/swc-darwin-x64": "14.2.10", + "@next/swc-linux-arm64-gnu": "14.2.10", + "@next/swc-linux-arm64-musl": "14.2.10", + "@next/swc-linux-x64-gnu": "14.2.10", + "@next/swc-linux-x64-musl": "14.2.10", + "@next/swc-win32-arm64-msvc": "14.2.10", + "@next/swc-win32-ia32-msvc": "14.2.10", + "@next/swc-win32-x64-msvc": "14.2.10" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -15421,9 +15421,9 @@ } }, "@next/env": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.2.tgz", - "integrity": "sha512-sk72qRfM1Q90XZWYRoJKu/UWlTgihrASiYw/scb15u+tyzcze3bOuJ/UV6TBOQEeUaxOkRqGeuGUdiiuxc5oqw==" + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.10.tgz", + "integrity": "sha512-dZIu93Bf5LUtluBXIv4woQw2cZVZ2DJTjax5/5DOs3lzEOeKLy7GxRSr4caK9/SCPdaW6bCgpye6+n4Dh9oJPw==" }, "@next/eslint-plugin-next": { "version": "13.4.12", @@ -15449,57 +15449,57 @@ } }, "@next/swc-darwin-arm64": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.2.tgz", - "integrity": "sha512-3iPgMhzbalizGwHNFUcGnDhFPSgVBHQ8aqSTAMxB5BvJG0oYrDf1WOJZlbXBgunOEj/8KMVbejEur/FpvFsgFQ==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.10.tgz", + "integrity": "sha512-V3z10NV+cvMAfxQUMhKgfQnPbjw+Ew3cnr64b0lr8MDiBJs3eLnM6RpGC46nhfMZsiXgQngCJKWGTC/yDcgrDQ==", "optional": true }, "@next/swc-darwin-x64": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.2.tgz", - "integrity": "sha512-x7Afi/jt0ZBRUZHTi49yyej4o8znfIMHO4RvThuoc0P+uli8Jd99y5GKjxoYunPKsXL09xBXEM1+OQy2xEL0Ag==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.10.tgz", + "integrity": "sha512-Y0TC+FXbFUQ2MQgimJ/7Ina2mXIKhE7F+GUe1SgnzRmwFY3hX2z8nyVCxE82I2RicspdkZnSWMn4oTjIKz4uzA==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.2.tgz", - "integrity": "sha512-zbfPtkk7L41ODMJwSp5VbmPozPmMMQrzAc0HAUomVeVIIwlDGs/UCqLJvLNDt4jpWgc21SjjyIn762lNGrMaUA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.10.tgz", + "integrity": "sha512-ZfQ7yOy5zyskSj9rFpa0Yd7gkrBnJTkYVSya95hX3zeBG9E55Z6OTNPn1j2BTFWvOVVj65C3T+qsjOyVI9DQpA==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.2.tgz", - "integrity": "sha512-wPbS3pI/JU16rm3XdLvvTmlsmm1nd+sBa2ohXgBZcShX4TgOjD4R+RqHKlI1cjo/jDZKXt6OxmcU0Iys0OC/yg==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.10.tgz", + "integrity": "sha512-n2i5o3y2jpBfXFRxDREr342BGIQCJbdAUi/K4q6Env3aSx8erM9VuKXHw5KNROK9ejFSPf0LhoSkU/ZiNdacpQ==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.2.tgz", - "integrity": "sha512-NqWOHqqq8iC9tuHvZxjQ2tX+jWy2X9y8NX2mcB4sj2bIccuCxbIZrU/ThFPZZPauygajZuVQ6zediejQHwZHwQ==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.10.tgz", + "integrity": "sha512-GXvajAWh2woTT0GKEDlkVhFNxhJS/XdDmrVHrPOA83pLzlGPQnixqxD8u3bBB9oATBKB//5e4vpACnx5Vaxdqg==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.2.tgz", - "integrity": "sha512-lGepHhwb9sGhCcU7999+iK1ZZT+6rrIoVg40MP7DZski9GIZP80wORSbt5kJzh9v2x2ev2lxC6VgwMQT0PcgTA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.10.tgz", + "integrity": "sha512-opFFN5B0SnO+HTz4Wq4HaylXGFV+iHrVxd3YvREUX9K+xfc4ePbRrxqOuPOFjtSuiVouwe6uLeDtabjEIbkmDA==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.2.tgz", - "integrity": "sha512-TZSh/48SfcLEQ4rD25VVn2kdIgUWmMflRX3OiyPwGNXn3NiyPqhqei/BaqCYXViIQ+6QsG9R0C8LftMqy8JPMA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.10.tgz", + "integrity": "sha512-9NUzZuR8WiXTvv+EiU/MXdcQ1XUvFixbLIMNQiVHuzs7ZIFrJDLJDaOF1KaqttoTujpcxljM/RNAOmw1GhPPQQ==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.2.tgz", - "integrity": "sha512-M0tBVNMEBJN2ZNQWlcekMn6pvLria7Sa2Fai5znm7CCJz4pP3lrvlSxhKdkCerk0D9E0bqx5yAo3o2Q7RrD4gA==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.10.tgz", + "integrity": "sha512-fr3aEbSd1GeW3YUMBkWAu4hcdjZ6g4NBl1uku4gAn661tcxd1bHs1THWYzdsbTRLcCKLjrDZlNp6j2HTfrw+Bg==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.2.tgz", - "integrity": "sha512-a/20E/wtTJZ3Ykv3f/8F0l7TtgQa2LWHU2oNB9bsu0VjqGuGGHmm/q6waoUNQYTVPYrrlxxaHjJcDV6aiSTt/w==", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.10.tgz", + "integrity": "sha512-UjeVoRGKNL2zfbcQ6fscmgjBAS/inHBh63mjIlfPg/NG8Yn2ztqylXt5qilYb6hoHIwaU2ogHknHWWmahJjgZQ==", "optional": true }, "@nodelib/fs.scandir": { @@ -20653,20 +20653,20 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "next": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.2.tgz", - "integrity": "sha512-oGwUaa2bCs47FbuxWMpOoXtBMPYpvTPgdZr3UAo+pu7Ns00z9otmYpoeV1HEiYL06AlRQQIA/ypK526KjJfaxg==", - "requires": { - "@next/env": "14.2.2", - "@next/swc-darwin-arm64": "14.2.2", - "@next/swc-darwin-x64": "14.2.2", - "@next/swc-linux-arm64-gnu": "14.2.2", - "@next/swc-linux-arm64-musl": "14.2.2", - "@next/swc-linux-x64-gnu": "14.2.2", - "@next/swc-linux-x64-musl": "14.2.2", - "@next/swc-win32-arm64-msvc": "14.2.2", - "@next/swc-win32-ia32-msvc": "14.2.2", - "@next/swc-win32-x64-msvc": "14.2.2", + "version": "14.2.10", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.10.tgz", + "integrity": "sha512-sDDExXnh33cY3RkS9JuFEKaS4HmlWmDKP1VJioucCG6z5KuA008DPsDZOzi8UfqEk3Ii+2NCQSJrfbEWtZZfww==", + "requires": { + "@next/env": "14.2.10", + "@next/swc-darwin-arm64": "14.2.10", + "@next/swc-darwin-x64": "14.2.10", + "@next/swc-linux-arm64-gnu": "14.2.10", + "@next/swc-linux-arm64-musl": "14.2.10", + "@next/swc-linux-x64-gnu": "14.2.10", + "@next/swc-linux-x64-musl": "14.2.10", + "@next/swc-win32-arm64-msvc": "14.2.10", + "@next/swc-win32-ia32-msvc": "14.2.10", + "@next/swc-win32-x64-msvc": "14.2.10", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", diff --git a/package.json b/package.json index 836ba4a14..094138d55 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "highlight.js": "^11.9.0", "highlightjs-rescript": "^0.2.2", "lz-string": "^1.4.4", - "next": "^14.2.2", + "next": "^14.2.10", "next-mdx-remote": "^4.4.1", "prettier": "^1.18.2", "react": "^18.2.0", From 85a7f8a1fe3b3bf3db430a8554000db9c7d720e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:21:11 +0100 Subject: [PATCH 047/124] Bump cross-spawn from 7.0.3 to 7.0.6 (#944) Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6536ae6d9..e0382af18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3214,9 +3214,9 @@ "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -16597,9 +16597,9 @@ "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", From 53284c10b09565e326a6025148f4a5c748ac65de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:26:01 +0100 Subject: [PATCH 048/124] Bump webpack from 5.91.0 to 5.95.0 (#922) Bumps [webpack](https://github.com/webpack/webpack) from 5.91.0 to 5.95.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.91.0...v5.95.0) --- updated-dependencies: - dependency-name: webpack dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 90 +++++++++++++---------------------------------- 1 file changed, 24 insertions(+), 66 deletions(-) diff --git a/package-lock.json b/package-lock.json index e0382af18..5fec0b2b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1898,26 +1898,6 @@ "@types/ms": "*" } }, - "node_modules/@types/eslint": { - "version": "8.56.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", - "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", - "peer": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "peer": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -2331,10 +2311,10 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "peer": true, "peerDependencies": { "acorn": "^8" @@ -3736,9 +3716,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz", - "integrity": "sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -14139,21 +14119,20 @@ } }, "node_modules/webpack": { - "version": "5.91.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", - "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", + "version": "5.95.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", + "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", "peer": true, "dependencies": { - "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", + "acorn-import-attributes": "^1.9.5", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.16.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -15599,26 +15578,6 @@ "@types/ms": "*" } }, - "@types/eslint": { - "version": "8.56.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", - "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", - "peer": true, - "requires": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "peer": true, - "requires": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -15963,10 +15922,10 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==" }, - "acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "peer": true, "requires": {} }, @@ -16973,9 +16932,9 @@ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" }, "enhanced-resolve": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz", - "integrity": "sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -23906,21 +23865,20 @@ } }, "webpack": { - "version": "5.91.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", - "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", + "version": "5.95.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", + "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", "peer": true, "requires": { - "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", + "acorn-import-attributes": "^1.9.5", "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.16.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", From d568f8052d3ac87e7135877207c9311df5966291 Mon Sep 17 00:00:00 2001 From: nerdalytics <97166791+nerdalytics@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:26:57 +0100 Subject: [PATCH 049/124] Add Zed extension (#936) Add link to the Zed extension under community supported section --- pages/docs/manual/latest/editor-plugins.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/docs/manual/latest/editor-plugins.mdx b/pages/docs/manual/latest/editor-plugins.mdx index 7530c08bc..41393093f 100644 --- a/pages/docs/manual/latest/editor-plugins.mdx +++ b/pages/docs/manual/latest/editor-plugins.mdx @@ -17,3 +17,4 @@ We don't officially support these; use them at your own risk! - [Neovim Tree-sitter](https://github.com/nkrkv/nvim-treesitter-rescript) - [IDEA](https://github.com/reasonml-editor/reasonml-idea-plugin) - [Emacs](https://github.com/jjlee/rescript-mode) +- [Zed](https://github.com/humaans/rescript-zed) From b6cebb37a3896fdf4d98ba68da2b26d41a5af9a5 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Tue, 3 Dec 2024 22:14:15 +0100 Subject: [PATCH 050/124] Npm audit (#948) --- package-lock.json | 689 ++++++++++++++++++++++------------------------ 1 file changed, 333 insertions(+), 356 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5fec0b2b3..20b8fcaef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1644,6 +1644,7 @@ "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -1659,6 +1660,7 @@ "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "darwin" @@ -1674,6 +1676,7 @@ "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -1689,6 +1692,7 @@ "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -1704,6 +1708,7 @@ "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -1719,6 +1724,7 @@ "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "linux" @@ -1734,6 +1740,7 @@ "cpu": [ "arm64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -1749,6 +1756,7 @@ "cpu": [ "ia32" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -1764,6 +1772,7 @@ "cpu": [ "x64" ], + "license": "MIT", "optional": true, "os": [ "win32" @@ -1899,9 +1908,10 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "license": "MIT" }, "node_modules/@types/estree-jsx": { "version": "1.0.3", @@ -2131,148 +2141,163 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "license": "MIT", "peer": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "license": "MIT", "peer": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "license": "MIT", "peer": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "license": "MIT", "peer": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "license": "MIT", "peer": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "license": "MIT", "peer": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "license": "MIT", "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "license": "MIT", "peer": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "license": "Apache-2.0", "peer": true, "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "license": "MIT", "peer": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "license": "MIT", "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "license": "MIT", "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "license": "MIT", "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "license": "MIT", "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "license": "MIT", "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" } }, @@ -2280,12 +2305,14 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "license": "BSD-3-Clause", "peer": true }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "license": "Apache-2.0", "peer": true }, "node_modules/accepts": { @@ -2301,9 +2328,10 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -2782,20 +2810,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -2834,9 +2848,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "funding": [ { "type": "opencollective", @@ -2851,11 +2865,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -2952,9 +2967,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001611", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001611.tgz", - "integrity": "sha512-19NuN1/3PjA3QI8Eki55N8my4LzfkMCRLgCVfrl/slbSAchQfV0+GwjPrK3rq37As4UCLlM/DHajbKkAqbv92Q==", + "version": "1.0.30001686", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz", + "integrity": "sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==", "funding": [ { "type": "opencollective", @@ -2968,7 +2983,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/caseless": { "version": "0.12.0", @@ -3176,9 +3192,10 @@ } }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3689,9 +3706,10 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.482", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.482.tgz", - "integrity": "sha512-h+UqpfmEr1Qkk0zp7ej/jid7CXoq4m4QzW6wNTb0ELJ/BZCpA4wgUylBIMGCe621tnr4l5VmoHjdoSx2lbnNJA==" + "version": "1.5.68", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.68.tgz", + "integrity": "sha512-FgMdJlma0OzUYlbrtZ4AeXjKxKPk6KT8WOP8BjcqxWtlg8qyJQjRzPJzUtUn5GBg1oQ26hFs7HOOHJMYiJRnvQ==", + "license": "ISC" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -3916,9 +3934,10 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -4514,23 +4533,24 @@ } }, "node_modules/express": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.20.0.tgz", - "integrity": "sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", "merge-descriptors": "1.0.3", @@ -4539,11 +4559,11 @@ "parseurl": "~1.3.3", "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.19.0", - "serve-static": "1.16.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -4685,12 +4705,13 @@ } }, "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -4705,14 +4726,25 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } }, + "node_modules/finalhandler/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/find-up": { "version": "5.0.0", @@ -9850,9 +9882,10 @@ } }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "license": "MIT" }, "node_modules/normalize-path": { "version": "3.0.0", @@ -10234,9 +10267,10 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" }, "node_modules/picomatch": { "version": "2.3.1", @@ -10954,11 +10988,12 @@ } }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -12692,53 +12727,27 @@ } }, "node_modules/serve-static": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.0.tgz", - "integrity": "sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/serve-static/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/serve-static/node_modules/debug/node_modules/ms": { + "node_modules/serve-static/node_modules/encodeurl": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/serve-static/node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", "engines": { - "node": ">= 0.8.0" + "node": ">= 0.8" } }, "node_modules/set-function-length": { @@ -13961,9 +13970,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "funding": [ { "type": "opencollective", @@ -13978,9 +13987,10 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -15579,9 +15589,9 @@ } }, "@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" }, "@types/estree-jsx": { "version": "1.0.3", @@ -15751,148 +15761,148 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, "@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", "peer": true, "requires": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", "peer": true }, "@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", "peer": true }, "@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", "peer": true }, "@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", "peer": true, "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", "peer": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", "peer": true, "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" } }, "@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", "peer": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", "peer": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", "peer": true }, "@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", "peer": true, "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" } }, "@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", "peer": true, "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", "peer": true, "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" } }, "@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", "peer": true, "requires": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", "peer": true, "requires": { - "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" } }, @@ -15918,9 +15928,9 @@ } }, "acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==" + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==" }, "acorn-import-attributes": { "version": "1.9.5", @@ -16271,14 +16281,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "requires": { - "side-channel": "^1.0.6" - } } } }, @@ -16314,14 +16316,14 @@ } }, "browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "requires": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" } }, "buffer-from": { @@ -16388,9 +16390,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001611", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001611.tgz", - "integrity": "sha512-19NuN1/3PjA3QI8Eki55N8my4LzfkMCRLgCVfrl/slbSAchQfV0+GwjPrK3rq37As4UCLlM/DHajbKkAqbv92Q==" + "version": "1.0.30001686", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz", + "integrity": "sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==" }, "caseless": { "version": "0.12.0", @@ -16541,9 +16543,9 @@ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" }, "cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==" + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==" }, "cookie-signature": { "version": "1.0.6", @@ -16911,9 +16913,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "electron-to-chromium": { - "version": "1.4.482", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.482.tgz", - "integrity": "sha512-h+UqpfmEr1Qkk0zp7ej/jid7CXoq4m4QzW6wNTb0ELJ/BZCpA4wgUylBIMGCe621tnr4l5VmoHjdoSx2lbnNJA==" + "version": "1.5.68", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.68.tgz", + "integrity": "sha512-FgMdJlma0OzUYlbrtZ4AeXjKxKPk6KT8WOP8BjcqxWtlg8qyJQjRzPJzUtUn5GBg1oQ26hFs7HOOHJMYiJRnvQ==" }, "emoji-regex": { "version": "9.2.2", @@ -17089,9 +17091,9 @@ } }, "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==" }, "escape-html": { "version": "1.0.3", @@ -17505,23 +17507,23 @@ } }, "express": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.20.0.tgz", - "integrity": "sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", "merge-descriptors": "1.0.3", @@ -17530,11 +17532,11 @@ "parseurl": "~1.3.3", "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.19.0", - "serve-static": "1.16.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -17652,12 +17654,12 @@ } }, "finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "requires": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -17673,6 +17675,11 @@ "ms": "2.0.0" } }, + "encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -20971,9 +20978,9 @@ } }, "node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==" }, "normalize-path": { "version": "3.0.0", @@ -21242,9 +21249,9 @@ } }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "picomatch": { "version": "2.3.1", @@ -21671,11 +21678,11 @@ "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" }, "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "requires": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" } }, "queue-microtask": { @@ -22862,50 +22869,20 @@ } }, "serve-static": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.0.tgz", - "integrity": "sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "requires": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - } - } - }, - "send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "requires": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - } + "encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==" } } }, @@ -23761,12 +23738,12 @@ "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==" }, "update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" } }, "uri-js": { From d6349891dee5df63d288fa8bca5b7a46d8e88ee3 Mon Sep 17 00:00:00 2001 From: Florian Verdonck Date: Thu, 5 Dec 2024 11:07:39 +0100 Subject: [PATCH 051/124] Add examples of bsc flags I use (#949) * Add examples of bsc flags I use * Elaborate on open flag --------- Co-authored-by: Florian Verdonck --- pages/docs/manual/latest/build-configuration.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/docs/manual/latest/build-configuration.mdx b/pages/docs/manual/latest/build-configuration.mdx index 99543ffc0..3c548a36a 100644 --- a/pages/docs/manual/latest/build-configuration.mdx +++ b/pages/docs/manual/latest/build-configuration.mdx @@ -192,6 +192,8 @@ The warning numbers are shown in the build output when they're triggered. See [W Extra flags to pass to the compiler. For advanced usages. +- `-open ABC` opens the module `ABC` for each file in the project. `ABC` can either be a dependency, namespaced project or local module of the current project. + ## gentypeconfig To enable genType, set `"gentypeconfig"` at top level in the project's `rescript.json`. From 2c2f158ba48061aa607f3cd642d4952c4bb191e4 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Fri, 27 Dec 2024 20:54:12 +0100 Subject: [PATCH 052/124] V12 docs (#952) * V12 docs * New data/api * Remove accidentally committed draft page * Update manual page links to versioned ones * Redirects for latest->v11, next->v12 * Fix href tests * Use version instead of 'latest' everywhere * Add WIP banner to V12 manual * Use short version number label as before * Unify version select labels between docs and playground --- .env | 2 + data/api/{latest => v11.0.0}/belt.json | 0 data/api/{latest => v11.0.0}/core.json | 0 data/api/{latest => v11.0.0}/dom.json | 0 data/api/{latest => v11.0.0}/js.json | 0 data/api/{latest => v11.0.0}/toc_tree.json | 0 data/api/v12.0.0/belt.json | 9318 ++++++++++ data/api/v12.0.0/core.json | 9950 ++++++++++ data/api/v12.0.0/dom.json | 1990 ++ data/api/v12.0.0/js.json | 14987 ++++++++++++++++ data/api/v12.0.0/toc_tree.json | 1 + data/sidebar_gentype_latest.json | 10 - ..._latest.json => sidebar_manual_v1100.json} | 0 data/sidebar_manual_v1200.json | 77 + next.config.mjs | 17 +- package-lock.json | 20 + package.json | 1 + pages/docs/manual/{latest => v11.0.0}/api.mdx | 0 .../{latest => v11.0.0}/api/[...slug].js | 6 +- .../{latest => v11.0.0}/array-and-list.mdx | 2 +- .../{latest => v11.0.0}/async-await.mdx | 2 +- .../manual/{latest => v11.0.0}/attribute.mdx | 2 +- .../bind-to-global-js-values.mdx | 2 +- .../bind-to-js-function.mdx | 2 +- .../{latest => v11.0.0}/bind-to-js-object.mdx | 2 +- .../browser-support-polyfills.mdx | 2 +- .../build-configuration-schema.mdx | 2 +- .../build-configuration.mdx | 2 +- .../build-external-stdlib.mdx | 2 +- .../{latest => v11.0.0}/build-overview.mdx | 2 +- .../{latest => v11.0.0}/build-performance.mdx | 8 +- .../build-pinned-dependencies.mdx | 23 +- .../{latest => v11.0.0}/control-flow.mdx | 2 +- .../converting-from-js.mdx | 2 +- .../{latest => v11.0.0}/editor-plugins.mdx | 2 +- .../embed-raw-javascript.mdx | 2 +- .../equality-comparison.mdx | 2 +- .../manual/{latest => v11.0.0}/exception.mdx | 2 +- .../extensible-variant.mdx | 2 +- .../manual/{latest => v11.0.0}/external.mdx | 2 +- pages/docs/manual/{latest => v11.0.0}/faq.mdx | 11 +- .../manual/{latest => v11.0.0}/function.mdx | 2 +- .../generate-converters-accessors.mdx | 2 +- .../{latest => v11.0.0}/import-export.mdx | 2 +- .../import-from-export-to-js.mdx | 2 +- .../inlining-constants.mdx | 2 +- .../{latest => v11.0.0}/installation.mdx | 4 +- .../interop-cheatsheet.mdx | 2 +- .../interop-with-js-build-systems.mdx | 2 +- .../{latest => v11.0.0}/introduction.mdx | 2 +- .../docs/manual/{latest => v11.0.0}/json.mdx | 2 +- pages/docs/manual/{latest => v11.0.0}/jsx.mdx | 2 +- .../{latest => v11.0.0}/lazy-values.mdx | 2 +- .../{latest => v11.0.0}/let-binding.mdx | 2 +- .../manual/{latest => v11.0.0}/libraries.mdx | 2 +- .../{latest => v11.0.0}/migrate-to-v11.mdx | 2 +- .../{latest => v11.0.0}/module-functions.mdx | 2 +- .../manual/{latest => v11.0.0}/module.mdx | 2 +- .../manual/{latest => v11.0.0}/mutation.mdx | 2 +- .../{latest => v11.0.0}/newcomer-examples.mdx | 2 +- .../null-undefined-option.mdx | 2 +- .../manual/{latest => v11.0.0}/object.mdx | 2 +- .../manual/{latest => v11.0.0}/overview.mdx | 132 +- .../pattern-matching-destructuring.mdx | 2 +- .../docs/manual/{latest => v11.0.0}/pipe.mdx | 2 +- .../polymorphic-variant.mdx | 2 +- .../{latest => v11.0.0}/primitive-types.mdx | 2 +- .../{latest => v11.0.0}/project-structure.mdx | 2 +- .../manual/{latest => v11.0.0}/promise.mdx | 2 +- .../manual/{latest => v11.0.0}/record.mdx | 2 +- .../{latest => v11.0.0}/reserved-keywords.mdx | 46 +- .../scoped-polymorphic-types.mdx | 2 +- .../{latest => v11.0.0}/shared-data-types.mdx | 4 +- .../{latest => v11.0.0}/tagged-templates.mdx | 2 +- pages/docs/manual/{latest => v11.0.0}/try.mdx | 2 +- .../docs/manual/{latest => v11.0.0}/tuple.mdx | 2 +- .../docs/manual/{latest => v11.0.0}/type.mdx | 2 +- .../typescript-integration.mdx | 2 +- .../use-illegal-identifier-names.mdx | 2 +- .../manual/{latest => v11.0.0}/variant.mdx | 2 +- .../{latest => v11.0.0}/warning-numbers.mdx | 2 +- pages/docs/manual/v12.0.0/api.mdx | 18 + pages/docs/manual/v12.0.0/api/[...slug].js | 18 + pages/docs/manual/v12.0.0/array-and-list.mdx | 219 + pages/docs/manual/v12.0.0/async-await.mdx | 326 + pages/docs/manual/v12.0.0/attribute.mdx | 90 + .../v12.0.0/bind-to-global-js-values.mdx | 145 + .../manual/v12.0.0/bind-to-js-function.mdx | 490 + .../docs/manual/v12.0.0/bind-to-js-object.mdx | 197 + .../v12.0.0/browser-support-polyfills.mdx | 18 + .../v12.0.0/build-configuration-schema.mdx | 23 + .../manual/v12.0.0/build-configuration.mdx | 245 + .../manual/v12.0.0/build-external-stdlib.mdx | 59 + pages/docs/manual/v12.0.0/build-overview.mdx | 83 + .../docs/manual/v12.0.0/build-performance.mdx | 89 + .../v12.0.0/build-pinned-dependencies.mdx | 105 + pages/docs/manual/v12.0.0/control-flow.mdx | 211 + .../manual/v12.0.0/converting-from-js.mdx | 303 + pages/docs/manual/v12.0.0/editor-plugins.mdx | 19 + .../manual/v12.0.0/embed-raw-javascript.mdx | 110 + .../manual/v12.0.0/equality-comparison.mdx | 125 + pages/docs/manual/v12.0.0/exception.mdx | 498 + .../manual/v12.0.0/extensible-variant.mdx | 75 + pages/docs/manual/v12.0.0/external.mdx | 91 + pages/docs/manual/v12.0.0/faq.mdx | 63 + pages/docs/manual/v12.0.0/function.mdx | 620 + .../v12.0.0/generate-converters-accessors.mdx | 114 + pages/docs/manual/v12.0.0/import-export.mdx | 38 + .../v12.0.0/import-from-export-to-js.mdx | 244 + .../manual/v12.0.0/inlining-constants.mdx | 78 + pages/docs/manual/v12.0.0/installation.mdx | 153 + .../manual/v12.0.0/interop-cheatsheet.mdx | 274 + .../v12.0.0/interop-with-js-build-systems.mdx | 57 + pages/docs/manual/v12.0.0/introduction.mdx | 80 + pages/docs/manual/v12.0.0/json.mdx | 82 + pages/docs/manual/v12.0.0/jsx.mdx | 383 + pages/docs/manual/v12.0.0/lazy-values.mdx | 126 + pages/docs/manual/v12.0.0/let-binding.mdx | 185 + pages/docs/manual/v12.0.0/libraries.mdx | 27 + pages/docs/manual/v12.0.0/migrate-to-v11.mdx | 131 + pages/docs/manual/v12.0.0/module.mdx | 569 + pages/docs/manual/v12.0.0/mutation.mdx | 75 + .../docs/manual/v12.0.0/newcomer-examples.mdx | 134 + .../manual/v12.0.0/null-undefined-option.mdx | 203 + pages/docs/manual/v12.0.0/object.mdx | 195 + pages/docs/manual/v12.0.0/overview.mdx | 255 + .../pattern-matching-destructuring.mdx | 864 + pages/docs/manual/v12.0.0/pipe.mdx | 244 + .../polymorphic-variant.mdx} | 41 +- pages/docs/manual/v12.0.0/primitive-types.mdx | 272 + .../docs/manual/v12.0.0/project-structure.mdx | 57 + pages/docs/manual/v12.0.0/promise.mdx | 182 + pages/docs/manual/v12.0.0/record.mdx | 557 + .../docs/manual/v12.0.0/reserved-keywords.mdx | 80 + .../v12.0.0/scoped-polymorphic-types.mdx | 100 + .../docs/manual/v12.0.0/shared-data-types.mdx | 46 + .../docs/manual/v12.0.0/tagged-templates.mdx | 124 + pages/docs/manual/v12.0.0/try.mdx | 9 + pages/docs/manual/v12.0.0/tuple.mdx | 104 + pages/docs/manual/v12.0.0/type.mdx | 278 + .../manual/v12.0.0/typescript-integration.mdx | 283 + .../v12.0.0/use-illegal-identifier-names.mdx | 51 + pages/docs/manual/v12.0.0/variant.mdx | 798 + pages/docs/manual/v12.0.0/warning-numbers.mdx | 15 + pages/docs/{latest.js => v11.0.0.js} | 0 pages/docs/v12.0.0.js | 3 + public/_redirects | 3 + scripts/extract-indices.mjs | 5 +- scripts/extract-tocs.mjs | 124 +- scripts/test-hrefs.mjs | 32 +- src/ApiDocs.res | 20 +- src/DocsOverview.res | 23 +- src/Playground.res | 29 +- src/common/App.res | 34 +- src/common/CompilerManagerHook.res | 72 - src/common/CompilerManagerHook.resi | 16 - src/common/Constants.res | 30 +- src/common/Semver.res | 75 + src/common/Semver.resi | 18 + src/common/Url.res | 13 +- src/common/Url.resi | 3 + src/components/Navigation.res | 32 +- src/components/Search.res | 5 +- src/components/VersionSelect.res | 23 +- src/components/VersionSelect.resi | 6 + src/layouts/ApiLayout.res | 4 +- src/layouts/ApiOverviewLayout.res | 27 +- src/layouts/ApiOverviewLayout.resi | 6 +- src/layouts/BeltDocsLayout10_0_0.res | 6 +- src/layouts/BeltDocsLayout8_0_0.res | 6 +- src/layouts/BeltDocsLayout9_0_0.res | 6 +- src/layouts/DocsLayout.res | 8 +- src/layouts/DocsLayout.resi | 1 + src/layouts/DomDocsLayout10_0_0.res | 6 +- src/layouts/DomDocsLayout8_0_0.res | 6 +- src/layouts/DomDocsLayout9_0_0.res | 6 +- src/layouts/JsDocsLayout10_0_0.res | 6 +- src/layouts/JsDocsLayout8_0_0.res | 6 +- src/layouts/JsDocsLayout9_0_0.res | 6 +- src/layouts/ManualDocsLayout.res | 107 +- src/layouts/ReactDocsLayout.res | 63 +- src/layouts/ReasonCompilerDocsLayout.res | 38 +- 182 files changed, 48645 insertions(+), 694 deletions(-) create mode 100644 .env rename data/api/{latest => v11.0.0}/belt.json (100%) rename data/api/{latest => v11.0.0}/core.json (100%) rename data/api/{latest => v11.0.0}/dom.json (100%) rename data/api/{latest => v11.0.0}/js.json (100%) rename data/api/{latest => v11.0.0}/toc_tree.json (100%) create mode 100644 data/api/v12.0.0/belt.json create mode 100644 data/api/v12.0.0/core.json create mode 100644 data/api/v12.0.0/dom.json create mode 100644 data/api/v12.0.0/js.json create mode 100644 data/api/v12.0.0/toc_tree.json delete mode 100644 data/sidebar_gentype_latest.json rename data/{sidebar_manual_latest.json => sidebar_manual_v1100.json} (100%) create mode 100644 data/sidebar_manual_v1200.json rename pages/docs/manual/{latest => v11.0.0}/api.mdx (100%) rename pages/docs/manual/{latest => v11.0.0}/api/[...slug].js (64%) rename pages/docs/manual/{latest => v11.0.0}/array-and-list.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/async-await.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/attribute.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/bind-to-global-js-values.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/bind-to-js-function.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/bind-to-js-object.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/browser-support-polyfills.mdx (90%) rename pages/docs/manual/{latest => v11.0.0}/build-configuration-schema.mdx (88%) rename pages/docs/manual/{latest => v11.0.0}/build-configuration.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/build-external-stdlib.mdx (97%) rename pages/docs/manual/{latest => v11.0.0}/build-overview.mdx (97%) rename pages/docs/manual/{latest => v11.0.0}/build-performance.mdx (97%) rename pages/docs/manual/{latest => v11.0.0}/build-pinned-dependencies.mdx (91%) rename pages/docs/manual/{latest => v11.0.0}/control-flow.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/converting-from-js.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/editor-plugins.mdx (92%) rename pages/docs/manual/{latest => v11.0.0}/embed-raw-javascript.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/equality-comparison.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/exception.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/extensible-variant.mdx (97%) rename pages/docs/manual/{latest => v11.0.0}/external.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/faq.mdx (93%) rename pages/docs/manual/{latest => v11.0.0}/function.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/generate-converters-accessors.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/import-export.mdx (96%) rename pages/docs/manual/{latest => v11.0.0}/import-from-export-to-js.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/inlining-constants.mdx (97%) rename pages/docs/manual/{latest => v11.0.0}/installation.mdx (97%) rename pages/docs/manual/{latest => v11.0.0}/interop-cheatsheet.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/interop-with-js-build-systems.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/introduction.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/json.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/jsx.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/lazy-values.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/let-binding.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/libraries.mdx (97%) rename pages/docs/manual/{latest => v11.0.0}/migrate-to-v11.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/module-functions.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/module.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/mutation.mdx (97%) rename pages/docs/manual/{latest => v11.0.0}/newcomer-examples.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/null-undefined-option.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/object.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/overview.mdx (52%) rename pages/docs/manual/{latest => v11.0.0}/pattern-matching-destructuring.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/pipe.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/polymorphic-variant.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/primitive-types.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/project-structure.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/promise.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/record.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/reserved-keywords.mdx (75%) rename pages/docs/manual/{latest => v11.0.0}/scoped-polymorphic-types.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/shared-data-types.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/tagged-templates.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/try.mdx (89%) rename pages/docs/manual/{latest => v11.0.0}/tuple.mdx (98%) rename pages/docs/manual/{latest => v11.0.0}/type.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/typescript-integration.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/use-illegal-identifier-names.mdx (94%) rename pages/docs/manual/{latest => v11.0.0}/variant.mdx (99%) rename pages/docs/manual/{latest => v11.0.0}/warning-numbers.mdx (90%) create mode 100644 pages/docs/manual/v12.0.0/api.mdx create mode 100644 pages/docs/manual/v12.0.0/api/[...slug].js create mode 100644 pages/docs/manual/v12.0.0/array-and-list.mdx create mode 100644 pages/docs/manual/v12.0.0/async-await.mdx create mode 100644 pages/docs/manual/v12.0.0/attribute.mdx create mode 100644 pages/docs/manual/v12.0.0/bind-to-global-js-values.mdx create mode 100644 pages/docs/manual/v12.0.0/bind-to-js-function.mdx create mode 100644 pages/docs/manual/v12.0.0/bind-to-js-object.mdx create mode 100644 pages/docs/manual/v12.0.0/browser-support-polyfills.mdx create mode 100644 pages/docs/manual/v12.0.0/build-configuration-schema.mdx create mode 100644 pages/docs/manual/v12.0.0/build-configuration.mdx create mode 100644 pages/docs/manual/v12.0.0/build-external-stdlib.mdx create mode 100644 pages/docs/manual/v12.0.0/build-overview.mdx create mode 100644 pages/docs/manual/v12.0.0/build-performance.mdx create mode 100644 pages/docs/manual/v12.0.0/build-pinned-dependencies.mdx create mode 100644 pages/docs/manual/v12.0.0/control-flow.mdx create mode 100644 pages/docs/manual/v12.0.0/converting-from-js.mdx create mode 100644 pages/docs/manual/v12.0.0/editor-plugins.mdx create mode 100644 pages/docs/manual/v12.0.0/embed-raw-javascript.mdx create mode 100644 pages/docs/manual/v12.0.0/equality-comparison.mdx create mode 100644 pages/docs/manual/v12.0.0/exception.mdx create mode 100644 pages/docs/manual/v12.0.0/extensible-variant.mdx create mode 100644 pages/docs/manual/v12.0.0/external.mdx create mode 100644 pages/docs/manual/v12.0.0/faq.mdx create mode 100644 pages/docs/manual/v12.0.0/function.mdx create mode 100644 pages/docs/manual/v12.0.0/generate-converters-accessors.mdx create mode 100644 pages/docs/manual/v12.0.0/import-export.mdx create mode 100644 pages/docs/manual/v12.0.0/import-from-export-to-js.mdx create mode 100644 pages/docs/manual/v12.0.0/inlining-constants.mdx create mode 100644 pages/docs/manual/v12.0.0/installation.mdx create mode 100644 pages/docs/manual/v12.0.0/interop-cheatsheet.mdx create mode 100644 pages/docs/manual/v12.0.0/interop-with-js-build-systems.mdx create mode 100644 pages/docs/manual/v12.0.0/introduction.mdx create mode 100644 pages/docs/manual/v12.0.0/json.mdx create mode 100644 pages/docs/manual/v12.0.0/jsx.mdx create mode 100644 pages/docs/manual/v12.0.0/lazy-values.mdx create mode 100644 pages/docs/manual/v12.0.0/let-binding.mdx create mode 100644 pages/docs/manual/v12.0.0/libraries.mdx create mode 100644 pages/docs/manual/v12.0.0/migrate-to-v11.mdx create mode 100644 pages/docs/manual/v12.0.0/module.mdx create mode 100644 pages/docs/manual/v12.0.0/mutation.mdx create mode 100644 pages/docs/manual/v12.0.0/newcomer-examples.mdx create mode 100644 pages/docs/manual/v12.0.0/null-undefined-option.mdx create mode 100644 pages/docs/manual/v12.0.0/object.mdx create mode 100644 pages/docs/manual/v12.0.0/overview.mdx create mode 100644 pages/docs/manual/v12.0.0/pattern-matching-destructuring.mdx create mode 100644 pages/docs/manual/v12.0.0/pipe.mdx rename pages/docs/manual/{v10.0.0/covariance-and-contravariance.mdx => v12.0.0/polymorphic-variant.mdx} (93%) create mode 100644 pages/docs/manual/v12.0.0/primitive-types.mdx create mode 100644 pages/docs/manual/v12.0.0/project-structure.mdx create mode 100644 pages/docs/manual/v12.0.0/promise.mdx create mode 100644 pages/docs/manual/v12.0.0/record.mdx create mode 100644 pages/docs/manual/v12.0.0/reserved-keywords.mdx create mode 100644 pages/docs/manual/v12.0.0/scoped-polymorphic-types.mdx create mode 100644 pages/docs/manual/v12.0.0/shared-data-types.mdx create mode 100644 pages/docs/manual/v12.0.0/tagged-templates.mdx create mode 100644 pages/docs/manual/v12.0.0/try.mdx create mode 100644 pages/docs/manual/v12.0.0/tuple.mdx create mode 100644 pages/docs/manual/v12.0.0/type.mdx create mode 100644 pages/docs/manual/v12.0.0/typescript-integration.mdx create mode 100644 pages/docs/manual/v12.0.0/use-illegal-identifier-names.mdx create mode 100644 pages/docs/manual/v12.0.0/variant.mdx create mode 100644 pages/docs/manual/v12.0.0/warning-numbers.mdx rename pages/docs/{latest.js => v11.0.0.js} (100%) create mode 100644 pages/docs/v12.0.0.js create mode 100644 src/common/Semver.res create mode 100644 src/common/Semver.resi diff --git a/.env b/.env new file mode 100644 index 000000000..431fdc073 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +VERSION_LATEST="v11.0.0" +VERSION_NEXT="v12.0.0" \ No newline at end of file diff --git a/data/api/latest/belt.json b/data/api/v11.0.0/belt.json similarity index 100% rename from data/api/latest/belt.json rename to data/api/v11.0.0/belt.json diff --git a/data/api/latest/core.json b/data/api/v11.0.0/core.json similarity index 100% rename from data/api/latest/core.json rename to data/api/v11.0.0/core.json diff --git a/data/api/latest/dom.json b/data/api/v11.0.0/dom.json similarity index 100% rename from data/api/latest/dom.json rename to data/api/v11.0.0/dom.json diff --git a/data/api/latest/js.json b/data/api/v11.0.0/js.json similarity index 100% rename from data/api/latest/js.json rename to data/api/v11.0.0/js.json diff --git a/data/api/latest/toc_tree.json b/data/api/v11.0.0/toc_tree.json similarity index 100% rename from data/api/latest/toc_tree.json rename to data/api/v11.0.0/toc_tree.json diff --git a/data/api/v12.0.0/belt.json b/data/api/v12.0.0/belt.json new file mode 100644 index 000000000..86bc0c43e --- /dev/null +++ b/data/api/v12.0.0/belt.json @@ -0,0 +1,9318 @@ +{ + "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## Examples\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{\n \"bsc-flags\": [\"-open Belt\"]\n}\n```\n\ninto your `bsconfig.json`.\n\n**Note**: this is the **only** `open` we encourage.\n\nExample usage:\n\n## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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 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, add the binding `k,v`, otherwise,\nupdate the old value with the new `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 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, add the binding `k,v`, otherwise,\nupdate the old value with the new `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 than the generic type", + "This module is [`Belt.HashSet`]() specialized with key type to be a primitive type.\n\nIt is more efficient in general, the API is the same with [`Belt.HashSet`]() except its key type is fixed,\nand identity is not needed(using the built-in one)\n\n**See** [`Belt.HashSet`]()" + ], + "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 than the generic type", + "This module is [`Belt.HashSet`]() specialized with key type to be a primitive type.\n\nIt is more efficient in general, the API is the same with [`Belt.HashSet`]() except its key type is fixed,\nand identity is not needed(using the built-in one)\n\n**See** [`Belt.HashSet`]()" + ], + "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)`. First compare by size, if size is the same, compare by key,\nvalue 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`. `f` receives the key as\nfirst argument, and the associated value as second argument. The application \norder 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)...)`, where `k1 ... kN` are\nthe keys of all bindings in `m` (in increasing order), and `d1 ... dN` are the\nassociated 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 satisfy the predicate `p`.\nThe 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 satisfy the predicate `p`.\nThe 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 `m` for chaining. If `x` was\nalready bound 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 associated value `a`\nof all bindings of `m` has been replaced by the result of the application of `f`\nto `a`. The bindings are passed to `f` in increasing order with respect to the\nordering 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)`. First compare by size, if size is the same, compare by key,\nvalue 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`. `f` receives the key as\nfirst argument, and the associated value as second argument. The application \norder 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)...)`, where `k1 ... kN` are\nthe keys of all bindings in `m` (in increasing order), and `d1 ... dN` are the\nassociated 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 satisfy the predicate `p`.\nThe 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 satisfy the predicate `p`.\nThe 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 `m` for chaining. If `x` was\nalready bound 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 associated value `a`\nof all bindings of `m` has been replaced by the result of the application of `f`\nto `a`. The bindings are passed to `f` in increasing order with respect to the\nordering 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 than the generic type", + "This module is [`Belt.MutableSet`]() specialized with key type to be a primitive type.\n\nIt is more efficient in general, the API is the same with [`Belt.MutableSet`]() except its key type is fixed,\nand identity is not needed(using the built-in one)\n\n**See** [`Belt.MutableSet`]()" + ], + "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 satisfy the predicate `p`.\nOrder 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 the set satisfies the predicate\n`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` that satisfy\npredicate `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 `s1` is\nthe set of all the elements of `s` that satisfy the predicate `p`, and `s2` is\nthe set of all the elements of `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 than the generic type", + "This module is [`Belt.MutableSet`]() specialized with key type to be a primitive type.\n\nIt is more efficient in general, the API is the same with [`Belt.MutableSet`]() except its key type is fixed,\nand identity is not needed(using the built-in one)\n\n**See** [`Belt.MutableSet`]()" + ], + "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 satisfy the predicate `p`.\nOrder 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 the set satisfies the predicate\n`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` that satisfy\npredicate `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 `s1` is\nthe set of all the elements of `s` that satisfy the predicate `p`, and `s2` is\nthe set of all the elements of `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": [ + "This module separates identity from data, it is a bit more verbose but\nslightly more efficient due to the fact that there is no need to pack\nidentity and data back after each operation.\n\n**_Advanced usage only_**" + ], + "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: (\n t<'k, 'v, 'id>,\n t<'k, 'v, 'id>,\n ~kcmp: cmp<'k, 'id>,\n ~vcmp: ('v, 'v) => int,\n) => int" + }, + { + "id": "Belt.Map.Dict.cmp", + "kind": "value", + "name": "cmp", + "docstrings": [], + "signature": "let cmp: (\n t<'k, 'v, 'id>,\n t<'k, 'v, 'id>,\n ~kcmp: cmp<'k, 'id>,\n ~vcmp: ('v, 'v) => int,\n) => int" + }, + { + "id": "Belt.Map.Dict.eqU", + "kind": "value", + "name": "eqU", + "docstrings": [], + "signature": "let eqU: (\n t<'k, 'a, 'id>,\n t<'k, 'a, 'id>,\n ~kcmp: cmp<'k, 'id>,\n ~veq: ('a, 'a) => bool,\n) => 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,\ncontain equal keys and associate them with equal data. `cmp` is the\nequality predicate used to compare the data associated with the keys." + ], + "signature": "let eq: (\n t<'k, 'a, 'id>,\n t<'k, 'a, 'id>,\n ~kcmp: cmp<'k, 'id>,\n ~veq: ('a, 'a) => bool,\n) => 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\nmatch predicate `p`.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Map.Dict.fromArray([(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"3\")], ~cmp=IntCmp.cmp)\n\nBelt.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\nkey as first argument, and the associated value as second argument. The\nbindings are passed to `f` in increasing order with respect to the ordering\nover 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 ... kN` \nare the keys of all bindings in `m` (in increasing order), and `d1 ... dN` \nare 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\npredicate `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\nfor `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: (\n t<'a, 'b, 'id>,\n array<'a>,\n ~cmp: cmp<'a, 'id>,\n) => 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\nbinding of `x` to `y`. If `x` was already bound in `m`, its previous\nbinding disappears." + ], + "signature": "let set: (\n t<'a, 'b, 'id>,\n 'a,\n 'b,\n ~cmp: cmp<'a, 'id>,\n) => 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: (\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.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`\nand of `m2`. The presence of each such binding, and the corresponding\nvalue, 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: (\n t<'a, 'b, 'id>,\n array<('a, 'b)>,\n ~cmp: cmp<'a, 'id>,\n) => 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\npredicate `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: (\n t<'k, 'a, 'id>,\n ('k, 'a) => bool,\n) => (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\nall the bindings of `s` that satisfy the predicate `p`, and `m2` is the map\nwith all the bindings of `s` that do not satisfy `p`." + ], + "signature": "let partition: (\n t<'k, 'a, 'id>,\n ('k, 'a) => bool,\n) => (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\nall the bindings of `m` whose key is strictly less than `x`; `r` is the map\nwith all the bindings of `m` whose key is strictly greater than `x`; `data`\nis `None` if `m` contains no binding for `x`, or `Some(v)` if `m` binds `v`\nto `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\nvalue `a` of all bindings of `m` has been replaced by the result of the\napplication of `f` to `a`. The bindings are passed to `f` in increasing\norder 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\nequal, that is, contain equal keys and associate them with\nequal 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\nto match predicate `p`.\n\n```rescript\nlet s0 = fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2,\"(3, \"\"))])\nfindFirstBy(s0, (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\nas second argument. The bindings are passed to `f` in increasing\norder 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)...)`,\nwhere `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 satisfy the predicate `p`.\nOrder 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 satisfy the predicate\n`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\nin `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: (\n t<'v>,\n t<'v2>,\n (key, option<'v>, option<'v2>) => option<'c>,\n) => 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`\nand of `m2`. The presence of each such binding, and the corresponding\nvalue, is determined with the function `f`." + ], + "signature": "let merge: (\n t<'v>,\n t<'v2>,\n (key, option<'v>, option<'v2>) => option<'c>,\n) => 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` that satisfy predicate\n`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 `m1` contains all the\nbindings of `s` that satisfy the predicate `p`, and `m2` is the map with all the\nbindings of `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 `l` is the map with all the\nbindings of `m` whose key is strictly less than `x`; `r` is the map with all the\nbindings of `m` whose key is strictly greater than `x`; `data` is `None` if `m`\ncontains no binding for `x`, 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 associated value `a`\nof all bindings of `m` has been replaced by the result of the application of `f`\nto `a`. The bindings are passed to `f` in increasing order with respect to the\nordering 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": [ + "## Examples\n\n```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\nequal, that is, contain equal keys and associate them with\nequal 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\nto match predicate `p`.\n\n```rescript\nlet s0 = fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2,\"(3, \"\"))])\nfindFirstBy(s0, (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\nas second argument. The bindings are passed to `f` in increasing\norder 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)...)`,\nwhere `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 satisfy the predicate `p`.\nOrder 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 satisfy the predicate\n`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\nin `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: (\n t<'v>,\n t<'v2>,\n (key, option<'v>, option<'v2>) => option<'c>,\n) => 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`\nand of `m2`. The presence of each such binding, and the corresponding\nvalue, is determined with the function `f`." + ], + "signature": "let merge: (\n t<'v>,\n t<'v2>,\n (key, option<'v>, option<'v2>) => option<'c>,\n) => 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` that satisfy predicate\n`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 `m1` contains all the\nbindings of `s` that satisfy the predicate `p`, and `m2` is the map with all the\nbindings of `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 `l` is the map with all the\nbindings of `m` whose key is strictly less than `x`; `r` is the map with all the\nbindings of `m` whose key is strictly greater than `x`; `data` is `None` if `m`\ncontains no binding for `x`, 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 associated value `a`\nof all bindings of `m` has been replaced by the result of the application of `f`\nto `a`. The bindings are passed to `f` in increasing order with respect to the\nordering 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\nmore efficient due to the fact that there is no need to pack identity and data back\nafter each operation", + "This module separates identity from data. It is a bit more verbose but slightly\nmore efficient due to the fact that there is no need to pack identity and data\nback 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": [ + "## Examples\n\n```rescript\nlet 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([1, 3, 2, 4], ~cmp=IntCmp.cmp)\n\ns0->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\nis 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet empty = Belt.Set.Dict.fromArray([], ~cmp=IntCmp.cmp)\nlet notEmpty = Belt.Set.Dict.fromArray([1], ~cmp=IntCmp.cmp)\n\nBelt.Set.Dict.isEmpty(empty) /* true */\nBelt.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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet set = Belt.Set.Dict.fromArray([1, 4, 2, 5], ~cmp=IntCmp.cmp)\n\nset->Belt.Set.Dict.has(3, ~cmp=IntCmp.cmp) /* false */\nset->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.empty\nlet s1 = s0->Belt.Set.Dict.add(1, ~cmp=IntCmp.cmp)\nlet s2 = s1->Belt.Set.Dict.add(2, ~cmp=IntCmp.cmp)\nlet s3 = s2->Belt.Set.Dict.add(2, ~cmp=IntCmp.cmp)\ns0->Belt.Set.Dict.toArray /* [] */\ns1->Belt.Set.Dict.toArray /* [1] */\ns2->Belt.Set.Dict.toArray /* [1, 2] */\ns3->Belt.Set.Dict.toArray /* [1,2 ] */\ns2 == s3 /* true */\n```" + ], + "signature": "let add: (\n t<'value, 'id>,\n 'value,\n ~cmp: cmp<'value, 'id>,\n) => 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet set = Belt.Set.Dict.empty\n\nlet newSet = set->Belt.Set.Dict.mergeMany([5, 4, 3, 2, 1], ~cmp=IntCmp.cmp)\nnewSet->Belt.Set.Dict.toArray /* [1, 2, 3, 4, 5] */\n```" + ], + "signature": "let mergeMany: (\n t<'value, 'id>,\n array<'value>,\n ~cmp: cmp<'value, 'id>,\n) => 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([2, 3, 1, 4, 5], ~cmp=IntCmp.cmp)\nlet s1 = s0->Belt.Set.Dict.remove(1, ~cmp=IntCmp.cmp)\nlet s2 = s1->Belt.Set.Dict.remove(3, ~cmp=IntCmp.cmp)\nlet s3 = s2->Belt.Set.Dict.remove(3, ~cmp=IntCmp.cmp)\n\ns1->Belt.Set.Dict.toArray /* [2,3,4,5] */\ns2->Belt.Set.Dict.toArray /* [2,4,5] */\ns2 == s3 /* true */\n```" + ], + "signature": "let remove: (\n t<'value, 'id>,\n 'value,\n ~cmp: cmp<'value, 'id>,\n) => 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet set = Belt.Set.Dict.fromArray([1, 2, 3, 4], ~cmp=IntCmp.cmp)\n\nlet newSet = set->Belt.Set.Dict.removeMany([5, 4, 3, 2, 1], ~cmp=IntCmp.cmp)\nnewSet->Belt.Set.Dict.toArray /* [] */\n```" + ], + "signature": "let removeMany: (\n t<'value, 'id>,\n array<'value>,\n ~cmp: cmp<'value, 'id>,\n) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.union", + "kind": "value", + "name": "union", + "docstrings": [ + "Returns union of two sets.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\nlet s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\nlet union = Belt.Set.Dict.union(s0, s1, ~cmp=IntCmp.cmp)\nunion->Belt.Set.Dict.toArray /* [1,2,3,4,5,6] */\n```" + ], + "signature": "let union: (\n t<'value, 'id>,\n t<'value, 'id>,\n ~cmp: cmp<'value, 'id>,\n) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [ + "Returns intersection of two sets.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\nlet s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\nlet intersect = Belt.Set.Dict.intersect(s0, s1, ~cmp=IntCmp.cmp)\nintersect->Belt.Set.Dict.toArray /* [2,3,5] */\n```" + ], + "signature": "let intersect: (\n t<'value, 'id>,\n t<'value, 'id>,\n ~cmp: cmp<'value, 'id>,\n) => 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\nlet s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\n\nlet diff1 = Belt.Set.Dict.diff(s0, s1, ~cmp=IntCmp.cmp)\nlet diff2 = Belt.Set.Dict.diff(s1, s0, ~cmp=IntCmp.cmp)\n\ndiff1->Belt.Set.Dict.toArray /* [6] */\ndiff2->Belt.Set.Dict.toArray /* [1,4] */\n```" + ], + "signature": "let diff: (\n t<'value, 'id>,\n t<'value, 'id>,\n ~cmp: cmp<'value, 'id>,\n) => t<'value, 'id>" + }, + { + "id": "Belt.Set.Dict.subset", + "kind": "value", + "name": "subset", + "docstrings": [ + "Checks if second set is subset of first set.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\nlet s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\nlet s2 = Belt.Set.Dict.intersect(s0, s1, ~cmp=IntCmp.cmp)\nBelt.Set.Dict.subset(s2, s0, ~cmp=IntCmp.cmp) /* true */\nBelt.Set.Dict.subset(s2, s1, ~cmp=IntCmp.cmp) /* true */\nBelt.Set.Dict.subset(s1, s0, ~cmp=IntCmp.cmp) /* false */\n```" + ], + "signature": "let subset: (\n t<'value, 'id>,\n t<'value, 'id>,\n ~cmp: cmp<'value, 'id>,\n) => 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\nof sets. It compares size first and then iterates over each element following the\norder of elements." + ], + "signature": "let cmp: (\n t<'value, 'id>,\n t<'value, 'id>,\n ~cmp: cmp<'value, 'id>,\n) => int" + }, + { + "id": "Belt.Set.Dict.eq", + "kind": "value", + "name": "eq", + "docstrings": [ + "Checks if two sets are equal.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([5, 2, 3], ~cmp=IntCmp.cmp)\nlet s1 = Belt.Set.Dict.fromArray([3, 2, 5], ~cmp=IntCmp.cmp)\n\nBelt.Set.Dict.eq(s0, s1, ~cmp=IntCmp.cmp) /* true */\n```" + ], + "signature": "let eq: (\n t<'value, 'id>,\n t<'value, 'id>,\n ~cmp: cmp<'value, 'id>,\n) => 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\nlet acc = ref(list{})\ns0->Belt.Set.Dict.forEach(x => acc := Belt.List.add(acc.contents, x))\nacc /* [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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet isEven = x => mod(x, 2) == 0\n\nlet s0 = Belt.Set.Dict.fromArray([2, 4, 6, 8], ~cmp=IntCmp.cmp)\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet isOdd = x => mod(x, 2) != 0\n\nlet s0 = Belt.Set.Dict.fromArray([1, 2, 4, 6, 8], ~cmp=IntCmp.cmp)\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet isEven = x => mod(x, 2) == 0\n\nlet s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\nlet s1 = s0->Belt.Set.Dict.keep(isEven)\n\ns1->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: (\n t<'value, 'id>,\n 'value => bool,\n) => (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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet isOdd = x => mod(x, 2) != 0\n\nlet s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\nlet (s1, s2) = s0->Belt.Set.Dict.partition(isOdd)\n\ns1->Belt.Set.Dict.toArray /* [1,3,5] */\ns2->Belt.Set.Dict.toArray /* [2,4] */\n```" + ], + "signature": "let partition: (\n t<'value, 'id>,\n 'value => bool,\n) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.Set.Dict.size", + "kind": "value", + "name": "size", + "docstrings": [ + "Returns size of the set.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4], ~cmp=IntCmp.cmp)\n\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.empty\nlet s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\ns0->Belt.Set.Dict.minimum /* None */\ns1->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.empty\nlet s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\ns0->Belt.Set.Dict.minUndefined /* undefined */\ns1->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.empty\nlet s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\ns0->Belt.Set.Dict.maximum /* None */\ns1->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.empty\nlet s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\ns0->Belt.Set.Dict.maxUndefined /* undefined */\ns1->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\nspecifiecd by this collection. Returns `None` if element does not exist.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n\ns0->Belt.Set.Dict.get(3, ~cmp=IntCmp.cmp) /* Some(3) */\ns0->Belt.Set.Dict.get(20, ~cmp=IntCmp.cmp) /* None */\n```" + ], + "signature": "let get: (\n t<'value, 'id>,\n 'value,\n ~cmp: cmp<'value, 'id>,\n) => 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: (\n t<'value, 'id>,\n 'value,\n ~cmp: cmp<'value, 'id>,\n) => 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n\nlet ((smaller, larger), present) = s0->Belt.Set.Dict.split(3, ~cmp=IntCmp.cmp)\n\npresent /* true */\nsmaller->Belt.Set.Dict.toArray /* [1,2] */\nlarger->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 than the generic type,\nits compare behavior is fixed using the built-in comparison", + "This module is [`Belt.Set`]() specialized with value type to be a primitive type.\n It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,\n and identity is not needed(using the built-in one)\n\n **See** [`Belt.Set`]()" + ], + "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 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 for doing sets\nof 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 equal, that is, contain\nequal 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`. 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 satisfy the predicate `p`. Order\nunspecified." + ], + "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 the set satisfies the predicate\n`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` 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 `s1` is the set of\nall the elements of `s` that satisfy the predicate `p`, and `s2` is the set of\nall the elements of `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 `l` is the set of\nelements of `s` that are strictly less than `x`;`r` is the set of elements of\n`s` that are strictly greater than `x`; `present` is `false` if `s` contains no\nelement equal to `x`, 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 than the generic type, its\ncompare behavior is fixed using the built-in comparison", + "This module is [`Belt.Set`]() specialized with value type to be a primitive type.\n It is more efficient in general, the API is the same with [`Belt_Set`]() except its value type is fixed,\n and identity is not needed(using the built-in one)\n\n **See** [`Belt.Set`]()" + ], + "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 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 for doing sets\nof 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 equal, that is, contain\nequal 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`. 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 satisfy the predicate `p`. Order\nunspecified." + ], + "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 the set satisfies the predicate\n`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` 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 `s1` is the set of\nall the elements of `s` that satisfy the predicate `p`, and `s2` is the set of\nall the elements of `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 `l` is the set of\nelements of `s` that are strictly less than `x`;`r` is the set of elements of\n`s` that are strictly greater than `x`; `present` is `false` if `s` contains no\nelement equal to `x`, 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 than the generic type", + "This is a specialized module for [`Belt_SortArray`](), the docs in that module also\napplies here, except the comparator is fixed and inlined" + ], + "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,\nthe negative number returned is the bitwise complement of the index of the first element\nthat is larger than value.\n\nIf value is not found and value is greater than all elements in array,\nthe negative number returned is the bitwise complement of\n(the index of the last element plus 1)\n\nfor example, if `key` is smaller than all elements return `-1` since `lnot (-1) = 0`\nif `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)` assume\n`src` and `src2` is strictly sorted. for equivalent elements, it is picked from\n`src` also assume that `dst` is large enough to store all elements" + ], + "signature": "let union: (\n array,\n int,\n int,\n array,\n int,\n int,\n array,\n int,\n) => int" + }, + { + "id": "Belt.SortArray.String.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [], + "signature": "let intersect: (\n array,\n int,\n int,\n array,\n int,\n int,\n array,\n int,\n) => int" + }, + { + "id": "Belt.SortArray.String.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (\n array,\n int,\n int,\n array,\n int,\n int,\n array,\n int,\n) => int" + } + ] + }, + "belt/sortarray/int": { + "id": "Belt.SortArray.Int", + "name": "Int", + "docstrings": [ + "Specalized when key type is `int`, more efficient than the generic type", + "This is a specialized module for [`Belt_SortArray`](), the docs in that module also\napplies here, except the comparator is fixed and inlined" + ], + "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,\nthe negative number returned is the bitwise complement of the index of the first element\nthat is larger than value.\n\nIf value is not found and value is greater than all elements in array,\nthe negative number returned is the bitwise complement of\n(the index of the last element plus 1)\n\nfor example, if `key` is smaller than all elements return `-1` since `lnot (-1) = 0`\nif `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)` assume\n`src` and `src2` is strictly sorted. for equivalent elements, it is picked from\n`src` also assume that `dst` is large enough to store all elements" + ], + "signature": "let union: (\n array,\n int,\n int,\n array,\n int,\n int,\n array,\n int,\n) => int" + }, + { + "id": "Belt.SortArray.Int.intersect", + "kind": "value", + "name": "intersect", + "docstrings": [], + "signature": "let intersect: (\n array,\n int,\n int,\n array,\n int,\n int,\n array,\n int,\n) => int" + }, + { + "id": "Belt.SortArray.Int.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (\n array,\n int,\n int,\n array,\n int,\n int,\n array,\n int,\n) => 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.", + "This module includes convenience methods for handling `float` types." + ], + "items": [ + { + "id": "Belt.Float.toInt", + "kind": "value", + "name": "toInt", + "docstrings": [ + "Converts a given `float` to an `int`.\n\n## Examples\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## Examples\n\n```rescript\nJs.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## Examples\n\n```rescript\nJs.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## Examples\n\n```rescript\nJs.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.\nCan be opened in a module to avoid dot-notation (`+.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n## Examples\n\n```rescript\nopen Belt.Float\nJs.log(2.0 + 2.0 === 4.0) /* true */\n```" + ], + "signature": "let +: (float, float) => float" + }, + { + "id": "Belt.Float.-", + "kind": "value", + "name": "-", + "docstrings": [ + "Subtraction of two `float` values.\nCan be opened in a module to avoid dot-notation (`-.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n## Examples\n\n```rescript\nopen Belt.Float\nJs.log(2.0 - 1.0 === 1.0) /* true */\n```" + ], + "signature": "let -: (float, float) => float" + }, + { + "id": "Belt.Float.*", + "kind": "value", + "name": "*", + "docstrings": [ + "Multiplication of two `float` values.\nCan be opened in a module to avoid dot-notation (`*.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n## Examples\n\n```rescript\nopen Belt.Float\nJs.log(2.0 * 2.0 === 4.0) /* true */\n```" + ], + "signature": "let *: (float, float) => float" + }, + { + "id": "Belt.Float./", + "kind": "value", + "name": "/", + "docstrings": [ + "Division of two `float` values.\nCan be opened in a module to avoid dot-notation (`/.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n## Examples\n\n```rescript\nopen Belt.Float\nJs.log(4.0 / 2.0 === 2.0) /* true */\n```" + ], + "signature": "let /: (float, float) => float" + } + ] + }, + "belt/int": { + "id": "Belt.Int", + "name": "Int", + "docstrings": [ + "[`Belt.Int`]()\n\n Utilities for Int.", + "This module includes convenience methods for handling `int` types." + ], + "items": [ + { + "id": "Belt.Int.toFloat", + "kind": "value", + "name": "toFloat", + "docstrings": [ + "Converts a given `int` to a `float`.\n\n## Examples\n\n```rescript\nJs.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## Examples\n\n```rescript\nJs.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## Examples\n\n```rescript\nJs.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## Examples\n\n```rescript\nJs.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## Examples\n\n```rescript\nopen Belt.Int\nJs.log(2 + 2 === 4) /* true */\n```" + ], + "signature": "let +: (int, int) => int" + }, + { + "id": "Belt.Int.-", + "kind": "value", + "name": "-", + "docstrings": [ + "Subtraction of two `int` values. Same as the subtraction from `Pervasives`.\n\n## Examples\n\n```rescript\nopen Belt.Int\nJs.log(2 - 1 === 1) /* true */\n```" + ], + "signature": "let -: (int, int) => int" + }, + { + "id": "Belt.Int.*", + "kind": "value", + "name": "*", + "docstrings": [ + "Multiplication of two `int` values. Same as the multiplication from `Pervasives`.\n\n## Examples\n\n```rescript\nopen Belt.Int\nJs.log(2 * 2 === 4) /* true */\n```" + ], + "signature": "let *: (int, int) => int" + }, + { + "id": "Belt.Int./", + "kind": "value", + "name": "/", + "docstrings": [ + "Division of two `int` values. Same as the division from `Pervasives`.\n\n## Examples\n\n```rescript\nopen Belt.Int\nJs.log(4 / 2 === 2); /* true */\n```" + ], + "signature": "let /: (int, int) => int" + } + ] + }, + "belt/result": { + "id": "Belt.Result", + "name": "Result", + "docstrings": [ + "[`Belt.Result`]()\n\n Utilities for result data type.", + "Result types are really useful to describe the result of a certain operation\nwithout relying on exceptions or `option` types.\n\nThis module gives you useful utilities to create and combine `Result` data." + ], + "items": [ + { + "id": "Belt.Result.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a, 'b> = result<'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## Examples\n\n```rescript\nBelt.Result.getExn(Belt.Result.Ok(42)) == 42\n\nBelt.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)`,\notherwise `default`.\n\n## Examples\n\n```rescript\nlet ok = Belt.Result.Ok(42)\nBelt.Result.mapWithDefault(ok, 0, (x) => x / 2) == 21\n\nlet error = Belt.Result.Error(\"Invalid data\")\nBelt.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\nunchanged. Function `f` takes a value of the same type as `n` and returns an\nordinary value.\n\n## Examples\n\n```rescript\nlet f = (x) => sqrt(Belt.Int.toFloat(x))\n\nBelt.Result.map(Ok(64), f) == Ok(8.0)\n\nBelt.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\nunchanged. Function `f` takes a value of the same type as `n` and returns a\n`Belt.Result`.\n\n## Examples\n\n```rescript\nlet 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\nBelt.Result.flatMap(Ok(2.0), recip) == Ok(0.5)\n\nBelt.Result.flatMap(Ok(0.0), recip) == Error(\"Divide by zero\")\n\nBelt.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`,\notherwise `default`\n\n## Examples\n\n```rescript\nBelt.Result.getWithDefault(Ok(42), 0) == 42\n\nBelt.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\nthe `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\nit 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\nrespect to an equality function. If `res1` and `res2` are of the form `Ok(n)`\nand `Ok(m)`, return the result of `f(n, m)`. If one of `res1` and `res2` are of\nthe form `Error(e)`, return false If both `res1` and `res2` are of the form\n`Error(e)`, return true\n\n## Examples\n\n```rescript\nlet good1 = Belt.Result.Ok(42)\n\nlet good2 = Belt.Result.Ok(32)\n\nlet bad1 = Belt.Result.Error(\"invalid\")\n\nlet bad2 = Belt.Result.Error(\"really invalid\")\n\nlet mod10equal = (a, b) => mod(a, 10) === mod(b, 10)\n\nBelt.Result.eq(good1, good2, mod10equal) == true\n\nBelt.Result.eq(good1, bad1, mod10equal) == false\n\nBelt.Result.eq(bad2, good2, mod10equal) == false\n\nBelt.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\ncomparison function. The comparison function returns -1 if the first variable\nis \"less than\" the second, 0 if the two variables are equal, and 1 if the first\nis \"greater than\" the second.\n\nIf `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)`,\nreturn -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\nboth `res1` and `res2` are of the form `Error(e)`, return 0 (equal)\n\n## Examples\n\n```rescript\nlet good1 = Belt.Result.Ok(59)\n\nlet good2 = Belt.Result.Ok(37)\n\nlet bad1 = Belt.Result.Error(\"invalid\")\n\nlet bad2 = Belt.Result.Error(\"really invalid\")\n\nlet mod10cmp = (a, b) => Pervasives.compare(mod(a, 10), mod(b, 10))\n\nBelt.Result.cmp(Ok(39), Ok(57), mod10cmp) == 1\n\nBelt.Result.cmp(Ok(57), Ok(39), mod10cmp) == (-1)\n\nBelt.Result.cmp(Ok(39), Error(\"y\"), mod10cmp) == 1\n\nBelt.Result.cmp(Error(\"x\"), Ok(57), mod10cmp) == (-1)\n\nBelt.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.", + "In Belt we represent the existence and nonexistence of a value by wrapping it\nwith the `option` type. In order to make it a bit more convenient to work with\noption-types, Belt provides utility-functions for it.\n\nThe `option` type is a part of the ReScript standard library which is defined like this:\n\n## Examples\n\n```rescript\ntype option<'a> = None | Some('a)\n```\n\n```rescript\nlet someString: option = Some(\"hello\")\n```" + ], + "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## Examples\n\n```rescript\nBelt.Option.keep(Some(10), x => x > 5) /* returns `Some(10)` */\nBelt.Option.keep(Some(4), x => x > 5) /* returns `None` */\nBelt.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## Examples\n\n```rescript\nBelt.Option.forEach(Some(\"thing\"), x => Js.log(x)) /* logs \"thing\" */\nBelt.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## Examples\n\n```rescript\nBelt.Option.getExn(Some(3)) /* 3 */\n\nBelt.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\nThis is an unsafe operation, it assumes `x` is neither `None`\nnor `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)`,\nthis function returns that value applied with `f`, in other words `f(value)`.\n\nIf `optionValue` is `None`, the default is returned.\n\n## Examples\n\n```rescript\nlet someValue = Some(3)\nsomeValue->Belt.Option.mapWithDefault(0, x => x + 5) /* 8 */\n\nlet noneValue = None\nnoneValue->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## Examples\n\n```rescript\nBelt.Option.map(Some(3), x => x * x) /* Some(9) */\n\nBelt.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`.
    \nThe function `f` must have a return type of `option<'b>`.\n\n## Examples\n\n```rescript\nlet addIfAboveOne = value =>\n if (value > 1) {\n Some(value + 1)\n } else {\n None\n }\n\nBelt.Option.flatMap(Some(2), addIfAboveOne) /* Some(3) */\n\nBelt.Option.flatMap(Some(-4), addIfAboveOne) /* None */\n\nBelt.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## Examples\n\n```rescript\nBelt.Option.getWithDefault(None, \"Banana\") /* Banana */\n\nBelt.Option.getWithDefault(Some(\"Apple\"), \"Banana\") /* Apple */\n```\n\n```rescript\nlet greet = (firstName: option) =>\n \"Greetings \" ++ firstName->Belt.Option.getWithDefault(\"Anonymous\")\n\nSome(\"Jane\")->greet /* \"Greetings Jane\" */\n\nNone->greet /* \"Greetings Anonymous\" */\n```" + ], + "signature": "let getWithDefault: (option<'a>, 'a) => 'a" + }, + { + "id": "Belt.Option.orElse", + "kind": "value", + "name": "orElse", + "docstrings": [ + "`orElse(optionalValue, otherOptional)` if `optionalValue` is `Some(value)`,\nreturns `Some(value)`, otherwise `otherOptional`\n\n## Examples\n\n```rescript\nBelt.Option.orElse(Some(1812), Some(1066)) == Some(1812)\nBelt.Option.orElse(None, Some(1066)) == Some(1066)\nBelt.Option.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## Examples\n\n```rescript\nBelt.Option.isSome(None) /* false */\n\nBelt.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## Examples\n\n```rescript\nBelt.Option.isNone(None) /* true */\n\nBelt.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\nfunction. If both `optValue1` and `optValue2` are `None`, returns `true`.\nIf one of the arguments is `Some(value)` and the other is `None`, returns\n`false`.\n\nIf arguments are `Some(value1)` and `Some(value2)`, returns the result of\n`predicate(value1, value2)`; the predicate function must return a bool.\n\n## Examples\n\n```rescript\nlet clockEqual = (a, b) => mod(a, 12) == mod(b, 12)\n\nopen Belt.Option\n\neq(Some(3), Some(15), clockEqual) /* true */\n\neq(Some(3), None, clockEqual) /* false */\n\neq(None, Some(3), clockEqual) /* false */\n\neq(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\nwith respect to given `comparisonFunction`.\n\nIf both `optValue1` and `optValue2` are `None`, it returns `0`.\n\nIf the first argument is `Some(value1)` and the second is `None`, returns `1`\n(something is greater than nothing).\n\nIf the first argument is `None` and the second is `Some(value2)`, returns `-1`\n(nothing is less than something).\n\nIf the arguments are `Some(value1)` and `Some(value2)`, returns the result of\n`comparisonFunction(value1, value2)`; comparisonFunction takes two arguments\nand returns `-1` if the first argument is less than the second, `0` if the\narguments are equal, and `1` if the first argument is greater than the second.\n\n## Examples\n\n```rescript\nlet clockCompare = (a, b) => compare(mod(a, 12), mod(b, 12))\n\nopen Belt.Option\n\ncmp(Some(3), Some(15), clockCompare) /* 0 */\n\ncmp(Some(3), Some(14), clockCompare) /* 1 */\n\ncmp(Some(2), Some(15), clockCompare) /* (-1) */\n\ncmp(None, Some(15), clockCompare) /* (-1) */\n\ncmp(Some(14), None, clockCompare) /* 1 */\n\ncmp(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`]()", + "A **mutable** Hash map which allows customized [`hash`]() behavior.\n\nAll data are parameterized by not its only type but also a unique identity in\nthe time of initialization, so that two _HashMaps of ints_ initialized with different\n_hash_ functions will have different type.\n\n## Examples\n\n```rescript\ntype t = int\nmodule I0 = unpack(Belt.Id.hashableU(~hash=(. a: t) => \"&\"(a, 0xff_ff), ~eq=(. a, b) => a == b))\nlet s0: t<_, string, _> = make(~hintSize=40, ~id=module(I0))\n\nmodule I1 = unpack(Belt.Id.hashableU(~hash=(. a: t) => \"&\"(a, 0xff), ~eq=(. a, b) => a == b))\nlet s1: t<_, string, _> = make(~hintSize=40, ~id=module(I1))\n```\n\nThe invariant must be held: for two elements who are _equal_,\ntheir hashed value should be the same\n\nHere the compiler would infer `s0` and `s1` having different type so that\nit would not mix.\n\n## Examples\n\n```rescript\nlet s0: t\nlet s1: t\n```\n\nWe can add elements to the collection:\n\n## Examples\n\n```rescript\nlet () = {\n add(s1, 0, \"3\")\n add(s1, 1, \"3\")\n}\n```\n\nSince this is an mutable data strucure, `s1` will contain two pairs." + ], + "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## Examples\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 hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n\nBelt.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## Examples\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 hMap = Belt.HashMap.fromArray([(1, \"1\")], ~id=module(IntHash))\nBelt.HashMap.clear(hMap)\nBelt.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## Examples\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\nBelt.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## Examples\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([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntHash))\n\nBelt.HashMap.set(s0, 2, \"3\")\n\nBelt.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## Examples\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([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntHash))\nlet s1 = Belt.HashMap.copy(s0)\n\nBelt.HashMap.set(s0, 2, \"3\")\n\nBelt.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## Examples\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## Examples\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.has(s0, 1) == true\nBelt.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## Examples\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\")\nBelt.HashMap.remove(s0, 1)\nBelt.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## Examples\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\")\nBelt.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\nThe 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## Examples\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\")\nBelt.HashMap.set(s0, 2, \"value2\")\n\nBelt.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: (\n t<'key, 'value, 'id>,\n ('key, 'value) => option<'value>,\n) => unit" + }, + { + "id": "Belt.HashMap.keepMapInPlace", + "kind": "value", + "name": "keepMapInPlace", + "docstrings": [ + "Filters out values for which function `f` returned `None`.\n\n## Examples\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\")\nBelt.HashMap.set(s0, 2, \"value2\")\n\nBelt.HashMap.keepMapInPlace(s0, (key, value) => key == 1 ? None : Some(value))\n```" + ], + "signature": "let keepMapInPlace: (\n t<'key, 'value, 'id>,\n ('key, 'value) => option<'value>,\n) => 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## Examples\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\")\nBelt.HashMap.set(s0, 2, \"value2\")\n\nBelt.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## Examples\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\")\nBelt.HashMap.set(s0, 2, \"value2\")\n\nBelt.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## Examples\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\")\nBelt.HashMap.set(s0, 2, \"value2\")\n\nBelt.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## Examples\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\")\nBelt.HashMap.set(s0, 2, \"value2\")\n\nBelt.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## Examples\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: (\n array<('key, 'value)>,\n ~id: id<'key, 'id>,\n) => t<'key, 'value, 'id>" + }, + { + "id": "Belt.HashMap.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [ + "## Examples\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 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": [ + "## Examples\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})\nlet hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\nBelt.HashMap.set(hMap, 1, \"1\")\n\nBelt.HashMap.getBucketHistogram(hMap)\n```" + ], + "signature": "let getBucketHistogram: t<'a, 'b, 'c> => array" + }, + { + "id": "Belt.HashMap.logStats", + "kind": "value", + "name": "logStats", + "docstrings": [ + "## Examples\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})\nlet hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\nBelt.HashMap.set(hMap, 1, \"1\")\n\nBelt.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`]()", + "A **mutable** Hash set which allows customized `hash` behavior.\n\nAll data are parameterized by not its only type but also a unique identity in\nthe time of initialization, so that two _HashSets of ints_ initialized with\ndifferent _hash_ functions will have different type.\n\n## Examples\n\n```rescript\nmodule I0 = unpack(\n Belt.Id.hashableU(\n ~hash=(. a: int) => land(a, 65535),\n ~eq=(. a, b) => a == b,\n )\n)\n\nlet s0 = Belt.HashSet.make(~id=module(I0), ~hintSize=40)\n\nmodule I1 = unpack(\n Belt.Id.hashableU(\n ~hash=(. a: int) => land(a, 255),\n ~eq=(. a, b) => a == b,\n )\n)\n\nlet s1 = Belt.HashSet.make(~id=module(I1), ~hintSize=40)\n\nBelt.HashSet.add(s1, 0)\nBelt.HashSet.add(s1, 1)\n```\n\nThe invariant must be held: for two elements who are equal, their hashed\nvalue should be the same.\n\nHere the compiler would infer `s0` and `s1` having different type so that it\nwould not mix.\n\n## Examples\n\n```rescript\nlet s0: Belt.HashSet.t\nlet s1: Belt.HashSet.t\n```\n\nWe can add elements to the collection (see last two lines in the example\nabove). Since this is an mutable data structure, `s1` will contain two pairs." + ], + "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\nkey, 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,\ncontain equal keys and associate them with equal data. `eqf` is the\nequality 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`\nas first argument, and the associated value as second argument. The\nbindings are passed to `f` in increasing order with respect to the ordering\nover 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 ...\nkN`are the keys of all bindings in`m`(in increasing order), and`d1 ... dN`\nare 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 `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 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<'b, 'a, 'c> => array<'a>" + }, + { + "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\nvalue a of all bindings of `m` has been replaced by the result of the\napplication of `f` to `a`. The bindings are passed to `f` in increasing\norder 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`]()", + "A **mutable** sorted set module which allows customized compare behavior.\nThe implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.\n\nIt also has two specialized inner modules [Belt.MutableSet.Int](mutable-set-int) and [Belt.MutableSet.String](mutable-set-string) - This module separates data from function which is more verbose but slightly more efficient\n\n## Examples\n\n```rescript\nmodule PairComparator = Belt.Id.MakeComparable({\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\nlet mySet = Belt.MutableSet.make(~id=module(PairComparator))\nmySet->Belt.MutableSet.add((1, 2))\n```" + ], + "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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([1, 3, 2, 4], ~id=module(IntCmp))\n\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([1, 3, 2, 4], ~id=module(IntCmp))\n\nlet copied = s0->Belt.MutableSet.copy\ncopied->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet empty = Belt.MutableSet.fromArray([], ~id=module(IntCmp))\nlet notEmpty = Belt.MutableSet.fromArray([1], ~id=module(IntCmp))\n\nBelt.MutableSet.isEmpty(empty) /* true */\nBelt.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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet set = Belt.MutableSet.fromArray([1, 4, 2, 5], ~id=module(IntCmp))\n\nset->Belt.MutableSet.has(3) /* false */\nset->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.make(~id=module(IntCmp))\ns0->Belt.MutableSet.add(1)\ns0->Belt.MutableSet.add(2)\ns0->Belt.MutableSet.add(2)\n\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet set = Belt.MutableSet.make(~id=module(IntCmp))\n\nset->Belt.MutableSet.mergeMany([5, 4, 3, 2, 1])\nset->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([2, 3, 1, 4, 5], ~id=module(IntCmp))\ns0->Belt.MutableSet.remove(1)\ns0->Belt.MutableSet.remove(3)\ns0->Belt.MutableSet.remove(3)\n\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet set = Belt.MutableSet.fromArray([1, 2, 3, 4], ~id=module(IntCmp))\n\nset->Belt.MutableSet.removeMany([5, 4, 3, 2, 1])\nset->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\nlet s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\nlet union = Belt.MutableSet.union(s0, s1)\nunion->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\nlet s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\nlet intersect = Belt.MutableSet.intersect(s0, s1)\nintersect->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\nlet s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\nBelt.MutableSet.toArray(Belt.MutableSet.diff(s0, s1)) /* [6] */\nBelt.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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\nlet s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\nlet s2 = Belt.MutableSet.intersect(s0, s1)\nBelt.MutableSet.subset(s2, s0) /* true */\nBelt.MutableSet.subset(s2, s1) /* true */\nBelt.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.\nIt 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([5, 2, 3], ~id=module(IntCmp))\nlet s1 = Belt.MutableSet.fromArray([3, 2, 5], ~id=module(IntCmp))\n\nBelt.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 `Belt.MutableSet.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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\nlet acc = ref(list{})\ns0->Belt.MutableSet.forEach(x => acc := Belt.List.add(acc.contents, x))\nacc /* [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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet isEven = x => mod(x, 2) == 0\n\nlet s0 = Belt.MutableSet.fromArray([2, 4, 6, 8], ~id=module(IntCmp))\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet isOdd = x => mod(x, 2) != 0\n\nlet s0 = Belt.MutableSet.fromArray([1, 2, 4, 6, 8], ~id=module(IntCmp))\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet isEven = x => mod(x, 2) == 0\n\nlet s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\nlet s1 = s0->Belt.MutableSet.keep(isEven)\n\ns1->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: (\n t<'value, 'id>,\n 'value => bool,\n) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.MutableSet.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet isOdd = x => mod(x, 2) != 0\n\nlet s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\nlet (s1, s2) = s0->Belt.MutableSet.partition(isOdd)\n\ns1->Belt.MutableSet.toArray /* [1,3,5] */\ns2->Belt.MutableSet.toArray /* [2,4] */\n```" + ], + "signature": "let partition: (\n t<'value, 'id>,\n 'value => bool,\n) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.MutableSet.size", + "kind": "value", + "name": "size", + "docstrings": [ + "Returns size of the set.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([1, 2, 3, 4], ~id=module(IntCmp))\n\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\ns0->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.make(~id=module(IntCmp))\nlet s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\ns0->Belt.MutableSet.minimum /* None */\ns1->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.make(~id=module(IntCmp))\nlet s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\ns0->Belt.MutableSet.minUndefined /* undefined */\ns1->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.make(~id=module(IntCmp))\nlet s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\ns0->Belt.MutableSet.maximum /* None */\ns1->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.make(~id=module(IntCmp))\nlet s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\ns0->Belt.MutableSet.maxUndefined /* undefined */\ns1->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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n\ns0->Belt.MutableSet.get(3) /* Some(3) */\ns0->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 `Belt.MutableSet.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 `Belt.MutableSet.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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n})\n\nlet s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n\nlet ((smaller, larger), present) = s0->Belt.MutableSet.split(3)\n\npresent /* true */\nsmaller->Belt.MutableSet.toArray /* [1,2] */\nlarger->Belt.MutableSet.toArray /* [4,5] */\n```" + ], + "signature": "let split: (\n t<'value, 'id>,\n 'value,\n) => ((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", + "The top level provides generic immutable map operations.\n\nIt also has three specialized inner modules `Belt.Map.Int`, `Belt.Map.String`\nand `Belt.Map.Dict`." + ], + "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## Examples\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## Examples\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## Examples\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.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\nTotal ordering of map given total ordering of value function.\n\nIt 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,\ncontain equal keys and associate them with equal data. `veq` is the\nequality 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": [ + "`\nfindFirstBy(m, p)` uses function `f` to find the first key value pair to match predicate `p`.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n})\n\nlet s0 = Belt.Map.fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"\")])\n\nBelt.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\nbindings are passed to `f` in increasing order with respect to the ordering\nover the type of the keys.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n})\n\nlet s0 = Belt.Map.fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"\")])\n\nlet acc = ref(list{})\n\nBelt.Map.forEach(s0, (k, v) => acc := list{(k, v), ...acc.contents})\n\nacc.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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n})\n\nlet s0 = Belt.Map.fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"3\")])\n\nBelt.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 predicate \n`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## Examples\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.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## Examples\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.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. 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## Examples\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.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## Examples\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.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## Examples\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.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## Examples\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.get(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp)), 2) ==\n Some(\"2\")\n\nBelt.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`. 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\nSee `Belt.Map.get`\n\nReturns 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\nSee `Belt.Map.getExn`\n\nraise 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## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n})\n\nlet s0 = Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))\n\nlet s1 = Belt.Map.remove(s0, 1)\n\nlet s2 = Belt.Map.remove(s1, 1)\n\ns1 === s2\n\nBelt.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\nRemoving each of `xs` to `s`, note unlike `Belt.Map.remove`, the reference\nof 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\nnew binding of `x` to `y`. If `x` was already bound in `m`, its previous\nbinding disappears.\n\n## Examples\n\n```rescript\nmodule IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n})\n\nlet s0 = Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))\n\nlet s1 = Belt.Map.set(s0, 2, \"3\")\n\nBelt.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: (\n t<'k, 'v, 'id>,\n 'k,\n option<'v> => option<'v>,\n) => 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\nfor 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)`\nthen `x` is associated to `z` in the resulting map." + ], + "signature": "let update: (\n t<'k, 'v, 'id>,\n 'k,\n option<'v> => option<'v>,\n) => t<'k, 'v, 'id>" + }, + { + "id": "Belt.Map.mergeMany", + "kind": "value", + "name": "mergeMany", + "docstrings": [ + "`mergeMany(s, xs)`\n\nAdding each of `xs` to `s`, note unlike `add`, the reference of return\nvalue 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`\nand of `m2`. The presence of each such binding, and the corresponding\nvalue, 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\npredicate `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: (\n t<'k, 'v, 'id>,\n ('k, 'v) => bool,\n) => (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\nall the bindings of `s` that satisfy the predicate `p`, and `m2` is the map\nwith all the bindings of `s` that do not satisfy `p`." + ], + "signature": "let partition: (\n t<'k, 'v, 'id>,\n ('k, 'v) => bool,\n) => (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\nthe bindings of `m` whose 'k is strictly less than `x`; `r` is the map with\nall 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: (\n t<'k, 'v, 'id>,\n 'k,\n) => ((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\nvalue`a`of all bindings of`m`has been replaced by the result of the\napplication of`f`to`a`. The bindings are passed to`f` in increasing order\nwith 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\nThe same as `Belt.Map.map` except that `f` is supplied with one more\nargument: 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\nAdvanced usage only\n\nReturns the raw data (detached from comparator), but its type is still\nmanifested, 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. 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\nAdvanced usage only\n\nReturns the packed collection." + ], + "signature": "let packIdData: (\n ~id: id<'k, 'id>,\n ~data: Belt_MapDict.t<'k, 'v, 'id>,\n) => 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", + "An _immutable_ sorted set module which allows customized _compare_ behavior.\n\nThe implementation uses balanced binary trees, and therefore searching\nand insertion take time logarithmic in the size of the map.\n\nFor more info on this module's usage of identity, `make` and others, please see\nthe top level documentation of Belt, **A special encoding for collection safety**.\n\n## Examples\n\n```rescript\nmodule PairComparator =\n Belt.Id.MakeComparable({\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\nlet mySet = Belt.Set.make(~id=module(PairComparator))\nlet mySet2 = Belt.Set.add(mySet, (1, 2))\n```\n\n**Note:** This module's examples will assume a predeclared module for integers\ncalled `IntCmp`. It is declared like this:\n\n```rescript\nmodule IntCmp =\n Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n```" + ], + "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## Examples\n\n```rescript\nlet 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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([1, 3, 2, 4], ~id=module(IntCmp))\n\ns0->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\nis 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## Examples\n\n```rescript\nlet empty = Belt.Set.fromArray([], ~id=module(IntCmp))\nlet notEmpty = Belt.Set.fromArray([1],~id=module(IntCmp))\n\nBelt.Set.isEmpty(empty) /* true */\nBelt.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## Examples\n\n```rescript\nlet set = Belt.Set.fromArray([1, 4, 2, 5], ~id=module(IntCmp))\n\nset->Belt.Set.has(3) /* false */\nset->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## Examples\n\n```rescript\nlet s0 = Belt.Set.make(~id=module(IntCmp))\nlet s1 = s0->Belt.Set.add(1)\nlet s2 = s1->Belt.Set.add(2)\nlet s3 = s2->Belt.Set.add(2)\ns0->Belt.Set.toArray /* [] */\ns1->Belt.Set.toArray /* [1] */\ns2->Belt.Set.toArray /* [1, 2] */\ns3->Belt.Set.toArray /* [1,2 ] */\ns2 == 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 `Belt.Set.add`](#add), the reference of return value might be changed even if all values in array already exist in set\n\n## Examples\n\n```rescript\nlet set = Belt.Set.make(~id=module(IntCmp))\n\nlet newSet = set->Belt.Set.mergeMany([5, 4, 3, 2, 1])\nnewSet->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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([2,3,1,4,5], ~id=module(IntCmp))\nlet s1 = s0->Belt.Set.remove(1)\nlet s2 = s1->Belt.Set.remove(3)\nlet s3 = s2->Belt.Set.remove(3)\n\ns1->Belt.Set.toArray /* [2,3,4,5] */\ns2->Belt.Set.toArray /* [2,4,5] */\ns2 == 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## Examples\n\n```rescript\nlet set = Belt.Set.fromArray([1, 2, 3, 4],~id=module(IntCmp))\n\nlet newSet = set->Belt.Set.removeMany([5, 4, 3, 2, 1])\nnewSet->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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\nlet s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\nlet union = Belt.Set.union(s0, s1)\nunion->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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\nlet s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\nlet intersect = Belt.Set.intersect(s0, s1)\nintersect->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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\nlet s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\nBelt.Set.toArray(Belt.Set.diff(s0, s1)) /* [6] */\nBelt.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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\nlet s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\nlet s2 = Belt.Set.intersect(s0, s1)\nBelt.Set.subset(s2, s0) /* true */\nBelt.Set.subset(s2, s1) /* true */\nBelt.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\nof sets. It compares size first and then iterates over each element following\nthe 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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([5,2,3], ~id=module(IntCmp))\nlet s1 = Belt.Set.fromArray([3,2,5], ~id=module(IntCmp))\n\nBelt.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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\nlet acc = ref(list{})\ns0->Belt.Set.forEach(x => {\n acc := Belt.List.add(acc.contents, x)\n})\nacc /* [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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\ns0->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## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nlet s0 = Belt.Set.fromArray([2,4,6,8], ~id=module(IntCmp))\ns0->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## Examples\n\n```rescript\nlet isOdd = x => mod(x, 2) != 0\n\nlet s0 = Belt.Set.fromArray([1,2,4,6,8], ~id=module(IntCmp))\ns0->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## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nlet s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\nlet s1 = s0->Belt.Set.keep(isEven)\n\ns1->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: (\n t<'value, 'id>,\n 'value => bool,\n) => (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## Examples\n\n```rescript\nlet isOdd = x => mod(x, 2) != 0\n\nlet s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\nlet (s1, s2) = s0->Belt.Set.partition(isOdd)\n\ns1->Belt.Set.toArray /* [1,3,5] */\ns2->Belt.Set.toArray /* [2,4] */\n```" + ], + "signature": "let partition: (\n t<'value, 'id>,\n 'value => bool,\n) => (t<'value, 'id>, t<'value, 'id>)" + }, + { + "id": "Belt.Set.size", + "kind": "value", + "name": "size", + "docstrings": [ + "Returns size of the set.\n\n## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([1,2,3,4], ~id=module(IntCmp))\n\ns0->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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\ns0->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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\ns0->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## Examples\n\n```rescript\nlet s0 = Belt.Set.make(~id=module(IntCmp))\nlet s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\ns0->Belt.Set.minimum /* None */\ns1->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## Examples\n\n```rescript\nlet s0 = Belt.Set.make(~id=module(IntCmp))\nlet s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\ns0->Belt.Set.minUndefined /* undefined */\ns1->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## Examples\n\n```rescript\nlet s0 = Belt.Set.make(~id=module(IntCmp))\nlet s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\ns0->Belt.Set.maximum /* None */\ns1->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## Examples\n\n```rescript\nlet s0 = Belt.Set.make(~id=module(IntCmp))\nlet s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\ns0->Belt.Set.maxUndefined /* undefined */\ns1->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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n\ns0->Belt.Set.get(3) /* Some(3) */\ns0->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## Examples\n\n```rescript\nlet s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n\nlet ((smaller, larger), present) = s0->Belt.Set.split(3)\n\npresent /* true */\nsmaller->Belt.Set.toArray /* [1,2] */\nlarger->Belt.Set.toArray /* [4,5] */\n\n```" + ], + "signature": "let split: (\n t<'value, 'id>,\n 'value,\n) => ((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\nReturns the raw data (detached from comparator), but its type is still manifested,\nso 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\nReturns 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\nReturns the packed collection." + ], + "signature": "let packIdData: (\n ~id: id<'value, 'id>,\n ~data: Belt_SetDict.t<'value, 'id>,\n) => t<'value, 'id>" + } + ] + }, + "belt/range": { + "id": "Belt.Range", + "name": "Range", + "docstrings": [ + "[`Belt.Range`]()\n\n Utilities for a closed range `(from, start)`", + "A small utility module to provide inclusive range operations for `[start, finish]`.\nInternally it is relying on loops instead of creating new arrays, which makes it\npretty performant and memory friendly." + ], + "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)` equivalent to `Belt.Array.forEach(Belt.Array.range(start, finish), action))`\n\n## Examples\n\n```rescript\nBelt.Range.forEach(0, 4, (i) => Js.log(i))\n\n// Prints:\n// 0\n// 1\n// 2\n// 3\n// 4\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)` equivalent to `Belt.Array.every(Belt.Array.range(start, finish), p)`\n## Examples\n\n```rescript\nBelt.Range.every(0, 4, (i) => i < 5) /* true */\n\nBelt.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)`. See `Belt.Array.rangeBy`, equivalent to\n`Belt.Array.every(Belt.Array.rangeBy(start, finish, ~step), p)`\n\n## Examples\n\n```rescript\nBelt.Range.everyBy(0, 4, ~step=1, (i) => mod(i, 2) === 0) /* false */\n\nBelt.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)` equivalent to `Belt.Array.some(Belt.Array.range(start, finish), p)`\n\n## Examples\n\n```rescript\nBelt.Range.some(0, 4, (i) => i > 5) /* false */\n\nBelt.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)` See `Belt.Array.rangeBy`, equivalent to\n`Belt.Array.some(Belt.Array.rangeBy(start, finish, ~step), p)`\n\n## Examples\n\n```rescript\nBelt.Range.someBy(1, 5, ~step=2, (i) => mod(i, 2) === 0) /* false */\nBelt.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", + "Collection functions for manipulating the `list` data structures, a singly-linked list.\n\n**Prefer Array** if you need any of the following:\n\n- Random access of element\n- Better interop with JavaScript\n- Better memory usage & performance." + ], + "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## Examples\n\n```rescript\nBelt.List.length(list{1, 2, 3}) // 3\n```" + ], + "signature": "let length: t<'a> => int" + }, + { + "id": "Belt.List.size", + "kind": "value", + "name": "size", + "docstrings": [ + "See `Belt.List.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## Examples\n\n```rescript\nBelt.List.head(list{}) // None\nBelt.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 `Belt.List.head` but raises an exception if `someList` is empty. Use\nwith care.\n\n## Examples\n\n```rescript\nBelt.List.headExn(list{1, 2, 3}) // 1\n\nBelt.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)`\nwhere `tail` is everything except the first element of `someList`.\n\n## Examples\n\n```rescript\nBelt.List.tail(list{1, 2, 3}) // Some(list{2, 3})\n\nBelt.List.tail(list{}) // None\n```" + ], + "signature": "let tail: t<'a> => option>" + }, + { + "id": "Belt.List.tailExn", + "kind": "value", + "name": "tailExn", + "docstrings": [ + "Same as `Belt.List.tail` but raises an exception if `someList` is empty. Use\nwith care.\n\n## Examples\n\n```rescript\nBelt.List.tailExn(list{1, 2, 3}) // list{2, 3}\n\nBelt.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## Examples\n\n```rescript\nBelt.List.add(list{2, 3}, 1) // list{1, 2, 3}\n\nBelt.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\nlength.\n\n## Examples\n\n```rescript\nlet abc = list{\"A\", \"B\", \"C\"}\n\nabc->Belt.List.get(1) // Some(\"B\")\n\nabc->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 `Belt.List.get` but raises an exception if `index` is larger than the\nlength. Use with care.\n\n## Examples\n\n```rescript\nlet abc = list{\"A\", \"B\", \"C\"}\n\nabc->Belt.List.getExn(1) // \"B\"\n\nabc->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## Examples\n\n```rescript\nBelt.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## Examples\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## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nlist{1, 2, 3}->Belt.List.drop(2) // Some(list{3})\n\nlist{1, 2, 3}->Belt.List.drop(3) // Some(list{})\n\nlist{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## Examples\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## Examples\n\n```rescript\nlist{\"Hello\", \"World\"}->Belt.List.splitAt(1) // Some((list{\"Hello\"}, list{\"World\"}))\n\nlist{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## Examples\n\n```rescript\nBelt.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\norder.\n\n## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nlist{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## Examples\n\n```rescript\nBelt.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 [Belt.List.zip](#zip)\n\n## Examples\n\n```rescript\nBelt.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`.\nFunction `f` takes two arguments: the index starting from 0 and the element from `someList`, in that order.\n\n## Examples\n\n```rescript\nlist{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## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nBelt.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\nmap(someList, f)->reverse\n```\n\n## Examples\n\n```rescript\nlist{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## Examples\n\n```rescript\nBelt.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.\nFunction `f` takes two arguments: the index starting from 0 and the element from `someList`. `f` returns `unit`.\n\n## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nlist{1, 2, 3, 4}->Belt.List.reduce(0, (a, b) => a + b) /* 10 */\n\n/* same as */\n\nlist{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## Examples\n\n```rescript\nlist{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\nitem of `someList` from the last back to the first.\n\n## Examples\n\n```rescript\nlist{1, 2, 3, 4}->Belt.List.reduceReverse(0, (a, b) => a + b) /* 10 */\n\nlist{1, 2, 3, 4}->Belt.List.reduceReverse(10, (a, b) => a - b) /* 0 */\n\nlist{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## Examples\n\n```rescript\n\nBelt.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## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nBelt.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\nbeginning. Stops with the shorter list. Function `f` has three parameters: an\n“accumulator” which starts with a value of init, an item from `firstList`,\nand an item from `secondList`. `reduce2` returns the final value of the\naccumulator.\n\n## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nlet isBelow10 = value => value < 10\n\nlist{1, 9, 8, 2}->Belt.List.every(isBelow10) /* true */\n\nlist{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\nreturning a bool.\n\n## Examples\n\n```rescript\nlet isAbove100 = value => value > 100\n\nlist{101, 1, 2, 3}->Belt.List.some(isAbove100) /* true */\n\nlist{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\nup to the shorter length (i.e. `min(length(firstList), length(secondList))`)\n\n## Examples\n\n```rescript\nBelt.List.every2(list{1, 2, 3}, list{0, 1}, (a, b) => a > b) /* true */\n\nBelt.List.every2(list{}, list{1}, (a, b) => a > b) /* true */\n\nBelt.List.every2(list{2, 3}, list{1}, (a, b) => a > b) /* true */\n\nBelt.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\nto the shorter length (i.e. `min(length(firstList), length(secondList))`)\n\n## Examples\n\n```rescript\nBelt.List.some2(list{1, 2, 3}, list{0, 1}, (a, b) => a > b) /* true */\n\nBelt.List.some2(list{}, list{1}, (a, b) => a > b) /* false */\n\nBelt.List.some2(list{2, 3}, list{1}, (a, b) => a > b) /* true */\n\nBelt.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\nless than `length(secondList)`, `0` if `length(firstList)` equals\n`length(secondList)`, and `1` if `length(firstList)` is greater than\n`length(secondList)`.\n\n## Examples\n\n```rescript\nBelt.List.cmpByLength(list{1, 2}, list{3, 4, 5, 6}) /* -1 */\n\nBelt.List.cmpByLength(list{1, 2, 3}, list{4, 5, 6}) /* = 0 */\n\nBelt.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\nThe comparison returns the first non-zero result of `compareFn`, or zero if `compareFn` returns zero for all `a` and `b`.\n\nIf all items have compared equal, but `firstList` is exhausted first, return `-1`. (`firstList` is shorter).\nIf all items have compared equal, but `secondList` is exhausted first, return `1` (`firstList` is longer).\n\n## Examples\n\n```rescript\nBelt.List.cmp(list{3}, list{3, 7}, (a, b) => compare(a, b)) /* (-1) */\n\nBelt.List.cmp(list{5, 3}, list{5}, (a, b) => compare(a, b)) /* 1 */\n\nBelt.List.cmp(list{1, 3, 5}, list{1, 4, 2}, (a, b) => compare(a, b)) /* (-1) */\n\nBelt.List.cmp(list{1, 3, 5}, list{1, 2, 3}, (a, b) => compare(a, b)) /* 1 */\n\nBelt.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,\nfor Array, we compare the length first and, only if the lengths are equal, elements one by one.\nFor 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\nelements, 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\nof `firstList` and `secondList` are not the same.\n\n## Examples\n\n```rescript\nBelt.List.eq(list{1, 2, 3}, list{1, 2}, (a, b) => a == b) /* false */\n\nBelt.List.eq(list{1, 2}, list{1, 2}, (a, b) => a == b) /* true */\n\nBelt.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## Examples\n\n```rescript\nlist{1, 2, 3}->Belt.List.has(2, (a, b) => a == b) /* true */\n\nlist{1, 2, 3}->Belt.List.has(4, (a, b) => a == b) /* false */\n\nlist{(-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\npredicate function `pred`. Returns `None` if no element satisfies the function.\n\n## Examples\n\n```rescript\nBelt.List.getBy(list{1, 4, 3, 2}, x => x > 3) /* Some(4) */\n\nBelt.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## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nBelt.List.keep(list{1, 2, 3, 4}, isEven) /* list{2, 4} */\n\nBelt.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## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nBelt.List.filter(list{1, 2, 3, 4}, isEven) /* list{2, 4} */\n\nBelt.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>", + "deprecated": "This function will soon be deprecated. Please, use `List.keep` instead." + }, + { + "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## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nBelt.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## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nBelt.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>", + "deprecated": "This function will soon be deprecated. Please, use `List.keepWithIndex` \\\n instead." + }, + { + "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.\nIf `f(x)` returns `None`, the element is _not_ retained in the result.\n\n## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nlist{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\nlist{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\nIn other words:\n\n```rescript\n(elementsThatSatisfies, elementsThatDoesNotSatisfy)\n```\n\n## Examples\n\n```rescript\nBelt.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## Examples\n\n```rescript\nBelt.List.unzip(list{(1, 2), (3, 4)}) /* (list{1, 3}, list{2, 4}) */\n\nBelt.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## Examples\n\n```rescript\nlist{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.getAssoc(3, (a, b) => a == b) /* Some(\"c\") */\n\nlist{(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## Examples\n\n```rescript\nlist{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.hasAssoc(1, (a, b) => a == b) /* true */\n\nlist{(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## Examples\n\n```rescript\nlist{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.removeAssoc(1, (a, b) => a == b) /* list{(2, \"b\"), (3, \"c\")} */\n\nlist{(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## Examples\n\n```rescript\nlist{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.setAssoc(2, \"x\", (a, b) => a == b) /* list{(1, \"a\"), (2, \"x\"), (3, \"c\")} */\n\nlist{(1, \"a\"), (3, \"c\")}->Belt.List.setAssoc(2, \"b\", (a, b) => a == b) /* list{(2, \"b\"), (1, \"a\"), (3, \"c\")} */\n\nlist{(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\nIn the last example, since: `15 mod 12` equals `3 mod 12`\n\nBoth 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## Examples\n\n```rescript\nBelt.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", + "First in last out stack. This module implements stacks, with in-place\nmodification." + ], + "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\nbefore applying `f`, `s` will be empty after this opeartion. This function is\nuseful 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", + "A 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\nreturn `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\nrecently 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\nlist 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`,\nthen clears `q1`. It is equivalent to the sequence `forEach((x) => add(x, q2), q1)`;\nclear `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`]()", + "A module for Array sort relevant utiliites" + ], + "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## Examples\n\n```rescript\nBelt.SortArray.strictlySortedLength([1, 2, 3, 4, 3], (x, y) => x < y) == 4\n\nBelt.SortArray.strictlySortedLength([], (x, y) => x < y) == 0\n\nBelt.SortArray.strictlySortedLength([1], (x, y) => x < y) == 1\n\nBelt.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\ncomparator `cmp`, the stable means if the elements are equal, their order will\nbe 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\nnegative number returned is the bitwise complement of the index of the first\nelement that is larger than value.\n\nIf value is not found and value is greater\nthan all elements in array, the negative number returned is the bitwise\ncomplement of (the index of the last element plus 1)for example, if `key` is\nsmaller than all elements return `-1` since `lnot(-1) == 0` if `key` is larger\nthan all elements return `lnot(-1) == 0` since `lnot(- (len + 1)) == len`\n\n## Examples\n\n```rescript\nBelt.SortArray.binarySearchBy([1, 2, 3, 4, 33, 35, 36], 33, Pervasives.compare) == 4\n\nlnot(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: (\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n ('a, 'a) => int,\n) => int" + }, + { + "id": "Belt.SortArray.union", + "kind": "value", + "name": "union", + "docstrings": [ + "`union src src1ofs src1len src2 src2ofs src2len dst dstofs cmp` assume `src` and\n`src2` is strictly sorted. for equivalent elements, it is picked from `src`\nalso assume that `dst` is large enough to store all elements" + ], + "signature": "let union: (\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n ('a, 'a) => int,\n) => int" + }, + { + "id": "Belt.SortArray.intersectU", + "kind": "value", + "name": "intersectU", + "docstrings": [], + "signature": "let intersectU: (\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n ('a, 'a) => int,\n) => 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: (\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n ('a, 'a) => int,\n) => int" + }, + { + "id": "Belt.SortArray.diffU", + "kind": "value", + "name": "diffU", + "docstrings": [], + "signature": "let diffU: (\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n ('a, 'a) => int,\n) => int" + }, + { + "id": "Belt.SortArray.diff", + "kind": "value", + "name": "diff", + "docstrings": [], + "signature": "let diff: (\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n int,\n array<'a>,\n int,\n ('a, 'a) => int,\n) => int" + } + ] + }, + "belt/array": { + "id": "Belt.Array", + "name": "Array", + "docstrings": [ + "[`Belt.Array`]()\n\n **mutable array**: Utilities functions", + "Utilities for `Array` functions.\n\n### Note about index syntax\n\nCode like `arr[0]` does *not* compile to JavaScript `arr[0]`. Reason transforms\nthe `[]` index syntax into a function: `Array.get(arr, 0)`. By default, this\nuses the default standard library's `Array.get` function, which may raise an\nexception if the index isn't found. If you `open Belt`, it will use the\n`Belt.Array.get` function which returns options instead of raising exceptions. \n[See this for more information](../belt.mdx#array-access-runtime-safety)." + ], + "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## Examples\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 [`Belt.Array.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`.\nIf `i` is out of range returns `None`.\n\n## Examples\n\n```rescript\nBelt.Array.get([\"a\", \"b\", \"c\"], 0) == Some(\"a\")\nBelt.Array.get([\"a\", \"b\", \"c\"], 3) == None\nBelt.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.\nOtherwise 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\nno 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\nIt does the samething in the runtime as [`getUnsafe`]();\nit is _type safe_ since the return type still track whether it is\nin 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`\nwith `x`. 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## Examples\n\n```rescript\nlet arr = [10, 11, 12, 13, 14]\n\nlet () = Belt.Array.reverseInPlace(arr)\n\narr == [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## Examples\n\n```rescript\nBelt.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\nvalue. You must specify the type of data that will eventually fill the array.\n\n## Examples\n\n```rescript\nlet arr: array> = Belt.Array.makeUninitialized(5)\n\nBelt.Array.getExn(arr, 0) == Js.undefined\n```" + ], + "signature": "let makeUninitialized: int => array>" + }, + { + "id": "Belt.Array.makeUninitializedUnsafe", + "kind": "value", + "name": "makeUninitializedUnsafe", + "docstrings": [ + "**Unsafe**\n\n## Examples\n\n```rescript\nlet arr = Belt.Array.makeUninitializedUnsafe(5)\n\nJs.log(Belt.Array.getExn(arr, 0)) // undefined\n\nBelt.Array.setExn(arr, 0, \"example\")\n\nJs.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`.\nReturns 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## Examples\n\n```rescript\nBelt.Array.range(0, 3) == [0, 1, 2, 3]\n\nBelt.Array.range(3, 0) == []\n\nBelt.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)` returns empty array when step is 0 or negative.\nIt also return an empty array when `start > finish`.\n\n## Examples\n\n```rescript\nBelt.Array.rangeBy(0, 10, ~step=3) == [0, 3, 6, 9]\n\nBelt.Array.rangeBy(0, 12, ~step=3) == [0, 3, 6, 9, 12]\n\nBelt.Array.rangeBy(33, 0, ~step=1) == []\n\nBelt.Array.rangeBy(33, 0, ~step=-1) == []\n\nBelt.Array.rangeBy(3, 12, ~step=-1) == []\n\nBelt.Array.rangeBy(3, 3, ~step=0) == []\n\nBelt.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)` return an empty array when n is negative return an array of size\nn populated by `f(i)` start from `0` to `n - 1`.\n\n## Examples\n\n```rescript\nBelt.Array.makeBy(5, (i) => i) == [0, 1, 2, 3, 4]\n\nBelt.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)` create an array of pairs from corresponding elements of a and b.\nStop with the shorter array.\n\n## Examples\n\n```rescript\nBelt.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)` create an array by applying `f` to corresponding elements of\n`xs` and `ys`. Stops with shorter array.\n\nEquivalent to `map(zip(xs, ys), ((a, b)) => f(a, b))`\n\n## Examples\n\n```rescript\nBelt.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\ncontains all the first items of the pairs; the second array contains all the\nsecond items.\n\n## Examples\n\n```rescript\nBelt.Array.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])\n\nBelt.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)` returns a fresh array containing the concatenation of the arrays\n`v1` and `v2`, so even if `v1` or `v2` is empty; it can not be shared.\n\n## Examples\n\n```rescript\nBelt.Array.concat([1, 2, 3], [4, 5]) == [1, 2, 3, 4, 5]\n\nBelt.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)` returns a fresh array as the concatenation of `xss` (an array of arrays)\n\n## Examples\n\n```rescript\nBelt.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`\nstarting 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\nsingleton array `slice(xs, ~-len, len)` will return a copy of the array if the\narray does not have enough data; `slice` extracts through the end of sequence.\n\nif `len` is negative; returns the empty array.\n\n## Examples\n\n```rescript\nBelt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=2, ~len=3) == [12, 13, 14]\n\nBelt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=-4, ~len=3) == [13, 14, 15]\n\nBelt.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\nat `offset`\n\n`offset` can be negative; and is evaluated as `length(xs) - offset(sliceToEnd, xs) - 1`\nmeans get the last element as a singleton array\n\n`sliceToEnd(xs, 0)` will return a copy of the array\n\n## Examples\n\n```rescript\nBelt.Array.sliceToEnd([10, 11, 12, 13, 14, 15, 16], 2) == [12, 13, 14, 15, 16]\n\nBelt.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)` returns a copy of `a`; that is; a fresh array containing the same\nelements as `a`." + ], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Belt.Array.fill", + "kind": "value", + "name": "fill", + "docstrings": [ + "`fill(arr, ~offset, ~len, x)` modifies `arr` in place, storing `x` in elements\nnumber `offset` to `offset + len - 1`. `offset` can be negative; and is evaluated\nas `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## Examples\n\n```rescript\nlet arr = Belt.Array.makeBy(5, (i) => i)\n\nBelt.Array.fill(arr, ~offset=2, ~len=2, 9)\n\narr == [0, 1, 9, 9, 4]\n\nBelt.Array.fill(arr, ~offset=7, ~len=2, 8)\n\narr == [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)` copies `len` elements\nfrom array `v1`;starting at element number `o1`;to array `v2`, starting at element\nnumber `o2`. It works correctly even if `v1` and `v2` are the same array and the\nsource 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\nFor 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## Examples\n\n```rescript\nlet v1 = [10, 11, 12, 13, 14, 15, 16, 17]\nlet v2 = [20, 21, 22, 23, 24, 25, 26, 27]\n\nBelt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v2, ~dstOffset=2, ~len=3)\nv2 == [20, 21, 14, 15, 16, 25, 26, 27]\n\nBelt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v1, ~dstOffset=2, ~len=3)\nv1 == [10, 11, 14, 15, 16, 15, 16, 17]\n```" + ], + "signature": "let blit: (\n ~src: t<'a>,\n ~srcOffset: int,\n ~dst: t<'a>,\n ~dstOffset: int,\n ~len: int,\n) => unit" + }, + { + "id": "Belt.Array.blitUnsafe", + "kind": "value", + "name": "blitUnsafe", + "docstrings": [ + "Unsafe blit without bounds checking." + ], + "signature": "let blitUnsafe: (\n ~src: t<'a>,\n ~srcOffset: int,\n ~dst: t<'a>,\n ~dstOffset: int,\n ~len: int,\n) => 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\nCall `f` on each element of `xs` from the beginning to end. `f` returns `unit`\nso no new array is created. Use `forEach` when you are primarily concerned with\nrepetitively creating side effects.\n\n## Examples\n\n```rescript\nBelt.Array.forEach([\"a\", \"b\", \"c\"], x => Js.log(\"Item: \" ++ x))\n\n/*\n prints:\n Item: a\n Item: b\n Item: c\n*/\nlet total = ref(0)\n\nBelt.Array.forEach([1, 2, 3, 4], x => total := total.contents + x)\n\ntotal.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)` returns a new array by calling `f` for each element of `xs` from\nthe beginning to end.\n\n## Examples\n\n```rescript\nBelt.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)` returns a new array by calling `f` for each element of `xs` from\nthe beginning to end, concatenating the results.\n\n## Examples\n\n```rescript\nBelt.Array.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)` returns `Some(value)` for the first value in `xs` that satisifies\nthe predicate function `p`; returns `None` if no element satisifies the function.\n\n## Examples\n\n```rescript\nBelt.Array.getBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(4)\nBelt.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\nsatisifies the predicate function `p`; returns `None` if no element satisifies\nthe function.\n\n## Examples\n\n```rescript\nBelt.Array.getIndexBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(1)\nBelt.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)` returns a new array that keep all elements satisfy `p`.\n\n## Examples\n\n```rescript\nBelt.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)` returns a new array that keep all elements that return a non\nNone applied `p`.\n\n## Examples\n\n```rescript\nBelt.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)` same as `Belt.Array.forEach`, except that `f` is\nsupplied two arguments: the index starting from 0 and the element from `xs`.\n\n## Examples\n\n```rescript\nBelt.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*/\nlet total = ref(0)\n\nBelt.Array.forEachWithIndex([10, 11, 12, 13], (i, x) => total := total.contents + x + i)\n\ntotal.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)` applies `f` to each element of `xs`. Function `f` takes\ntwo arguments: the index starting from 0 and the element from `xs`.\n\n## Examples\n\n```rescript\nBelt.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`;\nfirst of tuple where predicate cause true, second where predicate cause false\n\n## Examples\n\n```rescript\nBelt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) == 0) == ([2, 4], [1, 3, 5])\n\nBelt.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)` applies `f` to each element of `xs` from beginning to end.\nFunction `f` has two parameters: the item from the list and an “accumulator”;\nwhich starts with a value of `init`. `reduce` returns the final value of the\naccumulator.\n\n## Examples\n\n```rescript\nBelt.Array.reduce([2, 3, 4], 1, (a, b) => a + b) == 10\n\nBelt.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)` works like `Belt.Array.reduce` except that\nfunction `f` is applied to each item of `xs` from the last back to the first.\n\n## Examples\n\n```rescript\nBelt.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)` reduces two arrays xs and ys;taking items\nstarting at `min(length(xs), length(ys))` down to and including zero.\n\n## Examples\n\n```rescript\nBelt.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\nthree parameters: the item from the array and an “accumulator”, which starts \nwith a value of `init` and the index of each element. `reduceWithIndex` returns\nthe final value of the accumulator.\n\n## Examples\n\n```rescript\nBelt.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\nConcatenates all the elements of `xs` converted to string with `toString`, each\nseparated by `sep`, the string given as the second argument, into a single string.\nIf the array has only one element, then that element will be returned without \nusing the separator. If the array is empty, the empty string will be returned.\n\n## Examples\n\n```rescript\nBelt.Array.joinWith([0, 1], \", \", Js.Int.toString) == \"0, 1\"\nBelt.Array.joinWith([], \" \", Js.Int.toString) == \"\"\nBelt.Array.joinWith([1], \" \", Js.Int.toString) == \"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)` returns true if at least one of the elements in `xs` satifies `p`;\nwhere `p` is a predicate: a function taking an element and returning a `bool`.\n\n## Examples\n\n```rescript\nBelt.Array.some([2, 3, 4], (x) => mod(x, 2) == 1) == true\n\nBelt.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)` returns `true` if all elements satisfy `p`; where `p` is a\npredicate: a function taking an element and returning a `bool`.\n\n## Examples\n\n```rescript\nBelt.Array.every([1, 3, 5], (x) => mod(x, 2) == 1) == true\n\nBelt.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)` returns true if `p(xi, yi)` is true for all pairs of\nelements up to the shorter length (i.e. `min(length(xs), length(ys))`)\n\n## Examples\n\n```rescript\nBelt.Array.every2([1, 2, 3], [0, 1], (a, b) => a > b) == true\n\nBelt.Array.every2([], [1], (x, y) => x > y) == true\n\nBelt.Array.every2([2, 3], [1], (x, y) => x > y) == true\n\nBelt.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)` returns true if `p(xi, yi)` is true for any pair of elements\nup to the shorter length (i.e. `min(length(xs), length(ys))`)\n\n## Examples\n\n```rescript\nBelt.Array.some2([0, 2], [1, 0, 3], (a, b) => a > b) == true\n\nBelt.Array.some2([], [1], (x, y) => x > y) == false\n\nBelt.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)` compared by length if `length(xs) != length(ys)`; returning `-1`\nif `length(xs) < length(ys)` or 1 if `length(xs) > length(ys)`. Otherwise\ncompare one by one `f(x, y)`. `f` returns a negative number if `x` is “less than” `y`\nzero if `x` is “equal to” `y` a positive number if `x` is “greater than”\n`y`. The comparison returns the first non-zero result of `f`; or zero if `f`\nreturns zero for all `x` and `y`.\n\n## Examples\n\n```rescript\nBelt.Array.cmp([1, 3, 5], [1, 4, 2], (a, b) => compare(a, b)) == -1\n\nBelt.Array.cmp([1, 3, 5], [1, 2, 3], (a, b) => compare(a, b)) == 1\n\nBelt.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)` return `false` if length is not the same otherwise compare items\none by one using `f(xi, yi)`; and return true if all results are true false otherwise\n\n## Examples\n\n```rescript\nBelt.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`. If `n`\nis greater than the length of `xs`; the extra elements are set to `Js.Null_undefined.null`.\nIf `n` is less than zero; raises a `RangeError`.\n\n## Examples\n\n```rescript\nlet arr = [\"ant\", \"bee\", \"cat\", \"dog\", \"elk\"]\n\nBelt.Array.truncateToLengthUnsafe(arr, 3)\n\narr == [\"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", + "[`Belt.Id`]()\n\nProvide utiliites to create identified comparators or hashes for\ndata structures used below.\n\nIt create a unique identifer per module of functions so that different data structures with slightly different\ncomparison functions won't mix." + ], + "items": [ + { + "id": "Belt.Id.hash", + "kind": "type", + "name": "hash", + "docstrings": [ + "`('a, 'id) hash`\n\nIts runtime represenation is a `hash` function, but signed with a\ntype 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\nIts runtime represenation is an `eq` function, but signed with a\ntype 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\nIts runtime representation is a `cmp` function, but signed with a\ntype 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\nUnlike normal functions, when created, it comes with a unique identity (guaranteed\nby the type system).\n\nIt can be created using function [`comparableU`]() or [`comparable`]().\n\nThe idea of a unique identity when created is that it makes sure two sets would type\nmismatch if they use different comparison function" + ], + "signature": "type comparable<'key, 'id> = module(Comparable\n with type identity = 'id\n with type t = 'key)" + }, + { + "id": "Belt.Id.comparableU", + "kind": "value", + "name": "comparableU", + "docstrings": [], + "signature": "let comparableU: (\n ~cmp: ('a, 'a) => int,\n) => module(Comparable with type t = 'a)" + }, + { + "id": "Belt.Id.comparable", + "kind": "value", + "name": "comparable", + "docstrings": [ + "## Examples\n\n```rescript\nmodule C = (\n val Belt.Id.comparable ~cmp:(compare : int -> int -> int)\n)\nlet m = Belt.Set.make(module C)\n```\nNote that the name of C can not be ignored" + ], + "signature": "let comparable: (\n ~cmp: ('a, 'a) => int,\n) => 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\nUnlike normal functions, when created, it comes with a unique identity (guaranteed\nby the type system).\n\nIt can be created using function [`hashableU`]() or [`hashable`]().\n\nThe idea of a unique identity when created is that it makes sure two hash sets would type\nmismatch if they use different comparison function" + ], + "signature": "type hashable<'key, 'id> = module(Hashable\n with type identity = 'id\n with type t = 'key)" + }, + { + "id": "Belt.Id.hashableU", + "kind": "value", + "name": "hashableU", + "docstrings": [], + "signature": "let hashableU: (\n ~hash: 'a => int,\n ~eq: ('a, 'a) => bool,\n) => module(Hashable with type t = 'a)" + }, + { + "id": "Belt.Id.hashable", + "kind": "value", + "name": "hashable", + "docstrings": [], + "signature": "let hashable: (\n ~hash: 'a => int,\n ~eq: ('a, 'a) => bool,\n) => 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/api/v12.0.0/core.json b/data/api/v12.0.0/core.json new file mode 100644 index 000000000..ab511e0aa --- /dev/null +++ b/data/api/v12.0.0/core.json @@ -0,0 +1,9950 @@ +{ + "core": { + "id": "Core", + "name": "Core", + "docstrings": [], + "items": [ + { + "id": "Core.timeoutId", + "kind": "type", + "name": "timeoutId", + "docstrings": [ + "An `id` representing a timeout started via `setTimeout`.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN." + ], + "signature": "type timeoutId = Js.Global.timeoutId" + }, + { + "id": "Core.setTimeout", + "kind": "value", + "name": "setTimeout", + "docstrings": [ + "`setTimeout(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n```rescript\n// Log to the console after 2 seconds (2000 milliseconds).\nlet timeoutId = setTimeout(() => {\n Console.log(\"This prints in 2 seconds.\")\n}, 2000)\n```" + ], + "signature": "let setTimeout: (unit => unit, int) => timeoutId" + }, + { + "id": "Core.setTimeoutFloat", + "kind": "value", + "name": "setTimeoutFloat", + "docstrings": [ + "`setTimeoutFloat(callback, durationInMilliseconds)` starts a timer that will execute `callback` after `durationInMilliseconds`.\n\nThe same as `setTimeout`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/setTimeout) on MDN.\n\n## Examples\n```rescript\n// Log to the console after 2 seconds (2000 milliseconds).\nlet timeoutId = setTimeoutFloat(() => {\n Console.log(\"This prints in 2 seconds.\")\n}, 2000.)\n```" + ], + "signature": "let setTimeoutFloat: (unit => unit, float) => timeoutId" + }, + { + "id": "Core.clearTimeout", + "kind": "value", + "name": "clearTimeout", + "docstrings": [ + "`clearTimeout(timeoutId)` clears a scheduled timeout if it hasn't already executed.\n\nSee [`clearTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/clearTimeout) on MDN.\n\n## Examples\n```rescript\nlet timeoutId = setTimeout(() => {\n Console.log(\"This prints in 2 seconds.\")\n}, 2000)\n\n// Clearing the timeout right away, before 2 seconds has passed, means that the above callback logging to the console will never run.\nclearTimeout(timeoutId)\n```" + ], + "signature": "let clearTimeout: timeoutId => unit" + }, + { + "id": "Core.intervalId", + "kind": "type", + "name": "intervalId", + "docstrings": [ + "An `id` representing an interval started via `setInterval`.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN." + ], + "signature": "type intervalId = Js.Global.intervalId" + }, + { + "id": "Core.setInterval", + "kind": "value", + "name": "setInterval", + "docstrings": [ + "`setInterval(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n```rescript\n// Log to the console ever 2 seconds (2000 milliseconds).\nlet intervalId = setInterval(() => {\n Console.log(\"This prints every 2 seconds.\")\n}, 2000)\n```" + ], + "signature": "let setInterval: (unit => unit, int) => intervalId" + }, + { + "id": "Core.setIntervalFloat", + "kind": "value", + "name": "setIntervalFloat", + "docstrings": [ + "`setIntervalFloat(callback, intervalInMilliseconds)` starts an interval that will execute `callback` every `durationInMilliseconds` milliseconds.\n\nThe same as `setInterval`, but allows you to pass a `float` instead of an `int` for the duration.\n\nSee [`setInterval`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) on MDN.\n\n## Examples\n```rescript\n// Log to the console ever 2 seconds (2000 milliseconds).\nlet intervalId = setIntervalFloat(() => {\n Console.log(\"This prints every 2 seconds.\")\n}, 2000.)\n```" + ], + "signature": "let setIntervalFloat: (unit => unit, float) => intervalId" + }, + { + "id": "Core.clearInterval", + "kind": "value", + "name": "clearInterval", + "docstrings": [ + "`clearInterval(intervalId)` clears a scheduled interval.\n\nSee [`clearInterval`](https://developer.mozilla.org/en-US/docs/Web/API/clearInterval) on MDN.\n\n## Examples\n```rescript\nlet intervalId = setInterval(() => {\n Console.log(\"This prints in 2 seconds.\")\n}, 2000)\n\n// Stop the interval after 10 seconds\nlet timeoutId = setTimeout(() => {\n clearInterval(intervalId)\n}, 10000)\n```" + ], + "signature": "let clearInterval: intervalId => unit" + }, + { + "id": "Core.encodeURI", + "kind": "value", + "name": "encodeURI", + "docstrings": [ + "Encodes a URI by replacing characters in the provided string that aren't valid in a URL.\n\nThis is intended to operate on full URIs, so it encodes fewer characters than what `encodeURIComponent` does.\nIf you're looking to encode just parts of a URI, like a query parameter, prefer `encodeURIComponent`.\n\nSee [`encodeURI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI) on MDN.\n\n## Examples\n```rescript\nConsole.log(encodeURI(\"https://rescript-lang.org/?array=[someValue]\"))\n// Logs \"https://rescript-lang.org/?array=%5BsomeValue%5D\" to the console.\n```" + ], + "signature": "let encodeURI: string => string" + }, + { + "id": "Core.decodeURI", + "kind": "value", + "name": "decodeURI", + "docstrings": [ + "Decodes a previously encoded URI back to a regular string.\n\nThis is intended to operate on full URIs, so it decodes fewer characters than what `decodeURIComponent` does.\nIf you're looking to decode just parts of a URI, like a query parameter, prefer `decodeURIComponent`.\n\nSee [`decodeURI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI) on MDN.\n\n## Examples\n```rescript\nConsole.log(decodeURI(\"https://rescript-lang.org/?array=%5BsomeValue%5D\"))\n// Logs \"https://rescript-lang.org/?array=[someValue]\" to the console.\n```" + ], + "signature": "let decodeURI: string => string" + }, + { + "id": "Core.encodeURIComponent", + "kind": "value", + "name": "encodeURIComponent", + "docstrings": [ + "Encodes a string so it can be used as part of a URI.\n\nSee [`encodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) on MDN.\n\n## Examples\n```rescript\nConsole.log(encodeURIComponent(\"array=[someValue]\"))\n// Logs \"array%3D%5BsomeValue%5D\" to the console.\n```" + ], + "signature": "let encodeURIComponent: string => string" + }, + { + "id": "Core.decodeURIComponent", + "kind": "value", + "name": "decodeURIComponent", + "docstrings": [ + "Decodes a previously URI encoded string back to its original form.\n\nSee [`decodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) on MDN.\n\n## Examples\n```rescript\nConsole.log(decodeURIComponent(\"array%3D%5BsomeValue%5D\"))\n// Logs \"array=[someValue]\" to the console.\n```" + ], + "signature": "let decodeURIComponent: string => string" + }, + { + "id": "Core.window", + "kind": "value", + "name": "window", + "docstrings": [], + "signature": "let window: Dom.window" + }, + { + "id": "Core.document", + "kind": "value", + "name": "document", + "docstrings": [], + "signature": "let document: Dom.document" + }, + { + "id": "Core.globalThis", + "kind": "value", + "name": "globalThis", + "docstrings": [], + "signature": "let globalThis: {..}" + }, + { + "id": "Core.null", + "kind": "value", + "name": "null", + "docstrings": [], + "signature": "let null: Core__Nullable.t<'a>" + }, + { + "id": "Core.undefined", + "kind": "value", + "name": "undefined", + "docstrings": [], + "signature": "let undefined: Core__Nullable.t<'a>" + }, + { + "id": "Core.typeof", + "kind": "value", + "name": "typeof", + "docstrings": [], + "signature": "let typeof: 'a => Core__Type.t" + }, + { + "id": "Core.import", + "kind": "value", + "name": "import", + "docstrings": [ + "`import(value)` dynamically import a value or function from a ReScript\nmodule. The import call will return a `promise`, resolving to the dynamically loaded\nvalue.\n\n## Examples\n\n`Core__Array.res` file:\n\n```rescript\n@send external indexOf: (array<'a>, 'a) => int = \"indexOf\"\n\nlet indexOfOpt = (arr, item) =>\n switch arr->indexOf(item) {\n | -1 => None\n | index => Some(index)\n }\n```\nIn other file you can import the `indexOfOpt` value defined in `Core__Array.res`\n\n```rescript\nlet main = async () => {\n let indexOfOpt = await import(Core__Array.indexOfOpt)\n let index = indexOfOpt([1, 2], 2)\n Console.log(index)\n}\n```\n\nCompiles to:\n\n```javascript\nasync function main() {\n var add = await import(\"./Core__Array.mjs\").then(function(m) {\n return m.indexOfOpt;\n });\n var index = indexOfOpt([1, 2], 2);\n console.log(index);\n}\n```" + ], + "signature": "let import: 'a => promise<'a>" + }, + { + "id": "Core.null", + "kind": "type", + "name": "null", + "docstrings": [], + "signature": "type null<'a> = Js.null<'a>" + }, + { + "id": "Core.undefined", + "kind": "type", + "name": "undefined", + "docstrings": [], + "signature": "type undefined<'a> = Js.undefined<'a>" + }, + { + "id": "Core.nullable", + "kind": "type", + "name": "nullable", + "docstrings": [], + "signature": "type nullable<'a> = Js.nullable<'a>" + }, + { + "id": "Core.panic", + "kind": "value", + "name": "panic", + "docstrings": [], + "signature": "let panic: string => 'a" + } + ] + }, + "core/intl/numberformat/grouping": { + "id": "Core.Intl.NumberFormat.Grouping", + "name": "Grouping", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.NumberFormat.Grouping.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.NumberFormat.Grouping.parsed", + "kind": "type", + "name": "parsed", + "docstrings": [], + "signature": "type parsed = [#always | #auto | #bool(bool) | #min2]" + }, + { + "id": "Core.Intl.NumberFormat.Grouping.fromBool", + "kind": "value", + "name": "fromBool", + "docstrings": [], + "signature": "let fromBool: bool => t" + }, + { + "id": "Core.Intl.NumberFormat.Grouping.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [], + "signature": "let fromString: [#always | #auto | #min2] => t" + }, + { + "id": "Core.Intl.NumberFormat.Grouping.parseJsValue", + "kind": "value", + "name": "parseJsValue", + "docstrings": [], + "signature": "let parseJsValue: 'a => option<[> #always | #auto | #bool(bool) | #min2]>" + } + ] + }, + "core/intl/segments": { + "id": "Core.Intl.Segments", + "name": "Segments", + "docstrings": [ + "A Segments instance is an object that represents the segments of a specific string, subject to the locale and options of its constructing Intl.Segmenter instance.\nhttps://tc39.es/ecma402/#sec-segments-objects" + ], + "items": [ + { + "id": "Core.Intl.Segments.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.Segments.segmentData", + "kind": "type", + "name": "segmentData", + "docstrings": [], + "signature": "type segmentData = {\n segment: string,\n index: int,\n isWordLike: option,\n input: string,\n}" + }, + { + "id": "Core.Intl.Segments.containing", + "kind": "value", + "name": "containing", + "docstrings": [], + "signature": "let containing: t => segmentData" + }, + { + "id": "Core.Intl.Segments.containingWithIndex", + "kind": "value", + "name": "containingWithIndex", + "docstrings": [], + "signature": "let containingWithIndex: (t, int) => segmentData" + } + ] + }, + "core/intl/segmenter": { + "id": "Core.Intl.Segmenter", + "name": "Segmenter", + "docstrings": [ + "Not supported in Firefox" + ], + "items": [ + { + "id": "Core.Intl.Segmenter.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.Segmenter.granularity", + "kind": "type", + "name": "granularity", + "docstrings": [], + "signature": "type granularity = [#grapheme | #sentence | #word]" + }, + { + "id": "Core.Intl.Segmenter.options", + "kind": "type", + "name": "options", + "docstrings": [], + "signature": "type options = {\n localeMatcher?: Core__Intl__Common.localeMatcher,\n granularity?: granularity,\n}" + }, + { + "id": "Core.Intl.Segmenter.pluralCategories", + "kind": "type", + "name": "pluralCategories", + "docstrings": [], + "signature": "type pluralCategories = [\n | #few\n | #many\n | #one\n | #other\n | #two\n | #zero\n]" + }, + { + "id": "Core.Intl.Segmenter.resolvedOptions", + "kind": "type", + "name": "resolvedOptions", + "docstrings": [], + "signature": "type resolvedOptions = {\n locale: string,\n granularity: granularity,\n}" + }, + { + "id": "Core.Intl.Segmenter.supportedLocalesOptions", + "kind": "type", + "name": "supportedLocalesOptions", + "docstrings": [], + "signature": "type supportedLocalesOptions = {\n localeMatcher: Core__Intl__Common.localeMatcher,\n}" + }, + { + "id": "Core.Intl.Segmenter.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~locales: array=?, ~options: options=?) => t" + }, + { + "id": "Core.Intl.Segmenter.supportedLocalesOf", + "kind": "value", + "name": "supportedLocalesOf", + "docstrings": [], + "signature": "let supportedLocalesOf: (array, ~options: supportedLocalesOptions=?) => t" + }, + { + "id": "Core.Intl.Segmenter.resolvedOptions", + "kind": "value", + "name": "resolvedOptions", + "docstrings": [], + "signature": "let resolvedOptions: t => resolvedOptions" + }, + { + "id": "Core.Intl.Segmenter.segment", + "kind": "value", + "name": "segment", + "docstrings": [], + "signature": "let segment: (t, string) => Core__Intl__Segments.t" + } + ] + }, + "core/intl/relativetimeformat": { + "id": "Core.Intl.RelativeTimeFormat", + "name": "RelativeTimeFormat", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.RelativeTimeFormat.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.RelativeTimeFormat.numeric", + "kind": "type", + "name": "numeric", + "docstrings": [], + "signature": "type numeric = [#always | #auto]" + }, + { + "id": "Core.Intl.RelativeTimeFormat.style", + "kind": "type", + "name": "style", + "docstrings": [], + "signature": "type style = [#long | #narrow | #short]" + }, + { + "id": "Core.Intl.RelativeTimeFormat.timeUnit", + "kind": "type", + "name": "timeUnit", + "docstrings": [], + "signature": "type timeUnit = [\n | #day\n | #hour\n | #minute\n | #month\n | #quarter\n | #second\n | #week\n | #year\n]" + }, + { + "id": "Core.Intl.RelativeTimeFormat.options", + "kind": "type", + "name": "options", + "docstrings": [], + "signature": "type options = {\n localeMatcher?: Core__Intl__Common.localeMatcher,\n numeric?: numeric,\n style?: style,\n}" + }, + { + "id": "Core.Intl.RelativeTimeFormat.supportedLocalesOptions", + "kind": "type", + "name": "supportedLocalesOptions", + "docstrings": [], + "signature": "type supportedLocalesOptions = {\n localeMatcher: Core__Intl__Common.localeMatcher,\n}" + }, + { + "id": "Core.Intl.RelativeTimeFormat.resolvedOptions", + "kind": "type", + "name": "resolvedOptions", + "docstrings": [], + "signature": "type resolvedOptions = {\n locale: string,\n numeric: numeric,\n style: style,\n numberingSystem: string,\n}" + }, + { + "id": "Core.Intl.RelativeTimeFormat.relativeTimePartComponent", + "kind": "type", + "name": "relativeTimePartComponent", + "docstrings": [], + "signature": "type relativeTimePartComponent = [#integer | #literal]" + }, + { + "id": "Core.Intl.RelativeTimeFormat.relativeTimePart", + "kind": "type", + "name": "relativeTimePart", + "docstrings": [], + "signature": "type relativeTimePart = {\n \\\"type\": relativeTimePartComponent,\n value: string,\n unit?: timeUnit,\n}" + }, + { + "id": "Core.Intl.RelativeTimeFormat.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~locales: array=?, ~options: options=?) => t" + }, + { + "id": "Core.Intl.RelativeTimeFormat.supportedLocalesOf", + "kind": "value", + "name": "supportedLocalesOf", + "docstrings": [], + "signature": "let supportedLocalesOf: (array, ~options: supportedLocalesOptions=?) => t" + }, + { + "id": "Core.Intl.RelativeTimeFormat.resolvedOptions", + "kind": "value", + "name": "resolvedOptions", + "docstrings": [], + "signature": "let resolvedOptions: t => resolvedOptions" + }, + { + "id": "Core.Intl.RelativeTimeFormat.format", + "kind": "value", + "name": "format", + "docstrings": [], + "signature": "let format: (t, int, timeUnit) => string" + }, + { + "id": "Core.Intl.RelativeTimeFormat.formatToParts", + "kind": "value", + "name": "formatToParts", + "docstrings": [], + "signature": "let formatToParts: (t, int, timeUnit) => array" + } + ] + }, + "core/intl/pluralrules": { + "id": "Core.Intl.PluralRules", + "name": "PluralRules", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.PluralRules.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.PluralRules.localeType", + "kind": "type", + "name": "localeType", + "docstrings": [], + "signature": "type localeType = [#cardinal | #ordinal]" + }, + { + "id": "Core.Intl.PluralRules.options", + "kind": "type", + "name": "options", + "docstrings": [], + "signature": "type options = {\n localeMatcher?: Core__Intl__Common.localeMatcher,\n \\\"type\"?: localeType,\n minimumIntegerDigits?: Core__Intl__Common.oneTo21,\n minimumFractionDigits?: Core__Intl__Common.zeroTo20,\n maximumFractionDigits?: Core__Intl__Common.zeroTo20,\n minimumSignificantDigits?: Core__Intl__Common.oneTo21,\n maximumSignificantDigits?: Core__Intl__Common.oneTo21,\n}" + }, + { + "id": "Core.Intl.PluralRules.pluralCategories", + "kind": "type", + "name": "pluralCategories", + "docstrings": [], + "signature": "type pluralCategories = [\n | #few\n | #many\n | #one\n | #other\n | #two\n | #zero\n]" + }, + { + "id": "Core.Intl.PluralRules.resolvedOptions", + "kind": "type", + "name": "resolvedOptions", + "docstrings": [], + "signature": "type resolvedOptions = {\n locale: string,\n pluralCategories: array,\n \\\"type\": localeType,\n minimumIntegerDigits?: Core__Intl__Common.oneTo21,\n minimumFractionDigits?: Core__Intl__Common.zeroTo20,\n maximumFractionDigits?: Core__Intl__Common.zeroTo20,\n minimumSignificantDigits?: Core__Intl__Common.oneTo21,\n maximumSignificantDigits?: Core__Intl__Common.oneTo21,\n}" + }, + { + "id": "Core.Intl.PluralRules.supportedLocalesOptions", + "kind": "type", + "name": "supportedLocalesOptions", + "docstrings": [], + "signature": "type supportedLocalesOptions = {\n localeMatcher: Core__Intl__Common.localeMatcher,\n}" + }, + { + "id": "Core.Intl.PluralRules.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~locales: array=?, ~options: options=?) => t" + }, + { + "id": "Core.Intl.PluralRules.supportedLocalesOf", + "kind": "value", + "name": "supportedLocalesOf", + "docstrings": [], + "signature": "let supportedLocalesOf: (array, ~options: supportedLocalesOptions=?) => t" + }, + { + "id": "Core.Intl.PluralRules.resolvedOptions", + "kind": "value", + "name": "resolvedOptions", + "docstrings": [], + "signature": "let resolvedOptions: t => resolvedOptions" + }, + { + "id": "Core.Intl.PluralRules.rule", + "kind": "type", + "name": "rule", + "docstrings": [], + "signature": "type rule = [#few | #many | #one | #other | #two | #zero]" + }, + { + "id": "Core.Intl.PluralRules.select", + "kind": "value", + "name": "select", + "docstrings": [], + "signature": "let select: (t, float) => rule" + }, + { + "id": "Core.Intl.PluralRules.selectInt", + "kind": "value", + "name": "selectInt", + "docstrings": [], + "signature": "let selectInt: (t, int) => rule" + }, + { + "id": "Core.Intl.PluralRules.selectBigInt", + "kind": "value", + "name": "selectBigInt", + "docstrings": [], + "signature": "let selectBigInt: (t, bigint) => rule" + }, + { + "id": "Core.Intl.PluralRules.selectRange", + "kind": "value", + "name": "selectRange", + "docstrings": [], + "signature": "let selectRange: (t, ~start: float, ~end: float) => rule" + }, + { + "id": "Core.Intl.PluralRules.selectRangeInt", + "kind": "value", + "name": "selectRangeInt", + "docstrings": [], + "signature": "let selectRangeInt: (t, ~start: int, ~end: int) => rule" + }, + { + "id": "Core.Intl.PluralRules.selectRangeBigInt", + "kind": "value", + "name": "selectRangeBigInt", + "docstrings": [], + "signature": "let selectRangeBigInt: (t, ~start: bigint, ~end: bigint) => rule" + } + ] + }, + "core/intl/numberformat": { + "id": "Core.Intl.NumberFormat", + "name": "NumberFormat", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.NumberFormat.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.NumberFormat.currency", + "kind": "type", + "name": "currency", + "docstrings": [ + "An ISO 4217 currency code. e.g. USD, EUR, CNY" + ], + "signature": "type currency = string" + }, + { + "id": "Core.Intl.NumberFormat.currencyDisplay", + "kind": "type", + "name": "currencyDisplay", + "docstrings": [], + "signature": "type currencyDisplay = [\n | #code\n | #name\n | #narrowSymbol\n | #symbol\n]" + }, + { + "id": "Core.Intl.NumberFormat.currencySign", + "kind": "type", + "name": "currencySign", + "docstrings": [], + "signature": "type currencySign = [#accounting | #standard]" + }, + { + "id": "Core.Intl.NumberFormat.notation", + "kind": "type", + "name": "notation", + "docstrings": [], + "signature": "type notation = [\n | #compact\n | #engineering\n | #scientific\n | #standard\n]" + }, + { + "id": "Core.Intl.NumberFormat.compactDisplay", + "kind": "type", + "name": "compactDisplay", + "docstrings": [ + "Used only when notation is #compact" + ], + "signature": "type compactDisplay = [#long | #short]" + }, + { + "id": "Core.Intl.NumberFormat.signDisplay", + "kind": "type", + "name": "signDisplay", + "docstrings": [], + "signature": "type signDisplay = [\n | #always\n | #auto\n | #exceptZero\n | #negative\n | #never\n]" + }, + { + "id": "Core.Intl.NumberFormat.style", + "kind": "type", + "name": "style", + "docstrings": [], + "signature": "type style = [#currency | #decimal | #percent | #unit]" + }, + { + "id": "Core.Intl.NumberFormat.unitSystem", + "kind": "type", + "name": "unitSystem", + "docstrings": [ + "Defined in https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-issanctionedsimpleunitidentifier\nOnly used when style is #unit" + ], + "signature": "type unitSystem = string" + }, + { + "id": "Core.Intl.NumberFormat.unitDisplay", + "kind": "type", + "name": "unitDisplay", + "docstrings": [ + "Only used when style is #unit" + ], + "signature": "type unitDisplay = [#long | #narrow | #short]" + }, + { + "id": "Core.Intl.NumberFormat.rounding", + "kind": "type", + "name": "rounding", + "docstrings": [], + "signature": "type rounding = [\n | #ceil\n | #expand\n | #floor\n | #halfCeil\n | #halfEven\n | #halfExpand\n | #halfFloor\n | #halfTrunc\n | #trunc\n]" + }, + { + "id": "Core.Intl.NumberFormat.roundingPriority", + "kind": "type", + "name": "roundingPriority", + "docstrings": [], + "signature": "type roundingPriority = [\n | #auto\n | #lessPrecision\n | #morePrecision\n]" + }, + { + "id": "Core.Intl.NumberFormat.roundingIncrement", + "kind": "type", + "name": "roundingIncrement", + "docstrings": [], + "signature": "type roundingIncrement = [\n | #1\n | #10\n | #100\n | #1000\n | #2\n | #20\n | #200\n | #2000\n | #25\n | #250\n | #2500\n | #5\n | #50\n | #500\n | #5000\n]" + }, + { + "id": "Core.Intl.NumberFormat.trailingZeroDisplay", + "kind": "type", + "name": "trailingZeroDisplay", + "docstrings": [], + "signature": "type trailingZeroDisplay = [\n | #auto\n | #lessPrecision\n | #stripIfInteger\n]" + }, + { + "id": "Core.Intl.NumberFormat.options", + "kind": "type", + "name": "options", + "docstrings": [], + "signature": "type options = {\n compactDisplay?: compactDisplay,\n numberingSystem?: Core__Intl__Common.numberingSystem,\n currency?: currency,\n currencyDisplay?: currencyDisplay,\n currencySign?: currencySign,\n localeMatcher?: Core__Intl__Common.localeMatcher,\n notation?: notation,\n signDisplay?: signDisplay,\n style?: style,\n unit?: unitSystem,\n unitDisplay?: unitDisplay,\n useGrouping?: Grouping.t,\n roundingMode?: rounding,\n roundingPriority?: roundingPriority,\n roundingIncrement?: roundingIncrement,\n trailingZeroDisplay?: trailingZeroDisplay,\n minimumIntegerDigits?: Core__Intl__Common.oneTo21,\n minimumFractionDigits?: Core__Intl__Common.zeroTo20,\n maximumFractionDigits?: Core__Intl__Common.zeroTo20,\n minimumSignificantDigits?: Core__Intl__Common.oneTo21,\n maximumSignificantDigits?: Core__Intl__Common.oneTo21,\n}" + }, + { + "id": "Core.Intl.NumberFormat.resolvedOptions", + "kind": "type", + "name": "resolvedOptions", + "docstrings": [], + "signature": "type resolvedOptions = {\n currency?: currency,\n currencyDisplay?: currencyDisplay,\n currencySign?: currencySign,\n compactDisplay?: compactDisplay,\n unit: unitSystem,\n unitDisplay: unitDisplay,\n roundingMode?: rounding,\n roundingPriority?: roundingPriority,\n roundingIncrement?: roundingIncrement,\n minimumIntegerDigits?: Core__Intl__Common.oneTo21,\n minimumFractionDigits?: Core__Intl__Common.zeroTo20,\n maximumFractionDigits?: Core__Intl__Common.zeroTo20,\n minimumSignificantDigits?: Core__Intl__Common.oneTo21,\n maximumSignificantDigits?: Core__Intl__Common.oneTo21,\n locale: string,\n notation: notation,\n numberingSystem: Core__Intl__Common.numberingSystem,\n signDisplay: signDisplay,\n style: style,\n useGrouping: Grouping.t,\n}" + }, + { + "id": "Core.Intl.NumberFormat.supportedLocalesOptions", + "kind": "type", + "name": "supportedLocalesOptions", + "docstrings": [], + "signature": "type supportedLocalesOptions = {\n localeMatcher: Core__Intl__Common.localeMatcher,\n}" + }, + { + "id": "Core.Intl.NumberFormat.numberFormatPartType", + "kind": "type", + "name": "numberFormatPartType", + "docstrings": [], + "signature": "type numberFormatPartType = [\n | #compact\n | #currency\n | #decimal\n | #exponentInteger\n | #exponentMinusSign\n | #exponentSeparator\n | #fraction\n | #group\n | #infinity\n | #integer\n | #literal\n | #minusSign\n | #nan\n | #percentSign\n | #plusSign\n | #unit\n | #unknown\n]" + }, + { + "id": "Core.Intl.NumberFormat.numberFormatPart", + "kind": "type", + "name": "numberFormatPart", + "docstrings": [], + "signature": "type numberFormatPart = {\n \\\"type\": numberFormatPartType,\n value: string,\n}" + }, + { + "id": "Core.Intl.NumberFormat.rangeSource", + "kind": "type", + "name": "rangeSource", + "docstrings": [], + "signature": "type rangeSource = [#endRange | #shared | #startRange]" + }, + { + "id": "Core.Intl.NumberFormat.numberFormatRangePart", + "kind": "type", + "name": "numberFormatRangePart", + "docstrings": [], + "signature": "type numberFormatRangePart = {\n \\\"type\": numberFormatPartType,\n value: string,\n source: rangeSource,\n}" + }, + { + "id": "Core.Intl.NumberFormat.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~locales: array=?, ~options: options=?) => t" + }, + { + "id": "Core.Intl.NumberFormat.supportedLocalesOf", + "kind": "value", + "name": "supportedLocalesOf", + "docstrings": [], + "signature": "let supportedLocalesOf: (array, ~options: supportedLocalesOptions=?) => t" + }, + { + "id": "Core.Intl.NumberFormat.resolvedOptions", + "kind": "value", + "name": "resolvedOptions", + "docstrings": [], + "signature": "let resolvedOptions: t => resolvedOptions" + }, + { + "id": "Core.Intl.NumberFormat.format", + "kind": "value", + "name": "format", + "docstrings": [], + "signature": "let format: (t, float) => string" + }, + { + "id": "Core.Intl.NumberFormat.formatRange", + "kind": "value", + "name": "formatRange", + "docstrings": [], + "signature": "let formatRange: (t, ~start: float, ~end: float) => array" + }, + { + "id": "Core.Intl.NumberFormat.formatToParts", + "kind": "value", + "name": "formatToParts", + "docstrings": [], + "signature": "let formatToParts: (t, float) => array" + }, + { + "id": "Core.Intl.NumberFormat.formatRangeToParts", + "kind": "value", + "name": "formatRangeToParts", + "docstrings": [], + "signature": "let formatRangeToParts: (\n t,\n ~start: float,\n ~end: float,\n) => array" + }, + { + "id": "Core.Intl.NumberFormat.formatInt", + "kind": "value", + "name": "formatInt", + "docstrings": [], + "signature": "let formatInt: (t, int) => string" + }, + { + "id": "Core.Intl.NumberFormat.formatIntRange", + "kind": "value", + "name": "formatIntRange", + "docstrings": [], + "signature": "let formatIntRange: (t, ~start: int, ~end: int) => array" + }, + { + "id": "Core.Intl.NumberFormat.formatIntToParts", + "kind": "value", + "name": "formatIntToParts", + "docstrings": [], + "signature": "let formatIntToParts: (t, int) => array" + }, + { + "id": "Core.Intl.NumberFormat.formatIntRangeToParts", + "kind": "value", + "name": "formatIntRangeToParts", + "docstrings": [], + "signature": "let formatIntRangeToParts: (t, ~start: int, ~end: int) => array" + }, + { + "id": "Core.Intl.NumberFormat.formatBigInt", + "kind": "value", + "name": "formatBigInt", + "docstrings": [], + "signature": "let formatBigInt: (t, bigint) => string" + }, + { + "id": "Core.Intl.NumberFormat.formatBigIntRange", + "kind": "value", + "name": "formatBigIntRange", + "docstrings": [], + "signature": "let formatBigIntRange: (t, ~start: bigint, ~end: bigint) => array" + }, + { + "id": "Core.Intl.NumberFormat.formatBigIntToParts", + "kind": "value", + "name": "formatBigIntToParts", + "docstrings": [], + "signature": "let formatBigIntToParts: (t, bigint) => array" + }, + { + "id": "Core.Intl.NumberFormat.formatBigIntRangeToParts", + "kind": "value", + "name": "formatBigIntRangeToParts", + "docstrings": [], + "signature": "let formatBigIntRangeToParts: (t, ~start: bigint, ~end: bigint) => array" + }, + { + "id": "Core.Intl.NumberFormat.formatString", + "kind": "value", + "name": "formatString", + "docstrings": [], + "signature": "let formatString: (t, string) => string" + }, + { + "id": "Core.Intl.NumberFormat.formatStringToParts", + "kind": "value", + "name": "formatStringToParts", + "docstrings": [], + "signature": "let formatStringToParts: (t, string) => array" + } + ] + }, + "core/intl/locale": { + "id": "Core.Intl.Locale", + "name": "Locale", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.Locale.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.Locale.options", + "kind": "type", + "name": "options", + "docstrings": [], + "signature": "type options = {\n baseName?: string,\n calendar?: Core__Intl__Common.calendar,\n collation?: Core__Intl__Common.collation,\n hourCycle?: [#h11 | #h12 | #h23 | #h24],\n caseFirst?: [#\"false\" | #lower | #upper],\n numberingSystem?: Core__Intl__Common.numberingSystem,\n numeric?: bool,\n language?: string,\n script?: string,\n region?: string,\n}" + }, + { + "id": "Core.Intl.Locale.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (string, ~options: options=?) => t" + }, + { + "id": "Core.Intl.Locale.baseName", + "kind": "value", + "name": "baseName", + "docstrings": [], + "signature": "let baseName: t => string" + }, + { + "id": "Core.Intl.Locale.calendar", + "kind": "value", + "name": "calendar", + "docstrings": [], + "signature": "let calendar: t => option" + }, + { + "id": "Core.Intl.Locale.caseFirst", + "kind": "value", + "name": "caseFirst", + "docstrings": [], + "signature": "let caseFirst: t => option" + }, + { + "id": "Core.Intl.Locale.collation", + "kind": "value", + "name": "collation", + "docstrings": [], + "signature": "let collation: t => option" + }, + { + "id": "Core.Intl.Locale.hourCycle", + "kind": "value", + "name": "hourCycle", + "docstrings": [], + "signature": "let hourCycle: t => option" + }, + { + "id": "Core.Intl.Locale.language", + "kind": "value", + "name": "language", + "docstrings": [], + "signature": "let language: t => string" + }, + { + "id": "Core.Intl.Locale.numberingSystem", + "kind": "value", + "name": "numberingSystem", + "docstrings": [], + "signature": "let numberingSystem: t => option" + }, + { + "id": "Core.Intl.Locale.numeric", + "kind": "value", + "name": "numeric", + "docstrings": [], + "signature": "let numeric: t => bool" + }, + { + "id": "Core.Intl.Locale.region", + "kind": "value", + "name": "region", + "docstrings": [], + "signature": "let region: t => option" + }, + { + "id": "Core.Intl.Locale.script", + "kind": "value", + "name": "script", + "docstrings": [], + "signature": "let script: t => option" + }, + { + "id": "Core.Intl.Locale.maximize", + "kind": "value", + "name": "maximize", + "docstrings": [], + "signature": "let maximize: t => t" + }, + { + "id": "Core.Intl.Locale.minimize", + "kind": "value", + "name": "minimize", + "docstrings": [], + "signature": "let minimize: t => t" + } + ] + }, + "core/intl/listformat": { + "id": "Core.Intl.ListFormat", + "name": "ListFormat", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.ListFormat.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.ListFormat.listType", + "kind": "type", + "name": "listType", + "docstrings": [], + "signature": "type listType = [#conjunction | #disjunction | #unit]" + }, + { + "id": "Core.Intl.ListFormat.style", + "kind": "type", + "name": "style", + "docstrings": [], + "signature": "type style = [#long | #narrow | #short]" + }, + { + "id": "Core.Intl.ListFormat.options", + "kind": "type", + "name": "options", + "docstrings": [], + "signature": "type options = {\n localeMatcher?: Core__Intl__Common.localeMatcher,\n \\\"type\"?: listType,\n style?: style,\n}" + }, + { + "id": "Core.Intl.ListFormat.listPartComponentType", + "kind": "type", + "name": "listPartComponentType", + "docstrings": [], + "signature": "type listPartComponentType = [#element | #literal]" + }, + { + "id": "Core.Intl.ListFormat.listPart", + "kind": "type", + "name": "listPart", + "docstrings": [], + "signature": "type listPart = {\n \\\"type\": listPartComponentType,\n value: string,\n}" + }, + { + "id": "Core.Intl.ListFormat.resolvedOptions", + "kind": "type", + "name": "resolvedOptions", + "docstrings": [], + "signature": "type resolvedOptions = {\n locale: string,\n style: style,\n \\\"type\": listType,\n}" + }, + { + "id": "Core.Intl.ListFormat.supportedLocalesOptions", + "kind": "type", + "name": "supportedLocalesOptions", + "docstrings": [], + "signature": "type supportedLocalesOptions = {\n localeMatcher: Core__Intl__Common.localeMatcher,\n}" + }, + { + "id": "Core.Intl.ListFormat.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~locales: array=?, ~options: options=?) => t" + }, + { + "id": "Core.Intl.ListFormat.supportedLocalesOf", + "kind": "value", + "name": "supportedLocalesOf", + "docstrings": [], + "signature": "let supportedLocalesOf: (array, ~options: supportedLocalesOptions=?) => t" + }, + { + "id": "Core.Intl.ListFormat.resolvedOptions", + "kind": "value", + "name": "resolvedOptions", + "docstrings": [], + "signature": "let resolvedOptions: t => resolvedOptions" + }, + { + "id": "Core.Intl.ListFormat.format", + "kind": "value", + "name": "format", + "docstrings": [], + "signature": "let format: (t, array) => string" + }, + { + "id": "Core.Intl.ListFormat.formatToParts", + "kind": "value", + "name": "formatToParts", + "docstrings": [], + "signature": "let formatToParts: (t, array) => array" + } + ] + }, + "core/intl/datetimeformat": { + "id": "Core.Intl.DateTimeFormat", + "name": "DateTimeFormat", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.DateTimeFormat.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.DateTimeFormat.dateStyle", + "kind": "type", + "name": "dateStyle", + "docstrings": [], + "signature": "type dateStyle = [#full | #long | #medium | #short]" + }, + { + "id": "Core.Intl.DateTimeFormat.timeStyle", + "kind": "type", + "name": "timeStyle", + "docstrings": [], + "signature": "type timeStyle = [#full | #long | #medium | #short]" + }, + { + "id": "Core.Intl.DateTimeFormat.dayPeriod", + "kind": "type", + "name": "dayPeriod", + "docstrings": [], + "signature": "type dayPeriod = [#long | #narrow | #short]" + }, + { + "id": "Core.Intl.DateTimeFormat.weekday", + "kind": "type", + "name": "weekday", + "docstrings": [], + "signature": "type weekday = [#long | #narrow | #short]" + }, + { + "id": "Core.Intl.DateTimeFormat.era", + "kind": "type", + "name": "era", + "docstrings": [], + "signature": "type era = [#long | #narrow | #short]" + }, + { + "id": "Core.Intl.DateTimeFormat.year", + "kind": "type", + "name": "year", + "docstrings": [], + "signature": "type year = [#\"2-digit\" | #numeric]" + }, + { + "id": "Core.Intl.DateTimeFormat.month", + "kind": "type", + "name": "month", + "docstrings": [], + "signature": "type month = [\n | #\"2-digit\"\n | #long\n | #narrow\n | #numeric\n | #short\n]" + }, + { + "id": "Core.Intl.DateTimeFormat.day", + "kind": "type", + "name": "day", + "docstrings": [], + "signature": "type day = [#\"2-digit\" | #numeric]" + }, + { + "id": "Core.Intl.DateTimeFormat.hour", + "kind": "type", + "name": "hour", + "docstrings": [], + "signature": "type hour = [#\"2-digit\" | #numeric]" + }, + { + "id": "Core.Intl.DateTimeFormat.minute", + "kind": "type", + "name": "minute", + "docstrings": [], + "signature": "type minute = [#\"2-digit\" | #numeric]" + }, + { + "id": "Core.Intl.DateTimeFormat.second", + "kind": "type", + "name": "second", + "docstrings": [], + "signature": "type second = [#\"2-digit\" | #numeric]" + }, + { + "id": "Core.Intl.DateTimeFormat.timeZoneName", + "kind": "type", + "name": "timeZoneName", + "docstrings": [ + "Firefox also supports IANA time zone names here\nNode v19+ supports \"shortOffset\", \"shortGeneric\", \"longOffset\", and \"longGeneric\"." + ], + "signature": "type timeZoneName = [\n | #long\n | #longGeneric\n | #longOffset\n | #short\n | #shortGeneric\n | #shortOffset\n]" + }, + { + "id": "Core.Intl.DateTimeFormat.hourCycle", + "kind": "type", + "name": "hourCycle", + "docstrings": [], + "signature": "type hourCycle = [#h11 | #h12 | #h23 | #h24]" + }, + { + "id": "Core.Intl.DateTimeFormat.formatMatcher", + "kind": "type", + "name": "formatMatcher", + "docstrings": [], + "signature": "type formatMatcher = [#basic | #\"best fit\"]" + }, + { + "id": "Core.Intl.DateTimeFormat.fractionalSecondDigits", + "kind": "type", + "name": "fractionalSecondDigits", + "docstrings": [], + "signature": "type fractionalSecondDigits = [#0 | #1 | #2 | #3]" + }, + { + "id": "Core.Intl.DateTimeFormat.options", + "kind": "type", + "name": "options", + "docstrings": [], + "signature": "type options = {\n dateStyle?: dateStyle,\n timeStyle?: timeStyle,\n calendar?: Core__Intl__Common.calendar,\n dayPeriod?: dayPeriod,\n numberingSystem?: Core__Intl__Common.numberingSystem,\n localeMatcher?: Core__Intl__Common.localeMatcher,\n timeZone?: string,\n hour12?: bool,\n hourCycle?: hourCycle,\n formatMatcher?: formatMatcher,\n weekday?: weekday,\n era?: era,\n year?: year,\n month?: month,\n day?: day,\n hour?: hour,\n minute?: minute,\n second?: second,\n fractionalSecondDigits?: fractionalSecondDigits,\n timeZoneName?: timeZoneName,\n}" + }, + { + "id": "Core.Intl.DateTimeFormat.resolvedOptions", + "kind": "type", + "name": "resolvedOptions", + "docstrings": [], + "signature": "type resolvedOptions = {\n dateStyle?: dateStyle,\n timeStyle?: timeStyle,\n weekday?: weekday,\n era?: era,\n year?: year,\n month?: month,\n day?: day,\n hour?: hour,\n minute?: minute,\n second?: second,\n fractionalSecondDigits?: fractionalSecondDigits,\n timeZoneName?: timeZoneName,\n calendar: Core__Intl__Common.calendar,\n hour12: bool,\n hourCycle: hourCycle,\n locale: string,\n numberingSystem: Core__Intl__Common.numberingSystem,\n timeZone: string,\n}" + }, + { + "id": "Core.Intl.DateTimeFormat.supportedLocalesOptions", + "kind": "type", + "name": "supportedLocalesOptions", + "docstrings": [], + "signature": "type supportedLocalesOptions = {\n localeMatcher: Core__Intl__Common.localeMatcher,\n}" + }, + { + "id": "Core.Intl.DateTimeFormat.dateTimeComponent", + "kind": "type", + "name": "dateTimeComponent", + "docstrings": [], + "signature": "type dateTimeComponent = [\n | #day\n | #dayPeriod\n | #era\n | #fractionalSecond\n | #hour\n | #literal\n | #minute\n | #month\n | #relatedYear\n | #second\n | #timeZone\n | #weekday\n | #year\n | #yearName\n]" + }, + { + "id": "Core.Intl.DateTimeFormat.dateTimePart", + "kind": "type", + "name": "dateTimePart", + "docstrings": [], + "signature": "type dateTimePart = {\n \\\"type\": dateTimeComponent,\n value: string,\n}" + }, + { + "id": "Core.Intl.DateTimeFormat.dateTimeRangeSource", + "kind": "type", + "name": "dateTimeRangeSource", + "docstrings": [], + "signature": "type dateTimeRangeSource = [\n | #endRange\n | #shared\n | #startRange\n]" + }, + { + "id": "Core.Intl.DateTimeFormat.dateTimeRangePart", + "kind": "type", + "name": "dateTimeRangePart", + "docstrings": [], + "signature": "type dateTimeRangePart = {\n \\\"type\": dateTimeComponent,\n value: string,\n source: dateTimeRangeSource,\n}" + }, + { + "id": "Core.Intl.DateTimeFormat.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~locales: array=?, ~options: options=?) => t" + }, + { + "id": "Core.Intl.DateTimeFormat.supportedLocalesOf", + "kind": "value", + "name": "supportedLocalesOf", + "docstrings": [], + "signature": "let supportedLocalesOf: (array, ~options: supportedLocalesOptions=?) => t" + }, + { + "id": "Core.Intl.DateTimeFormat.resolvedOptions", + "kind": "value", + "name": "resolvedOptions", + "docstrings": [], + "signature": "let resolvedOptions: t => resolvedOptions" + }, + { + "id": "Core.Intl.DateTimeFormat.format", + "kind": "value", + "name": "format", + "docstrings": [], + "signature": "let format: (t, Core__Date.t) => string" + }, + { + "id": "Core.Intl.DateTimeFormat.formatToParts", + "kind": "value", + "name": "formatToParts", + "docstrings": [], + "signature": "let formatToParts: (t, Core__Date.t) => array" + }, + { + "id": "Core.Intl.DateTimeFormat.formatRange", + "kind": "value", + "name": "formatRange", + "docstrings": [], + "signature": "let formatRange: (\n t,\n ~startDate: Core__Date.t,\n ~endDate: Core__Date.t,\n) => string" + }, + { + "id": "Core.Intl.DateTimeFormat.formatRangeToParts", + "kind": "value", + "name": "formatRangeToParts", + "docstrings": [], + "signature": "let formatRangeToParts: (\n t,\n ~startDate: Core__Date.t,\n ~endDate: Core__Date.t,\n) => array" + } + ] + }, + "core/intl/collator": { + "id": "Core.Intl.Collator", + "name": "Collator", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.Collator.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.Intl.Collator.usage", + "kind": "type", + "name": "usage", + "docstrings": [], + "signature": "type usage = [#search | #sort]" + }, + { + "id": "Core.Intl.Collator.sensitivity", + "kind": "type", + "name": "sensitivity", + "docstrings": [], + "signature": "type sensitivity = [#accent | #base | #case | #variant]" + }, + { + "id": "Core.Intl.Collator.caseFirst", + "kind": "type", + "name": "caseFirst", + "docstrings": [], + "signature": "type caseFirst = [#\"false\" | #lower | #upper]" + }, + { + "id": "Core.Intl.Collator.options", + "kind": "type", + "name": "options", + "docstrings": [], + "signature": "type options = {\n localeMatcher?: Core__Intl__Common.localeMatcher,\n usage?: usage,\n sensitivity?: sensitivity,\n ignorePunctuation?: bool,\n numeric?: bool,\n caseFirst?: caseFirst,\n}" + }, + { + "id": "Core.Intl.Collator.resolvedOptions", + "kind": "type", + "name": "resolvedOptions", + "docstrings": [], + "signature": "type resolvedOptions = {\n locale: string,\n usage: usage,\n sensitivity: sensitivity,\n ignorePunctuation: bool,\n collation: [\n | #compat\n | #default\n | #dict\n | #emoji\n | #eor\n | #phonebk\n | #phonetic\n | #pinyin\n | #stroke\n | #trad\n | #unihan\n | #zhuyin\n ],\n numeric?: bool,\n caseFirst?: caseFirst,\n}" + }, + { + "id": "Core.Intl.Collator.supportedLocalesOptions", + "kind": "type", + "name": "supportedLocalesOptions", + "docstrings": [], + "signature": "type supportedLocalesOptions = {\n localeMatcher: Core__Intl__Common.localeMatcher,\n}" + }, + { + "id": "Core.Intl.Collator.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: (~locales: array=?, ~options: options=?) => t" + }, + { + "id": "Core.Intl.Collator.supportedLocalesOf", + "kind": "value", + "name": "supportedLocalesOf", + "docstrings": [], + "signature": "let supportedLocalesOf: (array, ~options: supportedLocalesOptions=?) => t" + }, + { + "id": "Core.Intl.Collator.resolvedOptions", + "kind": "value", + "name": "resolvedOptions", + "docstrings": [], + "signature": "let resolvedOptions: t => resolvedOptions" + }, + { + "id": "Core.Intl.Collator.compare", + "kind": "value", + "name": "compare", + "docstrings": [], + "signature": "let compare: (t, string, string) => int" + } + ] + }, + "core/intl/common": { + "id": "Core.Intl.Common", + "name": "Common", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.Common.localeMatcher", + "kind": "type", + "name": "localeMatcher", + "docstrings": [], + "signature": "type localeMatcher = [#\"best fit\" | #lookup]" + }, + { + "id": "Core.Intl.Common.calendar", + "kind": "type", + "name": "calendar", + "docstrings": [], + "signature": "type calendar = [\n | #buddhist\n | #chinese\n | #coptic\n | #dangi\n | #ethioaa\n | #ethiopic\n | #gregory\n | #hebrew\n | #indian\n | #islamic\n | #\"islamic-civil\"\n | #\"islamic-rgsa\"\n | #\"islamic-tbla\"\n | #\"islamic-umalqura\"\n | #iso8601\n | #japanese\n | #persian\n | #roc\n]" + }, + { + "id": "Core.Intl.Common.collation", + "kind": "type", + "name": "collation", + "docstrings": [], + "signature": "type collation = [\n | #compat\n | #dict\n | #emoji\n | #eor\n | #phonebk\n | #phonetic\n | #pinyin\n | #stroke\n | #trad\n | #unihan\n | #zhuyin\n]" + }, + { + "id": "Core.Intl.Common.numberingSystem", + "kind": "type", + "name": "numberingSystem", + "docstrings": [], + "signature": "type numberingSystem = [\n | #adlm\n | #ahom\n | #arab\n | #arabext\n | #bali\n | #beng\n | #bhks\n | #brah\n | #cakm\n | #cham\n | #deva\n | #diak\n | #fullwide\n | #gong\n | #gonm\n | #gujr\n | #guru\n | #hanidec\n | #hmng\n | #hmnp\n | #java\n | #kali\n | #kawi\n | #khmr\n | #knda\n | #lana\n | #lanatham\n | #laoo\n | #latn\n | #lepc\n | #limb\n | #mathbold\n | #mathdbl\n | #mathmono\n | #mathsanb\n | #mathsans\n | #mlym\n | #modi\n | #mong\n | #mroo\n | #mtei\n | #mymr\n | #mymrshan\n | #mymrtlng\n | #nagm\n | #newa\n | #nkoo\n | #olck\n | #orya\n | #osma\n | #rohg\n | #saur\n | #segment\n | #shrd\n | #sind\n | #sinh\n | #sora\n | #sund\n | #takr\n | #talu\n | #tamldec\n | #telu\n | #thai\n | #tibt\n | #tirh\n | #tnsa\n | #vaii\n | #wara\n | #wcho\n]" + }, + { + "id": "Core.Intl.Common.oneTo21", + "kind": "type", + "name": "oneTo21", + "docstrings": [], + "signature": "type oneTo21 = [\n | #1\n | #10\n | #11\n | #12\n | #13\n | #14\n | #15\n | #16\n | #17\n | #18\n | #19\n | #2\n | #20\n | #21\n | #3\n | #4\n | #5\n | #6\n | #7\n | #8\n | #9\n]" + }, + { + "id": "Core.Intl.Common.zeroTo20", + "kind": "type", + "name": "zeroTo20", + "docstrings": [], + "signature": "type zeroTo20 = [\n | #0\n | #1\n | #10\n | #11\n | #12\n | #13\n | #14\n | #15\n | #16\n | #17\n | #18\n | #19\n | #2\n | #20\n | #3\n | #4\n | #5\n | #6\n | #7\n | #8\n | #9\n]" + } + ] + }, + "core/biguint64array/constants": { + "id": "Core.BigUint64Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.BigUint64Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/bigint64array/constants": { + "id": "Core.BigInt64Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.BigInt64Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/uint8clampedarray/constants": { + "id": "Core.Uint8ClampedArray.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Uint8ClampedArray.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/uint32array/constants": { + "id": "Core.Uint32Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Uint32Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/uint16array/constants": { + "id": "Core.Uint16Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Uint16Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/uint8array/constants": { + "id": "Core.Uint8Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Uint8Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/int32array/constants": { + "id": "Core.Int32Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Int32Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/int16array/constants": { + "id": "Core.Int16Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Int16Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/int8array/constants": { + "id": "Core.Int8Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Int8Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/float64array/constants": { + "id": "Core.Float64Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Float64Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/float32array/constants": { + "id": "Core.Float32Array.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Float32Array.Constants.bytesPerElement", + "kind": "value", + "name": "bytesPerElement", + "docstrings": [ + "`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT)" + ], + "signature": "let bytesPerElement: int" + } + ] + }, + "core/json/decode": { + "id": "Core.JSON.Decode", + "name": "Decode", + "docstrings": [], + "items": [ + { + "id": "Core.JSON.Decode.bool", + "kind": "value", + "name": "bool", + "docstrings": [ + "Decodes a single JSON value. If the value is a bool, it will return `Some(bool)` - otherwise it will return `None`.\n\n ## Examples\n ```rescript\n JSON.parseExn(`true`)->JSON.Decode.bool\n // Some(true)\n\n JSON.parseExn(`\"hello world\"`)->JSON.Decode.bool\n // None\n ```" + ], + "signature": "let bool: t => option" + }, + { + "id": "Core.JSON.Decode.null", + "kind": "value", + "name": "null", + "docstrings": [ + "Decodes a single JSON value. If the value is null, it will return `Some(Null.t)` - otherwise it will return `None`.\n\n ## Examples\n ```rescript\n JSON.parseExn(`null`)->JSON.Decode.null\n // Some(null)\n\n JSON.parseExn(`\"hello world\"`)->JSON.Decode.null\n // None\n ```" + ], + "signature": "let null: t => option>" + }, + { + "id": "Core.JSON.Decode.string", + "kind": "value", + "name": "string", + "docstrings": [ + "Decodes a single JSON value. If the value is a string, it will return `Some(string)` - otherwise it will return `None`.\n\n ## Examples\n ```rescript\n JSON.parseExn(`\"hello world\"`)->JSON.Decode.string\n // Some(\"hello world\")\n\n JSON.parseExn(`42`)->JSON.Decode.string\n // None \n ```" + ], + "signature": "let string: t => option" + }, + { + "id": "Core.JSON.Decode.float", + "kind": "value", + "name": "float", + "docstrings": [ + "Decodes a single JSON value. If the value is a float, it will return `Some(float)` - otherwise it will return `None`.\n\n ## Examples\n ```rescript\n JSON.parseExn(`42.0`)->JSON.Decode.float\n // Some(42.0)\n\n JSON.parseExn(`\"hello world\"`)->JSON.Decode.float\n // None\n ```" + ], + "signature": "let float: t => option" + }, + { + "id": "Core.JSON.Decode.object", + "kind": "value", + "name": "object", + "docstrings": [ + "Decodes a single JSON value. If the value is an object, it will return `Some(Dict.t)` - otherwise it will return `None`.\n\n ## Examples\n ```rescript\n JSON.parseExn(`{\"foo\":\"bar\"}`)->JSON.Decode.object\n // Some({ foo: 'bar' })\n\n JSON.parseExn(`\"hello world\"`)->JSON.Decode.object\n // None\n ```" + ], + "signature": "let object: t => option>" + }, + { + "id": "Core.JSON.Decode.array", + "kind": "value", + "name": "array", + "docstrings": [ + "Decodes a single JSON value. If the value is an array, it will return `Some(array)` - otherwise it will return `None`.\n\n ## Examples\n ```rescript\n JSON.parseExn(`[\"foo\", \"bar\"]`)->JSON.Decode.array\n // Some([ 'foo', 'bar' ])\n\n JSON.parseExn(`\"hello world\"`)->JSON.Decode.array\n // None\n ```" + ], + "signature": "let array: t => option>" + } + ] + }, + "core/json/encode": { + "id": "Core.JSON.Encode", + "name": "Encode", + "docstrings": [], + "items": [ + { + "id": "Core.JSON.Encode.bool", + "kind": "value", + "name": "bool", + "docstrings": [ + "Returns a boolean as a JSON object.\n\n ## Examples\n ```rescript\n JSON.Encode.bool(true)\n ```" + ], + "signature": "let bool: bool => t" + }, + { + "id": "Core.JSON.Encode.null", + "kind": "value", + "name": "null", + "docstrings": [ + "Returns null as a JSON object.\n\n ## Examples\n ```rescript\n JSON.Encode.null\n ```" + ], + "signature": "let null: t" + }, + { + "id": "Core.JSON.Encode.string", + "kind": "value", + "name": "string", + "docstrings": [ + "Returns a string as a JSON object.\n\n ## Examples\n ```rescript\n JSON.Encode.string(\"hello world\")\n ```" + ], + "signature": "let string: string => t" + }, + { + "id": "Core.JSON.Encode.int", + "kind": "value", + "name": "int", + "docstrings": [ + "Returns an int as a JSON object.\n\n ## Examples\n ```rescript\n JSON.Encode.int(42)\n ```" + ], + "signature": "let int: int => t" + }, + { + "id": "Core.JSON.Encode.float", + "kind": "value", + "name": "float", + "docstrings": [ + "Returns a float as a JSON object.\n\n ## Examples\n ```rescript\n JSON.Encode.float(42.0)\n ```" + ], + "signature": "let float: float => t" + }, + { + "id": "Core.JSON.Encode.object", + "kind": "value", + "name": "object", + "docstrings": [ + "Returns a dict as a JSON object.\n\n ## Examples\n ```rescript\n let dict = Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n ])\n\n JSON.Encode.object(dict)\n ```" + ], + "signature": "let object: Core__Dict.t => t" + }, + { + "id": "Core.JSON.Encode.array", + "kind": "value", + "name": "array", + "docstrings": [ + "Returns an array as a JSON object.\n\n ## Examples\n ```rescript\n let array = [JSON.Encode.string(\"hello world\"), JSON.Encode.int(42)]\n\n JSON.Encode.array(array)\n ```" + ], + "signature": "let array: array => t" + } + ] + }, + "core/json/classify": { + "id": "Core.JSON.Classify", + "name": "Classify", + "docstrings": [], + "items": [ + { + "id": "Core.JSON.Classify.t", + "kind": "type", + "name": "t", + "docstrings": [ + "A type representing a JavaScript type." + ], + "signature": "type t =\n | Bool(bool)\n | Null\n | String(string)\n | Number(float)\n | Object(Core__Dict.t)\n | Array(array)" + }, + { + "id": "Core.JSON.Classify.classify", + "kind": "value", + "name": "classify", + "docstrings": [ + "Returns the JSON type of any value.\n\n ## Examples\n ```rescript\n JSON.Classify.classify(\"hello world\")\n // String(\"hello world\")\n\n JSON.Classify.classify(42)\n // Number(42)\n ```" + ], + "signature": "let classify: 'a => t" + } + ] + }, + "core/type/classify": { + "id": "Core.Type.Classify", + "name": "Classify", + "docstrings": [], + "items": [ + { + "id": "Core.Type.Classify.function", + "kind": "type", + "name": "function", + "docstrings": [ + "An abstract type representing a JavaScript function.\n\n See [`function`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) on MDN." + ], + "signature": "type function" + }, + { + "id": "Core.Type.Classify.object", + "kind": "type", + "name": "object", + "docstrings": [ + "An abstract type representing a JavaScript object.\n\n See [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) on MDN." + ], + "signature": "type object" + }, + { + "id": "Core.Type.Classify.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type representing a classified JavaScript value." + ], + "signature": "type t =\n | Bool(bool)\n | Null\n | Undefined\n | String(string)\n | Number(float)\n | Object(object)\n | Function(function)\n | Symbol(Core__Symbol.t)\n | BigInt(bigint)" + }, + { + "id": "Core.Type.Classify.classify", + "kind": "value", + "name": "classify", + "docstrings": [ + "`classify(anyValue)`\nClassifies a JavaScript value.\n\n## Examples\n```rescript\nswitch %raw(`null`)->Type.Classify.classify {\n| Null => Console.log(\"Yup, that's null.\")\n| _ => Console.log(\"This doesn't actually appear to be null...\")\n}\n```" + ], + "signature": "let classify: 'a => t" + } + ] + }, + "core/regexp/result": { + "id": "Core.RegExp.Result", + "name": "Result", + "docstrings": [], + "items": [ + { + "id": "Core.RegExp.Result.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Type representing the result of a `RegExp` execution." + ], + "signature": "type t = array>" + }, + { + "id": "Core.RegExp.Result.fullMatch", + "kind": "value", + "name": "fullMatch", + "docstrings": [ + "`fullMatch(regExpResult)` returns the full string that matched in this result.\n\n ## Examples\n ```rescript\n // Match the first two words separated by a space\n let regexp = RegExp.fromString(\"(\\\\w+) (\\\\w+)\")\n\n switch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n | None => Console.log(\"Nope, no match...\")\n | Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints the full string that matched, \"ReScript is\"\n }\n ```" + ], + "signature": "let fullMatch: t => string" + }, + { + "id": "Core.RegExp.Result.matches", + "kind": "value", + "name": "matches", + "docstrings": [ + "`matches(regExpResult)` returns all matches for `regExpResult`.\n\n ## Examples\n ```rescript\n // Match the first two words separated by a space\n let regexp = RegExp.fromString(\"(\\\\w+) (\\\\w+)\")\n\n // This below will log \"ReScript\" and \"is\" to the console.\n switch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n | None => Console.log(\"Nope, no match...\")\n | Some(result) => switch result->RegExp.Result.matches {\n | [firstWord, secondWord] => Console.log2(firstWord, secondWord)\n | _ => Console.log(\"Didn't find exactly two words...\")\n }\n }\n ```" + ], + "signature": "let matches: t => array" + }, + { + "id": "Core.RegExp.Result.index", + "kind": "value", + "name": "index", + "docstrings": [], + "signature": "let index: t => int" + }, + { + "id": "Core.RegExp.Result.input", + "kind": "value", + "name": "input", + "docstrings": [ + "`input(regExpResult)` returns the full input string that was passed to what produced the `RegExp.Result.t`.\n\n ## Examples\n ```rescript\n // Match the first two words separated by a space\n let regexp = RegExp.fromString(\"(\\\\w+) (\\\\w+)\")\n\n // This below will log the full input string \"ReScript is pretty cool, right?\" to the console.\n switch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n | None => Console.log(\"Nope, no match...\")\n | Some(result) => Console.log(result->RegExp.Result.input)\n }\n ```" + ], + "signature": "let input: t => string" + } + ] + }, + "core/math/int": { + "id": "Core.Math.Int", + "name": "Int", + "docstrings": [ + "Provide Math utilities for `int`" + ], + "items": [ + { + "id": "Core.Math.Int.abs", + "kind": "value", + "name": "abs", + "docstrings": [ + "`abs(v)` returns absolute value of `v`.\n See [`Math.abs`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.abs(-2) // 2\n Math.Int.abs(3) // 3\n ```" + ], + "signature": "let abs: int => int" + }, + { + "id": "Core.Math.Int.clz32", + "kind": "value", + "name": "clz32", + "docstrings": [ + "`clz32(v)` returns the number of leading zero bits of the argument's 32 bit\n int representation.\n See [`Math.clz32`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32) on MDN.\n\n ## Examples\n\n ```rescript\n // 00000000000000000000000000000001\n Math.Int.clz32(1) // 31\n // 00000000000000000000000000000100\n Math.Int.clz32(4) // 29\n ```" + ], + "signature": "let clz32: int => int" + }, + { + "id": "Core.Math.Int.imul", + "kind": "value", + "name": "imul", + "docstrings": [ + "`imul(a, b)` returns 32-bit integer multiplication. Use this only when you\n need to optimize performance of multiplication of numbers stored as 32-bit\n integers.\n See [`Math.imul`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.imul(3, 4) // 12\n Math.Int.imul(-5, 12) // 60\n ```" + ], + "signature": "let imul: (int, int) => int" + }, + { + "id": "Core.Math.Int.min", + "kind": "value", + "name": "min", + "docstrings": [ + "`min(a, b)` returns the minimum of its two integer arguments.\n See [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.min(1, 2) // 1\n Math.Int.min(-1, -2) // -2\n ```" + ], + "signature": "let min: (int, int) => int" + }, + { + "id": "Core.Math.Int.minMany", + "kind": "value", + "name": "minMany", + "docstrings": [ + "`minMany(arr)` returns the minimum of the integers in the given array `arr`.\n Returns `Infinity` if `arr` is empty.\n See [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.minMany([1, 2]) // 1\n Math.Int.minMany([-1, -2]) // -2\n Math.Int.minMany([])->Int.toFloat->Float.isFinite // false\n ```" + ], + "signature": "let minMany: array => int" + }, + { + "id": "Core.Math.Int.max", + "kind": "value", + "name": "max", + "docstrings": [ + "`max(a, b)` returns the maximum of its two integer arguments.\n See [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.max(1, 2) // 2\n Math.Int.max(-1, -2) // -1\n ```" + ], + "signature": "let max: (int, int) => int" + }, + { + "id": "Core.Math.Int.maxMany", + "kind": "value", + "name": "maxMany", + "docstrings": [ + "`maxMany(arr)` returns the maximum of the integers in the given array `arr`.\n Returns `Infinity` if `arr` is empty.\n See [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.maxMany([1, 2]) // 2\n Math.Int.maxMany([-1, -2]) // -1\n Math.Int.maxMany([])->Int.toFloat->Float.isFinite // false\n ```" + ], + "signature": "let maxMany: array => int" + }, + { + "id": "Core.Math.Int.pow", + "kind": "value", + "name": "pow", + "docstrings": [ + "`pow(a, ~exp)` raises the given base `a` to the given exponent `exp`.\n See [`Math.pow`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.pow(2, ~exp=4) // 16\n Math.Int.pow(3, ~exp=4) // 81\n ```" + ], + "signature": "let pow: (int, ~exp: int) => int" + }, + { + "id": "Core.Math.Int.sign", + "kind": "value", + "name": "sign", + "docstrings": [ + "`sign(v)` returns the sign of its integer argument: `-1` if negative, `0` if\n zero, `1` if positive.\n See [`Math.sign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.sign(3) // 1\n Math.Int.sign(-3) // 1\n Math.Int.sign(0) // 0\n ```" + ], + "signature": "let sign: int => int" + }, + { + "id": "Core.Math.Int.floor", + "kind": "value", + "name": "floor", + "docstrings": [ + "floor(v) returns the largest `int` less than or equal to the argument; \n See [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.floor(3.7) == 3\n Math.Int.floor(3.0) == 3\n Math.Int.floor(-3.1) == -4\n ```" + ], + "signature": "let floor: float => int" + }, + { + "id": "Core.Math.Int.ceil", + "kind": "value", + "name": "ceil", + "docstrings": [ + "ceil(v) returns the smallest `int` greater than or equal to the argument;\n See [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.ceil(3.7) == 4\n Math.Int.ceil(3.0) == 3\n Math.Int.ceil(-3.1) == -3\n ```" + ], + "signature": "let ceil: float => int" + }, + { + "id": "Core.Math.Int.random", + "kind": "value", + "name": "random", + "docstrings": [ + "`random(minVal, maxVal)` returns a random integer number in the half-closed interval [minVal, maxVal).\n See [`Math.random`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random)\n on MDN.\n\n ## Examples\n\n ```rescript\n Math.Int.random(2, 5) == 4\n Math.Int.random(505, 2000) == 1276\n Math.Int.random(-7, -2) == -4\n ```" + ], + "signature": "let random: (int, int) => int" + } + ] + }, + "core/math/constants": { + "id": "Core.Math.Constants", + "name": "Constants", + "docstrings": [ + "Mathematical Constants" + ], + "items": [ + { + "id": "Core.Math.Constants.e", + "kind": "value", + "name": "e", + "docstrings": [ + "`Math.Constants.e` returns Euler's number, ≈ 2.718281828459045.\n See [`Math.E`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/E) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Constants.e\n ```" + ], + "signature": "let e: float" + }, + { + "id": "Core.Math.Constants.ln2", + "kind": "value", + "name": "ln2", + "docstrings": [ + "`Math.Constants.ln2` returns Natural logarithm of 2, ≈ 0.6931471805599453.\n See [`Math.LN2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN2) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Constants.ln2\n ```" + ], + "signature": "let ln2: float" + }, + { + "id": "Core.Math.Constants.ln10", + "kind": "value", + "name": "ln10", + "docstrings": [ + "`Math.Constants.ln10` returns Natural logarithm of 10, ≈ 2.302585092994046.\n See [`Math.LN10`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN10) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Constants.ln10\n ```" + ], + "signature": "let ln10: float" + }, + { + "id": "Core.Math.Constants.log2e", + "kind": "value", + "name": "log2e", + "docstrings": [ + "`Math.Constants.log2e` returns Base 2 logarithm of E, ≈ 1.4426950408889634.\n See [`Math.LOG2E`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG2E) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Constants.log2e\n ```" + ], + "signature": "let log2e: float" + }, + { + "id": "Core.Math.Constants.log10e", + "kind": "value", + "name": "log10e", + "docstrings": [ + "`Math.Constants.log10e` returns Base 10 logarithm of E, ≈ 0.4342944819032518.\n See [`Math.LOG10E`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG10E) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Constants.log10e\n ```" + ], + "signature": "let log10e: float" + }, + { + "id": "Core.Math.Constants.pi", + "kind": "value", + "name": "pi", + "docstrings": [ + "`Math.Constants.pi` returns Pi - ratio of the circumference to the diameter\n of a circle, ≈ 3.141592653589793.\n See [`Math.PI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/PI) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Constants.pi\n ```" + ], + "signature": "let pi: float" + }, + { + "id": "Core.Math.Constants.sqrt1_2", + "kind": "value", + "name": "sqrt1_2", + "docstrings": [ + "`Math.Constants.sqrt1_2` returns Square root of 1/2, ≈ 0.7071067811865476.\n See [`Math.SQRT1_2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Constants.sqrt1_2\n ```" + ], + "signature": "let sqrt1_2: float" + }, + { + "id": "Core.Math.Constants.sqrt2", + "kind": "value", + "name": "sqrt2", + "docstrings": [ + "`Math.Constants.e` returns Absolute value for integer argument.\n See [`Math.abs`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs) on MDN.\n\n ## Examples\n\n ```rescript\n Math.Constants.sqrt2\n ```" + ], + "signature": "let sqrt2: float" + } + ] + }, + "core/int/constants": { + "id": "Core.Int.Constants", + "name": "Constants", + "docstrings": [], + "items": [ + { + "id": "Core.Int.Constants.minValue", + "kind": "value", + "name": "minValue", + "docstrings": [ + "The smallest positive number represented in JavaScript.\n See [`Number.MIN_VALUE`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE)\n on MDN.\n\n ## Examples\n\n ```rescript\n Console.log(Int.Constants.minValue)\n ```" + ], + "signature": "let minValue: int" + }, + { + "id": "Core.Int.Constants.maxValue", + "kind": "value", + "name": "maxValue", + "docstrings": [ + "The largest positive number represented in JavaScript.\n See [`Number.MAX_VALUE`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE)\n on MDN.\n\n ## Examples\n\n ```rescript\n Console.log(Int.Constants.maxValue)\n ```" + ], + "signature": "let maxValue: int" + } + ] + }, + "core/float/constants": { + "id": "Core.Float.Constants", + "name": "Constants", + "docstrings": [ + "Float constants." + ], + "items": [ + { + "id": "Core.Float.Constants.nan", + "kind": "value", + "name": "nan", + "docstrings": [ + "The special value \"Not a Number\"\n See [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN) on MDN.\n\n ## Examples\n\n ```rescript\n Float.Constants.nan\n ```" + ], + "signature": "let nan: float" + }, + { + "id": "Core.Float.Constants.epsilon", + "kind": "value", + "name": "epsilon", + "docstrings": [ + "Represents the difference between 1 and the smallest floating point number greater than 1.\n See [`Number.EPSILON`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) on MDN.\n\n ## Examples\n\n ```rescript\n Float.Constants.epsilon\n ```" + ], + "signature": "let epsilon: float" + }, + { + "id": "Core.Float.Constants.positiveInfinity", + "kind": "value", + "name": "positiveInfinity", + "docstrings": [ + "The positive Infinity value\n See [`Number.POSITIVE_INFINITY`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/POSITIVE_INFINITY) on MDN.\n\n ## Examples\n\n ```rescript\n Float.Constants.positiveInfinity\n ```" + ], + "signature": "let positiveInfinity: float" + }, + { + "id": "Core.Float.Constants.negativeInfinity", + "kind": "value", + "name": "negativeInfinity", + "docstrings": [ + "The negative Infinity value\n See [`Number.NEGATIVE_INFINITY`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/NEGATIVE_INFINITY) on MDN.\n\n ## Examples\n\n ```rescript\n Float.Constants.negativeInfinity\n ```" + ], + "signature": "let negativeInfinity: float" + }, + { + "id": "Core.Float.Constants.minValue", + "kind": "value", + "name": "minValue", + "docstrings": [ + "The smallest positive numeric value representable in JavaScript.\n See [`Number.MIN_VALUE`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_VALUE) on MDN.\n\n ## Examples\n\n ```rescript\n Float.Constants.minValue\n ```" + ], + "signature": "let minValue: float" + }, + { + "id": "Core.Float.Constants.maxValue", + "kind": "value", + "name": "maxValue", + "docstrings": [ + "The maximum positive numeric value representable in JavaScript.\n See [`Number.MAX_VALUE`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_VALUE) on MDN.\n\n ## Examples\n\n ```rescript\n Float.Constants.minValue\n ```" + ], + "signature": "let maxValue: float" + } + ] + }, + "core/error/urierror": { + "id": "Core.Error.URIError", + "name": "URIError", + "docstrings": [], + "items": [ + { + "id": "Core.Error.URIError.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new `URIError` with the provided `message`.\n\n See [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError) on MDN." + ], + "signature": "let make: string => t" + } + ] + }, + "core/error/typeerror": { + "id": "Core.Error.TypeError", + "name": "TypeError", + "docstrings": [], + "items": [ + { + "id": "Core.Error.TypeError.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new `TypeError` with the provided `message`.\n\n See [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) on MDN." + ], + "signature": "let make: string => t" + } + ] + }, + "core/error/syntaxerror": { + "id": "Core.Error.SyntaxError", + "name": "SyntaxError", + "docstrings": [], + "items": [ + { + "id": "Core.Error.SyntaxError.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new `SyntaxError` with the provided `message`.\n\n See [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) on MDN." + ], + "signature": "let make: string => t" + } + ] + }, + "core/error/referenceerror": { + "id": "Core.Error.ReferenceError", + "name": "ReferenceError", + "docstrings": [], + "items": [ + { + "id": "Core.Error.ReferenceError.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new `ReferenceError` with the provided `message`.\n\n See [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) on MDN." + ], + "signature": "let make: string => t" + } + ] + }, + "core/error/rangeerror": { + "id": "Core.Error.RangeError", + "name": "RangeError", + "docstrings": [], + "items": [ + { + "id": "Core.Error.RangeError.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new `RangeError` with the provided `message`.\n\n See [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) on MDN." + ], + "signature": "let make: string => t" + } + ] + }, + "core/error/evalerror": { + "id": "Core.Error.EvalError", + "name": "EvalError", + "docstrings": [], + "items": [ + { + "id": "Core.Error.EvalError.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new `EvalError` with the provided `message`.\n\n See [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) on MDN." + ], + "signature": "let make: string => t" + } + ] + }, + "core/date/utc": { + "id": "Core.Date.UTC", + "name": "UTC", + "docstrings": [], + "items": [ + { + "id": "Core.Date.UTC.makeWithYM", + "kind": "value", + "name": "makeWithYM", + "docstrings": [ + "Returns the time, in milliseconds, since UNIX epoch (January 1, 1970 00:00:00 UTC).\n Be aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n Months are 0-indexed (0 = January, 11 = December).\n Values, which are out of range, will be carried over to the next bigger unit (s. example).\n\n ## Examples\n ```rescript\n Date.UTC.makeWithYM(~year=2023, ~month=0)\n // 1672531200000\n\n Date.UTC.makeWithYM(~year=2023, ~month=11)\n // 1701388800000\n\n Date.UTC.makeWithYM(~year=2023, ~month=12)\n // 1704067200000\n\n Date.UTC.makeWithYM(~year=2023, ~month=-1)\n // 1669852800000\n ```" + ], + "signature": "let makeWithYM: (~year: int, ~month: int) => msSinceEpoch" + }, + { + "id": "Core.Date.UTC.makeWithYMD", + "kind": "value", + "name": "makeWithYMD", + "docstrings": [ + "Returns the time, in milliseconds, since UNIX epoch (January 1, 1970 00:00:00 UTC).\n Be aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n Months are 0-indexed (0 = January, 11 = December).\n Values, which are out of range, will be carried over to the next bigger unit (s. example).\n\n ## Examples\n ```rescript\n Date.UTC.makeWithYMD(~year=2023, ~month=1, ~date=20)\n // 1676851200000\n\n Date.UTC.makeWithYMD(~year=2023, ~month=1, ~date=-1)\n // 1675036800000\n\n Date.UTC.makeWithYMD(~year=2023, ~month=1, ~date=29)\n // 1677628800000\n ```" + ], + "signature": "let makeWithYMD: (~year: int, ~month: int, ~date: int) => msSinceEpoch" + }, + { + "id": "Core.Date.UTC.makeWithYMDH", + "kind": "value", + "name": "makeWithYMDH", + "docstrings": [ + "Returns the time, in milliseconds, since UNIX epoch (January 1, 1970 00:00:00 UTC).\n Be aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n Months are 0-indexed (0 = January, 11 = December).\n Values, which are out of range, will be carried over to the next bigger unit (s. example).\n\n ## Examples\n ```rescript\n Date.UTC.makeWithYMDH(~year=2023, ~month=1, ~date=20, ~hours=16)\n // 1676908800000\n\n Date.UTC.makeWithYMDH(~year=2023, ~month=1, ~date=20, ~hours=24)\n // 1676937600000\n\n Date.UTC.makeWithYMDH(~year=2023, ~month=1, ~date=20, ~hours=-1)\n // 1676847600000\n ```" + ], + "signature": "let makeWithYMDH: (\n ~year: int,\n ~month: int,\n ~date: int,\n ~hours: int,\n) => msSinceEpoch" + }, + { + "id": "Core.Date.UTC.makeWithYMDHM", + "kind": "value", + "name": "makeWithYMDHM", + "docstrings": [ + "Returns the time, in milliseconds, since UNIX epoch (January 1, 1970 00:00:00 UTC).\n Be aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n Months are 0-indexed (0 = January, 11 = December).\n Values, which are out of range, will be carried over to the next bigger unit (s. example).\n\n ## Examples\n ```rescript\n Date.UTC.makeWithYMDHM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40)\n // 1676911200000\n\n Date.UTC.makeWithYMDHM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=60)\n // 1676912400000\n\n Date.UTC.makeWithYMDHM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=-1)\n // 1676908740000\n ```" + ], + "signature": "let makeWithYMDHM: (\n ~year: int,\n ~month: int,\n ~date: int,\n ~hours: int,\n ~minutes: int,\n) => msSinceEpoch" + }, + { + "id": "Core.Date.UTC.makeWithYMDHMS", + "kind": "value", + "name": "makeWithYMDHMS", + "docstrings": [ + "Returns the time, in milliseconds, since UNIX epoch (January 1, 1970 00:00:00 UTC).\n Be aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n Months are 0-indexed (0 = January, 11 = December).\n Values, which are out of range, will be carried over to the next bigger unit (s. example).\n\n ## Examples\n ```rescript\n Date.UTC.makeWithYMDHMS(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=0)\n // 1676911200000\n\n Date.UTC.makeWithYMDHMS(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=60)\n // 1676911260000\n\n Date.UTC.makeWithYMDHMS(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=-1)\n // 1676911199000\n ```" + ], + "signature": "let makeWithYMDHMS: (\n ~year: int,\n ~month: int,\n ~date: int,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n) => msSinceEpoch" + }, + { + "id": "Core.Date.UTC.makeWithYMDHMSM", + "kind": "value", + "name": "makeWithYMDHMSM", + "docstrings": [ + "Returns the time, in milliseconds, since UNIX epoch (January 1, 1970 00:00:00 UTC).\n Be aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n Months are 0-indexed (0 = January, 11 = December).\n Values, which are out of range, will be carried over to the next bigger unit (s. example).\n\n ## Examples\n ```rescript\n Date.UTC.makeWithYMDHMSM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=0)->Console.log\n // 1676911200000\n\n Date.UTC.makeWithYMDHMSM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=1000)->Console.log\n // 1676911201000\n\n Date.UTC.makeWithYMDHMSM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=-1)->Console.log\n // 1676911199999\n ```" + ], + "signature": "let makeWithYMDHMSM: (\n ~year: int,\n ~month: int,\n ~date: int,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n ~milliseconds: int,\n) => msSinceEpoch" + } + ] + }, + "core/result": { + "id": "Core.Result", + "name": "Result", + "docstrings": [], + "items": [ + { + "id": "Core.Result.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "Result types are really useful to describe the result of a certain operation\n without relying on exceptions or `option` types.\n\n This module gives you useful utilities to create and combine `Result` data." + ], + "signature": "let getExn: result<'a, 'b> => 'a" + }, + { + "id": "Core.Result.mapOr", + "kind": "value", + "name": "mapOr", + "docstrings": [ + "`mapOr(res, default, f)`: When res is `Ok(n)`, returns `f(n)`, otherwise `default`.\n\n## Examples\n\n```rescript\nlet ok = Ok(42)\nResult.mapOr(ok, 0, (x) => x / 2) == 21\n\nlet error = Error(\"Invalid data\")\nResult.mapOr(error, 0, (x) => x / 2) == 0\n```" + ], + "signature": "let mapOr: (result<'a, 'c>, 'b, 'a => 'b) => 'b" + }, + { + "id": "Core.Result.mapWithDefault", + "kind": "value", + "name": "mapWithDefault", + "docstrings": [], + "signature": "let mapWithDefault: (result<'a, 'c>, 'b, 'a => 'b) => 'b", + "deprecated": "Use mapOr instead" + }, + { + "id": "Core.Result.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(res, f)`: When res is `Ok(n)`, returns `Ok(f(n))`. Otherwise returns res\nunchanged. Function `f` takes a value of the same type as `n` and returns an\nordinary value.\n\n## Examples\n\n```rescript\nlet f = (x) => sqrt(Int.toFloat(x))\n\nResult.map(Ok(64), f) == Ok(8.0)\n\nResult.map(Error(\"Invalid data\"), f) == Error(\"Invalid data\")\n```" + ], + "signature": "let map: (result<'a, 'c>, 'a => 'b) => result<'b, 'c>" + }, + { + "id": "Core.Result.flatMap", + "kind": "value", + "name": "flatMap", + "docstrings": [ + "`flatMap(res, f)`: When res is `Ok(n)`, returns `f(n)`. Otherwise, returns res\nunchanged. Function `f` takes a value of the same type as `n` and returns a\n`Result`.\n\n## Examples\n\n```rescript\nlet recip = (x) =>\n if (x !== 0.0) {\n Ok(1.0 /. x)\n } else {\n Error(\"Divide by zero\")\n }\n\nResult.flatMap(Ok(2.0), recip) == Ok(0.5)\n\nResult.flatMap(Ok(0.0), recip) == Error(\"Divide by zero\")\n\nResult.flatMap(Error(\"Already bad\"), recip) == Error(\"Already bad\")\n```" + ], + "signature": "let flatMap: (result<'a, 'c>, 'a => result<'b, 'c>) => result<'b, 'c>" + }, + { + "id": "Core.Result.getOr", + "kind": "value", + "name": "getOr", + "docstrings": [ + "`getOr(res, defaultValue)`: If `res` is `Ok(n)`, returns `n`, otherwise `default`\n\n## Examples\n\n```rescript\nResult.getOr(Ok(42), 0) == 42\n\nResult.getOr(Error(\"Invalid Data\"), 0) == 0\n```" + ], + "signature": "let getOr: (result<'a, 'b>, 'a) => 'a" + }, + { + "id": "Core.Result.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (result<'a, 'b>, 'a) => 'a", + "deprecated": "Use getOr instead" + }, + { + "id": "Core.Result.isOk", + "kind": "value", + "name": "isOk", + "docstrings": [ + "`isOk(res)`: Returns `true` if `res` is of the form `Ok(n)`, `false` if it is the `Error(e)` variant." + ], + "signature": "let isOk: result<'a, 'b> => bool" + }, + { + "id": "Core.Result.isError", + "kind": "value", + "name": "isError", + "docstrings": [ + "`isError(res)`: Returns `true` if `res` is of the form `Error(e)`, `false` if it is the `Ok(n)` variant." + ], + "signature": "let isError: result<'a, 'b> => bool" + }, + { + "id": "Core.Result.equal", + "kind": "value", + "name": "equal", + "docstrings": [ + "`equal(res1, res2, f)`: Determine if two `Result` variables are equal with\nrespect to an equality function. If `res1` and `res2` are of the form `Ok(n)`\nand `Ok(m)`, return the result of `f(n, m)`. If one of `res1` and `res2` are of\nthe form `Error(e)`, return false If both `res1` and `res2` are of the form\n`Error(e)`, return true\n\n## Examples\n\n```rescript\nlet good1 = Ok(42)\n\nlet good2 = Ok(32)\n\nlet bad1 = Error(\"invalid\")\n\nlet bad2 = Error(\"really invalid\")\n\nlet mod10equal = (a, b) => mod(a, 10) === mod(b, 10)\n\nResult.equal(good1, good2, mod10equal) == true\n\nResult.equal(good1, bad1, mod10equal) == false\n\nResult.equal(bad2, good2, mod10equal) == false\n\nResult.equal(bad1, bad2, mod10equal) == true\n```" + ], + "signature": "let equal: (result<'a, 'c>, result<'b, 'd>, ('a, 'b) => bool) => bool" + }, + { + "id": "Core.Result.compare", + "kind": "value", + "name": "compare", + "docstrings": [ + "`compare(res1, res2, f)`: Compare two `Result` variables with respect to a\ncomparison function. The comparison function returns -1. if the first variable\nis \"less than\" the second, 0. if the two variables are equal, and 1. if the first\nis \"greater than\" the second.\n\nIf `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)`,\nreturn -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\nboth `res1` and `res2` are of the form `Error(e)`, return 0. (equal)\n\n## Examples\n\n```rescript\nlet good1 = Ok(59)\n\nlet good2 = Ok(37)\n\nlet bad1 = Error(\"invalid\")\n\nlet bad2 = Error(\"really invalid\")\n\nlet mod10cmp = (a, b) => Int.compare(mod(a, 10), mod(b, 10))\n\nResult.compare(Ok(39), Ok(57), mod10cmp) == 1.\n\nResult.compare(Ok(57), Ok(39), mod10cmp) == (-1.)\n\nResult.compare(Ok(39), Error(\"y\"), mod10cmp) == 1.\n\nResult.compare(Error(\"x\"), Ok(57), mod10cmp) == (-1.)\n\nResult.compare(Error(\"x\"), Error(\"y\"), mod10cmp) == 0.\n```" + ], + "signature": "let compare: (\n result<'a, 'c>,\n result<'b, 'd>,\n ('a, 'b) => Core__Ordering.t,\n) => Core__Ordering.t" + }, + { + "id": "Core.Result.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(res, f)` runs the provided function `f` on the `Ok` value. If `res` is `Error`, nothing happens.\n\n## Examples\n\n```rescript\nResult.forEach(Ok(3), Console.log) // Logs \"3\", returns ()\nResult.forEach(Error(\"x\"), Console.log) // Does nothing, returns ()\n```" + ], + "signature": "let forEach: (result<'a, 'b>, 'a => unit) => unit" + }, + { + "id": "Core.Result.mapError", + "kind": "value", + "name": "mapError", + "docstrings": [ + "`mapError(r, f)` generates a new `result` by applying the function `f` to the `Error` value. If the source is `Ok`, return it as-is.\n\n## Examples\n\n```rescript\nlet format = n => `Error code: ${n->Int.toString}`\nResult.mapError(Error(14), format) // Error(\"Error code: 14\")\nResult.mapError(Ok(\"abc\"), format) // Ok(\"abc\")\n```" + ], + "signature": "let mapError: (result<'a, 'b>, 'b => 'c) => result<'a, 'c>" + } + ] + }, + "core/list": { + "id": "Core.List", + "name": "List", + "docstrings": [], + "items": [ + { + "id": "Core.List.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Collection functions for manipulating the `list` data structures, a singly-linked list.\n\n**Prefer Array** if you need any of the following:\n\n- Random access of element\n- Better interop with JavaScript\n- Better memory usage & performance." + ], + "signature": "type t<'a> = list<'a>" + }, + { + "id": "Core.List.length", + "kind": "value", + "name": "length", + "docstrings": [ + "`length(list)` returns the length of `list`.\n\n## Examples\n\n```rescript\nList.length(list{1, 2, 3}) // 3\n```" + ], + "signature": "let length: t<'a> => int" + }, + { + "id": "Core.List.size", + "kind": "value", + "name": "size", + "docstrings": [ + "`size(list)`. See [`length`](#length)\n\n## Examples\n\n```rescript\nList.size(list{1, 2, 3}) // 3\n```" + ], + "signature": "let size: t<'a> => int" + }, + { + "id": "Core.List.head", + "kind": "value", + "name": "head", + "docstrings": [ + "`head(list)` returns `Some(value)` where `value` is the first element in the\nlist, or `None` if `list` is an empty list.\n\n## Examples\n\n```rescript\nList.head(list{}) // None\nList.head(list{1, 2, 3}) // Some(1)\n```" + ], + "signature": "let head: t<'a> => option<'a>" + }, + { + "id": "Core.List.headExn", + "kind": "value", + "name": "headExn", + "docstrings": [ + "`headExn(list)` same as [`head`](#head).\n\n## Examples\n\n```rescript\nList.headExn(list{1, 2, 3}) // 1\n\nList.headExn(list{}) // Raises an Error\n```\n\n## Exceptions\n\n- Raises an Error if list is empty." + ], + "signature": "let headExn: t<'a> => 'a" + }, + { + "id": "Core.List.tail", + "kind": "value", + "name": "tail", + "docstrings": [ + "`tail(list)` returns `None` if `list` is empty, otherwise it returns `Some(tail)`\nwhere `tail` is everything except the first element of `list`.\n\n## Examples\n\n```rescript\nList.tail(list{1, 2, 3}) // Some(list{2, 3})\n\nList.tail(list{}) // None\n```" + ], + "signature": "let tail: t<'a> => option>" + }, + { + "id": "Core.List.tailExn", + "kind": "value", + "name": "tailExn", + "docstrings": [ + "`tailExn(list)` same as [`tail`](#tail).\n\n## Examples\n\n```rescript\nList.tailExn(list{1, 2, 3}) // list{2, 3}\n\nList.tailExn(list{}) // Raises an Error\n```\n\n## Exceptions\n\n- Raises an Error if list is empty." + ], + "signature": "let tailExn: t<'a> => t<'a>" + }, + { + "id": "Core.List.add", + "kind": "value", + "name": "add", + "docstrings": [ + "`add(list, value)` adds a `value` to the beginning of list `list`.\n\n## Examples\n\n```rescript\nList.add(list{2, 3}, 1) // list{1, 2, 3}\n\nList.add(list{\"World\", \"!\"}, \"Hello\") // list{\"Hello\", \"World\", \"!\"}\n```" + ], + "signature": "let add: (t<'a>, 'a) => t<'a>" + }, + { + "id": "Core.List.get", + "kind": "value", + "name": "get", + "docstrings": [ + "`get(list, index)` return the `index` element in `list`, or `None` if `index`\nis larger than the length of list `list`.\n\n## Examples\n\n```rescript\nlet abc = list{\"A\", \"B\", \"C\"}\n\nabc->List.get(1) // Some(\"B\")\n\nabc->List.get(4) // None\n```" + ], + "signature": "let get: (t<'a>, int) => option<'a>" + }, + { + "id": "Core.List.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "`getExn(list, index)` same as [`get`](#get).\n\n## Examples\n\n```rescript\nlet abc = list{\"A\", \"B\", \"C\"}\n\nabc->List.getExn(1) // \"B\"\n\nabc->List.getExn(4) // Raises an Error\n```\n\n## Exceptions\n\n- Raises an Error if `index` is larger than the length of list." + ], + "signature": "let getExn: (t<'a>, int) => 'a" + }, + { + "id": "Core.List.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(length, value)` returns a list of length `length` with each element filled\nwith `value`. Returns an empty list if `value` is negative.\n\n## Examples\n\n```rescript\nList.make(~length=3, 1) // list{1, 1, 1}\n```" + ], + "signature": "let make: (~length: int, 'a) => t<'a>" + }, + { + "id": "Core.List.fromInitializer", + "kind": "value", + "name": "fromInitializer", + "docstrings": [ + "`makeBy(length, f)` return a list of length `length` with element initialized\nwith `f`. Returns an empty list if `length` is negative.\n\n## Examples\n\n```rescript\nList.fromInitializer(~length=5, i => i) // list{0, 1, 2, 3, 4}\n\nList.fromInitializer(~length=5, i => i * i) // list{0, 1, 4, 9, 16}\n```" + ], + "signature": "let fromInitializer: (~length: int, int => 'a) => t<'a>" + }, + { + "id": "Core.List.toShuffled", + "kind": "value", + "name": "toShuffled", + "docstrings": [ + "`toShuffled(list)` returns a new list in random order.\n\n## Examples\n\n```rescript\nList.toShuffled(list{1, 2, 3}) // list{2, 1, 3}\n```" + ], + "signature": "let toShuffled: t<'a> => t<'a>" + }, + { + "id": "Core.List.drop", + "kind": "value", + "name": "drop", + "docstrings": [ + "`drop(list, value)` return a new list, dropping the first `value` element.\nReturns `None` if `list` has fewer than `value` elements.\n\n## Examples\n\n```rescript\nlist{1, 2, 3}->List.drop(2) // Some(list{3})\n\nlist{1, 2, 3}->List.drop(3) // Some(list{})\n\nlist{1, 2, 3}->List.drop(4) // None\n```" + ], + "signature": "let drop: (t<'a>, int) => option>" + }, + { + "id": "Core.List.take", + "kind": "value", + "name": "take", + "docstrings": [ + "`take(list, value)` returns a list with the first `value` elements from `list`,\nor `None` if `list` has fewer than `value` elements.\n\n## Examples\n\n```rescript\nlist{1, 2, 3}->List.take(1) // Some(list{1})\n\nlist{1, 2, 3}->List.take(2) // Some(list{1, 2})\n\nlist{1, 2, 3}->List.take(4) // None\n```" + ], + "signature": "let take: (t<'a>, int) => option>" + }, + { + "id": "Core.List.splitAt", + "kind": "value", + "name": "splitAt", + "docstrings": [ + "`splitAt(list, n)` split the list `list` at `n`. Returns `None` when the length\nof `list` is less than `n`.\n\n## Examples\n\n```rescript\nlist{\"Hello\", \"World\"}->List.splitAt(1) // Some((list{\"Hello\"}, list{\"World\"}))\n\nlist{0, 1, 2, 3, 4}->List.splitAt(2) // Some((list{0, 1}, list{2, 3, 4}))\n```" + ], + "signature": "let splitAt: (t<'a>, int) => option<(list<'a>, list<'a>)>" + }, + { + "id": "Core.List.concat", + "kind": "value", + "name": "concat", + "docstrings": [ + "`concat(list1, list2)` returns the list obtained by adding `list1` after `list2`.\n\n## Examples\n\n```rescript\nList.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": "Core.List.concatMany", + "kind": "value", + "name": "concatMany", + "docstrings": [ + "`concatMany(arr)` returns the list obtained by concatenating all the lists in\narray `arr`, in order.\n\n## Examples\n\n```rescript\nList.concatMany([list{1, 2, 3}, list{}, list{3}]) // list{1, 2, 3, 3}\n```" + ], + "signature": "let concatMany: array> => t<'a>" + }, + { + "id": "Core.List.reverseConcat", + "kind": "value", + "name": "reverseConcat", + "docstrings": [ + "`reverseConcat(list1, list2)` is equivalent to writing: `concat(reverse(list1, list2)`\n\n## Examples\n\n```rescript\nList.reverseConcat(list{1, 2}, list{3, 4}) // list{2, 1, 3, 4}\n```" + ], + "signature": "let reverseConcat: (t<'a>, t<'a>) => t<'a>" + }, + { + "id": "Core.List.flat", + "kind": "value", + "name": "flat", + "docstrings": [ + "`flat(list)` return the list obtained by concatenating all the lists in\n`list`, in order.\n\n## Examples\n\n```rescript\nList.flat(list{list{1, 2, 3}, list{}, list{3}}) // list{1, 2, 3, 3}\n```" + ], + "signature": "let flat: t> => t<'a>" + }, + { + "id": "Core.List.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(list, f)` returns a new list with `f` applied to each element of `list`.\n\n## Examples\n\n```rescript\nlist{1, 2}->List.map(x => x + 1) // list{3, 4}\n```" + ], + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Core.List.zip", + "kind": "value", + "name": "zip", + "docstrings": [ + "`zip(list1, list2)` returns a list of pairs from the two lists with the length\nof the shorter list.\n\n## Examples\n\n```rescript\nList.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": "Core.List.zipBy", + "kind": "value", + "name": "zipBy", + "docstrings": [ + "`zipBy(list1, list2, f)`. See [`zip`](#zip)\n\n## Examples\n\n```rescript\nList.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": "Core.List.mapWithIndex", + "kind": "value", + "name": "mapWithIndex", + "docstrings": [ + "`mapWithIndex(list, f)` applies `f` to each element of `list`. Function `f`\ntakes two arguments: the index starting from 0 and the element from `list`, in\nthat order.\n\n## Examples\n\n```rescript\nlist{1, 2, 3}->List.mapWithIndex((x, index) => index + x) // list{1, 3, 5}\n```" + ], + "signature": "let mapWithIndex: (t<'a>, ('a, int) => 'b) => t<'b>" + }, + { + "id": "Core.List.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray(arr)` converts the given array `arr` to a list.\n\n## Examples\n\n```rescript\nList.fromArray([1, 2, 3]) // list{1, 2, 3}\n```" + ], + "signature": "let fromArray: array<'a> => t<'a>" + }, + { + "id": "Core.List.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "`toArray(list)` converts the given list `list` to an array.\n\n## Examples\n\n```rescript\nList.toArray(list{1, 2, 3}) // [1, 2, 3]\n```" + ], + "signature": "let toArray: t<'a> => array<'a>" + }, + { + "id": "Core.List.reverse", + "kind": "value", + "name": "reverse", + "docstrings": [ + "`reverse(list)` returns a new list whose elements are those of `list` in\nreversed order.\n\n## Examples\n\n```rescript\nList.reverse(list{1, 2, 3}) // list{3, 2, 1}\n```" + ], + "signature": "let reverse: t<'a> => t<'a>" + }, + { + "id": "Core.List.mapReverse", + "kind": "value", + "name": "mapReverse", + "docstrings": [ + "`mapReverse(list, f)` is equivalent to `map` function.\n\n## Examples\n\n```rescript\nlet f = x => x * x\nlet l = list{3, 4, 5}\n\nlet withMap = List.map(l, f)->List.reverse\nlet withMapReverse = l->List.mapReverse(f)\n\nConsole.log(withMap == withMapReverse) // true\n```" + ], + "signature": "let mapReverse: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Core.List.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(list, f)` call `f` on each element of `list` from the beginning to end.\n`f` returns `unit`, so no new array is created. Use `forEach` when you are primarily\nconcerned with repetitively creating side effects.\n\n## Examples\n\n```rescript\nList.forEach(list{\"a\", \"b\", \"c\"}, x => Console.log(\"Item: \" ++ x))\n/*\n prints:\n Item: a\n Item: b\n Item: c\n*/\n```" + ], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Core.List.forEachWithIndex", + "kind": "value", + "name": "forEachWithIndex", + "docstrings": [ + "`forEachWithIndex(list, f, index)` call `f` on each element of `list` from beginning\nto end. Function `f` takes two arguments: the `index` starting from 0 and the\nelement from `list`. `f` returns `unit`.\n\n## Examples\n\n```rescript\nList.forEachWithIndex(list{\"a\", \"b\", \"c\"}, (x, index) => {\n Console.log(\"Item \" ++ 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>, ('a, int) => unit) => unit" + }, + { + "id": "Core.List.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce(list, initialValue, f)` applies `f` to each element of `list` from\nbeginning to end. Function `f` has two parameters: the item from the list and\nan \"accumulator\", which starts with a value of `initialValue`. `reduce` returns\nthe final value of the accumulator.\n\n## Examples\n\n```rescript\nlist{1, 2, 3, 4}->List.reduce(0, (a, b) => a + b) // 10\n\n// same as\n\nlist{1, 2, 3, 4}->List.reduce(0, (acc, item) => acc + item) // 10\n```" + ], + "signature": "let reduce: (t<'a>, 'b, ('b, 'a) => 'b) => 'b" + }, + { + "id": "Core.List.reduceWithIndex", + "kind": "value", + "name": "reduceWithIndex", + "docstrings": [ + "`reduceWithIndex(list, initialValue, f)` applies `f` to each element of `list`\nfrom beginning to end. Function `f` has three parameters: the item from the list\nand an \"accumulator\", which starts with a value of `initialValue` and the index\nof each element. `reduceWithIndex` returns the final value of the accumulator.\n\n## Examples\n\n```rescript\nlist{1, 2, 3, 4}->List.reduceWithIndex(0, (acc, item, index) => acc + item + index) // 16\n```" + ], + "signature": "let reduceWithIndex: (t<'a>, 'b, ('b, 'a, int) => 'b) => 'b" + }, + { + "id": "Core.List.reduceReverse", + "kind": "value", + "name": "reduceReverse", + "docstrings": [ + "`reduceReverse(list, initialValue, f)` works like `reduce`, except that\nfunction `f` is applied to each item of `list` from the last back to the first.\n\n## Examples\n\n```rescript\nlist{1, 2, 3, 4}->List.reduceReverse(0, (a, b) => a + b) // 10\n\nlist{1, 2, 3, 4}->List.reduceReverse(10, (a, b) => a - b) // 0\n\nlist{1, 2, 3, 4}->List.reduceReverse(list{}, List.add) // list{1, 2, 3, 4}\n```" + ], + "signature": "let reduceReverse: (t<'a>, 'b, ('b, 'a) => 'b) => 'b" + }, + { + "id": "Core.List.mapReverse2", + "kind": "value", + "name": "mapReverse2", + "docstrings": [ + "`mapReverse2(list1, list2, f)` is equivalent to `List.zipBy(list1, list2, f)->List.reverse`.\n\n## Examples\n\n```rescript\nList.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": "Core.List.forEach2", + "kind": "value", + "name": "forEach2", + "docstrings": [ + "`forEach2(list1, list2, f)` is similar to `forEach`, but accepts two lists and\nstops at the length of the shorter list.\n\n## Examples\n\n```rescript\nList.forEach2(list{\"Z\", \"Y\"}, list{\"A\", \"B\", \"C\"}, (x, y) => Console.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": "Core.List.reduce2", + "kind": "value", + "name": "reduce2", + "docstrings": [ + "`reduce2(list1, list2, initialValue, f)` applies `f` to each element of `list1`\nand `list2` from beginning to end. Stops with the shorter list. Function `f` has\nthree parameters: an accumulator which starts with a value of `initialValue`, an\nitem from `l1`, and an item from `l2`. `reduce2` returns the final value of the\naccumulator.\n\n## Examples\n\n```rescript\nList.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": "Core.List.reduceReverse2", + "kind": "value", + "name": "reduceReverse2", + "docstrings": [ + "`reduceReverse2(list1, list2, initialValue, f)` applies `f` to each element of\n`list1` and `list2`from end to beginning. Stops with the shorter list. Function\n`f` has three parameters: an accumulator which starts with a value of\n`initialValue`, an item from `l1`, and an item from `l2`. `reduce2` returns the\nfinal value of the accumulator.\n\n## Examples\n\n```rescript\nList.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": "Core.List.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every(list, f)` returns `true` if all elements in `list` satisfy `f`, where `f`\nis a predicate: a function taking an element and returning a bool.\n\n## Examples\n\n```rescript\nlet isBelow10 = value => value < 10\n\nlist{1, 9, 8, 2}->List.every(isBelow10) // true\n\nlist{1, 99, 8, 2}->List.every(isBelow10) // false\n```" + ], + "signature": "let every: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Core.List.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some(list, f)` returns `true` if at least _one_ of the elements in `list`\nsatisfies `f`, where `f` is a predicate: a function taking an element and\nreturning a bool.\n\n## Examples\n\n```rescript\nlet isAbove100 = value => value > 100\n\nlist{101, 1, 2, 3}->List.some(isAbove100) // true\n\nlist{1, 2, 3, 4}->List.some(isAbove100) // false\n```" + ], + "signature": "let some: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Core.List.every2", + "kind": "value", + "name": "every2", + "docstrings": [ + "`every2(list1, list2, f)` returns `true` if predicate `f` is `true` for all\npairs of elements up to the shorter length (i.e. `min(length(list1), length(list2))`)\n\n## Examples\n\n```rescript\nList.every2(list{1, 2, 3}, list{0, 1}, (a, b) => a > b) // true\n\nList.every2(list{}, list{1}, (a, b) => a > b) // true\n\nList.every2(list{2, 3}, list{1}, (a, b) => a > b) // true\n\nList.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": "Core.List.some2", + "kind": "value", + "name": "some2", + "docstrings": [ + "`some2(list1, list2, f)` returns `true` if predicate `f` is `true` for any pair\nof elements up to the shorter length (i.e. `min(length(list1), length(list2))`)\n\n## Examples\n\n```rescript\nList.some2(list{1, 2, 3}, list{0, 1}, (a, b) => a > b) // true\n\nList.some2(list{}, list{1}, (a, b) => a > b) // false\n\nList.some2(list{2, 3}, list{1}, (a, b) => a > b) // true\n\nList.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": "Core.List.compareLength", + "kind": "value", + "name": "compareLength", + "docstrings": [ + "`compareLength(list1, list2)` compare two lists solely by length. Returns `-1.` if\n`length(list1)` is less than `length(list2)`, `0.` if `length(list1)` equals\n`length(list2)`, and `1.` if `length(list1)` is greater than `length(list2)`.\n\n## Examples\n\n```rescript\nList.compareLength(list{1, 2}, list{3, 4, 5, 6}) // -1.\n\nList.compareLength(list{1, 2, 3}, list{4, 5, 6}) // 0.\n\nList.compareLength(list{1, 2, 3, 4}, list{5, 6}) // 1.\n```" + ], + "signature": "let compareLength: (t<'a>, t<'a>) => Core__Ordering.t" + }, + { + "id": "Core.List.compare", + "kind": "value", + "name": "compare", + "docstrings": [ + "`compare(list1, list2, f)` compare elements one by one `f`. `f` returns a negative\nnumber if `list1` is \"less than\" `list2`, zero if `list1` is \"equal to\" `list2`,\na positive number if `list1` is \"greater than\" `list2`.\n\nThe comparison returns the first non-zero result of `f`, or zero if `f` returns\nzero for all `list1` and `list2`.\n\n- If all items have compared equal, but `list1` is exhausted first, return `-1.`. (`list1` is shorter).\n- If all items have compared equal, but `list2` is exhausted first, return `1.` (`list1` is longer).\n\n## Examples\n\n```rescript\nList.compare(list{3}, list{3, 7}, (a, b) => Int.compare(a, b)) // -1.\nList.compare(list{5, 3}, list{5}, (a, b) => Int.compare(a, b)) // 1.\nList.compare(list{1, 3, 5}, list{1, 4, 2}, (a, b) => Int.compare(a, b)) // -1.\nList.compare(list{1, 3, 5}, list{1, 2, 3}, (a, b) => Int.compare(a, b)) // 1.\nList.compare(list{1, 3, 5}, list{1, 3, 5}, (a, b) => Int.compare(a, b)) // 0.\n```\n\n**Please note:** The total ordering of List is different from Array,\nfor Array, we compare the length first and, only if the lengths are equal, elements one by one.\nFor lists, we just compare elements one by one." + ], + "signature": "let compare: (\n t<'a>,\n t<'a>,\n ('a, 'a) => Core__Ordering.t,\n) => Core__Ordering.t" + }, + { + "id": "Core.List.equal", + "kind": "value", + "name": "equal", + "docstrings": [ + "`equal(list1, list2, f)` check equality of `list2` and `list2` using `f` for\nequality on elements, where `f` is a function that returns `true` if items `x` and\n`y` meet some criterion for equality, `false` otherwise. equal `false` if length\nof `list1` and `list2` are not the same.\n\n## Examples\n\n```rescript\nList.equal(list{1, 2, 3}, list{1, 2}, (a, b) => a == b) // false\n\nList.equal(list{1, 2}, list{1, 2}, (a, b) => a == b) // true\n\nList.equal(list{1, 2, 3}, list{(-1), (-2), (-3)}, (a, b) => abs(a) == abs(b)) // true\n```" + ], + "signature": "let equal: (t<'a>, t<'a>, ('a, 'a) => bool) => bool" + }, + { + "id": "Core.List.has", + "kind": "value", + "name": "has", + "docstrings": [ + "`has(list, element, f)` returns `true` if the list contains at least one\n`element` for which `f` returns `true'.\n\n## Examples\n\n```rescript\nlist{1, 2, 3}->List.has(2, (a, b) => a == b) // true\n\nlist{1, 2, 3}->List.has(4, (a, b) => a == b) // false\n\nlist{(-1), (-2), (-3)}->List.has(2, (a, b) => abs(a) == abs(b)) // true\n```" + ], + "signature": "let has: (t<'a>, 'b, ('a, 'b) => bool) => bool" + }, + { + "id": "Core.List.find", + "kind": "value", + "name": "find", + "docstrings": [ + "`find(list, f)` returns `Some(value)` for the first value in `list` that\nsatisfies the predicate function `f`. Returns `None` if no element satisfies\nthe function.\n\n## Examples\n\n```rescript\nList.find(list{1, 4, 3, 2}, x => x > 3) // Some(4)\n\nList.find(list{1, 4, 3, 2}, x => x > 4) // None\n```" + ], + "signature": "let find: (t<'a>, 'a => bool) => option<'a>" + }, + { + "id": "Core.List.filter", + "kind": "value", + "name": "filter", + "docstrings": [ + "`filter(list, f)` returns a list of all elements in `list` which satisfy the\npredicate function `f`.\n\n## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nList.filter(list{1, 2, 3, 4}, isEven) // list{2, 4}\n\nList.filter(list{None, Some(2), Some(3), None}, Option.isSome) // list{Some(2), Some(3)}\n```" + ], + "signature": "let filter: (t<'a>, 'a => bool) => t<'a>" + }, + { + "id": "Core.List.filterWithIndex", + "kind": "value", + "name": "filterWithIndex", + "docstrings": [ + "`filterWithIndex(list, f)` returns a list of all elements in `list` which\nsatisfy the predicate function `f`.\n\n## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nList.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": "Core.List.filterMap", + "kind": "value", + "name": "filterMap", + "docstrings": [ + "`filterMap(list, f)` applies `f` to each element of `list`. If `f` returns\n`Some(value)`, then `value` is _kept_ in the resulting list. If `f` returns\n`None`, the element is _not_ retained in the result.\n\n## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\n\nlist{1, 2, 3, 4}\n->List.filterMap(x =>\n if (isEven(x)) {\n Some(x)\n } else {\n None\n }\n ) // list{2, 4}\n\nlist{Some(1), Some(2), None}->List.filterMap(x => x) // list{1, 2}\n```" + ], + "signature": "let filterMap: (t<'a>, 'a => option<'b>) => t<'b>" + }, + { + "id": "Core.List.partition", + "kind": "value", + "name": "partition", + "docstrings": [ + "`partition(list, f)` creates a pair of lists; the first list consists of all\nelements of `list` that satisfy the predicate function `f`, the second list\nconsists of all elements of `list` that _do not_ satisfy `f`.\n\n## Examples\n\n```rescript\n// (elementsThatSatisfies, elementsThatDoesNotSatisfy)\n\nList.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": "Core.List.unzip", + "kind": "value", + "name": "unzip", + "docstrings": [ + "`unzip(list)` takes a list of pairs and creates a pair of lists. The first list\ncontains all the first items of the pairs, the second list contains all the\nsecond items.\n\n## Examples\n\n```rescript\nList.unzip(list{(1, 2), (3, 4)}) // (list{1, 3}, list{2, 4})\n\nList.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": "Core.List.getAssoc", + "kind": "value", + "name": "getAssoc", + "docstrings": [ + "`getAssoc(list, k, f)` return the second element of a pair in `list` where\nthe first element equals `k` as per the predicate function `f`, or `None` if\nnot found.\n\n## Examples\n\n```rescript\nlist{(1, \"a\"), (2, \"b\"), (3, \"c\")}->List.getAssoc(3, (a, b) => a == b) // Some(\"c\")\n\nlist{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")}\n->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": "Core.List.hasAssoc", + "kind": "value", + "name": "hasAssoc", + "docstrings": [ + "`hasAssoc(list, k, f)` returns `true` if there is a pair in `list` where the\nfirst element equals `k` as per the predicate function `f`.\n\n## Examples\n\n```rescript\nlist{(1, \"a\"), (2, \"b\"), (3, \"c\")}->List.hasAssoc(1, (a, b) => a == b) // true\n\nlist{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")}\n->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": "Core.List.removeAssoc", + "kind": "value", + "name": "removeAssoc", + "docstrings": [ + "`removeAssoc(list, k, f)` return a list after removing the first pair whose\nfirst value is `k` per the equality predicate `f`, if not found, return a new\nlist identical to `list`.\n\n## Examples\n\n```rescript\nlist{(1, \"a\"), (2, \"b\"), (3, \"c\")}->List.removeAssoc(1, (a, b) => a == b) // list{(2, \"b\"), (3, \"c\")}\n\nlist{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")}\n->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": "Core.List.setAssoc", + "kind": "value", + "name": "setAssoc", + "docstrings": [ + "`setAssoc(list, k, v, f)`. If `k` exists in `list` by satisfying the `f`\npredicate, return a new list with the key and value replaced by the new `k` and\n`v`, otherwise, return a new list with the pair `k`, `v` added to the head of\n`list`.\n\n## Examples\n\n```rescript\nlist{(1, \"a\"), (2, \"b\"), (3, \"c\")}->List.setAssoc(2, \"x\", (a, b) => a == b) // list{(1, \"a\"), (2, \"x\"), (3, \"c\")}\n\nlist{(1, \"a\"), (3, \"c\")}->List.setAssoc(2, \"b\", (a, b) => a == b) // list{(2, \"b\"), (1, \"a\"), (3, \"c\")}\n\nlist{(9, \"morning\"), (3, \"morning?!\"), (22, \"night\")}\n->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**: In the last example, since: `15 mod 12` equals `3 mod 12`. Both\nthe key _and_ the value are replaced in the list." + ], + "signature": "let setAssoc: (t<('a, 'c)>, 'a, 'c, ('a, 'a) => bool) => t<('a, 'c)>" + }, + { + "id": "Core.List.sort", + "kind": "value", + "name": "sort", + "docstrings": [ + "`sort(list, f)` returns a sorted list.\n\n## Examples\n\n```rescript\nList.sort(list{5, 4, 9, 3, 7}, Int.compare) // list{3, 4, 5, 7, 9}\n```" + ], + "signature": "let sort: (t<'a>, ('a, 'a) => Core__Ordering.t) => t<'a>" + } + ] + }, + "core/option": { + "id": "Core.Option", + "name": "Option", + "docstrings": [ + "We represent the existence and nonexistence of a value by wrapping it with\nthe `option` type. In order to make it a bit more convenient to work with\noption-types, we provide utility-functions for it.\n\nThe `option` type is a part of the ReScript standard library which is defined\nlike this:\n\n```rescript\ntype option<'a> = None | Some('a)\n```\n\n```rescript\nlet someString: option = Some(\"hello\")\n```" + ], + "items": [ + { + "id": "Core.Option.filter", + "kind": "value", + "name": "filter", + "docstrings": [ + "`filter(opt, f)` applies `f` to `opt`, if `f` returns `true`, then it returns `Some(value)`, otherwise returns `None`.\n\n## Examples\n\n```rescript\nOption.filter(Some(10), x => x > 5) // Some(10)\nOption.filter(Some(4), x => x > 5) // None\nOption.filter(None, x => x > 5) // None\n```" + ], + "signature": "let filter: (option<'a>, 'a => bool) => option<'a>" + }, + { + "id": "Core.Option.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(opt, f)` call `f` on `opt`. if `opt` is `Some(value)`, then if calls\n`f`, otherwise returns `unit`.\n\n## Examples\n\n```rescript\nOption.forEach(Some(\"thing\"), x => Console.log(x)) // logs \"thing\"\nOption.forEach(None, x => Console.log(x)) // returns ()\n```" + ], + "signature": "let forEach: (option<'a>, 'a => unit) => unit" + }, + { + "id": "Core.Option.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "`getExn(opt, ~message=?)` returns `value` if `opt` is `Some(value)`, otherwise raises an exception with the message provided, or a generic message if no message was provided.\n\n```rescript\nOption.getExn(Some(3)) // 3\nOption.getExn(None) /* Raises an Error */\nOption.getExn(None, ~message=\"was None!\") /* Raises an Error with the message \"was None!\" */\n```\n\n## Exceptions\n\n- Raises an error if `opt` is `None`" + ], + "signature": "let getExn: (option<'a>, ~message: string=?) => 'a" + }, + { + "id": "Core.Option.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [ + "`getUnsafe(opt)` returns `value` if `opt` is `Some(value)`, otherwise `undefined`.\n\n## Examples\n\n```rescript\nOption.getUnsafe(Some(3)) == 3\nOption.getUnsafe(None: option) // Returns `undefined`, which is not a valid `int`\n```\n\n## Notes\n\n- This is an unsafe operation. It assumes `value` is not `None`, and may cause undefined behaviour if it is." + ], + "signature": "let getUnsafe: option<'a> => 'a" + }, + { + "id": "Core.Option.mapOr", + "kind": "value", + "name": "mapOr", + "docstrings": [ + "`mapOr(opt, default, f)` returns `f(value)` if `opt` is `Some(value)`, otherwise `default`.\n\n## Examples\n\n```rescript\nlet someValue = Some(3)\nsomeValue->Option.mapOr(0, x => x + 5) // 8\n\nlet noneValue = None\nnoneValue->Option.mapOr(0, x => x + 5) // 0\n```" + ], + "signature": "let mapOr: (option<'a>, 'b, 'a => 'b) => 'b" + }, + { + "id": "Core.Option.mapWithDefault", + "kind": "value", + "name": "mapWithDefault", + "docstrings": [], + "signature": "let mapWithDefault: (option<'a>, 'b, 'a => 'b) => 'b", + "deprecated": "Use mapOr instead" + }, + { + "id": "Core.Option.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(opt, f)` returns `Some(f(value))` if `opt` is `Some(value)`, otherwise `None`.\n\n## Examples\n\n```rescript\nOption.map(Some(3), x => x * x) // Some(9)\nOption.map(None, x => x * x) // None\n```" + ], + "signature": "let map: (option<'a>, 'a => 'b) => option<'b>" + }, + { + "id": "Core.Option.flatMap", + "kind": "value", + "name": "flatMap", + "docstrings": [ + "`flatMap(opt, f)` returns `f(value)` if `opt` is `Some(value)`, otherwise `None`.\n\n## Examples\n\n```rescript\nlet addIfAboveOne = value =>\n if (value > 1) {\n Some(value + 1)\n } else {\n None\n }\n\nOption.flatMap(Some(2), addIfAboveOne) // Some(3)\nOption.flatMap(Some(-4), addIfAboveOne) // None\nOption.flatMap(None, addIfAboveOne) // None\n```" + ], + "signature": "let flatMap: (option<'a>, 'a => option<'b>) => option<'b>" + }, + { + "id": "Core.Option.getOr", + "kind": "value", + "name": "getOr", + "docstrings": [ + "`getOr(opt, default)` returns `value` if `opt` is `Some(value)`, otherwise `default`.\n\n## Examples\n\n```rescript\nOption.getOr(None, \"Banana\") // Banana\nOption.getOr(Some(\"Apple\"), \"Banana\") // Apple\n\nlet greet = (firstName: option) =>\n \"Greetings \" ++ firstName->Option.getOr(\"Anonymous\")\n\nSome(\"Jane\")->greet // \"Greetings Jane\"\nNone->greet // \"Greetings Anonymous\"\n```" + ], + "signature": "let getOr: (option<'a>, 'a) => 'a" + }, + { + "id": "Core.Option.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (option<'a>, 'a) => 'a", + "deprecated": "Use getOr instead" + }, + { + "id": "Core.Option.orElse", + "kind": "value", + "name": "orElse", + "docstrings": [ + "`orElse(opt1, opt2)` returns `opt2` if `opt1` is `None`, otherwise `opt1`.\n\n## Examples\n\n```rescript\nOption.orElse(Some(1812), Some(1066)) == Some(1812)\nOption.orElse(None, Some(1066)) == Some(1066)\nOption.orElse(None, None) == None\n```" + ], + "signature": "let orElse: (option<'a>, option<'a>) => option<'a>" + }, + { + "id": "Core.Option.isSome", + "kind": "value", + "name": "isSome", + "docstrings": [ + "`isSome(opt)` returns `true` if `opt` is `Some(value)`, otherwise returns `false`.\n\n## Examples\n\n```rescript\nOption.isSome(None) // false\nOption.isSome(Some(1)) // true\n```" + ], + "signature": "let isSome: option<'a> => bool" + }, + { + "id": "Core.Option.isNone", + "kind": "value", + "name": "isNone", + "docstrings": [ + "`isNone(opt)` returns `true` if `opt` is `None`, false otherwise.\n\n## Examples\n\n```rescript\nOption.isNone(None) // true\nOption.isNone(Some(1)) // false\n```" + ], + "signature": "let isNone: option<'a> => bool" + }, + { + "id": "Core.Option.equal", + "kind": "value", + "name": "equal", + "docstrings": [ + "`equal(opt1, opt2, f)` evaluates two optional values for equality with respect to a predicate function `f`. If both `opt1` and `opt2` are `None`, returns `true`.\nIf one of the arguments is `Some(value)` and the other is `None`, returns\n`false`.\nIf arguments are `Some(value1)` and `Some(value2)`, returns the result of\n`f(value1, value2)`, the predicate function `f` must return a bool.\n\n## Examples\n\n```rescript\nlet clockEqual = (a, b) => mod(a, 12) == mod(b, 12)\n\nopen Option\n\nequal(Some(3), Some(15), clockEqual) // true\nequal(Some(3), None, clockEqual) // false\nequal(None, Some(3), clockEqual) // false\nequal(None, None, clockEqual) // true\n```" + ], + "signature": "let equal: (option<'a>, option<'b>, ('a, 'b) => bool) => bool" + }, + { + "id": "Core.Option.compare", + "kind": "value", + "name": "compare", + "docstrings": [ + "`compare(opt1, opt2, f)` compares two optional values with respect to given `f`.\n\nIf both `opt1` and `opt2` are `None`, it returns `0.`. If the first argument is `Some(value1)` and the second is `None`, returns `1.` (something is greater than nothing).\n\nIf the first argument is `None` and the second is `Some(value2)`, returns `-1.`\n(nothing is less than something).\n\nIf the arguments are `Some(value1)` and `Some(value2)`, returns the result of\n`f(value1, value2)`, `f` takes two arguments and returns `-1.` if the first\nargument is less than the second, `0.` if the arguments are equal, and `1.` if\nthe first argument is greater than the second.\n\n## Examples\n\n```rescript\nlet clockCompare = (a, b) => Int.compare(mod(a, 12), mod(b, 12))\n\nOption.compare(Some(3), Some(15), clockCompare) // 0.\nOption.compare(Some(3), Some(14), clockCompare) // 1.\nOption.compare(Some(2), Some(15), clockCompare) // (-1.)\nOption.compare(None, Some(15), clockCompare) // (-1.)\nOption.compare(Some(14), None, clockCompare) // 1.\nOption.compare(None, None, clockCompare) // 0.\n```" + ], + "signature": "let compare: (\n option<'a>,\n option<'b>,\n ('a, 'b) => Core__Ordering.t,\n) => Core__Ordering.t" + } + ] + }, + "core/exn": { + "id": "Core.Exn", + "name": "Exn", + "docstrings": [], + "items": [] + }, + "core/intl": { + "id": "Core.Intl", + "name": "Intl", + "docstrings": [], + "items": [ + { + "id": "Core.Intl.getCanonicalLocalesExn", + "kind": "value", + "name": "getCanonicalLocalesExn", + "docstrings": [ + "@throws RangeError" + ], + "signature": "let getCanonicalLocalesExn: string => array" + }, + { + "id": "Core.Intl.getCanonicalLocalesManyExn", + "kind": "value", + "name": "getCanonicalLocalesManyExn", + "docstrings": [ + "@throws RangeError" + ], + "signature": "let getCanonicalLocalesManyExn: array => array" + }, + { + "id": "Core.Intl.supportedValuesOfExn", + "kind": "value", + "name": "supportedValuesOfExn", + "docstrings": [ + "@throws RangeError" + ], + "signature": "let supportedValuesOfExn: string => array" + } + ] + }, + "core/biguint64array": { + "id": "Core.BigUint64Array", + "name": "BigUint64Array", + "docstrings": [], + "items": [ + { + "id": "Core.BigUint64Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `BigUint64Array` typed array represents an array of 64-bit unsigned integers in platform byte order. See [BigUint64Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.BigUint64Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `BigUint64Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array/BigUint64Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.BigUint64Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `BigUint64Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array/BigUint64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.BigUint64Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `BigUint64Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array/BigUint64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.BigUint64Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `BigUint64Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array/BigUint64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.BigUint64Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `BigUint64Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array/BigUint64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.BigUint64Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `BigUint64Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.BigUint64Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `BigUint64Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => bigint) => t" + } + ] + }, + "core/bigint64array": { + "id": "Core.BigInt64Array", + "name": "BigInt64Array", + "docstrings": [], + "items": [ + { + "id": "Core.BigInt64Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `BigInt64Array` typed array represents an array of 64-bit signed integers in platform byte order. See [BigInt64Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.BigInt64Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `BigInt64Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array/BigInt64Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.BigInt64Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `BigInt64Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array/BigInt64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.BigInt64Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `BigInt64Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array/BigInt64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.BigInt64Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `BigInt64Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array/BigInt64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.BigInt64Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `BigInt64Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array/BigInt64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.BigInt64Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `BigInt64Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.BigInt64Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `BigInt64Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => bigint) => t" + } + ] + }, + "core/uint8clampedarray": { + "id": "Core.Uint8ClampedArray", + "name": "Uint8ClampedArray", + "docstrings": [], + "items": [ + { + "id": "Core.Uint8ClampedArray.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `Uint8ClampedArray` typed array represents an array of 8-bit unsigned integers clamped to 0-255. See [Uint8ClampedArray on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.Uint8ClampedArray.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `Uint8ClampedArray` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray/Uint8ClampedArray)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.Uint8ClampedArray.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `Uint8ClampedArray` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray/Uint8ClampedArray)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.Uint8ClampedArray.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `Uint8ClampedArray` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray/Uint8ClampedArray)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.Uint8ClampedArray.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `Uint8ClampedArray` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray/Uint8ClampedArray)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.Uint8ClampedArray.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `Uint8ClampedArray` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray/Uint8ClampedArray)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.Uint8ClampedArray.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `Uint8ClampedArray` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.Uint8ClampedArray.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `Uint8ClampedArray` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t" + } + ] + }, + "core/uint32array": { + "id": "Core.Uint32Array", + "name": "Uint32Array", + "docstrings": [], + "items": [ + { + "id": "Core.Uint32Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `Uint32Array` typed array represents an array of 32-bit unsigned integers in platform byte order. See [Uint32Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.Uint32Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `Uint32Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array/Uint32Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.Uint32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `Uint32Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array/Uint32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.Uint32Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `Uint32Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array/Uint32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.Uint32Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `Uint32Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array/Uint32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.Uint32Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `Uint32Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array/Uint32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.Uint32Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `Uint32Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.Uint32Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `Uint32Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t" + } + ] + }, + "core/uint16array": { + "id": "Core.Uint16Array", + "name": "Uint16Array", + "docstrings": [], + "items": [ + { + "id": "Core.Uint16Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `Uint16Array` typed array represents an array of 16-bit unsigned integers in platform byte order. See [Uint16Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.Uint16Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `Uint16Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array/Uint16Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.Uint16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `Uint16Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array/Uint16Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.Uint16Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `Uint16Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array/Uint16Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.Uint16Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `Uint16Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array/Uint16Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.Uint16Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `Uint16Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array/Uint16Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.Uint16Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `Uint16Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.Uint16Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `Uint16Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t" + } + ] + }, + "core/uint8array": { + "id": "Core.Uint8Array", + "name": "Uint8Array", + "docstrings": [], + "items": [ + { + "id": "Core.Uint8Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `Uint8Array` typed array represents an array of 8-bit unsigned integers. See [Uint8Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.Uint8Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `Uint8Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/Uint8Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.Uint8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `Uint8Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/Uint8Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.Uint8Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `Uint8Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/Uint8Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.Uint8Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `Uint8Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/Uint8Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.Uint8Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `Uint8Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/Uint8Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.Uint8Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `Uint8Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.Uint8Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `Uint8Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t" + } + ] + }, + "core/int32array": { + "id": "Core.Int32Array", + "name": "Int32Array", + "docstrings": [], + "items": [ + { + "id": "Core.Int32Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `Int32Array` typed array represents an array of twos-complemenet 32-bit signed integers in platform byte order. See [Int32Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.Int32Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `Int32Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array/Int32Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.Int32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `Int32Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array/Int32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.Int32Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `Int32Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array/Int32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.Int32Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `Int32Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array/Int32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.Int32Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `Int32Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array/Int32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.Int32Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `Int32Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.Int32Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `Int32Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t" + } + ] + }, + "core/int16array": { + "id": "Core.Int16Array", + "name": "Int16Array", + "docstrings": [], + "items": [ + { + "id": "Core.Int16Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `Int16Array` typed array represents an array of twos-complement 16-bit signed integers in platform byte order. See [Int16Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.Int16Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `Int16Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array/Int16Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.Int16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `Int16Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array/Int16Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.Int16Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `Int16Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array/Int16Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.Int16Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `Int16Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array/Int16Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.Int16Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `Int16Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array/Int16Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.Int16Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `Int16Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.Int16Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `Int16Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t" + } + ] + }, + "core/int8array": { + "id": "Core.Int8Array", + "name": "Int8Array", + "docstrings": [], + "items": [ + { + "id": "Core.Int8Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `Int8Array` typed array represents an array of twos-complement 8-bit signed integers. See [Int8Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.Int8Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `Int8Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array/Int8Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.Int8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `Int8Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array/Int8Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.Int8Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `Int8Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array/Int8Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.Int8Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `Int8Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array/Int8Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.Int8Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `Int8Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array/Int8Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.Int8Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `Int8Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.Int8Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `Int8Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => int) => t" + } + ] + }, + "core/float64array": { + "id": "Core.Float64Array", + "name": "Float64Array", + "docstrings": [], + "items": [ + { + "id": "Core.Float64Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `Float64Array` typed array represents an array of 64-bit floating point numbers in platform byte order. See [Float64Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.Float64Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `Float64Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array/Float64Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.Float64Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `Float64Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array/Float64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.Float64Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `Float64Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array/Float64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.Float64Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `Float64Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array/Float64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.Float64Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `Float64Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array/Float64Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.Float64Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `Float64Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.Float64Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `Float64Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => float) => t" + } + ] + }, + "core/float32array": { + "id": "Core.Float32Array", + "name": "Float32Array", + "docstrings": [], + "items": [ + { + "id": "Core.Float32Array.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The `Float32Array` typed array represents an array of 32-bit floating point numbers in platform byte order. See [Float32Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array)" + ], + "signature": "type t = Core__TypedArray.t" + }, + { + "id": "Core.Float32Array.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray` creates a `Float32Array` from an array of values. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array/Float32Array)" + ], + "signature": "let fromArray: array => t" + }, + { + "id": "Core.Float32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [ + "`fromBuffer` creates a `Float32Array` from an `ArrayBuffer.t`. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array/Float32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.Float32Array.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [ + "`fromBufferToEnd` creates a `Float32Array` from an `ArrayBuffer.t`, starting at a particular offset and continuing through to the end. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array/Float32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.Float32Array.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [ + "`fromBufferWithRange` creates a `Float32Array` from an `ArrayBuffer.t`, starting at a particular offset and consuming `length` **bytes**. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array/Float32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.Float32Array.fromLength", + "kind": "value", + "name": "fromLength", + "docstrings": [ + "`fromLength` creates a zero-initialized `Float32Array` to hold the specified count of numbers; this is **not** a byte length. See [TypedArray constructor on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array/Float32Array)\n\n**Note:** This is a potentially unsafe operation. Ensure the buffer is large enough and only accessed within its bounds." + ], + "signature": "let fromLength: int => t" + }, + { + "id": "Core.Float32Array.fromArrayLikeOrIterable", + "kind": "value", + "name": "fromArrayLikeOrIterable", + "docstrings": [ + "`fromArrayLikeOrIterable` creates a `Float32Array` from an array-like or iterable object. See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterable: 'a => t" + }, + { + "id": "Core.Float32Array.fromArrayLikeOrIterableWithMap", + "kind": "value", + "name": "fromArrayLikeOrIterableWithMap", + "docstrings": [ + "`fromArrayLikeOrIterableWithMap` creates a `Float32Array` from an array-like or iterable object and applies the mapping function to each item. The mapping function expects (value, index). See [TypedArray.from on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from)" + ], + "signature": "let fromArrayLikeOrIterableWithMap: ('a, ('b, int) => float) => t" + } + ] + }, + "core/typedarray": { + "id": "Core.TypedArray", + "name": "TypedArray", + "docstrings": [], + "items": [ + { + "id": "Core.TypedArray.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a>" + }, + { + "id": "Core.TypedArray.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'a>, int) => option<'a>" + }, + { + "id": "Core.TypedArray.set", + "kind": "value", + "name": "set", + "docstrings": [], + "signature": "let set: (t<'a>, int, 'a) => unit" + }, + { + "id": "Core.TypedArray.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t<'a> => Core__ArrayBuffer.t" + }, + { + "id": "Core.TypedArray.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t<'a> => int" + }, + { + "id": "Core.TypedArray.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t<'a> => int" + }, + { + "id": "Core.TypedArray.setArray", + "kind": "value", + "name": "setArray", + "docstrings": [], + "signature": "let setArray: (t<'a>, array<'a>) => unit" + }, + { + "id": "Core.TypedArray.setArrayFrom", + "kind": "value", + "name": "setArrayFrom", + "docstrings": [], + "signature": "let setArrayFrom: (t<'a>, array<'a>, int) => unit" + }, + { + "id": "Core.TypedArray.length", + "kind": "value", + "name": "length", + "docstrings": [], + "signature": "let length: t<'a> => int" + }, + { + "id": "Core.TypedArray.copyAllWithin", + "kind": "value", + "name": "copyAllWithin", + "docstrings": [], + "signature": "let copyAllWithin: (t<'a>, ~target: int) => array<'a>" + }, + { + "id": "Core.TypedArray.copyWithinToEnd", + "kind": "value", + "name": "copyWithinToEnd", + "docstrings": [], + "signature": "let copyWithinToEnd: (t<'a>, ~target: int, ~start: int) => array<'a>" + }, + { + "id": "Core.TypedArray.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (t<'a>, ~target: int, ~start: int, ~end: int) => array<'a>" + }, + { + "id": "Core.TypedArray.fillAll", + "kind": "value", + "name": "fillAll", + "docstrings": [], + "signature": "let fillAll: (t<'a>, 'a) => t<'a>" + }, + { + "id": "Core.TypedArray.fillToEnd", + "kind": "value", + "name": "fillToEnd", + "docstrings": [], + "signature": "let fillToEnd: (t<'a>, 'a, ~start: int) => t<'a>" + }, + { + "id": "Core.TypedArray.fill", + "kind": "value", + "name": "fill", + "docstrings": [], + "signature": "let fill: (t<'a>, 'a, ~start: int, ~end: int) => t<'a>" + }, + { + "id": "Core.TypedArray.reverse", + "kind": "value", + "name": "reverse", + "docstrings": [], + "signature": "let reverse: t<'a> => unit" + }, + { + "id": "Core.TypedArray.toReversed", + "kind": "value", + "name": "toReversed", + "docstrings": [], + "signature": "let toReversed: t<'a> => t<'a>" + }, + { + "id": "Core.TypedArray.sort", + "kind": "value", + "name": "sort", + "docstrings": [], + "signature": "let sort: (t<'a>, ('a, 'a) => Core__Ordering.t) => unit" + }, + { + "id": "Core.TypedArray.toSorted", + "kind": "value", + "name": "toSorted", + "docstrings": [], + "signature": "let toSorted: (t<'a>, ('a, 'a) => Core__Ordering.t) => t<'a>" + }, + { + "id": "Core.TypedArray.with", + "kind": "value", + "name": "with", + "docstrings": [], + "signature": "let with: (t<'a>, int, 'a) => t<'a>" + }, + { + "id": "Core.TypedArray.includes", + "kind": "value", + "name": "includes", + "docstrings": [], + "signature": "let includes: (t<'a>, 'a) => bool" + }, + { + "id": "Core.TypedArray.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [], + "signature": "let indexOf: (t<'a>, 'a) => int" + }, + { + "id": "Core.TypedArray.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (t<'a>, 'a, int) => int" + }, + { + "id": "Core.TypedArray.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [], + "signature": "let joinWith: (t<'a>, string) => string" + }, + { + "id": "Core.TypedArray.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (t<'a>, 'a) => int" + }, + { + "id": "Core.TypedArray.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (t<'a>, 'a, int) => int" + }, + { + "id": "Core.TypedArray.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (t<'a>, ~start: int, ~end: int) => t<'a>" + }, + { + "id": "Core.TypedArray.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "docstrings": [], + "signature": "let sliceToEnd: (t<'a>, ~start: int) => t<'a>" + }, + { + "id": "Core.TypedArray.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Core.TypedArray.subarray", + "kind": "value", + "name": "subarray", + "docstrings": [], + "signature": "let subarray: (t<'a>, ~start: int, ~end: int) => t<'a>" + }, + { + "id": "Core.TypedArray.subarrayToEnd", + "kind": "value", + "name": "subarrayToEnd", + "docstrings": [], + "signature": "let subarrayToEnd: (t<'a>, ~start: int) => t<'a>" + }, + { + "id": "Core.TypedArray.toString", + "kind": "value", + "name": "toString", + "docstrings": [], + "signature": "let toString: t<'a> => string" + }, + { + "id": "Core.TypedArray.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: t<'a> => string" + }, + { + "id": "Core.TypedArray.every", + "kind": "value", + "name": "every", + "docstrings": [], + "signature": "let every: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Core.TypedArray.everyWithIndex", + "kind": "value", + "name": "everyWithIndex", + "docstrings": [], + "signature": "let everyWithIndex: (t<'a>, ('a, int) => bool) => bool" + }, + { + "id": "Core.TypedArray.filter", + "kind": "value", + "name": "filter", + "docstrings": [], + "signature": "let filter: (t<'a>, 'a => bool) => t<'a>" + }, + { + "id": "Core.TypedArray.filterWithIndex", + "kind": "value", + "name": "filterWithIndex", + "docstrings": [], + "signature": "let filterWithIndex: (t<'a>, ('a, int) => bool) => t<'a>" + }, + { + "id": "Core.TypedArray.find", + "kind": "value", + "name": "find", + "docstrings": [], + "signature": "let find: (t<'a>, 'a => bool) => option<'a>" + }, + { + "id": "Core.TypedArray.findWithIndex", + "kind": "value", + "name": "findWithIndex", + "docstrings": [], + "signature": "let findWithIndex: (t<'a>, ('a, int) => bool) => option<'a>" + }, + { + "id": "Core.TypedArray.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [], + "signature": "let findIndex: (t<'a>, 'a => bool) => int" + }, + { + "id": "Core.TypedArray.findIndexWithIndex", + "kind": "value", + "name": "findIndexWithIndex", + "docstrings": [], + "signature": "let findIndexWithIndex: (t<'a>, ('a, int) => bool) => int" + }, + { + "id": "Core.TypedArray.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Core.TypedArray.forEachWithIndex", + "kind": "value", + "name": "forEachWithIndex", + "docstrings": [], + "signature": "let forEachWithIndex: (t<'a>, ('a, int) => unit) => unit" + }, + { + "id": "Core.TypedArray.map", + "kind": "value", + "name": "map", + "docstrings": [], + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Core.TypedArray.mapWithIndex", + "kind": "value", + "name": "mapWithIndex", + "docstrings": [], + "signature": "let mapWithIndex: (t<'a>, ('a, int) => 'b) => t<'b>" + }, + { + "id": "Core.TypedArray.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [], + "signature": "let reduce: (t<'a>, ('b, 'a) => 'b, 'b) => 'b" + }, + { + "id": "Core.TypedArray.reduceWithIndex", + "kind": "value", + "name": "reduceWithIndex", + "docstrings": [], + "signature": "let reduceWithIndex: (t<'a>, ('b, 'a, int) => 'b, 'b) => 'b" + }, + { + "id": "Core.TypedArray.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [], + "signature": "let reduceRight: (t<'a>, ('b, 'a) => 'b, 'b) => 'b" + }, + { + "id": "Core.TypedArray.reduceRightWithIndex", + "kind": "value", + "name": "reduceRightWithIndex", + "docstrings": [], + "signature": "let reduceRightWithIndex: (t<'a>, ('b, 'a, int) => 'b, 'b) => 'b" + }, + { + "id": "Core.TypedArray.some", + "kind": "value", + "name": "some", + "docstrings": [], + "signature": "let some: (t<'a>, 'a => bool) => bool" + }, + { + "id": "Core.TypedArray.someWithIndex", + "kind": "value", + "name": "someWithIndex", + "docstrings": [], + "signature": "let someWithIndex: (t<'a>, ('a, int) => bool) => bool" + } + ] + }, + "core/arraybuffer": { + "id": "Core.ArrayBuffer", + "name": "ArrayBuffer", + "docstrings": [], + "items": [ + { + "id": "Core.ArrayBuffer.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = Js.TypedArray2.ArrayBuffer.t" + }, + { + "id": "Core.ArrayBuffer.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: int => t" + }, + { + "id": "Core.ArrayBuffer.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Core.ArrayBuffer.slice", + "kind": "value", + "name": "slice", + "docstrings": [], + "signature": "let slice: (t, ~start: int, ~end: int) => t" + }, + { + "id": "Core.ArrayBuffer.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "docstrings": [], + "signature": "let sliceToEnd: (t, ~start: int) => t" + } + ] + }, + "core/weakset": { + "id": "Core.WeakSet", + "name": "WeakSet", + "docstrings": [], + "items": [ + { + "id": "Core.WeakSet.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a> = Js.WeakSet.t<'a>" + }, + { + "id": "Core.WeakSet.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: unit => t<'a>" + }, + { + "id": "Core.WeakSet.add", + "kind": "value", + "name": "add", + "docstrings": [], + "signature": "let add: (t<'a>, 'a) => t<'a>" + }, + { + "id": "Core.WeakSet.delete", + "kind": "value", + "name": "delete", + "docstrings": [], + "signature": "let delete: (t<'a>, 'a) => bool" + }, + { + "id": "Core.WeakSet.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'a>, 'a) => bool" + } + ] + }, + "core/set": { + "id": "Core.Set", + "name": "Set", + "docstrings": [ + "Bindings to the mutable JavaScript `Set`.\n\nSee [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) on MDN." + ], + "items": [ + { + "id": "Core.Set.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Type representing an instance of `Set`." + ], + "signature": "type t<'a> = Js.Set.t<'a>" + }, + { + "id": "Core.Set.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new, mutable JavaScript `Set`. A `Set` is a collection of unique values.\n\nSee [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) on MDN.\n\n\n\n## Examples\n```rescript\n// You can annotate the type of your set if you want to\nlet mySet: Set.t = Set.make()\n\n// Or you can let ReScript infer what's in your Set\nlet set = Set.make()\nset->Set.add(\"Fine name\") // Inferred as Set.t\n```\n\n## Alternatives\nA JavaScript `Set` is mutable. If you're looking for an immutable alternative, check out `Belt.Set`." + ], + "signature": "let make: unit => t<'a>" + }, + { + "id": "Core.Set.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "Turns an array of values into a Set. Meaning only unique values are preserved.\n\n## Examples\n```rescript\ntype languages = ReScript | JavaScript | TypeScript\nlet languageRank = [ReScript, JavaScript, TypeScript]\n\nlet set = Set.fromArray(languageRank) // Set.t\n\nswitch set->Set.has(ReScript) {\n| true => Console.log(\"Yay, ReScript is in there!\")\n| false => Console.log(\"Uh-oh, something is _terribly_ wrong with this program... abort.\")\n}\n```" + ], + "signature": "let fromArray: array<'a> => t<'a>" + }, + { + "id": "Core.Set.fromIterator", + "kind": "value", + "name": "fromIterator", + "docstrings": [ + "Turns an iterator into a `Set`.\n\n## Examples\n```rescript\n// Let's pretend we have an interator\n@val external someIterator: Iterator.t = \"someIterator\"\n\nlet set = Set.fromIterator(someIterator) // Set.t\n```" + ], + "signature": "let fromIterator: Core__Iterator.t<'a> => t<'a>" + }, + { + "id": "Core.Set.size", + "kind": "value", + "name": "size", + "docstrings": [ + "Returns the size, the number of unique values, of the set.\n\n## Examples\n```rescript\nlet set = Set.make()\n\nset->Set.add(\"someValue\")\nset->Set.add(\"someValue\")\nset->Set.add(\"someValue2\")\n\nlet size = set->Set.size // 2\n```" + ], + "signature": "let size: t<'a> => int" + }, + { + "id": "Core.Set.clear", + "kind": "value", + "name": "clear", + "docstrings": [ + "Clears all entries in the set.\n\n## Examples\n```rescript\nlet set = Set.make()\n\nset->Set.add(\"someKey\")\nset->Set.size // 1\n\nset->Set.clear\nset->Set.size // 0\n```" + ], + "signature": "let clear: t<'a> => unit" + }, + { + "id": "Core.Set.add", + "kind": "value", + "name": "add", + "docstrings": [ + "Adds a new value to the set.\n\n## Examples\n```rescript\nlet set = Set.make()\nset->Set.add(\"someValue\")\n```" + ], + "signature": "let add: (t<'a>, 'a) => unit" + }, + { + "id": "Core.Set.delete", + "kind": "value", + "name": "delete", + "docstrings": [ + "Deletes the provided `value` from the set. Returns a `bool` for whether the value existed, and was deleted.\n\n## Examples\n```rescript\nlet set = Set.make()\nset->Set.add(\"someValue\")\nlet didDeleteValue = set->Set.delete(\"someValue\")\nConsole.log(didDeleteValue) // Logs `true` to the console, becuase the set had the value, so it was successfully deleted\n\nlet didDeleteValue = set->Set.delete(\"someNonExistantKey\")\nConsole.log(didDeleteValue) // Logs `false` to the console, becuase the value did not exist in the set\n```" + ], + "signature": "let delete: (t<'a>, 'a) => bool" + }, + { + "id": "Core.Set.has", + "kind": "value", + "name": "has", + "docstrings": [ + "Checks whether the set has a specific value.\n\n## Examples\n```rescript\nlet set = Set.make()\nset->Set.add(\"someValue\")\n\nswitch set->Set.has(\"someValue\") {\n| false => Console.log(\"Nope, didn't have it.\")\n| true => Console.log(\"Yay, we have the value!\")\n}\n```" + ], + "signature": "let has: (t<'a>, 'a) => bool" + }, + { + "id": "Core.Set.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "Iterates through all values of the set.\n\n## Examples\n```rescript\nlet set = Set.make()\nset->Set.add(\"someValue\")\nset->Set.add(\"someValue2\")\n\nset->Set.forEach(value => {\n Console.log(value)\n})\n```" + ], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Core.Set.values", + "kind": "value", + "name": "values", + "docstrings": [ + "Returns an iterator that holds all values of the set.\n\n## Examples\n```rescript\nlet set = Set.make()\nset->Set.add(\"someValue\")\nset->Set.add(\"anotherValue\")\n\nlet values = set->Set.values\n\n// Logs the first value\nConsole.log(Iterator.next(values).value)\n\n// You can also turn the iterator into an array.\n// Remember that an iterator consumes values. We'll need a fresh values iterator to get an array of all values, since we consumed a value via `next` above already.\nConsole.log(set->Set.values->Iterator.toArray)\n```" + ], + "signature": "let values: t<'a> => Core__Iterator.t<'a>" + } + ] + }, + "core/weakmap": { + "id": "Core.WeakMap", + "name": "WeakMap", + "docstrings": [], + "items": [ + { + "id": "Core.WeakMap.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'k, 'v> = Js.WeakMap.t<'k, 'v>" + }, + { + "id": "Core.WeakMap.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: unit => t<'k, 'v>" + }, + { + "id": "Core.WeakMap.get", + "kind": "value", + "name": "get", + "docstrings": [], + "signature": "let get: (t<'k, 'v>, 'k) => option<'v>" + }, + { + "id": "Core.WeakMap.has", + "kind": "value", + "name": "has", + "docstrings": [], + "signature": "let has: (t<'k, 'v>, 'k) => bool" + }, + { + "id": "Core.WeakMap.set", + "kind": "value", + "name": "set", + "docstrings": [], + "signature": "let set: (t<'k, 'v>, 'k, 'v) => t<'k, 'v>" + }, + { + "id": "Core.WeakMap.delete", + "kind": "value", + "name": "delete", + "docstrings": [], + "signature": "let delete: (t<'k, 'v>, 'k) => bool" + } + ] + }, + "core/map": { + "id": "Core.Map", + "name": "Map", + "docstrings": [ + "Bindings to the mutable JavaScript `Map`.\n\nSee [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) on MDN." + ], + "items": [ + { + "id": "Core.Map.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Type representing an instance of `Map`." + ], + "signature": "type t<'k, 'v> = Js.Map.t<'k, 'v>" + }, + { + "id": "Core.Map.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new, mutable JavaScript `Map`. A `Map` can have any values as both keys and values.\n\nSee [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) on MDN.\n\n\n\n## Examples\n```rescript\n`make()`\n// You can annotate the type of your map if you want to\nlet myMap: Map.t = Map.make()\n\n// Or you can let ReScript infer what's in your map\nlet map = Map.make()\nmap->Map.set(\"lang\", \"ReScript\") // Inferred as Map.t\n```\n\n## Alternatives\nA JavaScript `Map` is mutable. If you're looking for an immutable alternative, check out`Belt.Map`." + ], + "signature": "let make: unit => t<'k, 'v>" + }, + { + "id": "Core.Map.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "Turns an array of key/value pairs into a Map.\n\n## Examples\n```rescript\ntype languages = ReScript | JavaScript | TypeScript\nlet languageRank = [(ReScript, 1), (JavaScript, 2), (TypeScript, 3)]\n\nlet map = Map.fromArray(languageRank) // Map.t\n\nswitch map->Map.get(ReScript) {\n| Some(1) => Console.log(\"Yay, ReScript is #1!\")\n| _ => Console.log(\"Uh-oh, something is _terribly_ wrong with this program... abort.\")\n}\n```" + ], + "signature": "let fromArray: array<('k, 'v)> => t<'k, 'v>" + }, + { + "id": "Core.Map.fromIterator", + "kind": "value", + "name": "fromIterator", + "docstrings": [ + "Turns an iterator in the shape of `('key, 'value)` into a `Map`.\n\n## Examples\n```rescript\n// Let's pretend we have an interator in the correct shape\n@val external someIterator: Iterator.t<(string, int)> = \"someIterator\"\n\nlet map = Map.fromIterator(someIterator) // Map.t\n```" + ], + "signature": "let fromIterator: Core__Iterator.t<('k, 'v)> => t<'k, 'v>" + }, + { + "id": "Core.Map.size", + "kind": "value", + "name": "size", + "docstrings": [ + "Returns the size, the number of key/value pairs, of the map.\n\n## Examples\n```rescript\nlet map = Map.make()\n\nmap->Map.set(\"someKey\", \"someValue\")\n\nlet size = map->Map.size // 1\n```" + ], + "signature": "let size: t<'k, 'v> => int" + }, + { + "id": "Core.Map.clear", + "kind": "value", + "name": "clear", + "docstrings": [ + "Clears all entries in the map.\n\n## Examples\n```rescript\nlet map = Map.make()\n\nmap->Map.set(\"someKey\", \"someValue\")\nmap->Map.size // 1\n\nmap->Map.clear\nmap->Map.size // 0\n```" + ], + "signature": "let clear: t<'k, 'v> => unit" + }, + { + "id": "Core.Map.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "Iterates through all values of the map.\n\n> Please note that this is *without the keys*, just the values. If you need the key as well, use `Map.forEachWithKey`.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\nmap->Map.set(\"someKey2\", \"someValue2\")\n\nmap->Map.forEach(value => {\n Console.log(value)\n})\n```" + ], + "signature": "let forEach: (t<'k, 'v>, 'v => unit) => unit" + }, + { + "id": "Core.Map.forEachWithKey", + "kind": "value", + "name": "forEachWithKey", + "docstrings": [ + "Iterates through all values of the map, including the key for each value.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\nmap->Map.set(\"someKey2\", \"someValue2\")\n\nmap->Map.forEachWithKey((value, key) => {\n Console.log2(value, key)\n})\n```" + ], + "signature": "let forEachWithKey: (t<'k, 'v>, ('v, 'k) => unit) => unit" + }, + { + "id": "Core.Map.get", + "kind": "value", + "name": "get", + "docstrings": [ + "Returns the value for a key, if a value exists at that key.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\n\nswitch map->Map.get(\"someKey\") {\n| None => Console.log(\"Nope, didn't have it.\")\n| Some(value) => Console.log2(\"Yay, had the value, and it's:\", value)\n}\n```" + ], + "signature": "let get: (t<'k, 'v>, 'k) => option<'v>" + }, + { + "id": "Core.Map.has", + "kind": "value", + "name": "has", + "docstrings": [ + "Checks whether the map has a specific key.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\n\nswitch map->Map.has(\"someKey\") {\n| false => Console.log(\"Nope, didn't have it.\")\n| true => Console.log(\"Yay, we have the value!\")\n}\n```" + ], + "signature": "let has: (t<'k, 'v>, 'k) => bool" + }, + { + "id": "Core.Map.set", + "kind": "value", + "name": "set", + "docstrings": [ + "Sets the provided `value` to the provided `key`.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\n```" + ], + "signature": "let set: (t<'k, 'v>, 'k, 'v) => unit" + }, + { + "id": "Core.Map.delete", + "kind": "value", + "name": "delete", + "docstrings": [ + "Deletes the provided `key` and its value from the map. Returns a `bool` for whether the key existed, and was deleted.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\nlet didDeleteKey = map->Map.delete(\"someKey\")\nConsole.log(didDeleteKey) // Logs `true` to the console, becuase the map had the key, so it was successfully deleted\n\nlet didDeleteKey = map->Map.delete(\"someNonExistantKey\")\nConsole.log(didDeleteKey) // Logs `false` to the console, becuase the key did not exist\n```" + ], + "signature": "let delete: (t<'k, 'v>, 'k) => bool" + }, + { + "id": "Core.Map.keys", + "kind": "value", + "name": "keys", + "docstrings": [ + "Returns an iterator that holds all keys of the map.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\nmap->Map.set(\"anotherKey\", \"anotherValue\")\n\nlet keys = map->Map.keys\n\n// Logs the first key\nConsole.log(Iterator.next(keys).value)\n\n// You can also turn the iterator into an array.\n// Remember that an iterator consumes values. We'll need a fresh keys iterator to get an array of all keys, since we consumed a value via `next` above already.\nConsole.log(map->Map.keys->Iterator.toArray)\n```" + ], + "signature": "let keys: t<'k, 'v> => Core__Iterator.t<'k>" + }, + { + "id": "Core.Map.values", + "kind": "value", + "name": "values", + "docstrings": [ + "Returns an iterator that holds all values of the map.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\nmap->Map.set(\"anotherKey\", \"anotherValue\")\n\nlet values = map->Map.values\n\n// Logs the first value\nConsole.log(Iterator.next(values).value)\n\n// You can also turn the iterator into an array.\n// Remember that an iterator consumes values. We'll need a fresh values iterator to get an array of all values, since we consumed a value via `next` above already.\nConsole.log(map->Map.values->Iterator.toArray)\n```" + ], + "signature": "let values: t<'k, 'v> => Core__Iterator.t<'v>" + }, + { + "id": "Core.Map.entries", + "kind": "value", + "name": "entries", + "docstrings": [ + "Returns an iterator that holds all entries of the map.\nAn entry is represented as a tuple of `('key, 'value)`,\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\nmap->Map.set(\"anotherKey\", \"anotherValue\")\n\nlet entries = map->Map.entries\n\n// Logs the first value\nConsole.log(Iterator.next(entries).value)\n\n// You can also turn the iterator into an array.\n// Remember that an iterator consumes entries. We'll need a fresh entries iterator to get an array of all entries, since we consumed a value via `next` above already.\nConsole.log(map->Map.entries->Iterator.toArray)\n```" + ], + "signature": "let entries: t<'k, 'v> => Core__Iterator.t<('k, 'v)>" + } + ] + }, + "core/asynciterator": { + "id": "Core.AsyncIterator", + "name": "AsyncIterator", + "docstrings": [ + "Bindings to async iterators, a way to do async iteration in JavaScript.\n\nSee [async iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) on MDN." + ], + "items": [ + { + "id": "Core.AsyncIterator.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type representing an async iterator." + ], + "signature": "type t<'a>" + }, + { + "id": "Core.AsyncIterator.value", + "kind": "type", + "name": "value", + "docstrings": [], + "signature": "type value<'a> = {done: bool, value: option<'a>}" + }, + { + "id": "Core.AsyncIterator.next", + "kind": "value", + "name": "next", + "docstrings": [ + "`next(asyncIterator)`\n\nReturns the next value of the iterator, if any.\n\nSee [async iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) on MDN.\n\n## Examples\n- A simple example, getting the next value:\n```rescript\n@val external asyncIterator: AsyncIterator.t = \"someAsyncIterator\"\nlet {AsyncIterator.done, value} = await asyncIterator->AsyncIterator.next\n```\n\n- Complete example, including looping over all values:\n```rescript\n// Let's pretend we get an async iterator returning ints from somewhere.\n@val external asyncIterator: AsyncIterator.t = \"someAsyncIterator\"\n\n\nlet processMyAsyncIterator = async () => {\n // ReScript doesn't have `for ... of` loops, but it's easy to mimic using a while loop.\n let break = ref(false)\n\n while !break.contents {\n // Await the next iterator value\n let {value, done} = await asyncIterator->AsyncIterator.next\n\n // Exit the while loop if the iterator says it's done\n break := done\n\n // This will log the (int) value of the current async iteration, if a value was returned.\n Console.log(value)\n }\n}\n```" + ], + "signature": "let next: t<'a> => promise>" + }, + { + "id": "Core.AsyncIterator.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(iterator, fn)` consumes all values in the async iterator and runs the callback `fn` for each value.\n\nSee [iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) on MDN.\n\n## Examples\n```rescript\n// Let's pretend we get an async iterator returning ints from somewhere.\n@val external asyncIterator: AsyncIterator.t = \"someAsyncIterator\"\n\nawait asyncIterator->AsyncIterator.forEach(value =>\n switch value {\n | Some(value) if value > 10 => Console.log(\"More than 10!\")\n | _ => ()\n }\n)\n```" + ], + "signature": "let forEach: (t<'a>, option<'a> => unit) => promise" + } + ] + }, + "core/iterator": { + "id": "Core.Iterator", + "name": "Iterator", + "docstrings": [ + "Bindings to JavaScript iterators.\n\nSee [`iterator protocols`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) on MDN." + ], + "items": [ + { + "id": "Core.Iterator.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The type representing an iterator." + ], + "signature": "type t<'a>" + }, + { + "id": "Core.Iterator.value", + "kind": "type", + "name": "value", + "docstrings": [ + "The current value of an iterator." + ], + "signature": "type value<'a> = {done: bool, value: option<'a>}" + }, + { + "id": "Core.Iterator.next", + "kind": "value", + "name": "next", + "docstrings": [ + "Returns the next value of the iterator, if any.\n\nSee [iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) on MDN.\n\n## Examples\n```rescript\n@val external someIterator: Iterator.t = \"someIterator\"\n\n// Pulls out the next value of the iterator\nlet {Iterator.done, value} = someIterator->Iterator.next\n```" + ], + "signature": "let next: t<'a> => value<'a>" + }, + { + "id": "Core.Iterator.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "Turns an iterator into an array of the remaining values.\nRemember that each invocation of `next` of an iterator consumes a value. `Iterator.toArray` will consume all remaining values of the iterator and return them in an array to you.\n\nSee [iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) on MDN.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\nmap->Map.set(\"someKey2\", \"someValue2\")\n\n// `Map.keys` returns all keys of the map as an iterator.\nlet mapKeysAsArray = map->Map.keys->Iterator.toArray\n\nConsole.log(mapKeysAsArray) // Logs [\"someKey\", \"someKey2\"] to the console.\n```" + ], + "signature": "let toArray: t<'a> => array<'a>" + }, + { + "id": "Core.Iterator.toArrayWithMapper", + "kind": "value", + "name": "toArrayWithMapper", + "docstrings": [ + "`toArray(iterator)` turns `iterator` into an array of its remaining values, applying the provided mapper function on each item.\nRemember that each invocation of `next` of an iterator consumes a value. `Iterator.toArrayWithMapper` will consume all remaining values of the iterator and return them in an array to you.\n\nSee [iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) on MDN.\n\n## Examples\n```rescript\nlet map = Map.make()\nmap->Map.set(\"someKey\", \"someValue\")\nmap->Map.set(\"someKey2\", \"someValue2\")\n\n// `Map.keys` returns all keys of the map as an iterator.\nlet mapKeysAsArray = map\n ->Map.keys\n ->Iterator.toArrayWithMapper(key => key->String.length)\n\nConsole.log(mapKeysAsArray) // Logs [7, 8] to the console.\n```" + ], + "signature": "let toArrayWithMapper: (t<'a>, 'a => 'b) => array<'b>" + }, + { + "id": "Core.Iterator.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(iterator, fn)` consumes all values in the iterator and runs the callback `fn` for each value.\n\nSee [iterator protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) on MDN.\n\n## Examples\n```rescript\n@val external someIterator: Iterator.t = \"someIterator\"\n\nsomeIterator->Iterator.forEach(value =>\n switch value {\n | Some(value) if value > 10 => Console.log(\"More than 10!\")\n | _ => ()\n }\n)\n```" + ], + "signature": "let forEach: (t<'a>, option<'a> => unit) => unit" + } + ] + }, + "core/json": { + "id": "Core.JSON", + "name": "JSON", + "docstrings": [ + "Functions for interacting with JSON." + ], + "items": [ + { + "id": "Core.JSON.t", + "kind": "type", + "name": "t", + "docstrings": [ + "A type representing a JSON object." + ], + "signature": "type t = Js.Json.t =\n | Boolean(bool)\n | Null\n | String(string)\n | Number(float)\n | Object(Core__Dict.t)\n | Array(array)" + }, + { + "id": "Core.JSON.replacer", + "kind": "type", + "name": "replacer", + "docstrings": [], + "signature": "type replacer =\n | Keys(array)\n | Replacer((string, t) => t)" + }, + { + "id": "Core.JSON.parseExn", + "kind": "value", + "name": "parseExn", + "docstrings": [ + "`parseExn(string, ~reviver=?)` \n\nParses a JSON string or throws a JavaScript exception (SyntaxError), if the string isn't valid.\nThe reviver describes how the value should be transformed. It is a function which receives a key and a value.\nIt returns a JSON type.\n\n## Examples\n```rescript\ntry {\n let _ = JSON.parseExn(`{\"foo\":\"bar\",\"hello\":\"world\"}`)\n // { foo: 'bar', hello: 'world' }\n\n let _ = JSON.parseExn(\"\")\n // error\n} catch {\n| Exn.Error(_) => Console.log(\"error\")\n}\n\nlet reviver = (_, value: JSON.t) =>\n switch value {\n | String(string) => string->String.toUpperCase->JSON.Encode.string\n | Number(number) => (number *. 2.0)->JSON.Encode.float\n | _ => value\n }\n\nlet jsonString = `{\"hello\":\"world\",\"someNumber\":21}`\n\ntry {\n JSON.parseExn(jsonString, ~reviver)->Console.log\n // { hello: 'WORLD', someNumber: 42 }\n\n JSON.parseExn(\"\", ~reviver)->Console.log\n // error\n} catch {\n| Exn.Error(_) => Console.log(\"error\")\n}\n```\n\n## Exceptions \n\n- Raises a SyntaxError (Exn.t) if the string isn't valid JSON." + ], + "signature": "let parseExn: (string, ~reviver: (string, t) => t=?) => t" + }, + { + "id": "Core.JSON.parseExnWithReviver", + "kind": "value", + "name": "parseExnWithReviver", + "docstrings": [ + "`parseExnWithReviver(string, reviver)` \n\nParses a JSON string or throws a JavaScript exception (SyntaxError), if the string isn't valid.\nThe reviver describes how the value should be transformed. It is a function which receives a key and a value.\nIt returns a JSON type.\n\n## Examples\n```rescript\nlet reviver = (_, value: JSON.t) =>\n switch value {\n | String(string) => string->String.toUpperCase->JSON.Encode.string\n | Number(number) => (number *. 2.0)->JSON.Encode.float\n | _ => value\n }\n\nlet jsonString = `{\"hello\":\"world\",\"someNumber\":21}`\n\ntry {\n JSON.parseExnWithReviver(jsonString, reviver)->Console.log\n // { hello: 'WORLD', someNumber: 42 }\n\n JSON.parseExnWithReviver(\"\", reviver)->Console.log\n // error\n} catch {\n| Exn.Error(_) => Console.log(\"error\")\n}\n```\n\n## Exceptions \n\n- Raises a SyntaxError if the string isn't valid JSON." + ], + "signature": "let parseExnWithReviver: (string, (string, t) => t) => t", + "deprecated": "Use `parseExn` with optional parameter instead" + }, + { + "id": "Core.JSON.stringify", + "kind": "value", + "name": "stringify", + "docstrings": [ + "`stringify(json, ~replacer=?, ~space=?)` \n\nConverts a JSON object to a JSON string.\nThe replacer describes how the value should be transformed. It is a function which receives a key and a value,\nor an array of keys which should be included in the output.\nIf you want to stringify any type, use `JSON.stringifyAny` instead.\n\n## Examples\n```rescript\nlet json =\n Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n ])->JSON.Encode.object\n\nJSON.stringify(json)\n// {\"foo\":\"bar\",\"hello\":\"world\",\"someNumber\":42}\n\nJSON.stringify(json, ~space=2)\n// {\n// \"foo\": \"bar\",\n// \"hello\": \"world\",\n// \"someNumber\": 42\n// }\n\nJSON.stringify(json, ~replacer=Keys([\"foo\", \"someNumber\"]))\n// {\"foo\":\"bar\",\"someNumber\":42}\n\nlet replacer = JSON.Replacer((_, value) => {\n let decodedValue = value->JSON.Decode.string\n\n switch decodedValue {\n | Some(string) => string->String.toUpperCase->JSON.Encode.string\n | None => value\n }\n})\n\nJSON.stringify(json, ~replacer)\n// {\"foo\":\"BAR\",\"hello\":\"WORLD\",\"someNumber\":42}\n```" + ], + "signature": "let stringify: (t, ~replacer: replacer=?, ~space: int=?) => string" + }, + { + "id": "Core.JSON.stringifyWithIndent", + "kind": "value", + "name": "stringifyWithIndent", + "docstrings": [ + "`stringifyWithIndent(json, indentation)` \n\nConverts a JSON object to a JSON string. The output will be indented.\nIf you want to stringify any type, use `JSON.stringifyAnyWithIndent` instead.\n\n## Examples\n```rescript\nlet json =\n Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n ])->JSON.Encode.object\n\nJSON.stringifyWithIndent(json, 2)\n// {\n// \"foo\": \"bar\",\n// \"hello\": \"world\",\n// \"someNumber\": 42\n// }\n```" + ], + "signature": "let stringifyWithIndent: (t, int) => string", + "deprecated": "Use `stringify` with optional parameter instead" + }, + { + "id": "Core.JSON.stringifyWithReplacer", + "kind": "value", + "name": "stringifyWithReplacer", + "docstrings": [ + "`stringifyWithReplacer(json, replacer)` \n\nConverts a JSON object to a JSON string.\nThe replacer describes how the value should be transformed. It is a function which receives a key and a value.\nIf you want to stringify any type, use `JSON.stringifyAnyWithReplacer` instead.\n\n## Examples\n```rescript\nlet json =\n Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n ])->JSON.Encode.object\n\nlet replacer = (_, value) => {\n let decodedValue = value->JSON.Decode.string\n\n switch decodedValue {\n | Some(string) => string->String.toUpperCase->JSON.Encode.string\n | None => value\n }\n}\n\nJSON.stringifyWithReplacer(json, replacer)\n// {\"foo\":\"BAR\",\"hello\":\"WORLD\",\"someNumber\":42}\n```" + ], + "signature": "let stringifyWithReplacer: (t, (string, t) => t) => string", + "deprecated": "Use `stringify` with optional parameter instead" + }, + { + "id": "Core.JSON.stringifyWithReplacerAndIndent", + "kind": "value", + "name": "stringifyWithReplacerAndIndent", + "docstrings": [ + "`stringifyWithReplacerAndIndent(json, replacer, indentation)`\n\nConverts a JSON object to a JSON string. The output will be indented.\nThe replacer describes how the value should be transformed. It is a function which receives a key and a value.\nIf you want to stringify any type, use `JSON.stringifyAnyWithReplacerAndIndent` instead.\n\n## Examples\n```rescript\nlet json =\n Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n ])->JSON.Encode.object\n\nlet replacer = (_, value) => {\n let decodedValue = value->JSON.Decode.string\n\n switch decodedValue {\n | Some(string) => string->String.toUpperCase->JSON.Encode.string\n | None => value\n }\n}\n\nJSON.stringifyWithReplacerAndIndent(json, replacer, 2)\n// {\n// \"foo\": \"BAR\",\n// \"hello\": \"WORLD\",\n// \"someNumber\": 42\n// }\n```" + ], + "signature": "let stringifyWithReplacerAndIndent: (t, (string, t) => t, int) => string", + "deprecated": "Use `stringify` with optional parameters instead" + }, + { + "id": "Core.JSON.stringifyWithFilter", + "kind": "value", + "name": "stringifyWithFilter", + "docstrings": [ + "`stringifyWithFilter(json, filter)` \n\nConverts a JSON object to a JSON string.\nThe filter is an array of keys, which should be included in the output.\nIf you want to stringify any type, use `JSON.stringifyAnyWithFilter` instead.\n\n## Examples\n```rescript\nlet json =\n Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n ])->JSON.Encode.object\n\nJSON.stringifyWithFilter(json, [\"foo\", \"someNumber\"])\n// {\"foo\":\"bar\",\"someNumber\":42}\n```" + ], + "signature": "let stringifyWithFilter: (t, array) => string", + "deprecated": "Use `stringify` with optional parameter instead" + }, + { + "id": "Core.JSON.stringifyWithFilterAndIndent", + "kind": "value", + "name": "stringifyWithFilterAndIndent", + "docstrings": [ + "`stringifyWithFilterAndIndent(json, filter, indentation)` \n\nConverts a JSON object to a JSON string. The output will be indented.\nThe filter is an array of keys, which should be included in the output.\nIf you want to stringify any type, use `JSON.stringifyAnyWithFilterAndIndent` instead.\n\n## Examples\n```rescript\nlet json =\n Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n ])->JSON.Encode.object\n\nJSON.stringifyWithFilterAndIndent(json, [\"foo\", \"someNumber\"], 2)\n// {\n// \"foo\": \"bar\",\n// \"someNumber\": 42\n// }\n```" + ], + "signature": "let stringifyWithFilterAndIndent: (t, array, int) => string", + "deprecated": "Use `stringify` with optional parameters instead" + }, + { + "id": "Core.JSON.stringifyAny", + "kind": "value", + "name": "stringifyAny", + "docstrings": [ + "`stringifyAny(any, ~replacer=?, ~space=?)` \n\nConverts any type to a JSON string.\nThe replacer describes how the value should be transformed. It is a function which receives a key and a value.\nStringifying a function or `undefined` will return `None`.\nIf the value contains circular references or `BigInt`s, the function will throw a JavaScript exception (TypeError).\nIf you want to stringify a JSON object, use `JSON.stringify` instead.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n])\n\nJSON.stringifyAny(dict)\n// {\"foo\":\"bar\",\"hello\":\"world\",\"someNumber\":42}\n\nJSON.stringifyAny(dict, ~space=2)\n// {\n// \"foo\": \"bar\",\n// \"hello\": \"world\",\n// \"someNumber\": 42\n// }\n\nJSON.stringifyAny(dict, ~replacer=Keys([\"foo\", \"someNumber\"]))\n// {\"foo\":\"bar\",\"someNumber\":42}\n\nlet replacer = JSON.Replacer((_, value) => {\n let decodedValue = value->JSON.Decode.string\n\n switch decodedValue {\n | Some(string) => string->String.toUpperCase->JSON.Encode.string\n | None => value\n }\n})\n\nJSON.stringifyAny(dict, ~replacer)\n// {\"foo\":\"BAR\",\"hello\":\"WORLD\",\"someNumber\":42}\n\nJSON.stringifyAny(() => \"hello world\")\n// None\n\nBigInt.fromInt(0)->JSON.stringifyAny\n// exception\n```\n\n## Exceptions \n\n- Raises a TypeError if the value contains circular references.\n- Raises a TypeError if the value contains `BigInt`s." + ], + "signature": "let stringifyAny: ('a, ~replacer: replacer=?, ~space: int=?) => option" + }, + { + "id": "Core.JSON.stringifyAnyWithIndent", + "kind": "value", + "name": "stringifyAnyWithIndent", + "docstrings": [ + "`stringifyAnyWithIndent(any, indentation)` \n\nConverts any type to a JSON string. The output will be indented.\nStringifying a function or `undefined` will return `None`.\nIf the value contains circular references or `BigInt`s, the function will throw a JavaScript exception (TypeError).\nIf you want to stringify a JSON object, use `JSON.stringifyWithIndent` instead.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n])\n\nJSON.stringifyAnyWithIndent(dict, 2)\n// {\n// \"foo\": \"bar\",\n// \"hello\": \"world\",\n// \"someNumber\": 42\n// }\n\nJSON.stringifyAny(() => \"hello world\")\n// None\n\nBigInt.fromInt(0)->JSON.stringifyAny\n// exception\n```\n\n## Exceptions \n\n- Raises a TypeError if the value contains circular references.\n- Raises a TypeError if the value contains `BigInt`s." + ], + "signature": "let stringifyAnyWithIndent: ('a, int) => option", + "deprecated": "Use `stringifyAny` with optional parameter instead" + }, + { + "id": "Core.JSON.stringifyAnyWithReplacer", + "kind": "value", + "name": "stringifyAnyWithReplacer", + "docstrings": [ + "`stringifyAnyWithReplacer(json, replacer)`\n\nConverts any type to a JSON string.\nThe replacer describes how the value should be transformed. It is a function which receives a key and a value.\nStringifying a function or `undefined` will return `None`.\nIf the value contains circular references or `BigInt`s, the function will throw a JavaScript exception (TypeError).\nIf you want to stringify a JSON object, use `JSON.stringifyWithReplacer` instead.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n])\n\nlet replacer = (_, value) => {\n let decodedValue = value->JSON.Decode.string\n\n switch decodedValue {\n | Some(string) => string->String.toUpperCase->JSON.Encode.string\n | None => value\n }\n}\n\nJSON.stringifyAnyWithReplacer(dict, replacer)\n// {\"foo\":\"BAR\",\"hello\":\"WORLD\",\"someNumber\":42}\n\nJSON.stringifyAny(() => \"hello world\")\n// None\n\nBigInt.fromInt(0)->JSON.stringifyAny\n// exception\n```\n\n## Exceptions \n\n- Raises a TypeError if the value contains circular references.\n- Raises a TypeError if the value contains `BigInt`s." + ], + "signature": "let stringifyAnyWithReplacer: ('a, (string, t) => t) => option", + "deprecated": "Use `stringifyAny` with optional parameter instead" + }, + { + "id": "Core.JSON.stringifyAnyWithReplacerAndIndent", + "kind": "value", + "name": "stringifyAnyWithReplacerAndIndent", + "docstrings": [ + "`stringifyAnyWithReplacerAndIndent(json, replacer, indentation)` \n\nConverts any type to a JSON string. The output will be indented.\nThe replacer describes how the value should be transformed. It is a function which receives a key and a value.\nStringifying a function or `undefined` will return `None`.\nIf the value contains circular references or `BigInt`s, the function will throw a JavaScript exception (TypeError).\nIf you want to stringify a JSON object, use `JSON.stringifyWithReplacerAndIndent` instead.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n])\n\nlet replacer = (_, value) => {\n let decodedValue = value->JSON.Decode.string\n\n switch decodedValue {\n | Some(string) => string->String.toUpperCase->JSON.Encode.string\n | None => value\n }\n}\n\nJSON.stringifyAnyWithReplacerAndIndent(dict, replacer, 2)\n// {\n// \"foo\": \"BAR\",\n// \"hello\": \"WORLD\",\n// \"someNumber\": 42\n// }\n\nJSON.stringifyAny(() => \"hello world\")\n// None\n\nBigInt.fromInt(0)->JSON.stringifyAny\n// exception\n```\n\n## Exceptions \n\n- Raises a TypeError if the value contains circular references.\n- Raises a TypeError if the value contains `BigInt`s." + ], + "signature": "let stringifyAnyWithReplacerAndIndent: ('a, (string, t) => t, int) => option", + "deprecated": "Use `stringifyAny` with optional parameters instead" + }, + { + "id": "Core.JSON.stringifyAnyWithFilter", + "kind": "value", + "name": "stringifyAnyWithFilter", + "docstrings": [ + "`stringifyAnyWithFilter(json, filter)` \n\nConverts any type to a JSON string.\nThe filter is an array of keys, which should be included in the output.\nStringifying a function or `undefined` will return `None`.\nIf the value contains circular references or `BigInt`s, the function will throw a JavaScript exception (TypeError).\nIf you want to stringify a JSON object, use `JSON.stringifyWithFilter` instead.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n])\n\nJSON.stringifyAnyWithFilter(dict, [\"foo\", \"someNumber\"])\n// {\"foo\": \"bar\",\"someNumber\": 42}\n\nJSON.stringifyAny(() => \"hello world\")\n// None\n\nBigInt.fromInt(0)->JSON.stringifyAny\n// exception\n```\n\n## Exceptions \n\n- Raises a TypeError if the value contains circular references.\n- Raises a TypeError if the value contains `BigInt`s." + ], + "signature": "let stringifyAnyWithFilter: ('a, array) => string", + "deprecated": "Use `stringifyAny` with optional parameter instead" + }, + { + "id": "Core.JSON.stringifyAnyWithFilterAndIndent", + "kind": "value", + "name": "stringifyAnyWithFilterAndIndent", + "docstrings": [ + "`stringifyAnyWithFilterAndIndent(json, filter, indentation)` \n\nConverts any type to a JSON string. The output will be indented.\nThe filter is an array of keys, which should be included in the output.\nStringifying a function or `undefined` will return `None`.\nIf the value contains circular references or `BigInt`s, the function will throw a JavaScript exception (TypeError).\nIf you want to stringify a JSON object, use `JSON.stringifyWithFilterAndIndent` instead.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([\n (\"foo\", JSON.Encode.string(\"bar\")),\n (\"hello\", JSON.Encode.string(\"world\")),\n (\"someNumber\", JSON.Encode.int(42)),\n])\n\nJSON.stringifyAnyWithFilterAndIndent(dict, [\"foo\", \"someNumber\"], 2)\n// {\n// \"foo\": \"bar\",\n// \"someNumber\": 42\n// }\n\nJSON.stringifyAny(() => \"hello world\")\n// None\n\nBigInt.fromInt(0)->JSON.stringifyAny\n// exception\n```\n\n## Exceptions \n\n- Raises a TypeError if the value contains circular references.\n- Raises a TypeError if the value contains `BigInt`s." + ], + "signature": "let stringifyAnyWithFilterAndIndent: ('a, array, int) => string", + "deprecated": "Use `stringifyAny` with optional parameters instead" + } + ] + }, + "core/type": { + "id": "Core.Type", + "name": "Type", + "docstrings": [ + "Utilities for classifying the type of JavaScript values at runtime." + ], + "items": [ + { + "id": "Core.Type.t", + "kind": "type", + "name": "t", + "docstrings": [ + "The possible types of JavaScript values." + ], + "signature": "type t = [\n | #bigint\n | #boolean\n | #function\n | #number\n | #object\n | #string\n | #symbol\n | #undefined\n]" + }, + { + "id": "Core.Type.typeof", + "kind": "value", + "name": "typeof", + "docstrings": [ + "`typeof(someValue)`\n\nReturns the underlying JavaScript type of any runtime value.\n\nSee [`typeof`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) on MDN.\n\n## Examples\n```rescript\nConsole.log(Type.typeof(\"Hello\")) // Logs \"string\" to the console.\n\nlet someVariable = true\n\nswitch someVariable->Type.typeof {\n| #boolean => Console.log(\"This is a bool, yay!\")\n| _ => Console.log(\"Oh, not a bool sadly...\")\n}\n```" + ], + "signature": "let typeof: 'a => t" + } + ] + }, + "core/symbol": { + "id": "Core.Symbol", + "name": "Symbol", + "docstrings": [], + "items": [ + { + "id": "Core.Symbol.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = Js.Types.symbol" + }, + { + "id": "Core.Symbol.make", + "kind": "value", + "name": "make", + "docstrings": [], + "signature": "let make: string => t" + }, + { + "id": "Core.Symbol.getFor", + "kind": "value", + "name": "getFor", + "docstrings": [], + "signature": "let getFor: string => t" + }, + { + "id": "Core.Symbol.keyFor", + "kind": "value", + "name": "keyFor", + "docstrings": [], + "signature": "let keyFor: t => option" + }, + { + "id": "Core.Symbol.asyncIterator", + "kind": "value", + "name": "asyncIterator", + "docstrings": [], + "signature": "let asyncIterator: t" + }, + { + "id": "Core.Symbol.hasInstance", + "kind": "value", + "name": "hasInstance", + "docstrings": [], + "signature": "let hasInstance: t" + }, + { + "id": "Core.Symbol.isConcatSpreadable", + "kind": "value", + "name": "isConcatSpreadable", + "docstrings": [], + "signature": "let isConcatSpreadable: t" + }, + { + "id": "Core.Symbol.iterator", + "kind": "value", + "name": "iterator", + "docstrings": [], + "signature": "let iterator: t" + }, + { + "id": "Core.Symbol.match", + "kind": "value", + "name": "match", + "docstrings": [], + "signature": "let match: t" + }, + { + "id": "Core.Symbol.matchAll", + "kind": "value", + "name": "matchAll", + "docstrings": [], + "signature": "let matchAll: t" + }, + { + "id": "Core.Symbol.replace", + "kind": "value", + "name": "replace", + "docstrings": [], + "signature": "let replace: t" + }, + { + "id": "Core.Symbol.search", + "kind": "value", + "name": "search", + "docstrings": [], + "signature": "let search: t" + }, + { + "id": "Core.Symbol.species", + "kind": "value", + "name": "species", + "docstrings": [], + "signature": "let species: t" + }, + { + "id": "Core.Symbol.split", + "kind": "value", + "name": "split", + "docstrings": [], + "signature": "let split: t" + }, + { + "id": "Core.Symbol.toPrimitive", + "kind": "value", + "name": "toPrimitive", + "docstrings": [], + "signature": "let toPrimitive: t" + }, + { + "id": "Core.Symbol.toStringTag", + "kind": "value", + "name": "toStringTag", + "docstrings": [], + "signature": "let toStringTag: t" + }, + { + "id": "Core.Symbol.unscopables", + "kind": "value", + "name": "unscopables", + "docstrings": [], + "signature": "let unscopables: t" + } + ] + }, + "core/string": { + "id": "Core.String", + "name": "String", + "docstrings": [ + "Functions for interacting with JavaScript strings.\nSee: [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)." + ], + "items": [ + { + "id": "Core.String.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(value)` converts the given value to a `string`.\n\n## Examples\n\n```rescript\nString.make(3.5) == \"3.5\"\nString.make([1, 2, 3]) == \"1,2,3\"\n```" + ], + "signature": "let make: 'a => string" + }, + { + "id": "Core.String.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)`.\nSee [`String.fromCharCode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode) on MDN.\n\n## Examples\n\n```rescript\nString.fromCharCode(65) == \"A\"\nString.fromCharCode(0x3c8) == `ψ`\nString.fromCharCode(0xd55c) == `한`\nString.fromCharCode(-64568) == `ψ`\n```" + ], + "signature": "let fromCharCode: int => string" + }, + { + "id": "Core.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`.\nSee [`String.fromCharCode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode) on MDN.\n\n## Examples\n\n```rescript\nString.fromCharCodeMany([189, 43, 190, 61]) == \"½+¾=\"\nString.fromCharCodeMany([65, 66, 67]) == \"ABC\"\n```" + ], + "signature": "let fromCharCodeMany: array => string" + }, + { + "id": "Core.String.fromCodePoint", + "kind": "value", + "name": "fromCodePoint", + "docstrings": [ + "`fromCodePoint(n)` creates a `string` containing the character corresponding to\nthat numeric code point.\nSee [`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint) on MDN.\n\n## Examples\n\n```rescript\nString.fromCodePoint(65) == \"A\"\nString.fromCodePoint(0x3c8) == `ψ`\nString.fromCodePoint(0xd55c) == `한`\nString.fromCodePoint(0x1f63a) == `😺`\n```\n\n## Exceptions\n\n- `RangeError`: If the number is not a valid code point, like `fromCharCode(-5)`." + ], + "signature": "let fromCodePoint: int => string" + }, + { + "id": "Core.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`.\nSee [`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint) on MDN.\n\n## Examples\n\n```rescript\nString.fromCodePointMany([0xd55c, 0xae00, 0x1f63a]) == `한글😺`\n```\n\n## Exceptions\n\n- `RangeError`: If one of the number is not a valid code point, like\n`fromCharCode([1, -5])`." + ], + "signature": "let fromCodePointMany: array => string" + }, + { + "id": "Core.String.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: (string, string) => bool" + }, + { + "id": "Core.String.compare", + "kind": "value", + "name": "compare", + "docstrings": [], + "signature": "let compare: (string, string) => Core__Ordering.t" + }, + { + "id": "Core.String.length", + "kind": "value", + "name": "length", + "docstrings": [ + "`length(str)` returns the length of the given `string`.\nSee [`String.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length) on MDN.\n\n## Examples\n\n```rescript\nString.length(\"abcd\") == 4\n```" + ], + "signature": "let length: string => int" + }, + { + "id": "Core.String.get", + "kind": "value", + "name": "get", + "docstrings": [ + "`get(str, index)` returns an `option` at the given `index` number. If\n`index` is out of range, this function returns `None`.\n\n## Examples\n\n```rescript\nString.get(\"ReScript\", 0) == Some(\"R\")\nString.get(\"Hello\", 4) == Some(\"o\")\nString.get(`JS`, 4) == None\n```" + ], + "signature": "let get: (string, int) => option" + }, + { + "id": "Core.String.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [ + "`getUnsafe(str, index)` returns an `string` at the given `index` number.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `string`.\n\nUse `String.getUnsafe` only when you are sure the `index` exists.\n## Examples\n\n```rescript\nString.getUnsafe(\"ReScript\", 0) == \"R\"\nString.getUnsafe(\"Hello\", 4) == \"o\"\n```" + ], + "signature": "let getUnsafe: (string, int) => string" + }, + { + "id": "Core.String.charAt", + "kind": "value", + "name": "charAt", + "docstrings": [ + "`charAt(str, index)` gets the character at `index` within string `str`. If\n`index` is negative or greater than the length of `str`, it returns the empty\nstring. If the string contains characters outside the range \\u0000-\\uffff, it\nwill return the first 16-bit value at that position in the string.\nSee [`String.charAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt) on MDN.\n\n## Examples\n\n```rescript\nString.charAt(\"ReScript\", 0) == \"R\"\nString.charAt(\"Hello\", 12) == \"\"\nString.charAt(`JS`, 5) == \"\"\n```" + ], + "signature": "let charAt: (string, int) => string" + }, + { + "id": "Core.String.charCodeAt", + "kind": "value", + "name": "charCodeAt", + "docstrings": [ + "`charCodeAt(str, index)` returns the character code at position `index` in\nstring `str` the result is in the range 0-65535, unlike `codePointAt`, so it\nwill not work correctly for characters with code points greater than or equal\nto 0x10000. The return type is `float` because this function returns NaN if\n`index` is less than zero or greater than the length of the string.\nSee [`String.charCodeAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt) on MDN.\n\n## Examples\n\n```rescript\nString.charCodeAt(`😺`, 0) == 0xd83d->Int.toFloat\nString.codePointAt(`😺`, 0) == Some(0x1f63a)\n```" + ], + "signature": "let charCodeAt: (string, int) => float" + }, + { + "id": "Core.String.codePointAt", + "kind": "value", + "name": "codePointAt", + "docstrings": [ + "`codePointAt(str, index)` returns the code point at position `index` within\nstring `str` as a `Some(value)`. The return value handles code points greater\nthan or equal to 0x10000. If there is no code point at the given position, the\nfunction returns `None`.\nSee [`String.codePointAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) on MDN.\n\n## Examples\n\n```rescript\nString.codePointAt(`¿😺?`, 1) == Some(0x1f63a)\nString.codePointAt(\"abc\", 5) == None\n```" + ], + "signature": "let codePointAt: (string, int) => option" + }, + { + "id": "Core.String.concat", + "kind": "value", + "name": "concat", + "docstrings": [ + "`concat(original, append)` returns a new `string` with `append` added after\n`original`.\nSee [`String.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat) on MDN.\n\n## Examples\n\n```rescript\nString.concat(\"cow\", \"bell\") == \"cowbell\"\nString.concat(\"Re\", \"Script\") == \"ReScript\"\n```" + ], + "signature": "let concat: (string, string) => string" + }, + { + "id": "Core.String.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.\nSee [`String.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat) on MDN.\n\n## Examples\n\n```rescript\nString.concatMany(\"1st\", [\"2nd\", \"3rd\", \"4th\"]) == \"1st2nd3rd4th\"\n```" + ], + "signature": "let concatMany: (string, array) => string" + }, + { + "id": "Core.String.endsWith", + "kind": "value", + "name": "endsWith", + "docstrings": [ + "`endsWith(str, substr)` returns `true` if the `str` ends with `substr`, `false`\notherwise.\nSee [`String.endsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith) on MDN.\n\n## Examples\n\n```rescript\nString.endsWith(\"BuckleScript\", \"Script\") == true\nString.endsWith(\"BuckleShoes\", \"Script\") == false\n```" + ], + "signature": "let endsWith: (string, string) => bool" + }, + { + "id": "Core.String.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`.\nSee [`String.endsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith) on MDN.\n\n## Examples\n\n```rescript\nString.endsWithFrom(\"abcd\", \"cd\", 4) == true\nString.endsWithFrom(\"abcde\", \"cd\", 3) == false\nString.endsWithFrom(\"abcde\", \"cde\", 99) == true\nString.endsWithFrom(\"example.dat\", \"ple\", 7) == true\n```" + ], + "signature": "let endsWithFrom: (string, string, int) => bool" + }, + { + "id": "Core.String.includes", + "kind": "value", + "name": "includes", + "docstrings": [ + "`includes(str, searchValue)` returns `true` if `searchValue` is found anywhere\nwithin `str`, `false` otherwise.\nSee [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) on MDN.\n\n## Examples\n\n```rescript\nString.includes(\"programmer\", \"gram\") == true\nString.includes(\"programmer\", \"er\") == true\nString.includes(\"programmer\", \"pro\") == true\nString.includes(\"programmer.dat\", \"xyz\") == false\n```" + ], + "signature": "let includes: (string, string) => bool" + }, + { + "id": "Core.String.includesFrom", + "kind": "value", + "name": "includesFrom", + "docstrings": [ + "`includesFrom(str, searchValue, start)` returns `true` if `searchValue` is found\nanywhere within `str` starting at character number `start` (where 0 is the\nfirst character), `false` otherwise.\nSee [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes) on MDN.\n\n## Examples\n\n```rescript\nString.includesFrom(\"programmer\", \"gram\", 1) == true\nString.includesFrom(\"programmer\", \"gram\", 4) == false\nString.includesFrom(`대한민국`, `한`, 1) == true\n```" + ], + "signature": "let includesFrom: (string, string, int) => bool" + }, + { + "id": "Core.String.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [ + "`indexOf(str, searchValue)` returns the position at which `searchValue` was\nfirst found within `str`, or `-1` if `searchValue` is not in `str`.\nSee [`String.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf) on MDN.\n\n## Examples\n\n```rescript\nString.indexOf(\"bookseller\", \"ok\") == 2\nString.indexOf(\"bookseller\", \"sell\") == 4\nString.indexOf(\"beekeeper\", \"ee\") == 1\nString.indexOf(\"bookseller\", \"xyz\") == -1\n```" + ], + "signature": "let indexOf: (string, string) => int" + }, + { + "id": "Core.String.indexOfOpt", + "kind": "value", + "name": "indexOfOpt", + "docstrings": [ + "`indexOfOpt(str, searchValue)`. Like `indexOf`, but return an `option`.\n\n## Examples\n\n```rescript\nString.indexOfOpt(\"bookseller\", \"ok\") == Some(2)\nString.indexOfOpt(\"bookseller\", \"xyz\") == None\n```" + ], + "signature": "let indexOfOpt: (string, string) => option" + }, + { + "id": "Core.String.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.\nSee [`String.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf) on MDN.\n\n## Examples\n\n```rescript\nString.indexOfFrom(\"bookseller\", \"ok\", 1) == 2\nString.indexOfFrom(\"bookseller\", \"sell\", 2) == 4\nString.indexOfFrom(\"bookseller\", \"sell\", 5) == -1\n```" + ], + "signature": "let indexOfFrom: (string, string, int) => int" + }, + { + "id": "Core.String.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.\nSee [`String.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf) on MDN.\n\n## Examples\n\n```rescript\nString.lastIndexOf(\"bookseller\", \"ok\") == 2\nString.lastIndexOf(\"beekeeper\", \"ee\") == 4\nString.lastIndexOf(\"abcdefg\", \"xyz\") == -1\n```" + ], + "signature": "let lastIndexOf: (string, string) => int" + }, + { + "id": "Core.String.lastIndexOfOpt", + "kind": "value", + "name": "lastIndexOfOpt", + "docstrings": [ + "`lastIndexOfOpt(str, searchValue)`. Like `lastIndexOfOpt`, but return an\n`option`.\n\n## Examples\n\n```rescript\nString.lastIndexOfOpt(\"bookseller\", \"ok\") == Some(2)\nString.lastIndexOfOpt(\"beekeeper\", \"ee\") == Some(4)\nString.lastIndexOfOpt(\"abcdefg\", \"xyz\") == None\n```" + ], + "signature": "let lastIndexOfOpt: (string, string) => option" + }, + { + "id": "Core.String.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.\nSee [`String.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf) on MDN.\n\n## Examples\n\n```rescript\nString.lastIndexOfFrom(\"bookseller\", \"ok\", 6) == 2\nString.lastIndexOfFrom(\"beekeeper\", \"ee\", 8) == 4\nString.lastIndexOfFrom(\"beekeeper\", \"ee\", 3) == 1\nString.lastIndexOfFrom(\"abcdefg\", \"xyz\", 4) == -1\n```" + ], + "signature": "let lastIndexOfFrom: (string, string, int) => int" + }, + { + "id": "Core.String.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\nthere 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.\nSee [`String.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) on MDN.\n\n## Examples\n\n```rescript\nString.match(\"The better bats\", %re(\"/b[aeiou]t/\")) == Some([Some(\"bet\")])\nString.match(\"The better bats\", %re(\"/b[aeiou]t/g\")) == Some([Some(\"bet\"), Some(\"bat\")])\nString.match(\"Today is 2018-04-05.\", %re(\"/(\\d+)-(\\d+)-(\\d+)/\")) ==\n Some([Some(\"2018-04-05\"), Some(\"2018\"), Some(\"04\"), Some(\"05\")])\nString.match(\"The optional example\", %re(\"/(foo)?(example)/\")) == Some([Some(\"example\"), None, Some(\"example\")])\nString.match(\"The large container.\", %re(\"/b[aeiou]g/\")) == None\n```" + ], + "signature": "let match: (string, Core__RegExp.t) => option" + }, + { + "id": "Core.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.\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.\n\n## Examples\n\n```rescript\nlet string1 = \"\\uFB00\"\nlet string2 = \"\\u0066\\u0066\"\nConsole.log(string1 === string2) // false\n\nlet normalizeString1 = String.normalize(string1)\nlet normalizeString2 = String.normalize(string2)\nassert(normalizeString1 === normalizeString2)\n```" + ], + "signature": "let normalize: string => string" + }, + { + "id": "Core.String.normalizeForm", + "kind": "type", + "name": "normalizeForm", + "docstrings": [ + "`normalizeByForm(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.\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\ndetails.\n\n## Examples\n\n```rescript\nlet string1 = \"\\uFB00\"\nlet string2 = \"\\u0066\\u0066\"\nConsole.log(string1 == string2) // false\n\nlet normalizeString1 = String.normalizeByForm(string1, #NFKD)\nlet normalizeString2 = String.normalizeByForm(string2, #NFKD)\nConsole.log(normalizeString1 == normalizeString2) // true\n```" + ], + "signature": "type normalizeForm = [#NFC | #NFD | #NFKC | #NFKD]" + }, + { + "id": "Core.String.normalizeByForm", + "kind": "value", + "name": "normalizeByForm", + "docstrings": [], + "signature": "let normalizeByForm: (string, normalizeForm) => string" + }, + { + "id": "Core.String.repeat", + "kind": "value", + "name": "repeat", + "docstrings": [ + "`repeat(str, n)` returns a `string` that consists of `n` repetitions of `str`.\nSee [`String.repeat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat) on MDN.\n\n## Examples\n\n```rescript\nString.repeat(\"ha\", 3) == \"hahaha\"\nString.repeat(\"empty\", 0) == \"\"\n```\n\n## Exceptions\n\n- `RangeError`: if `n` is negative." + ], + "signature": "let repeat: (string, int) => string" + }, + { + "id": "Core.String.replace", + "kind": "value", + "name": "replace", + "docstrings": [ + "`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.\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) on MDN.\n\n## Examples\n\n```rescript\nString.replace(\"old string\", \"old\", \"new\") == \"new string\"\nString.replace(\"the cat and the dog\", \"the\", \"this\") == \"this cat and the dog\"\n```" + ], + "signature": "let replace: (string, string, string) => string" + }, + { + "id": "Core.String.replaceRegExp", + "kind": "value", + "name": "replaceRegExp", + "docstrings": [ + "`replaceRegExp(str, regex, replacement)` returns a new `string` where\noccurrences matching regex have been replaced by `replacement`.\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) on MDN.\n\n## Examples\n\n```rescript\nString.replaceRegExp(\"vowels be gone\", %re(\"/[aeiou]/g\"), \"x\") == \"vxwxls bx gxnx\"\nString.replaceRegExp(\"Juan Fulano\", %re(\"/(\\w+) (\\w+)/\"), \"$2, $1\") == \"Fulano, Juan\"\n```" + ], + "signature": "let replaceRegExp: (string, Core__RegExp.t, string) => string" + }, + { + "id": "Core.String.replaceAll", + "kind": "value", + "name": "replaceAll", + "docstrings": [ + "`replaceAll(str, substr, newSubstr)` returns a new `string` which is\nidentical to `str` except with all matching instances of `substr` replaced\nby `newSubstr`. `substr` is treated as a verbatim string to match, not a\nregular expression.\nSee [`String.replaceAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) on MDN.\n\n## Examples\n\n```rescript\nString.replaceAll(\"old old string\", \"old\", \"new\") == \"new new string\"\nString.replaceAll(\"the cat and the dog\", \"the\", \"this\") == \"this cat and this dog\"\n```" + ], + "signature": "let replaceAll: (string, string, string) => string" + }, + { + "id": "Core.String.replaceAllRegExp", + "kind": "value", + "name": "replaceAllRegExp", + "docstrings": [ + "`replaceAllRegExp(str, regex, replacement)` returns a new `string` where\nall occurrences matching regex have been replaced by `replacement`.\nThe pattern must include the global (`g`) flag or a runtime TypeError will be thrown.\nSee [`String.replaceAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) on MDN.\n\n## Examples\n\n```rescript\nString.replaceAllRegExp(\"vowels be gone\", %re(\"/[aeiou]/g\"), \"x\") == \"vxwxls bx gxnx\"\nString.replaceAllRegExp(\"aabbcc\", %re(\"/b/g\"), \".\") == \"aa..cc\"\n```" + ], + "signature": "let replaceAllRegExp: (string, Core__RegExp.t, string) => string" + }, + { + "id": "Core.String.unsafeReplaceRegExpBy0", + "kind": "value", + "name": "unsafeReplaceRegExpBy0", + "docstrings": [ + "`unsafeReplaceRegExpBy0(str, regex, f)` returns a new `string` with some or all\nmatches of a pattern with no capturing parentheses replaced by the value\nreturned from the given function. The function receives as its parameters the\nmatched string, the offset at which the match begins, and the whole string being\nmatched.\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) on MDN.\n\n## Examples\n\n```rescript\nlet str = \"beautiful vowels\"\nlet re = %re(\"/[aeiou]/g\")\nlet matchFn = (~match, ~offset as _, ~input as _) => String.toUpperCase(match)\nString.unsafeReplaceRegExpBy0(str, re, matchFn) == \"bEAUtIfUl vOwEls\"\n```" + ], + "signature": "let unsafeReplaceRegExpBy0: (\n string,\n Core__RegExp.t,\n (~match: string, ~offset: int, ~input: string) => string,\n) => string" + }, + { + "id": "Core.String.unsafeReplaceRegExpBy1", + "kind": "value", + "name": "unsafeReplaceRegExpBy1", + "docstrings": [ + "`unsafeReplaceRegExpBy1(str, regexp, f)`. Like `unsafeReplaceRegExpBy0`, but `f`\nhas `group1` parameter.\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) on MDN.\n\n## Examples\n\n```rescript\nlet str = \"Jony is 40\"\nlet re = %re(\"/(Jony is )\\d+/g\")\nlet matchFn = (~match as _, ~group1, ~offset as _, ~input as _) => {\n group1 ++ \"41\"\n}\nString.unsafeReplaceRegExpBy1(str, re, matchFn) == \"Jony is 41\"\n```" + ], + "signature": "let unsafeReplaceRegExpBy1: (\n string,\n Core__RegExp.t,\n (\n ~match: string,\n ~group1: string,\n ~offset: int,\n ~input: string,\n ) => string,\n) => string" + }, + { + "id": "Core.String.unsafeReplaceRegExpBy2", + "kind": "value", + "name": "unsafeReplaceRegExpBy2", + "docstrings": [ + "`unsafeReplaceRegExpBy2(str, regexp, f)`. Like `unsafeReplaceRegExpBy1`, but `f`\nhas two group parameters.\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) on MDN.\n\n## Examples\n\n```rescript\nlet str = \"7 times 6\"\nlet re = %re(\"/(\\d+) times (\\d+)/\")\nlet matchFn = (~match as _, ~group1, ~group2, ~offset as _, ~input as _) => {\n switch (Int.fromString(group1), Int.fromString(group2)) {\n | (Some(x), Some(y)) => Int.toString(x * y)\n | _ => \"???\"\n }\n}\nString.unsafeReplaceRegExpBy2(str, re, matchFn) == \"42\"\n```" + ], + "signature": "let unsafeReplaceRegExpBy2: (\n string,\n Core__RegExp.t,\n (\n ~match: string,\n ~group1: string,\n ~group2: string,\n ~offset: int,\n ~input: string,\n ) => string,\n) => string" + }, + { + "id": "Core.String.unsafeReplaceRegExpBy3", + "kind": "value", + "name": "unsafeReplaceRegExpBy3", + "docstrings": [ + "`unsafeReplaceRegExpBy3(str, regexp, f)`. Like `unsafeReplaceRegExpBy1`, but `f`\nhas three group parameters.\nSee [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) on MDN." + ], + "signature": "let unsafeReplaceRegExpBy3: (\n string,\n Core__RegExp.t,\n (\n ~match: string,\n ~group1: string,\n ~group2: string,\n ~group3: string,\n ~offset: int,\n ~input: string,\n ) => string,\n) => string" + }, + { + "id": "Core.String.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.\nSee [`String.search`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search) on MDN.\n\n## Examples\n\n```rescript\nString.search(\"testing 1 2 3\", %re(\"/\\d+/\")) == 8\nString.search(\"no numbers\", %re(\"/\\d+/\")) == -1\n```" + ], + "signature": "let search: (string, Core__RegExp.t) => int" + }, + { + "id": "Core.String.searchOpt", + "kind": "value", + "name": "searchOpt", + "docstrings": [ + "`searchOpt(str, regexp)`. Like `search`, but return an `option`.\n\n## Examples\n\n```rescript\nString.searchOpt(\"testing 1 2 3\", %re(\"/\\d+/\")) == Some(8)\nString.searchOpt(\"no numbers\", %re(\"/\\d+/\")) == None\n```" + ], + "signature": "let searchOpt: (string, Core__RegExp.t) => option" + }, + { + "id": "Core.String.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`slice(str, ~start, ~end)` returns the substring of `str` starting at\ncharacter `start` up to but not including `end`.\n- If either `start` or `end` is negative, then it is evaluated as\n`length(str - start)` or `length(str - end)`.\n- If `end` is greater than the length of `str`, then it is treated as\n`length(str)`.\n- If `start` is greater than `end`, slice returns the empty string.\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.slice(\"abcdefg\", ~start=2, ~end=5) == \"cde\"\nString.slice(\"abcdefg\", ~start=2, ~end=9) == \"cdefg\"\nString.slice(\"abcdefg\", ~start=-4, ~end=-2) == \"de\"\nString.slice(\"abcdefg\", ~start=5, ~end=1) == \"\"\n```" + ], + "signature": "let slice: (string, ~start: int, ~end: int) => string" + }, + { + "id": "Core.String.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "docstrings": [ + "`sliceToEnd(str, ~start)` returns the substring of `str` starting at character\n`start` to the end of the string.\n- If `start` is negative, then it is evaluated as `length(str - start)`.\n- If `start` is greater than the length of `str`, then sliceToEnd returns the empty string.\nSee [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.\n\n## Examples\n\n```rescript\nString.sliceToEnd(\"abcdefg\", ~start=4) == \"efg\"\nString.sliceToEnd(\"abcdefg\", ~start=-2) == \"fg\"\nString.sliceToEnd(\"abcdefg\", ~start=7) == \"\"\n```" + ], + "signature": "let sliceToEnd: (string, ~start: int) => string" + }, + { + "id": "Core.String.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.\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) on MDN.\n\n## Examples\n\n```rescript\nString.split(\"2018-01-02\", \"-\") == [\"2018\", \"01\", \"02\"]\nString.split(\"a,b,,c\", \",\") == [\"a\", \"b\", \"\", \"c\"]\nString.split(\"good::bad as great::awful\", \"::\") == [\"good\", \"bad as great\", \"awful\"]\nString.split(\"has-no-delimiter\", \";\") == [\"has-no-delimiter\"]\n```" + ], + "signature": "let split: (string, string) => array" + }, + { + "id": "Core.String.splitAtMost", + "kind": "value", + "name": "splitAtMost", + "docstrings": [ + "`splitAtMost(str, delimiter, ~limit)` splits the given `str` at every\noccurrence of `delimiter` and returns an array of the first `limit` resulting\nsubstrings. If `limit` is negative or greater than the number of substrings,\nthe array will contain all the substrings.\n\n## Examples\n\n```rescript\nString.splitAtMost(\"ant/bee/cat/dog/elk\", \"/\", ~limit=3) == [\"ant\", \"bee\", \"cat\"]\nString.splitAtMost(\"ant/bee/cat/dog/elk\", \"/\", ~limit=0) == []\nString.splitAtMost(\"ant/bee/cat/dog/elk\", \"/\", ~limit=9) == [\"ant\", \"bee\", \"cat\", \"dog\", \"elk\"]\n```" + ], + "signature": "let splitAtMost: (string, string, ~limit: int) => array" + }, + { + "id": "Core.String.splitByRegExp", + "kind": "value", + "name": "splitByRegExp", + "docstrings": [ + "`splitByRegExp(str, regexp)` splits the given `str` at every occurrence of\n`regexp` and returns an array of the resulting substrings.\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) on MDN.\n\n## Examples\n\n```rescript\nString.splitByRegExp(\"Jan,Feb,Mar\", %re(\"/,/\")) == [Some(\"Jan\"), Some(\"Feb\"), Some(\"Mar\")]\n```" + ], + "signature": "let splitByRegExp: (string, Core__RegExp.t) => array>" + }, + { + "id": "Core.String.splitByRegExpAtMost", + "kind": "value", + "name": "splitByRegExpAtMost", + "docstrings": [ + "`splitByRegExpAtMost(str, regexp, ~limit)` splits the given `str` at every\noccurrence of `regexp` and returns an array of the first `limit` resulting\nsubstrings. If `limit` is negative or greater than the number of substrings, the\narray will contain all the substrings.\nSee [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split) on MDN.\n\n## Examples\n\n```rescript\nString.splitByRegExpAtMost(\"Hello World. How are you doing?\", %re(\"/ /\"), ~limit=3) == [\n Some(\"Hello\"),\n Some(\"World.\"),\n Some(\"How\"),\n]\n```" + ], + "signature": "let splitByRegExpAtMost: (\n string,\n Core__RegExp.t,\n ~limit: int,\n) => array>" + }, + { + "id": "Core.String.startsWith", + "kind": "value", + "name": "startsWith", + "docstrings": [ + "`startsWith(str, substr)` returns `true` if the `str` starts with `substr`,\n`false` otherwise.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWith(\"BuckleScript\", \"Buckle\") == true\nString.startsWith(\"BuckleScript\", \"\") == true\nString.startsWith(\"JavaScript\", \"Buckle\") == false\n```" + ], + "signature": "let startsWith: (string, string) => bool" + }, + { + "id": "Core.String.startsWithFrom", + "kind": "value", + "name": "startsWithFrom", + "docstrings": [ + "`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`.\nSee [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith) on MDN.\n\n## Examples\n\n```rescript\nString.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nString.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nString.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```" + ], + "signature": "let startsWithFrom: (string, string, int) => bool" + }, + { + "id": "Core.String.substring", + "kind": "value", + "name": "substring", + "docstrings": [ + "`substring(str, ~start, ~end)` returns characters `start` up to but not\nincluding end from `str`.\n- If `start` is less than zero, it is treated as zero.\n- If `end` is zero or negative, the empty string is returned.\n- If `start` is greater than `end`, the `start` and `end` points are swapped.\nSee [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.\n\n## Examples\n\n```rescript\nString.substring(\"playground\", ~start=3, ~end=6) == \"ygr\"\nString.substring(\"playground\", ~start=6, ~end=3) == \"ygr\"\nString.substring(\"playground\", ~start=4, ~end=12) == \"ground\"\n```" + ], + "signature": "let substring: (string, ~start: int, ~end: int) => string" + }, + { + "id": "Core.String.substringToEnd", + "kind": "value", + "name": "substringToEnd", + "docstrings": [ + "`substringToEnd(str, ~start)` returns the substring of `str` from position\n`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\nis returned.\nSee [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.\n\n## Examples\n\n```rescript\nString.substringToEnd(\"playground\", ~start=4) == \"ground\"\nString.substringToEnd(\"playground\", ~start=-3) == \"playground\"\nString.substringToEnd(\"playground\", ~start=12) == \"\"\n```" + ], + "signature": "let substringToEnd: (string, ~start: int) => string" + }, + { + "id": "Core.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.\nSee [`String.toLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) on MDN.\n\n## Examples\n\n```rescript\nString.toLowerCase(\"ABC\") == \"abc\"\nString.toLowerCase(`ΣΠ`) == `σπ`\nString.toLowerCase(`ΠΣ`) == `πς`\n```" + ], + "signature": "let toLowerCase: string => string" + }, + { + "id": "Core.String.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) on MDN." + ], + "signature": "let toLocaleLowerCase: string => string" + }, + { + "id": "Core.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.\nSee [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) on MDN.\n\n## Examples\n\n```rescript\nString.toUpperCase(\"abc\") == \"ABC\"\nString.toUpperCase(`Straße`) == `STRASSE`\nString.toUpperCase(`πς`) == `ΠΣ`\n```" + ], + "signature": "let toUpperCase: string => string" + }, + { + "id": "Core.String.toLocaleUpperCase", + "kind": "value", + "name": "toLocaleUpperCase", + "docstrings": [ + "`toLocaleUpperCase(str)` converts `str` to upper case using the current locale.\nSee [`String.toLocaleUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase) on MDN." + ], + "signature": "let toLocaleUpperCase: string => string" + }, + { + "id": "Core.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.\nSee [`String.trim`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim) on MDN.\n\n## Examples\n\n```rescript\nString.trim(\" abc def \") == \"abc def\"\nString.trim(\"\\n\\r\\t abc def \\n\\n\\t\\r \") == \"abc def\"\n```" + ], + "signature": "let trim: string => string" + }, + { + "id": "Core.String.trimStart", + "kind": "value", + "name": "trimStart", + "docstrings": [ + "`trimStart(str)` returns a string that is `str` with whitespace stripped from\nthe beginning of a string. Internal whitespace is not removed.\nSee [`String.trimStart`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimStart) on MDN.\n\n## Examples\n\n```rescript\nString.trimStart(\" Hello world! \") == \"Hello world! \"\nString.trimStart(\" Hello world! \") == \"Hello world! \"\n```" + ], + "signature": "let trimStart: string => string" + }, + { + "id": "Core.String.trimEnd", + "kind": "value", + "name": "trimEnd", + "docstrings": [ + "`trinEnd(str)` returns a string that is `str` with whitespace stripped from the\nend of a string. Internal whitespace is not removed.\nSee [`String.trimEnd`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimEnd) on MDN.\n\n## Examples\n\n```rescript\nString.trimEnd(\" Hello world! \") == \" Hello world!\"\nString.trimEnd(\" Hello world! \") == \" Hello world!\"\n```" + ], + "signature": "let trimEnd: string => string" + }, + { + "id": "Core.String.padStart", + "kind": "value", + "name": "padStart", + "docstrings": [ + "`padStart(str, n, padStr)` returns a string that has been padded with `padStr`\n(multiple times, if needed) until the resulting string reaches the given `n`\nlength. The padding is applied from the start of the current string.\nSee [`String.padStart`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart) on MDN.\n\n## Examples\n\n```rescript\nString.padStart(\"abc\", 5, \" \") == \" abc\"\nString.padStart(\"abc\", 6, \"123465\") == \"123abc\"\n```" + ], + "signature": "let padStart: (string, int, string) => string" + }, + { + "id": "Core.String.padEnd", + "kind": "value", + "name": "padEnd", + "docstrings": [ + "`padEnd(str, n, padStr)` returns a string that has been padded with `padStr`\n(multiple times, if needed) until the resulting string reaches the given `n`\nlength. The padding is applied from the end of the current string.\nSee [`String.padEnd`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd) on MDN.\n\n## Examples\n\n```rescript\nString.padEnd(\"Hello\", 10, \".\") == \"Hello.....\"\nString.padEnd(\"abc\", 1, \"\") == \"abc\"\n```" + ], + "signature": "let padEnd: (string, int, string) => string" + }, + { + "id": "Core.String.getSymbol", + "kind": "value", + "name": "getSymbol", + "docstrings": [], + "signature": "let getSymbol: (string, Core__Symbol.t) => option<'a>" + }, + { + "id": "Core.String.getSymbolUnsafe", + "kind": "value", + "name": "getSymbolUnsafe", + "docstrings": [], + "signature": "let getSymbolUnsafe: (string, Core__Symbol.t) => 'a" + }, + { + "id": "Core.String.setSymbol", + "kind": "value", + "name": "setSymbol", + "docstrings": [], + "signature": "let setSymbol: (string, Core__Symbol.t, 'a) => unit" + }, + { + "id": "Core.String.localeCompare", + "kind": "value", + "name": "localeCompare", + "docstrings": [ + "`localeCompare(referenceStr, compareStr)` returns a float than indicatings\nwhether a reference string comes before or after, or is the same as the given\nstring in sort order. If `referenceStr` occurs before `compareStr` positive if\nthe `referenceStr` occurs after `compareStr`, `0` if they are equivalent.\nDo not rely on exact return values of `-1` or `1`\nSee [`String.localeCompare`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare) on MDN.\n\n## Examples\n\n```rescript\nString.localeCompare(\"a\", \"c\") < 0.0 == true\nString.localeCompare(\"a\", \"a\") == 0.0\n```" + ], + "signature": "let localeCompare: (string, string) => float" + } + ] + }, + "core/regexp": { + "id": "Core.RegExp", + "name": "RegExp", + "docstrings": [ + "Functions for handling RegExp's in ReScript.\n\nSee [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) on MDN." + ], + "items": [ + { + "id": "Core.RegExp.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Type representing an instantiated `RegExp`." + ], + "signature": "type t = Js.Re.t" + }, + { + "id": "Core.RegExp.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [ + "`fromString(string)` creates a `RegExp.t` from the provided string. This can then be used to match on strings using `RegExp.exec`.\n\nSee [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```" + ], + "signature": "let fromString: string => t" + }, + { + "id": "Core.RegExp.fromStringWithFlags", + "kind": "value", + "name": "fromStringWithFlags", + "docstrings": [ + "`fromStringWithFlags(string)` creates a `RegExp.t` from the provided string, using the provided `flags`. This can then be used to match on strings using `RegExp.exec`.\n\nSee [`RegExp parameters`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp#parameters) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```" + ], + "signature": "let fromStringWithFlags: (string, ~flags: string) => t" + }, + { + "id": "Core.RegExp.test", + "kind": "value", + "name": "test", + "docstrings": [ + "`test(regexp, string)` tests whether the provided `regexp` matches on the provided string.\n\nSee [`RegExp.test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nif regexp->RegExp.test(\"ReScript is cool!\") {\n Console.log(\"Yay, there's a word in there.\")\n}\n```" + ], + "signature": "let test: (t, string) => bool" + }, + { + "id": "Core.RegExp.exec", + "kind": "value", + "name": "exec", + "docstrings": [ + "`exec(regexp, string)` executes the provided regexp on the provided string, optionally returning a `RegExp.Result.t` if the regexp matches on the string.\n\nSee [`RegExp.exec`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\n\nswitch regexp->RegExp.exec(\"ReScript is pretty cool, right?\") {\n| None => Console.log(\"Nope, no match...\")\n| Some(result) => Console.log(result->RegExp.Result.fullMatch) // Prints \"ReScript\"\n}\n```" + ], + "signature": "let exec: (t, string) => option" + }, + { + "id": "Core.RegExp.lastIndex", + "kind": "value", + "name": "lastIndex", + "docstrings": [ + "`lastIndex(regexp)` returns the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `0` to the console\n\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `4` to the console\n```" + ], + "signature": "let lastIndex: t => int" + }, + { + "id": "Core.RegExp.setLastIndex", + "kind": "value", + "name": "setLastIndex", + "docstrings": [ + "`setLastIndex(regexp, index)` set the index the next match will start from.\n\nSee [`RegExp.lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) on MDN.\n\n## Examples\n```rescript\n// Match the first word in a sentence\nlet regexp = RegExp.fromString(\"\\\\w+\")\nlet someStr = \"Many words here.\"\n\nregexp->RegExp.setLastIndex(4)\nregexp->RegExp.exec(someStr)->ignore\n\nConsole.log(regexp->RegExp.lastIndex) // Logs `10` to the console\n```" + ], + "signature": "let setLastIndex: (t, int) => unit" + }, + { + "id": "Core.RegExp.ignoreCase", + "kind": "value", + "name": "ignoreCase", + "docstrings": [ + "`ignoreCase(regexp)` returns whether the ignore case (`i`) flag is set on this `RegExp`.\n\nSee [`RegExp.ignoreCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/ignoreCase) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.ignoreCase) // Logs `false`, since `i` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.ignoreCase) // Logs `true`, since `i` is set\n```" + ], + "signature": "let ignoreCase: t => bool" + }, + { + "id": "Core.RegExp.global", + "kind": "value", + "name": "global", + "docstrings": [ + "`global(regexp)` returns whether the global (`g`) flag is set on this `RegExp`.\n\nSee [`RegExp.global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/global) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.global) // Logs `true`, since `g` is set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"i\")\nConsole.log(regexp2->RegExp.global) // Logs `false`, since `g` is not set\n```" + ], + "signature": "let global: t => bool" + }, + { + "id": "Core.RegExp.multiline", + "kind": "value", + "name": "multiline", + "docstrings": [ + "`multiline(regexp)` returns whether the multiline (`m`) flag is set on this `RegExp`.\n\nSee [`RegExp.multiline`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.multiline) // Logs `false`, since `m` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mi\")\nConsole.log(regexp2->RegExp.multiline) // Logs `true`, since `m` is set\n```" + ], + "signature": "let multiline: t => bool" + }, + { + "id": "Core.RegExp.source", + "kind": "value", + "name": "source", + "docstrings": [ + "`source(regexp)` returns the source text for this `RegExp`, without the two forward slashes (if present), and without any set flags.\n\nSee [`RegExp.source`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source) on MDN.\n\n## Examples\n```rescript\nlet regexp = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp->RegExp.source) // Logs `\\w+`, the source text of the `RegExp`\n```" + ], + "signature": "let source: t => string" + }, + { + "id": "Core.RegExp.sticky", + "kind": "value", + "name": "sticky", + "docstrings": [ + "`sticky(regexp)` returns whether the sticky (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.sticky`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `y` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"my\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `y` is set\n```" + ], + "signature": "let sticky: t => bool" + }, + { + "id": "Core.RegExp.unicode", + "kind": "value", + "name": "unicode", + "docstrings": [ + "`unicode(regexp)` returns whether the unicode (`y`) flag is set on this `RegExp`.\n\nSee [`RegExp.unicode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) on MDN.\n\n## Examples\n```rescript\nlet regexp1 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"g\")\nConsole.log(regexp1->RegExp.unicode) // Logs `false`, since `u` is not set\n\nlet regexp2 = RegExp.fromStringWithFlags(\"\\\\w+\", ~flags=\"mu\")\nConsole.log(regexp2->RegExp.unicode) // Logs `true`, since `u` is set\n```" + ], + "signature": "let unicode: t => bool" + } + ] + }, + "core/promise": { + "id": "Core.Promise", + "name": "Promise", + "docstrings": [ + "Functions for interacting with JavaScript Promise.\nSee: [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)." + ], + "items": [ + { + "id": "Core.Promise.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a> = promise<'a>" + }, + { + "id": "Core.Promise.resolve", + "kind": "value", + "name": "resolve", + "docstrings": [ + "`resolve(value)` creates a resolved Promise with a given `value`.\nSee [`Promise.resolve`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve) on MDN.\n\n## Examples\n\n```rescript\nlet p = Promise.resolve(5) // promise\n```" + ], + "signature": "let resolve: 'a => t<'a>" + }, + { + "id": "Core.Promise.reject", + "kind": "value", + "name": "reject", + "docstrings": [ + "`reject(exn)` reject a Promise.\nSee [`Promise.reject`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject) on MDN.\n\n## Examples\n\n```rescript\nexception TestError(string)\n\nlet p = Promise.reject(TestError(\"some rejected value\"))\n```" + ], + "signature": "let reject: exn => t<'a>" + }, + { + "id": "Core.Promise.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(callback)` creates a new Promise based on a `callback` that receives two\nuncurried functions `resolve` and `reject` for defining the Promise's result.\n\n## Examples\n\n```rescript\nopen Promise\n\nlet n = 4\nPromise.make((resolve, reject) => {\n if(n < 5) {\n resolve(. \"success\")\n }\n else {\n reject(. \"failed\")\n }\n})\n->then(str => {\n Console.log(str)->resolve\n})\n->catch(_ => {\n Console.log(\"Error occurred\")\n resolve()\n})\n->ignore\n```" + ], + "signature": "let make: (('a => unit, 'e => unit) => unit) => t<'a>" + }, + { + "id": "Core.Promise.promiseAndResolvers", + "kind": "type", + "name": "promiseAndResolvers", + "docstrings": [], + "signature": "type promiseAndResolvers<'a> = {\n promise: t<'a>,\n resolve: 'a => unit,\n reject: exn => unit,\n}" + }, + { + "id": "Core.Promise.withResolvers", + "kind": "value", + "name": "withResolvers", + "docstrings": [ + "`withResolvers()` returns a object containing a new promise with functions to resolve or reject it. See [`Promise.withResolvers`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers) on MDN.\n\n## Examples\n\n```rescript\nopen Promise\n\nlet {promise, resolve, _} = Promise.withResolvers()\n\nsetTimeout(() => {\n resolve(. \"success\")\n}, 1000)->ignore\n\npromise\n->thenResolve(str => {\n Console.log(str)\n})\n->ignore\n```" + ], + "signature": "let withResolvers: unit => promiseAndResolvers<'a>" + }, + { + "id": "Core.Promise.catch", + "kind": "value", + "name": "catch", + "docstrings": [ + "`catch(promise, errorCallback)` registers an exception handler in a promise chain.\nThe `errorCallback` receives an `exn` value that can later be refined into a JS\nerror or ReScript error. The `errorCallback` needs to return a promise with the\nsame type as the consumed promise. See [`Promise.catch`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch) on MDN.\n\n## Examples\n\n```rescript\nopen Promise\n\nexception SomeError(string)\n\nreject(SomeError(\"this is an error\"))\n->then(_ => {\n Ok(\"This result will never be returned\")->resolve\n})\n->catch(e => {\n let msg = switch(e) {\n | SomeError(msg) => \"ReScript error occurred: \" ++ msg\n | Exn.Error(obj) =>\n switch Exn.message(obj) {\n | Some(msg) => \"JS exception occurred: \" ++ msg\n | None => \"Some other JS value has been thrown\"\n }\n | _ => \"Unexpected error occurred\"\n }\n\n Error(msg)->resolve\n})\n->then(result => {\n switch result {\n | Ok(r) => Console.log2(\"Operation successful: \", r)\n | Error(msg) => Console.log2(\"Operation failed: \", msg)\n }->resolve\n})\n->ignore // Ignore needed for side-effects\n```\n\nIn case you want to return another promise in your `callback`, consider using\n`then` instead." + ], + "signature": "let catch: (t<'a>, exn => t<'a>) => t<'a>" + }, + { + "id": "Core.Promise.then", + "kind": "value", + "name": "then", + "docstrings": [ + "`then(promise, callback)` returns a new promise based on the result of `promise`'s \nvalue. The `callback` needs to explicitly return a new promise via `resolve`.\nIt is **not allowed** to resolve a nested promise (like `resolve(resolve(1))`).\nSee [`Promise.then`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) on MDN.\n## Examples\n\n```rescript\nopen Promise\nresolve(5)\n->then(num => {\n resolve(num + 5)\n})\n->then(num => {\n Console.log2(\"Your lucky number is: \", num)\n resolve()\n})\n->ignore\n```" + ], + "signature": "let then: (t<'a>, 'a => t<'b>) => t<'b>" + }, + { + "id": "Core.Promise.thenResolve", + "kind": "value", + "name": "thenResolve", + "docstrings": [ + "`thenResolve(promise, callback)` converts an encapsulated value of a promise\ninto another promise wrapped value. It is **not allowed** to return a promise\nwithin the provided callback (e.g. `thenResolve(value => resolve(value))`).\n\n## Examples\n\n```rescript\nopen Promise\nresolve(\"Anna\")\n->thenResolve(str => {\n \"Hello \" ++ str\n})\n->thenResolve(str => {\n Console.log(str)\n})\n->ignore // Ignore needed for side-effects\n```\n\nIn case you want to return another promise in your `callback`, consider using\n`then` instead." + ], + "signature": "let thenResolve: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Core.Promise.finally", + "kind": "value", + "name": "finally", + "docstrings": [ + "`finally(promise, callback)` is used to execute a function that is called no\nmatter if a promise was resolved or rejected. It will return the same `promise`\nit originally received. See [`Promise.finally`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/finally) on MDN.\n\n## Examples\n\n```rescript\nopen Promise\nexception SomeError(string)\nlet isDone = ref(false)\n\nresolve(5)\n->then(_ => {\n reject(SomeError(\"test\"))\n})\n->then(v => {\n Console.log2(\"final result\", v)\n resolve()\n})\n->catch(_ => {\n Console.log(\"Error handled\")\n resolve()\n})\n->finally(() => {\n Console.log(\"finally\")\n isDone := true\n})\n->then(() => {\n Console.log2(\"isDone:\", isDone.contents)\n resolve()\n})\n->ignore\n```" + ], + "signature": "let finally: (t<'a>, unit => unit) => t<'a>" + }, + { + "id": "Core.Promise.race", + "kind": "value", + "name": "race", + "docstrings": [ + "`race(arr)` runs all promises concurrently and returns promise settles with the eventual state of the first promise that settles. See [`Promise.race`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/race) on MDN.\n\n## Examples\n\n```rescript\nopen Promise\nlet racer = (ms, name) => {\n Promise.make((resolve, _) => {\n setTimeout(() => {\n resolve(name)\n }, ms)->ignore\n })\n}\n\nlet promises = [racer(1000, \"Turtle\"), racer(500, \"Hare\"), racer(100, \"Eagle\")]\n\nrace(promises)->then(winner => {\n Console.log(\"The winner is \" ++ winner)\n resolve()\n})\n```" + ], + "signature": "let race: array> => t<'a>" + }, + { + "id": "Core.Promise.any", + "kind": "value", + "name": "any", + "docstrings": [ + "`any(arr)` runs all promises concurrently and returns promise fulfills when any of the input's promises fulfills, with this first fulfillment value. See [`Promise.any`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/any) on MDN.\n\n## Examples\n\n```rescript\nopen Promise\nlet racer = (ms, name) => {\n Promise.make((resolve, _) => {\n setTimeout(() => {\n resolve(name)\n }, ms)->ignore\n })\n}\n\nlet promises = [racer(1000, \"Turtle\"), racer(500, \"Hare\"), racer(100, \"Eagle\")]\n\nany(promises)->then(winner => {\n Console.log(\"The winner is \" ++ winner)\n resolve()\n})\n```" + ], + "signature": "let any: array> => t<'a>" + }, + { + "id": "Core.Promise.all", + "kind": "value", + "name": "all", + "docstrings": [ + "`all(promises)` runs all promises concurrently and returns a promise fulfills when all of the input's promises fulfill, with an array of the fulfillment values. See [`Promise.all`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all) on MDN.\n\n```rescript\nopen Promise\nlet promises = [resolve(1), resolve(2), resolve(3)]\n\nall(promises)\n->then((results) => {\n results->Array.forEach(num => {\n Console.log2(\"Number: \", num)\n })\n\n resolve()\n})\n->ignore\n```" + ], + "signature": "let all: array> => t>" + }, + { + "id": "Core.Promise.all2", + "kind": "value", + "name": "all2", + "docstrings": [ + "`all2((p1, p2))`. Like `all()`, but with a fixed size tuple of 2" + ], + "signature": "let all2: ((t<'a>, t<'b>)) => t<('a, 'b)>" + }, + { + "id": "Core.Promise.all3", + "kind": "value", + "name": "all3", + "docstrings": [ + "`all3((p1, p2, p3))`. Like `all()`, but with a fixed size tuple of 3" + ], + "signature": "let all3: ((t<'a>, t<'b>, t<'c>)) => t<('a, 'b, 'c)>" + }, + { + "id": "Core.Promise.all4", + "kind": "value", + "name": "all4", + "docstrings": [ + "`all4((p1, p2, p3, p4))`. Like `all()`, but with a fixed size tuple of 4" + ], + "signature": "let all4: ((t<'a>, t<'b>, t<'c>, t<'d>)) => t<('a, 'b, 'c, 'd)>" + }, + { + "id": "Core.Promise.all5", + "kind": "value", + "name": "all5", + "docstrings": [ + "`all5((p1, p2, p3, p4, p5))`. Like `all()`, but with a fixed size tuple of 5" + ], + "signature": "let all5: (\n (t<'a>, t<'b>, t<'c>, t<'d>, t<'e>),\n) => t<('a, 'b, 'c, 'd, 'e)>" + }, + { + "id": "Core.Promise.all6", + "kind": "value", + "name": "all6", + "docstrings": [ + "`all6((p1, p2, p4, p5, p6))`. Like `all()`, but with a fixed size tuple of 6\n\")" + ], + "signature": "let all6: (\n (t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>),\n) => t<('a, 'b, 'c, 'd, 'e, 'f)>" + }, + { + "id": "Core.Promise.settledResult", + "kind": "type", + "name": "settledResult", + "docstrings": [], + "signature": "type settledResult<'a> =\n | Fulfilled({value: 'a})\n | Rejected({reason: exn})" + }, + { + "id": "Core.Promise.allSettled", + "kind": "value", + "name": "allSettled", + "docstrings": [ + "`allSettled(promises)` runs all promises concurrently and returns promise fulfills when all of the input's promises settle with an array of objects that describe the outcome of each promise. See [`Promise.allSettled`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled) on MDN.\n\n```rescript\nopen Promise\n\nexception TestError(string)\n\nlet promises = [resolve(1), resolve(2), reject(TestError(\"some rejected promise\"))]\n\nallSettled(promises)\n->then((results) => {\n results->Array.forEach((result) => {\n switch result {\n | Fulfilled({value: num}) => \n Console.log2(\"Number: \", num)\n | Rejected({reason}) =>\n Console.log(reason)\n }\n })\n\n resolve()\n})\n->ignore\n```" + ], + "signature": "let allSettled: array> => t>>" + }, + { + "id": "Core.Promise.allSettled2", + "kind": "value", + "name": "allSettled2", + "docstrings": [ + "`allSettled2((p1, p2))`. Like `allSettled()`, but with a fixed size tuple of 2" + ], + "signature": "let allSettled2: (\n (t<'a>, t<'b>),\n) => t<(settledResult<'a>, settledResult<'b>)>" + }, + { + "id": "Core.Promise.allSettled3", + "kind": "value", + "name": "allSettled3", + "docstrings": [ + "`allSettled3((p1, p2, p3))`. Like `allSettled()`, but with a fixed size tuple of 3" + ], + "signature": "let allSettled3: (\n (t<'a>, t<'b>, t<'c>),\n) => t<\n (settledResult<'a>, settledResult<'b>, settledResult<'c>),\n>" + }, + { + "id": "Core.Promise.allSettled4", + "kind": "value", + "name": "allSettled4", + "docstrings": [ + "`allSettled4((p1, p2, p3, p4))`. Like `allSettled()`, but with a fixed size tuple of 4" + ], + "signature": "let allSettled4: (\n (t<'a>, t<'b>, t<'c>, t<'d>),\n) => t<\n (\n settledResult<'a>,\n settledResult<'b>,\n settledResult<'c>,\n settledResult<'d>,\n ),\n>" + }, + { + "id": "Core.Promise.allSettled5", + "kind": "value", + "name": "allSettled5", + "docstrings": [ + "`allSettled5((p1, p2, p3, p4, p5))`. Like `allSettled()`, but with a fixed size tuple of 5" + ], + "signature": "let allSettled5: (\n (t<'a>, t<'b>, t<'c>, t<'d>, t<'e>),\n) => t<\n (\n settledResult<'a>,\n settledResult<'b>,\n settledResult<'c>,\n settledResult<'d>,\n settledResult<'e>,\n ),\n>" + }, + { + "id": "Core.Promise.allSettled6", + "kind": "value", + "name": "allSettled6", + "docstrings": [ + "`allSettled6((p1, p2, p4, p5, p6))`. Like `allSettled()`, but with a fixed size tuple of 6\n\")" + ], + "signature": "let allSettled6: (\n (t<'a>, t<'b>, t<'c>, t<'d>, t<'e>, t<'f>),\n) => t<\n (\n settledResult<'a>,\n settledResult<'b>,\n settledResult<'c>,\n settledResult<'d>,\n settledResult<'e>,\n settledResult<'f>,\n ),\n>" + }, + { + "id": "Core.Promise.done", + "kind": "value", + "name": "done", + "docstrings": [ + "`done(p)` is a safe way to ignore a promise. If a value is anything else than a\npromise, it will raise a type error." + ], + "signature": "let done: promise<'a> => unit" + } + ] + }, + "core/ordering": { + "id": "Core.Ordering", + "name": "Ordering", + "docstrings": [], + "items": [ + { + "id": "Core.Ordering.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t = float" + }, + { + "id": "Core.Ordering.less", + "kind": "value", + "name": "less", + "docstrings": [], + "signature": "let less: float" + }, + { + "id": "Core.Ordering.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: float" + }, + { + "id": "Core.Ordering.greater", + "kind": "value", + "name": "greater", + "docstrings": [], + "signature": "let greater: float" + }, + { + "id": "Core.Ordering.isLess", + "kind": "value", + "name": "isLess", + "docstrings": [], + "signature": "let isLess: float => bool" + }, + { + "id": "Core.Ordering.isEqual", + "kind": "value", + "name": "isEqual", + "docstrings": [], + "signature": "let isEqual: float => bool" + }, + { + "id": "Core.Ordering.isGreater", + "kind": "value", + "name": "isGreater", + "docstrings": [], + "signature": "let isGreater: float => bool" + }, + { + "id": "Core.Ordering.invert", + "kind": "value", + "name": "invert", + "docstrings": [], + "signature": "let invert: float => float" + }, + { + "id": "Core.Ordering.fromInt", + "kind": "value", + "name": "fromInt", + "docstrings": [], + "signature": "let fromInt: int => float" + } + ] + }, + "core/object": { + "id": "Core.Object", + "name": "Object", + "docstrings": [], + "items": [ + { + "id": "Core.Object.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make` create a new object that inherits the properties and methods from the standard built-in Object, such as `toString`. See [Object on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\n\n## Examples\n\n```rescript\nlet x = Object.make()\nx->Object.keysToArray->Array.length // 0\nx->Object.get(\"toString\")->Option.isSome // true\n```" + ], + "signature": "let make: unit => {..}" + }, + { + "id": "Core.Object.is", + "kind": "value", + "name": "is", + "docstrings": [ + "`is` determines if two objects are identical in all contexts. Objects, arrays, records, and other non-primitives are only identical if they reference the **exact** same object in memory. Primitives like ints, floats, and strings are identical if they have the same value. `+0` and `-0` are distinct. NaN is equal to itself. See [Object.is on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)\n\nIn most scenarios use `==` or `===` or the custom `equals` function (if provided) for the type.\n\n## Examples\n\n```rescript\nObject.is(25, 13) // false\nObject.is(\"abc\", \"abc\") // true\nObject.is(undefined, undefined) // true\nObject.is(undefined, null) // false\nObject.is(-0.0, 0.0) // false\nObject.is(list{1, 2}, list{1, 2}) // false\n\nObject.is([1, 2, 3], [1, 2, 3]) // false\n[1, 2, 3] == [1, 2, 3] // true\n[1, 2, 3] === [1, 2, 3] // false\n\nlet fruit = {\"name\": \"Apple\" }\nObject.is(fruit, fruit) // true\nObject.is(fruit, {\"name\": \"Apple\" }) // false\nfruit == {\"name\": \"Apple\" } // true\nfruit === {\"name\": \"Apple\" } // false\n```" + ], + "signature": "let is: ('a, 'a) => bool" + }, + { + "id": "Core.Object.create", + "kind": "value", + "name": "create", + "docstrings": [ + "`create` creates a new object, using an existing object as the prototype of the new object. See [Object.create on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\n\n**Note:** ReScript provides [first-class support for immutable objects](https://rescript-lang.org/docs/manual/latest/object) and [records](https://rescript-lang.org/docs/manual/latest/record). This is often safer and more convenient than using `create` and other functions in this module.\n\n## Examples\n\n```rescript\nlet x = {\"fruit\": \"banana\"}\nlet y = Object.create(x)\ny->Object.get(\"fruit\") // Some(\"banana\")\n```" + ], + "signature": "let create: {..} => {..}" + }, + { + "id": "Core.Object.createWithProperties", + "kind": "value", + "name": "createWithProperties", + "docstrings": [], + "signature": "let createWithProperties: ({..}, {..}) => {..}" + }, + { + "id": "Core.Object.createWithNull", + "kind": "value", + "name": "createWithNull", + "docstrings": [], + "signature": "let createWithNull: unit => {..}" + }, + { + "id": "Core.Object.createWithNullAndProperties", + "kind": "value", + "name": "createWithNullAndProperties", + "docstrings": [], + "signature": "let createWithNullAndProperties: {..} => {..}" + }, + { + "id": "Core.Object.assign", + "kind": "value", + "name": "assign", + "docstrings": [ + "`assign(target, source)` copies enumerable own properties from the source to the target, overwriting properties with the same name. It returns the modified target object. A deep clone is not created; properties are copied by reference.\n\n**Warning:** ReScript provides compile-time support for type-safe access to JavaScript objects. This eliminates common errors such as accessing properties that do not exist, or using a property of type x as if it were a y. Using `assign` can bypass these safety checks and lead to run-time errors (if you are not careful). ReScript provides [first-class support for immutable objects](https://rescript-lang.org/docs/manual/latest/object) and [records](https://rescript-lang.org/docs/manual/latest/record). This is often safer and more convenient than using `assign` and other functions in this module.\n\nSee [Object.assign on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) or [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign).\n\n## Examples\n\n```rescript\nObject.assign({\"a\": 1}, {\"a\": 2}) // {\"a\": 2}\nObject.assign({\"a\": 1, \"b\": 2}, {\"a\": 0}) // {\"a\": 0, \"b\": 2}\nObject.assign({\"a\": 1}, {\"a\": null}) // {\"a\": null}\n```" + ], + "signature": "let assign: ({..}, {..}) => {..}" + }, + { + "id": "Core.Object.assignMany", + "kind": "value", + "name": "assignMany", + "docstrings": [ + "`assignMany(target, sources)` copies enumerable own properties from each source to the target, overwriting properties with the same name. Later sources' properties overwrite earlier ones. It returns the modified target object. A deep clone is not created; properties are copied by reference.\n\n**Note:** ReScript provides [first-class support for immutable objects](https://rescript-lang.org/docs/manual/latest/object), including spreading one object into another. This is often more convenient than using `assign` or `assignMany`. \n\nSee [Object.assign on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) or [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign)." + ], + "signature": "let assignMany: ({..}, array<{..}>) => {..}" + }, + { + "id": "Core.Object.copy", + "kind": "value", + "name": "copy", + "docstrings": [], + "signature": "let copy: ({..} as 'a) => 'a" + }, + { + "id": "Core.Object.get", + "kind": "value", + "name": "get", + "docstrings": [ + "`get` gets the value of a property by name. Returns `None` if the property does not exist or has the value `undefined`. Otherwise returns `Some`, including if the value is `null`.\n\n## Examples\n\n```rescript\n{\"a\": 1}->Object.get(\"a\") // Some(1)\n{\"a\": 1}->Object.get(\"b\") // None\n{\"a\": undefined}->Object.get(\"a\") // None\n{\"a\": null}->Object.get(\"a\") // Some(null)\n{\"a\": 1}->Object.get(\"toString\")->Option.isSome // true\n```" + ], + "signature": "let get: ({..}, string) => option<'a>" + }, + { + "id": "Core.Object.getSymbol", + "kind": "value", + "name": "getSymbol", + "docstrings": [ + "`getSymbol` gets the value of a property by symbol. Returns `None` if the property does not exist or has the value `undefined`. Otherwise returns `Some`, including if the value is `null`.\n\n## Examples\n\n```rescript\nlet fruit = Symbol.make(\"fruit\")\nlet x = Object.make()\nx->Object.setSymbol(fruit, \"banana\")\nx->Object.getSymbol(fruit) // Some(\"banana\")\n```" + ], + "signature": "let getSymbol: ({..}, Core__Symbol.t) => option<'a>" + }, + { + "id": "Core.Object.getSymbolUnsafe", + "kind": "value", + "name": "getSymbolUnsafe", + "docstrings": [], + "signature": "let getSymbolUnsafe: ({..}, Core__Symbol.t) => 'a" + }, + { + "id": "Core.Object.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set(name, value)` assigns a value to the named object property, overwriting the previous value if any. See [Working with Objects on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#objects_and_properties)\n\n## Examples\n\n```rescript\n{\"a\": 1}->Object.set(\"a\", 2) // {\"a\": 2}\n{\"a\": 1}->Object.set(\"a\", None) // {\"a\": None}\n{\"a\": 1}->Object.set(\"b\", 2) // {\"a\": 1, \"b\": 2}\n```" + ], + "signature": "let set: ({..}, string, 'a) => unit" + }, + { + "id": "Core.Object.setSymbol", + "kind": "value", + "name": "setSymbol", + "docstrings": [], + "signature": "let setSymbol: ({..}, Core__Symbol.t, 'a) => unit" + }, + { + "id": "Core.Object.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [ + "`keysToArray` returns an array of an object's own enumerable string-keyed property names. See [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.keys) \nor [Object.keys on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys).\n\n## Examples\n\n```rescript\n{\"a\": 1, \"b\": 2}->Object.keysToArray // [\"a\", \"b\"]\n{\"a\": None}->Object.keysToArray // [\"a\"]\nObject.make()->Object.keysToArray // []\n```" + ], + "signature": "let keysToArray: {..} => array" + }, + { + "id": "Core.Object.hasOwnProperty", + "kind": "value", + "name": "hasOwnProperty", + "docstrings": [ + "`hasOwnProperty` determines whether the object has the specified property as its **own** property, as opposed to inheriting it. See [hasOwnProperty on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty)\n\n## Examples\n\n```rescript\nlet point = {\"x\": 1, \"y\": 2}\n{\"a\": 1}->Object.hasOwnProperty(\"a\") // true\n{\"a\": 1}->Object.hasOwnProperty(\"b\") // false\n{\"a\": 1}->Object.hasOwnProperty(\"toString\") // false\n```" + ], + "signature": "let hasOwnProperty: ({..}, string) => bool" + }, + { + "id": "Core.Object.seal", + "kind": "value", + "name": "seal", + "docstrings": [ + "`seal` seals an object. Sealing an object prevents extensions and makes existing properties non-configurable. A sealed object has a fixed set of properties. Unlike `freeze`, values of existing properties can still be changed as long as they are writable. \n\n**Note:** `seal` returns the same object that was passed in; it does not create a copy. Any attempt to delete or add properties to a sealed object will fail, either silently or by throwing an error. \n\nSee [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.seal) and [Object.seal on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal)\n\n## Examples\n\n```rescript\nlet point = {\"x\": 1, \"y\": 2}\npoint->Object.set(\"x\", -7) // succeeds\npoint->Object.seal->ignore\npoint->Object.set(\"z\", 9) // fails\npoint->Object.set(\"x\", 13) // succeeds\n```" + ], + "signature": "let seal: ({..} as 'a) => 'a" + }, + { + "id": "Core.Object.preventExtensions", + "kind": "value", + "name": "preventExtensions", + "docstrings": [ + "`preventExtensions` prevents new properties from being added to the object. It modifies the object (rather than creating a copy) and returns it.\n\nSee [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.preventextensions) and [Object.preventExtensions on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/preventExtensions)\n\n## Examples\n\n```rescript\nlet obj = {\"a\": 1}\nobj->Object.set(\"b\", 2) // succeeds\nobj->Object.preventExtensions->ignore\nobj->Object.set(\"c\", 3) // fails\n```" + ], + "signature": "let preventExtensions: ({..} as 'a) => 'a" + }, + { + "id": "Core.Object.freeze", + "kind": "value", + "name": "freeze", + "docstrings": [ + "`freeze` freezes an object. Freezing an object makes existing properties non-writable and prevents extensions. Once an object is frozen, new properties cannot be be added, existing properties cannot be removed, and their values cannot be changed.\n\n**Note:** `freeze` returns the same object that was passed in; it does not create a frozen copy. Any attempt to change a frozen object will fail, either silently or by throwing an exception.\n\nSee [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.isfrozen) and [Object.isFrozen on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen).\n\n## Examples\n\n ```rescript\nlet obj = {\"a\": 1}\nobj->Object.set(\"a\", 2) // succeeds\nobj->Object.freeze->ignore\nobj->Object.set(\"a\", 3) // fails\n```" + ], + "signature": "let freeze: ({..} as 'a) => 'a" + }, + { + "id": "Core.Object.isSealed", + "kind": "value", + "name": "isSealed", + "docstrings": [ + "`isSealed` determines if an object is sealed. A sealed object has a fixed set of properties.\n\nSee [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.issealed) and [Object.isSealed on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed)\n\n## Examples\n\n```rescript\nlet point = {\"x\": 1, \"y\": 3}->Object.seal\nlet pointIsSealed = point->Object.isSealed // true\nlet fruit = {\"name\": \"Apple\" }\nlet fruitIsSealed = fruit->Object.isSealed // false\n ```" + ], + "signature": "let isSealed: 'a => bool" + }, + { + "id": "Core.Object.isFrozen", + "kind": "value", + "name": "isFrozen", + "docstrings": [ + "`isFrozen` determines if an object is frozen. An object is frozen if an only if it is not extensible, all its properties are non-configurable, and all its data properties are non-writable.\n\nSee [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.isfrozen) and [Object.isFrozen on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen).\n\n## Examples\n\n```rescript\nlet point = {\"x\": 1, \"y\": 3}->Object.freeze\nlet pointIsFrozen = point->Object.isFrozen // true\nlet fruit = {\"name\": \"Apple\" }\nlet fruitIsFrozen = fruit->Object.isFrozen // false\n ```" + ], + "signature": "let isFrozen: 'a => bool" + }, + { + "id": "Core.Object.isExtensible", + "kind": "value", + "name": "isExtensible", + "docstrings": [ + "`isExtensible` determines if an object is extensible (whether it can have new properties added to it).\n\nSee [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.isextensible) and [Object.isExtensible on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible)\n\n## Examples\n\n```rescript\nlet obj = {\"a\": 1}\nobj->Object.isExtensible // true\nobj->Object.preventExtensions->ignore\nobj->Object.isExtensible // false\n```" + ], + "signature": "let isExtensible: 'a => bool" + } + ] + }, + "core/nullable": { + "id": "Core.Nullable", + "name": "Nullable", + "docstrings": [ + "Functions for handling nullable values.\n\nPrimarily useful when interoping with JavaScript when you don't know whether you'll get a value, `null` or `undefined`." + ], + "items": [ + { + "id": "Core.Nullable.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Type representing a nullable value.\nA nullable value can be the value `'a`, `null` or `undefined`." + ], + "signature": "type t<'a> = Js.Nullable.t<'a> =\n | Value('a)\n | Null\n | Undefined" + }, + { + "id": "Core.Nullable.null", + "kind": "value", + "name": "null", + "docstrings": [ + "The value `null`.\n\nSee [`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/null) on MDN.\n\n## Examples\n```rescript\nConsole.log(Nullable.null) // Logs `null` to the console.\n```" + ], + "signature": "let null: t<'a>" + }, + { + "id": "Core.Nullable.undefined", + "kind": "value", + "name": "undefined", + "docstrings": [ + "The value `undefined`.\n\nSee [`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/undefined) on MDN.\n\n## Examples\n```rescript\nConsole.log(undefined) // Logs `undefined` to the console.\n```" + ], + "signature": "let undefined: t<'a>" + }, + { + "id": "Core.Nullable.isNullable", + "kind": "value", + "name": "isNullable", + "docstrings": [ + "`isNullable(a)` returns `true` if `a` is null or undefined, `false` otherwise.\n\n## Examples\n\n```rescript\nlet myStr = \"Hello\"\nlet asNullable = myStr->Nullable.make\n\n// Can't do the below because we're now forced to check for nullability\n// myStr == asNullable\n\n// Check if asNullable is not null or undefined\nswitch asNullable->Nullable.isNullable {\n| true => assert(false)\n| false => assert(true)\n}\n```" + ], + "signature": "let isNullable: t<'a> => bool" + }, + { + "id": "Core.Nullable.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new nullable value from the provided value.\nThis means the compiler will enforce null checks for the new value.\n\n## Examples\n```rescript\nlet myStr = \"Hello\"\nlet asNullable = myStr->Nullable.make\n\n// Can't do the below because we're now forced to check for nullability\n// myStr == asNullable\n\n// Need to do this\nswitch asNullable->Nullable.toOption {\n| Some(value) if value == myStr => Console.log(\"Yay, values matched!\")\n| _ => Console.log(\"Values did not match.\")\n}\n```" + ], + "signature": "let make: 'a => t<'a>" + }, + { + "id": "Core.Nullable.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: (t<'a>, t<'b>, ('a, 'b) => bool) => bool" + }, + { + "id": "Core.Nullable.compare", + "kind": "value", + "name": "compare", + "docstrings": [], + "signature": "let compare: (\n t<'a>,\n t<'b>,\n ('a, 'b) => Core__Ordering.t,\n) => Core__Ordering.t" + }, + { + "id": "Core.Nullable.toOption", + "kind": "value", + "name": "toOption", + "docstrings": [ + "Converts a nullable value into an option, so it can be pattern matched on.\nWill convert both `null` and `undefined` to `None`, and a present value to `Some(value)`.\n\n## Examples\n```rescript\nlet nullableString = Nullable.make(\"Hello\")\n\nswitch nullableString->Nullable.toOption {\n| Some(str) => Console.log2(\"Got string:\", str)\n| None => Console.log(\"Didn't have a value.\")\n}\n```" + ], + "signature": "let toOption: t<'a> => option<'a>" + }, + { + "id": "Core.Nullable.fromOption", + "kind": "value", + "name": "fromOption", + "docstrings": [ + "Turns an `option` into a `Nullable.t`.\n\n## Examples\n```rescript\nlet optString = Some(\"Hello\")\nlet asNullable = optString->Nullable.fromOption // Nullable.t\n```" + ], + "signature": "let fromOption: option<'a> => t<'a>" + }, + { + "id": "Core.Nullable.getOr", + "kind": "value", + "name": "getOr", + "docstrings": [ + "`getOr(value, default)` returns `value` if not `null` or `undefined`,\notherwise return `default`.\n\n## Examples\n\n```rescript\nNullable.getOr(Nullable.null, \"Banana\") // Banana\nNullable.getOr(Nullable.make(\"Apple\"), \"Banana\") // Apple\n\nlet greet = (firstName: option) =>\n \"Greetings \" ++ firstName->Option.getOr(\"Anonymous\")\n\nNullable.make(\"Jane\")->Nullable.toOption->greet // \"Greetings Jane\"\nNullable.null->Nullable.toOption->greet // \"Greetings Anonymous\"\n```" + ], + "signature": "let getOr: (t<'a>, 'a) => 'a" + }, + { + "id": "Core.Nullable.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (t<'a>, 'a) => 'a", + "deprecated": "Use getOr instead" + }, + { + "id": "Core.Nullable.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "`getExn(value)` raises an exception if `null` or `undefined`, otherwise returns the value.\n\n```rescript\nNullable.getExn(Nullable.make(3)) // 3\nNullable.getExn(Nullable.null) /* Raises an Error */\n```\n\n## Exceptions\n\n- Raises `Invalid_argument` if `value` is `null` or `undefined`" + ], + "signature": "let getExn: t<'a> => 'a" + }, + { + "id": "Core.Nullable.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [ + "`getUnsafe(value)` returns `value`.\n\n## Examples\n\n```rescript\nNullable.getUnsafe(Nullable.make(3)) == 3\nNullable.getUnsafe(Nullable.null) // Raises an error\n```\n\n## Important\n\n- This is an unsafe operation, it assumes `value` is not `null` or `undefined`." + ], + "signature": "let getUnsafe: t<'a> => 'a" + }, + { + "id": "Core.Nullable.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(value, f)` call `f` on `value`. if `value` is not `null` or `undefined`, \nthen if calls `f`, otherwise returns `unit`.\n\n## Examples\n\n```rescript\nNullable.forEach(Nullable.make(\"thing\"), x => Console.log(x)) // logs \"thing\"\nNullable.forEach(Nullable.null, x => Console.log(x)) // returns ()\nNullable.forEach(undefined, x => Console.log(x)) // returns ()\n```" + ], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Core.Nullable.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(value, f)` returns `f(value)` if `value` is not `null` or `undefined`,\notherwise returns `value` unchanged.\n\n## Examples\n\n```rescript\nNullable.map(Nullable.make(3), x => x * x) // Nullable.make(9)\nNullable.map(undefined, x => x * x) // undefined\n```" + ], + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Core.Nullable.mapOr", + "kind": "value", + "name": "mapOr", + "docstrings": [ + "`mapOr(value, default, f)` returns `f(value)` if `value` is not `null`\nor `undefined`, otherwise returns `default`.\n\n## Examples\n\n```rescript\nlet someValue = Nullable.make(3)\nsomeValue->Nullable.mapOr(0, x => x + 5) // 8\n\nlet noneValue = Nullable.null\nnoneValue->Nullable.mapOr(0, x => x + 5) // 0\n```" + ], + "signature": "let mapOr: (t<'a>, 'b, 'a => 'b) => 'b" + }, + { + "id": "Core.Nullable.mapWithDefault", + "kind": "value", + "name": "mapWithDefault", + "docstrings": [], + "signature": "let mapWithDefault: (t<'a>, 'b, 'a => 'b) => 'b", + "deprecated": "Use mapOr instead" + }, + { + "id": "Core.Nullable.flatMap", + "kind": "value", + "name": "flatMap", + "docstrings": [ + "`flatMap(value, f)` returns `f(value)` if `value` is not `null` or `undefined`,\notherwise returns `value` unchanged.\n\n## Examples\n\n```rescript\nlet addIfAboveOne = value =>\n if (value > 1) {\n Nullable.make(value + 1)\n } else {\n Nullable.null\n }\n\nNullable.flatMap(Nullable.make(2), addIfAboveOne) // Nullable.make(3)\nNullable.flatMap(Nullable.make(-4), addIfAboveOne) // undefined\nNullable.flatMap(Nullable.null, addIfAboveOne) // undefined\n```" + ], + "signature": "let flatMap: (t<'a>, 'a => t<'b>) => t<'b>" + } + ] + }, + "core/null": { + "id": "Core.Null", + "name": "Null", + "docstrings": [ + "Functions for handling values that could be `null`.\n\nIf you also need to cover `undefined`, check out `Nullable` instead." + ], + "items": [ + { + "id": "Core.Null.t", + "kind": "type", + "name": "t", + "docstrings": [ + "A type representing a value that can be either `'a` or `null`." + ], + "signature": "type t<'a> = Js.Null.t<'a> = Value('a) | Null" + }, + { + "id": "Core.Null.asNullable", + "kind": "value", + "name": "asNullable", + "docstrings": [ + "Converts a `Null.t` into a `Nullable.t`.\n\n## Examples\n```rescript\nlet nullValue = Null.make(\"Hello\")\nlet asNullable = nullValue->Null.asNullable // Nullable.t\n```" + ], + "signature": "let asNullable: t<'a> => Core__Nullable.t<'a>" + }, + { + "id": "Core.Null.null", + "kind": "value", + "name": "null", + "docstrings": [ + "The value `null`.\n\nSee [`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/null) on MDN.\n\n## Examples\n```rescript\nConsole.log(null) // Logs `null` to the console.\n```" + ], + "signature": "let null: t<'a>" + }, + { + "id": "Core.Null.make", + "kind": "value", + "name": "make", + "docstrings": [ + "Creates a new `Null.t` from the provided value.\nThis means the compiler will enforce null checks for the new value.\n\n## Examples\n```rescript\nlet myStr = \"Hello\"\nlet asNullValue = myStr->Null.make // The compiler now thinks this can be `string` or `null`.\n```" + ], + "signature": "let make: 'a => t<'a>" + }, + { + "id": "Core.Null.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: (t<'a>, t<'b>, ('a, 'b) => bool) => bool" + }, + { + "id": "Core.Null.compare", + "kind": "value", + "name": "compare", + "docstrings": [], + "signature": "let compare: (\n t<'a>,\n t<'b>,\n ('a, 'b) => Core__Ordering.t,\n) => Core__Ordering.t" + }, + { + "id": "Core.Null.toOption", + "kind": "value", + "name": "toOption", + "docstrings": [ + "Converts a nullable value into an option, so it can be pattern matched on.\nWill convert `null` to `None`, and a present value to `Some(value)`.\n\n## Examples\n```rescript\nlet nullStr = Null.make(\"Hello\")\n\nswitch nullStr->Null.toOption {\n| Some(str) => Console.log2(\"Got string:\", str)\n| None => Console.log(\"Didn't have a value.\")\n}\n```" + ], + "signature": "let toOption: t<'a> => option<'a>" + }, + { + "id": "Core.Null.fromOption", + "kind": "value", + "name": "fromOption", + "docstrings": [ + "Turns an `option` into a `Null.t`. `None` will be converted to `null`.\n\n## Examples\n```rescript\nlet optString: option = None\nlet asNull = optString->Null.fromOption // Null.t\nConsole.log(asNull == Null.null) // Logs `true` to the console.\n```" + ], + "signature": "let fromOption: option<'a> => t<'a>" + }, + { + "id": "Core.Null.getOr", + "kind": "value", + "name": "getOr", + "docstrings": [ + "`getOr(value, default)` returns `value` if not `null`, otherwise return\n`default`.\n\n## Examples\n\n```rescript\nNull.getOr(Null.null, \"Banana\") // Banana\nNull.getOr(Null.make(\"Apple\"), \"Banana\") // Apple\n\nlet greet = (firstName: option) =>\n \"Greetings \" ++ firstName->Option.getOr(\"Anonymous\")\n\nNull.make(\"Jane\")->Null.toOption->greet // \"Greetings Jane\"\nNull.null->Null.toOption->greet // \"Greetings Anonymous\"\n```" + ], + "signature": "let getOr: (t<'a>, 'a) => 'a" + }, + { + "id": "Core.Null.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "docstrings": [], + "signature": "let getWithDefault: (t<'a>, 'a) => 'a", + "deprecated": "Use getOr instead" + }, + { + "id": "Core.Null.getExn", + "kind": "value", + "name": "getExn", + "docstrings": [ + "`getExn(value)` raises an exception if `null`, otherwise returns the value.\n\n```rescript\nNull.getExn(Null.make(3)) // 3\nNull.getExn(Null.null) /* Raises an Error */\n```\n\n## Exceptions\n\n- Raises `Invalid_argument` if `value` is `null`," + ], + "signature": "let getExn: t<'a> => 'a" + }, + { + "id": "Core.Null.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [ + "`getUnsafe(value)` returns `value`.\n\n## Examples\n\n```rescript\nNull.getUnsafe(Null.make(3)) == 3\nNull.getUnsafe(Null.null) // Raises an error\n```\n\n## Important\n\n- This is an unsafe operation, it assumes `value` is not `null`." + ], + "signature": "let getUnsafe: t<'a> => 'a" + }, + { + "id": "Core.Null.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(value, f)` call `f` on `value`. if `value` is not `null`, then if calls\n`f`, otherwise returns `unit`.\n\n## Examples\n\n```rescript\nNull.forEach(Null.make(\"thing\"), x => Console.log(x)) // logs \"thing\"\nNull.forEach(Null.null, x => Console.log(x)) // logs nothing\n```" + ], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Core.Null.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(value, f)` returns `f(value)` if `value` is not `null`, otherwise returns\n`value` unchanged.\n\n## Examples\n\n```rescript\nNull.map(Null.make(3), x => x * x) // Null.make(9)\nNull.map(Null.null, x => x * x) // null\n```" + ], + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>" + }, + { + "id": "Core.Null.mapOr", + "kind": "value", + "name": "mapOr", + "docstrings": [ + "`mapOr(value, default, f)` returns `f(value)` if `value` is not `null`,\notherwise returns `default`.\n\n## Examples\n\n```rescript\nlet someValue = Null.make(3)\nsomeValue->Null.mapOr(0, x => x + 5) // 8\n\nlet noneValue = Null.null\nnoneValue->Null.mapOr(0, x => x + 5) // 0\n```" + ], + "signature": "let mapOr: (t<'a>, 'b, 'a => 'b) => 'b" + }, + { + "id": "Core.Null.mapWithDefault", + "kind": "value", + "name": "mapWithDefault", + "docstrings": [], + "signature": "let mapWithDefault: (t<'a>, 'b, 'a => 'b) => 'b", + "deprecated": "Use mapOr instead" + }, + { + "id": "Core.Null.flatMap", + "kind": "value", + "name": "flatMap", + "docstrings": [ + "`flatMap(value, f)` returns `f(value)` if `value` is not `null`, otherwise\nreturns `value` unchanged.\n\n## Examples\n\n```rescript\nlet addIfAboveOne = value =>\n if (value > 1) {\n Null.make(value + 1)\n } else {\n Null.null\n }\n\nNull.flatMap(Null.make(2), addIfAboveOne) // Null.make(3)\nNull.flatMap(Null.make(-4), addIfAboveOne) // null\nNull.flatMap(Null.null, addIfAboveOne) // null\n```" + ], + "signature": "let flatMap: (t<'a>, 'a => t<'b>) => t<'b>" + } + ] + }, + "core/math": { + "id": "Core.Math", + "name": "Math", + "docstrings": [ + "Functions for interacting with JavaScript Math.\nSee: [`Math`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math)." + ], + "items": [ + { + "id": "Core.Math.abs", + "kind": "value", + "name": "abs", + "docstrings": [ + "`abs(v)` returns absolute value of `v`.\nSee [`Math.abs`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs) on MDN.\n\n## Examples\n\n```rescript\nMath.abs(-2.0) // 2.0\nMath.abs(3.0) // 3.0\n```" + ], + "signature": "let abs: float => float" + }, + { + "id": "Core.Math.acos", + "kind": "value", + "name": "acos", + "docstrings": [ + "`acos(v)` returns arccosine (in radians) of argument `v`, returns `NaN` if the\nargument is outside the range [-1.0, 1.0].\nSee [`Math.acos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acos) on MDN.\n\n## Examples\n\n```rescript\nMath.acos(-1.0) // 3.141592653589793\nMath.acos(-3.0)->Float.isNaN // true\n```" + ], + "signature": "let acos: float => float" + }, + { + "id": "Core.Math.acosh", + "kind": "value", + "name": "acosh", + "docstrings": [ + "`acosh(v)` returns the inverse hyperbolic arccosine (in radians) of argument `v`,\nreturns `NaN` if the argument is less than `1.0`.\nSee [`Math.acosh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acosh) on MDN.\n\n## Examples\n\n```rescript\nMath.acosh(1.0) // 0.0\nMath.acosh(0.5)->Float.isNaN // true\n```" + ], + "signature": "let acosh: float => float" + }, + { + "id": "Core.Math.asin", + "kind": "value", + "name": "asin", + "docstrings": [ + "`asin(v)` returns the inverse sine (in radians) of argument `v`, returns `NaN`\nif the argument `v` is outside the range [-1.0, 1.0].\nSee [`Math.asin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asin) on MDN.\n\n## Examples\n\n```rescript\nMath.asin(-1.0) // -1.5707963267948966\nMath.asin(-2.0)->Float.isNaN // true\n```" + ], + "signature": "let asin: float => float" + }, + { + "id": "Core.Math.asinh", + "kind": "value", + "name": "asinh", + "docstrings": [ + "`asinh(v)` returns the inverse hyperbolic sine of argument `v`.\nSee [`Math.asinh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asinh) on MDN.\n\n## Examples\n\n```rescript\nMath.asinh(-1.0) // -0.881373587019543\nMath.asinh(-0.0) // -0.0\n```" + ], + "signature": "let asinh: float => float" + }, + { + "id": "Core.Math.atan", + "kind": "value", + "name": "atan", + "docstrings": [ + "`atan(v)` returns the inverse tangent (in radians) of argument `v`.\nSee [`Math.atan`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan) on MDN.\n\n## Examples\n\n```rescript\nMath.atan(-0.0) // -0.0\nMath.atan(0.0) // 0.0\nMath.atan(1.0) // 0.7853981633974483\n```" + ], + "signature": "let atan: float => float" + }, + { + "id": "Core.Math.atanh", + "kind": "value", + "name": "atanh", + "docstrings": [ + "`atanh(v)` returns the invert hyperbolic tangent of argument `v`. Returns `NaN`\nif the argument `v` is is outside the range [-1.0, 1.0] and `Infinity` if `v`\nis `-1.0` or `1.0`.\nSee [`Math.atanh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh) on MDN.\n\n## Examples\n\n```rescript\nMath.atanh(-2.0)->Float.isNaN // true\nMath.atanh(-1.0)->Float.isFinite // false\nMath.atanh(-0.0) // -0.0\nMath.atanh(0.0) // 0.0\nMath.atanh(0.5) // 0.5493061443340548\n```" + ], + "signature": "let atanh: float => float" + }, + { + "id": "Core.Math.atan2", + "kind": "value", + "name": "atan2", + "docstrings": [ + "`atan2(~y, ~x)` returns the angle (in radians) of the quotient `y /. x`. It is\nalso the angle between the *x*-axis and point (*x*, *y*).\nSee [`Math.atan2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2) on MDN.\n\n## Examples\n\n```rescript\nMath.atan2(~y=0.0, ~x=10.0) == 0.0\nMath.atan2(~x=5.0, ~y=5.0) == Math.Constants.pi /. 4.0\nMath.atan2(~x=90.0, ~y=15.0) // 1.4056476493802699\nMath.atan2(~x=15.0, ~y=90.0) // 0.16514867741462683\n```" + ], + "signature": "let atan2: (~y: float, ~x: float) => float" + }, + { + "id": "Core.Math.cbrt", + "kind": "value", + "name": "cbrt", + "docstrings": [ + "`cbrt(v)` returns the cube root of argument `v`.\nSee [`Math.cbrt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cbrt) on MDN.\n\n## Examples\n\n```rescript\nMath.cbrt(-1.0) // -1.0\nMath.cbrt(-0.0) // -0.0\nMath.cbrt(0.0) // 0.0\n```" + ], + "signature": "let cbrt: float => float" + }, + { + "id": "Core.Math.ceil", + "kind": "value", + "name": "ceil", + "docstrings": [ + "`ceil(v)` returns the smallest integral value greater than or equal to the\nargument `v`. The result is a `float` and is not restricted to the `int` data\ntype range.\nSee [`Math.ceil`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil) on MDN.\n\n## Examples\n\n```rescript\nMath.ceil(3.1) == 4.0\nMath.ceil(3.0) == 3.0\nMath.ceil(-3.1) == -3.0\nMath.ceil(2_150_000_000.3) == 2_150_000_001.0\n```" + ], + "signature": "let ceil: float => float" + }, + { + "id": "Core.Math.cos", + "kind": "value", + "name": "cos", + "docstrings": [ + "`cos(v)` returns the cosine of argument `v`, which must be specified in radians.\nSee [`Math.cos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos) on MDN.\n\n## Examples\n\n```rescript\nMath.cos(-0.0) // 1.0\nMath.cos(0.0) // 1.0\nMath.cos(1.0) // 0.5403023058681398\n```" + ], + "signature": "let cos: float => float" + }, + { + "id": "Core.Math.cosh", + "kind": "value", + "name": "cosh", + "docstrings": [ + "`cosh(v)` returns the hyperbolic cosine of argument `v`, which must be specified\nin radians.\nSee [`Math.cosh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cosh) on MDN.\n\n## Examples\n\n```rescript\nMath.cosh(-1.0) // 1.5430806348152437\nMath.cosh(-0.0) // 1.0\nMath.cosh(0.0) // 1.0\n```" + ], + "signature": "let cosh: float => float" + }, + { + "id": "Core.Math.exp", + "kind": "value", + "name": "exp", + "docstrings": [ + "`exp(v)` returns natural exponentional, returns *e* (the base of natural logarithms)\nto the power of the given argument `v`.\nSee [`Math.exp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/exp) on MDN.\n\n## Examples\n\n```rescript\nMath.exp(-1.0) // 0.36787944117144233\nMath.exp(0.0) // 1.0\n```" + ], + "signature": "let exp: float => float" + }, + { + "id": "Core.Math.expm1", + "kind": "value", + "name": "expm1", + "docstrings": [ + "`expm1(v)` returns *e* (the base of natural logarithms) to the power of the given\nargument `v` minus 1.\nSee [`Math.expm1`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/expm1) on MDN.\n\n## Examples\n\n```rescript\nMath.expm1(-1.0) // -0.6321205588285577\nMath.expm1(-0.0) // -0\n```" + ], + "signature": "let expm1: float => float" + }, + { + "id": "Core.Math.floor", + "kind": "value", + "name": "floor", + "docstrings": [ + "`floor(v)` returns the largest integral value less than or equal to the argument\n`v`. The result is a `float` and is not restricted to the `int` data type range.\nSee [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor) on MDN.\n\n## Examples\n\n```rescript\nMath.floor(-45.95) // -46.0\nMath.floor(-45.05) // -46.0\nMath.floor(-0.0) // -0.0\n```" + ], + "signature": "let floor: float => float" + }, + { + "id": "Core.Math.fround", + "kind": "value", + "name": "fround", + "docstrings": [ + "`fround(v)` returns the nearest single precision float.\nSee [`Math.fround`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround) on MDN.\n\n## Examples\n\n```rescript\nMath.fround(5.5) == 5.5\nMath.fround(5.05) == 5.050000190734863\n```" + ], + "signature": "let fround: float => float" + }, + { + "id": "Core.Math.hypot", + "kind": "value", + "name": "hypot", + "docstrings": [ + "`hypot(a, b)` returns the square root of the sum of squares of its two arguments\n(the Pythagorean formula).\nSee [`Math.hypot`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot) on MDN.\n\n## Examples\n\n```rescript\nMath.hypot(3.0, 4.0) // 5.0\nMath.hypot(3.0, 5.0) // 5.8309518948453\n```" + ], + "signature": "let hypot: (float, float) => float" + }, + { + "id": "Core.Math.hypotMany", + "kind": "value", + "name": "hypotMany", + "docstrings": [ + "`hypotMany(arr)` returns the square root of the sum of squares of the numbers in\nthe array argument (generalized Pythagorean equation). Using an array allows you\nto have more than two items. If `arr` is an empty array then returns `0.0`.\nSee [`Math.hypot`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot) on MDN.\n\n## Examples\n\n```rescript\nMath.hypotMany([3.0, 4.0, 5.0]) // 7.0710678118654755\nMath.hypotMany([]) // 0.0\n```" + ], + "signature": "let hypotMany: array => float" + }, + { + "id": "Core.Math.log", + "kind": "value", + "name": "log", + "docstrings": [ + "`log(v)` returns the natural logarithm of argument `v`, this is the number *x*\nsuch that `e^x` equals the argument. Returns `NaN` for negative arguments and\n`Infinity` for `0.0` or `-0.0`.\nSee [`Math.log`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log) on MDN.\n\n## Examples\n\n```rescript\nMath.log(-1.0)->Float.isNaN // true\nMath.log(-0.0)->Float.isFinite // false\nMath.log(0.0)->Float.isFinite // false\nMath.log(1.0) // 0\n```" + ], + "signature": "let log: float => float" + }, + { + "id": "Core.Math.log1p", + "kind": "value", + "name": "log1p", + "docstrings": [ + "`log1p(v)` returns the natural logarithm of one plus the argument `v`.\nReturns `NaN` for arguments less than `-1` and `Infinity` if `v` is `-1.0`.\nSee [`Math.log1p`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log1p) on MDN.\n\n## Examples\n\n```rescript\nMath.log1p(-2.0)->Float.isNaN // true\nMath.log1p(-1.0)->Float.isFinite // false\nMath.log1p(-0.0) // -0\n```" + ], + "signature": "let log1p: float => float" + }, + { + "id": "Core.Math.log10", + "kind": "value", + "name": "log10", + "docstrings": [ + "`log10(v)` returns the base 10 logarithm of argument `v`. Returns `NaN` for\nnegative `v`. If `v` is `-0.0` or `0.0` returns `Infinity`.\nSee [`Math.log10`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log10) on MDN.\n\n## Examples\n\n```rescript\nMath.log10(-2.0)->Float.isNaN // true\nMath.log10(-0.0)->Float.isFinite // false\nMath.log10(0.0)->Float.isFinite // false\nMath.log10(1.0) // 0\n```" + ], + "signature": "let log10: float => float" + }, + { + "id": "Core.Math.log2", + "kind": "value", + "name": "log2", + "docstrings": [ + "`log2(v)` returns the base 2 logarithm of argument `v`. Returns `NaN` for\nnegative `v` and `Infinity` if `v` is `-0.0` or `0.0`.\nSee [`Math.log2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2) on MDN.\n\n## Examples\n\n```rescript\nMath.log2(-2.0)->Float.isNaN // true\nMath.log2(-0.0)->Float.isFinite // false\nMath.log2(0.0)->Float.isFinite // false\nMath.log2(1.0) // 0.0\n```" + ], + "signature": "let log2: float => float" + }, + { + "id": "Core.Math.min", + "kind": "value", + "name": "min", + "docstrings": [ + "`min(a, b)` returns the minimum of its two float arguments.\nSee [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min) on MDN.\n\n## Examples\n\n```rescript\nMath.min(1.0, 2.0) // 1.0\nMath.min(-1.0, -2.0) // -2.0\n```" + ], + "signature": "let min: (float, float) => float" + }, + { + "id": "Core.Math.minMany", + "kind": "value", + "name": "minMany", + "docstrings": [ + "`minMany(arr)` returns the minimum of the float in the given array `arr`.\nReturns `Infinity` if `arr` is empty.\nSee [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min) on MDN.\n\n## Examples\n\n```rescript\nMath.minMany([1.0, 2.0]) // 1.0\nMath.minMany([-1.0, -2.0]) // -2.0\nMath.minMany([])->Float.isFinite // false\n```" + ], + "signature": "let minMany: array => float" + }, + { + "id": "Core.Math.max", + "kind": "value", + "name": "max", + "docstrings": [ + "`max(a, b)` returns the maximum of its two float arguments.\nSee [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max) on MDN.\n\n## Examples\n\n```rescript\nMath.max(1.0, 2.0) // 2.0\nMath.max(-1.0, -2.0) // -1.0\n```" + ], + "signature": "let max: (float, float) => float" + }, + { + "id": "Core.Math.maxMany", + "kind": "value", + "name": "maxMany", + "docstrings": [ + "`maxMany(arr)` returns the maximum of the float in the given array `arr`.\nReturns `Infinity` if `arr` is empty.\nSee [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max) on MDN.\n\n## Examples\n\n```rescript\nMath.maxMany([1.0, 2.0]) // 2.0\nMath.maxMany([-1.0, -2.0]) // -1.0\nMath.maxMany([])->Float.isFinite // false\n```" + ], + "signature": "let maxMany: array => float" + }, + { + "id": "Core.Math.pow", + "kind": "value", + "name": "pow", + "docstrings": [ + "`pow(a, ~exp)` raises the given base `a` to the given exponent `exp`.\nSee [`Math.pow`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow) on MDN.\n\n## Examples\n\n```rescript\nMath.pow(2.0, ~exp=4.0) // 16.0\nMath.pow(3.0, ~exp=4.0) // 81.0\n```" + ], + "signature": "let pow: (float, ~exp: float) => float" + }, + { + "id": "Core.Math.random", + "kind": "value", + "name": "random", + "docstrings": [ + "`random()` returns a random number in the half-closed interval [0,1].\nSee [`Math.random`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random) on MDN.\n\n## Examples\n\n```rescript\nMath.random()\n```" + ], + "signature": "let random: unit => float" + }, + { + "id": "Core.Math.round", + "kind": "value", + "name": "round", + "docstrings": [ + "`round(v)` returns then value of `v` rounded to nearest integral value\n(expressed as a float). If the fractional portion of the argument `v` is greater\nthan `0.5`, the argument `v` is rounded to the float with the next higher\nabsolute value.\nSee [`Math.round`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round) on MDN.\n\n## Examples\n\n```rescript\nMath.round(-20.5) // -20.0\nMath.round(-0.1) // -0.0\nMath.round(0.0) // 0.0\nMath.round(-0.0) // -0.0\n```" + ], + "signature": "let round: float => float" + }, + { + "id": "Core.Math.sign", + "kind": "value", + "name": "sign", + "docstrings": [ + "`sign(v)` returns the sign of its foat argument: `-1` if negative, `0` if\nzero, `1` if positive.\nSee [`Math.sign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign) on MDN.\n\n## Examples\n\n```rescript\nMath.sign(3.0) // 1.0\nMath.sign(-3.0) // 1.0\nMath.sign(0.0) // 0.0\n```" + ], + "signature": "let sign: float => float" + }, + { + "id": "Core.Math.sin", + "kind": "value", + "name": "sin", + "docstrings": [ + "`sin(v)` returns the sine of argument `v`, which must be specified in radians.\nSee [`Math.sin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sin) on MDN.\n\n## Examples\n\n```rescript\nMath.sin(-0.0) // -0.0\nMath.sin(0.0) // 0.0\nMath.sin(1.0) // 0.8414709848078965\n```" + ], + "signature": "let sin: float => float" + }, + { + "id": "Core.Math.sinh", + "kind": "value", + "name": "sinh", + "docstrings": [ + "`sinh(v)` returns then hyperbolic sine of argument `v`, which must be specified\nin radians.\nSee [`Math.sinh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sinh) on MDN.\n\n## Examples\n\n```rescript\nMath.sinh(-0.0) // -0.0\nMath.sinh(0.0) // 0.0\nMath.sinh(1.0) // 1.1752011936438014\n```" + ], + "signature": "let sinh: float => float" + }, + { + "id": "Core.Math.sqrt", + "kind": "value", + "name": "sqrt", + "docstrings": [ + "`sqrt(v)` returns the square root of `v`. If `v` is negative returns `NaN`.\nSee [`Math.sqrt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt) on MDN.\n\n## Examples\n\n```rescript\nMath.sqrt(-1.0)->Float.isNaN // true\nMath.sqrt(-0.0) // -0.0\nMath.sqrt(0.0) // 0.0\nMath.sqrt(1.0) // 1.0\nMath.sqrt(9.0) // 3.0\n```" + ], + "signature": "let sqrt: float => float" + }, + { + "id": "Core.Math.tan", + "kind": "value", + "name": "tan", + "docstrings": [ + "`tan(v)` returns the tangent of argument `v`, which must be specified in\nradians. Returns `NaN` if `v` is positive `Infinity` or negative `Infinity`.\nSee [`Math.tan`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tan) on MDN.\n\n## Examples\n\n```rescript\nMath.tan(-0.0) // -0.0\nMath.tan(0.0) // 0.0\nMath.tan(1.0) // 1.5574077246549023\n```" + ], + "signature": "let tan: float => float" + }, + { + "id": "Core.Math.tanh", + "kind": "value", + "name": "tanh", + "docstrings": [ + "`tanh(v)` returns the hyperbolic tangent of argument `v`, which must be\nspecified in radians.\nSee [`Math.tanh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tanh) on MDN.\n\n## Examples\n\n```rescript\nMath.tanh(-0.0) // -0.0\nMath.tanh(0.0) // 0.0\nMath.tanh(1.0) // 0.7615941559557649\n```" + ], + "signature": "let tanh: float => float" + }, + { + "id": "Core.Math.trunc", + "kind": "value", + "name": "trunc", + "docstrings": [ + "`trunc(v)` truncates the argument `v`, i.e., removes fractional digits.\nSee [`Math.trunc`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc) on MDN.\n\n## Examples\n\n```rescript\nMath.trunc(0.123) // 0.0\nMath.trunc(1.999) // 1.0\nMath.trunc(13.37) // 13.0\nMath.trunc(42.84) // 42.0\n```" + ], + "signature": "let trunc: float => float" + } + ] + }, + "core/bigint": { + "id": "Core.BigInt", + "name": "BigInt", + "docstrings": [], + "items": [ + { + "id": "Core.BigInt.asIntN", + "kind": "value", + "name": "asIntN", + "docstrings": [], + "signature": "let asIntN: (~width: int, bigint) => bigint" + }, + { + "id": "Core.BigInt.asUintN", + "kind": "value", + "name": "asUintN", + "docstrings": [], + "signature": "let asUintN: (~width: int, bigint) => bigint" + }, + { + "id": "Core.BigInt.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [], + "signature": "let fromString: string => bigint" + }, + { + "id": "Core.BigInt.fromStringExn", + "kind": "value", + "name": "fromStringExn", + "docstrings": [ + "Parses the given `string` into a `bigint` using JavaScript semantics. Return the\nnumber as a `bigint` if successfully parsed. Uncaught syntax exception otherwise.\n\n## Examples\n\n```rescript\n/* returns 123n */\nBigInt.fromStringExn(\"123\")\n\n/* returns 0n */\nBigInt.fromStringExn(\"\")\n\n/* returns 17n */\nBigInt.fromStringExn(\"0x11\")\n\n/* returns 3n */\nBigInt.fromStringExn(\"0b11\")\n\n/* returns 9n */\nBigInt.fromStringExn(\"0o11\")\n\n/* catch exception */\ntry {\n BigInt.fromStringExn(\"a\")\n} catch {\n| Exn.Error(_error) => 0n\n}\n```" + ], + "signature": "let fromStringExn: string => bigint" + }, + { + "id": "Core.BigInt.fromInt", + "kind": "value", + "name": "fromInt", + "docstrings": [], + "signature": "let fromInt: int => bigint" + }, + { + "id": "Core.BigInt.fromFloat", + "kind": "value", + "name": "fromFloat", + "docstrings": [], + "signature": "let fromFloat: float => bigint" + }, + { + "id": "Core.BigInt.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Formats a `bigint` as a string. Return a `string` representing the given value.\nSee [`toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\n\n```rescript\n/* prints \"123\" */\nJs.BigInt.toString(123n)->Js.log\n```" + ], + "signature": "let toString: (bigint, ~radix: int=?) => string" + }, + { + "id": "Core.BigInt.toStringWithRadix", + "kind": "value", + "name": "toStringWithRadix", + "docstrings": [], + "signature": "let toStringWithRadix: (bigint, ~radix: int) => string", + "deprecated": "Use `toString` with `~radix` instead" + }, + { + "id": "Core.BigInt.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [ + "Returns a string with a language-sensitive representation of this BigInt value.\n\n## Examples\n\n```rescript\n/* prints \"123\" */\nJs.BigInt.toString(123n)->Js.log\n```" + ], + "signature": "let toLocaleString: bigint => string" + }, + { + "id": "Core.BigInt.toFloat", + "kind": "value", + "name": "toFloat", + "docstrings": [], + "signature": "let toFloat: bigint => float" + }, + { + "id": "Core.BigInt.toInt", + "kind": "value", + "name": "toInt", + "docstrings": [], + "signature": "let toInt: bigint => int" + }, + { + "id": "Core.BigInt.+", + "kind": "value", + "name": "+", + "docstrings": [], + "signature": "let +: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.-", + "kind": "value", + "name": "-", + "docstrings": [], + "signature": "let -: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.*", + "kind": "value", + "name": "*", + "docstrings": [], + "signature": "let *: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt./", + "kind": "value", + "name": "/", + "docstrings": [], + "signature": "let /: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.~-", + "kind": "value", + "name": "~-", + "docstrings": [], + "signature": "let ~-: bigint => bigint" + }, + { + "id": "Core.BigInt.~+", + "kind": "value", + "name": "~+", + "docstrings": [], + "signature": "let ~+: bigint => bigint" + }, + { + "id": "Core.BigInt.**", + "kind": "value", + "name": "**", + "docstrings": [], + "signature": "let **: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.add", + "kind": "value", + "name": "add", + "docstrings": [], + "signature": "let add: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.sub", + "kind": "value", + "name": "sub", + "docstrings": [], + "signature": "let sub: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.mul", + "kind": "value", + "name": "mul", + "docstrings": [], + "signature": "let mul: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.div", + "kind": "value", + "name": "div", + "docstrings": [], + "signature": "let div: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.mod", + "kind": "value", + "name": "mod", + "docstrings": [], + "signature": "let mod: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.land", + "kind": "value", + "name": "land", + "docstrings": [], + "signature": "let land: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.lor", + "kind": "value", + "name": "lor", + "docstrings": [], + "signature": "let lor: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.lxor", + "kind": "value", + "name": "lxor", + "docstrings": [], + "signature": "let lxor: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.lsl", + "kind": "value", + "name": "lsl", + "docstrings": [], + "signature": "let lsl: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.asr", + "kind": "value", + "name": "asr", + "docstrings": [], + "signature": "let asr: (bigint, bigint) => bigint" + }, + { + "id": "Core.BigInt.lnot", + "kind": "value", + "name": "lnot", + "docstrings": [], + "signature": "let lnot: bigint => bigint" + } + ] + }, + "core/int": { + "id": "Core.Int", + "name": "Int", + "docstrings": [ + "Functions for interacting with JavaScript Number.\nSee: [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)." + ], + "items": [ + { + "id": "Core.Int.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: (int, int) => bool" + }, + { + "id": "Core.Int.compare", + "kind": "value", + "name": "compare", + "docstrings": [], + "signature": "let compare: (int, int) => Core__Ordering.t" + }, + { + "id": "Core.Int.toExponential", + "kind": "value", + "name": "toExponential", + "docstrings": [ + "`toExponential(n, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n## Examples\n\n```rescript\nInt.toExponential(1000) // \"1e+3\"\nInt.toExponential(-1000) // \"-1e+3\"\nInt.toExponential(77, ~digits=2) // \"7.70e+1\"\nInt.toExponential(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10." + ], + "signature": "let toExponential: (int, ~digits: int=?) => string" + }, + { + "id": "Core.Int.toExponentialWithPrecision", + "kind": "value", + "name": "toExponentialWithPrecision", + "docstrings": [ + "`toExponential(n, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point. See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\non MDN.\n\n## Examples\n\n```rescript\nInt.toExponentialWithPrecision(77, ~digits=2) // \"7.70e+1\"\nInt.toExponentialWithPrecision(5678, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10." + ], + "signature": "let toExponentialWithPrecision: (int, ~digits: int) => string", + "deprecated": "Use `toExponential` instead" + }, + { + "id": "Core.Int.toFixed", + "kind": "value", + "name": "toFixed", + "docstrings": [ + "`toFixed(n, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixed(123456) // \"123456.00\"\nInt.toFixed(10) // \"10.00\"\nInt.toFixed(300, ~digits=4) // \"300.0000\"\nInt.toFixed(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100." + ], + "signature": "let toFixed: (int, ~digits: int=?) => string" + }, + { + "id": "Core.Int.toFixedWithPrecision", + "kind": "value", + "name": "toFixedWithPrecision", + "docstrings": [ + "`toFixedWithPrecision(n, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point. See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)\non MDN.\n\n## Examples\n\n```rescript\nInt.toFixedWithPrecision(300, ~digits=4) // \"300.0000\"\nInt.toFixedWithPrecision(300, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100." + ], + "signature": "let toFixedWithPrecision: (int, ~digits: int) => string", + "deprecated": "Use `toFixed` instead" + }, + { + "id": "Core.Int.toPrecision", + "kind": "value", + "name": "toPrecision", + "docstrings": [ + "`toPrecision(n, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecision(100) // \"100\"\nInt.toPrecision(1) // \"1\"\nInt.toPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\nImplementations are allowed to support larger and smaller values as well.\nECMA-262 only requires a precision of up to 21 significant digits." + ], + "signature": "let toPrecision: (int, ~digits: int=?) => string" + }, + { + "id": "Core.Int.toPrecisionWithPrecision", + "kind": "value", + "name": "toPrecisionWithPrecision", + "docstrings": [ + "`toPrecisionWithPrecision(n, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits. See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nInt.toPrecisionWithPrecision(100, ~digits=2) // \"1.0e+2\"\nInt.toPrecisionWithPrecision(1, ~digits=2) // \"1.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\nImplementations are allowed to support larger and smaller values as well.\nECMA-262 only requires a precision of up to 21 significant digits." + ], + "signature": "let toPrecisionWithPrecision: (int, ~digits: int) => string", + "deprecated": "Use `toPrecision` instead" + }, + { + "id": "Core.Int.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "`toString(n, ~radix=?)` return a `string` representing the given value.\n`~radix` specifies the radix base to use for the formatted number.\nSee [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)\non MDN.\n\n## Examples\n\n```rescript\nInt.toString(1000) // \"1000\"\nInt.toString(-1000) // \"-1000\"\nInt.toString(6, ~radix=2) // \"110\"\nInt.toString(373592855, ~radix=16) // \"16449317\"\nInt.toString(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36." + ], + "signature": "let toString: (int, ~radix: int=?) => string" + }, + { + "id": "Core.Int.toStringWithRadix", + "kind": "value", + "name": "toStringWithRadix", + "docstrings": [ + "`toStringWithRadix(n, ~radix)` return a `string` representing the given value.\n`~radix` specifies the radix base to use for the formatted number.\nSee [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)\non MDN.\n\n## Examples\n\n```rescript\nInt.toStringWithRadix(6, ~radix=2) // \"110\"\nInt.toStringWithRadix(373592855, ~radix=16) // \"16449317\"\nInt.toStringWithRadix(123456, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36." + ], + "signature": "let toStringWithRadix: (int, ~radix: int) => string", + "deprecated": "Use `toString` instead" + }, + { + "id": "Core.Int.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [ + "`toLocaleString(n)` return a `string` with language-sensitive representing the\ngiven value. See [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nInt.toLocaleString(1000) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nInt.toLocaleString(1000) // \"1.000\"\n```" + ], + "signature": "let toLocaleString: int => string" + }, + { + "id": "Core.Int.toFloat", + "kind": "value", + "name": "toFloat", + "docstrings": [ + "`toFloat(n)` return a `float` representing the given value.\n\n## Examples\n\n```rescript\nInt.toFloat(100) == 100.0\nInt.toFloat(2) == 2.0\n```" + ], + "signature": "let toFloat: int => float" + }, + { + "id": "Core.Int.fromFloat", + "kind": "value", + "name": "fromFloat", + "docstrings": [ + "`fromFloat(n)` return an `int` representing the given value. The conversion is\ndone by truncating the decimal part.\n\n## Examples\n\n```rescript\nInt.fromFloat(2.0) == 2\nInt.fromFloat(1.999) == 1\nInt.fromFloat(1.5) == 1\nInt.fromFloat(0.9999) == 0\n```" + ], + "signature": "let fromFloat: float => int" + }, + { + "id": "Core.Int.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [ + "`fromString(str, ~radix=?)` return an `option` representing the given value\n`str`. `~radix` specifies the radix base to use for the formatted number.\n\n## Examples\n\n```rescript\nInt.fromString(\"0\") == Some(0)\nInt.fromString(\"NaN\") == None\nInt.fromString(\"6\", ~radix=2) == None\n```" + ], + "signature": "let fromString: (string, ~radix: int=?) => option" + }, + { + "id": "Core.Int.mod", + "kind": "value", + "name": "mod", + "docstrings": [ + "`mod(n1, n2)` calculates the modulo (remainder after division) of two integers.\n\n## Examples\n\n```rescript\nInt.mod(7, 4) == 3\n```" + ], + "signature": "let mod: (int, int) => int" + }, + { + "id": "Core.Int.rangeOptions", + "kind": "type", + "name": "rangeOptions", + "docstrings": [ + "The options for `range`." + ], + "signature": "type rangeOptions = {step?: int, inclusive?: bool}" + }, + { + "id": "Core.Int.range", + "kind": "value", + "name": "range", + "docstrings": [ + "`range(start, end, ~options=?)` returns an int array of the sequence of integers in the\nrange `[start, end)`. That is, including `start` but excluding `end`.\n\nIf `step` is not set and `start < end`, the sequence will be increasing in steps of 1.\n\nIf `step` is not set and `start > end`, the sequence will be decreasing in steps of -1.\n\nIf `step` is set, the sequence will increase or decrease by that amount for each\nstep. If `start < end` and `step` is negative, or vice versa, an empty array is\nreturned since the sequence would otherwise never reach or exceed the end value\nand hence be infinite. If `step` is `0` and `start !=` end, a `RangeError` is\nraised as the sequence would never reach or exceed the end value and hence be\ninfinite.\n\nIf `inclusive` is set to `true`, the sequence will include `end` if `step` is\nset such that the sequence includes it.\n\n## Examples\n\n```rescript\nInt.range(3, 6) == [3, 4, 5]\nInt.range(-3, -1) == [-3, -2]\nInt.range(3, 1) == [3, 2]\nInt.range(3, 7, ~options={step: 2}) == [3, 5]\nInt.range(3, 7, ~options={step: 2, inclusive: true}) == [3, 5, 7]\nInt.range(3, 6, ~options={step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`." + ], + "signature": "let range: (int, int, ~options: rangeOptions=?) => array" + }, + { + "id": "Core.Int.rangeWithOptions", + "kind": "value", + "name": "rangeWithOptions", + "docstrings": [ + "`rangeWithOptions(start, end, options)` is like `range`, but with `step` and\n`inclusive` options configurable.\n\nIf `step` is set, the sequence will increase or decrease by that amount for each\nstep. If `start < end` and `step` is negative, or vice versa, an empty array is\nreturned since the sequence would otherwise never reach or exceed the end value\nand hence be infinite. If `step` is `0` and `start !=` end, a `RangeError` is\nraised as the sequence would never reach or exceed the end value and hence be\ninfinite.\n\nIf `inclusive` is set to `true`, the sequence will include `end` if `step` is\nset such that the sequence includes it.\n\n## Examples\n\n```rescript\nInt.rangeWithOptions(3, 7, {step: 2}) == [3, 5]\nInt.rangeWithOptions(3, 7, {step: 2, inclusive: true}) == [3, 5, 7]\nInt.rangeWithOptions(3, 6, {step: -2}) // RangeError\n```\n\n## Exceptions\n\n- Raises `RangeError` if `step == 0 && start != end`." + ], + "signature": "let rangeWithOptions: (int, int, rangeOptions) => array", + "deprecated": "Use `range` instead" + }, + { + "id": "Core.Int.clamp", + "kind": "value", + "name": "clamp", + "docstrings": [ + "`clamp(~min=?, ~max=?, value)` returns `value`, optionally bounded by `min` and `max`.\n\nif `max` < `min` returns `min`.\n\n## Examples\n\n```rescript\nInt.clamp(42) == 42\nInt.clamp(42, ~min=50) == 50\nInt.clamp(42, ~max=40) == 40\nInt.clamp(42, ~min=50, ~max=40) == 50\n```" + ], + "signature": "let clamp: (~min: int=?, ~max: int=?, int) => int" + } + ] + }, + "core/float": { + "id": "Core.Float", + "name": "Float", + "docstrings": [ + "Functions for interacting with float." + ], + "items": [ + { + "id": "Core.Float.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: (float, float) => bool" + }, + { + "id": "Core.Float.compare", + "kind": "value", + "name": "compare", + "docstrings": [], + "signature": "let compare: (float, float) => Core__Ordering.t" + }, + { + "id": "Core.Float.isNaN", + "kind": "value", + "name": "isNaN", + "docstrings": [ + "`isNaN(v)` tests if the given `v` is `NaN`.\nSee [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN) on MDN.\n\n## Examples\n\n```rescript\nFloat.isNaN(3.0) // false\nFloat.isNaN(Float.Constants.nan) // true\n```" + ], + "signature": "let isNaN: float => bool" + }, + { + "id": "Core.Float.isFinite", + "kind": "value", + "name": "isFinite", + "docstrings": [ + "`isFinite(v)` tests if the given `v` is finite.\nSee [`isFinite`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite) on MDN.\n\n## Examples\n\n```rescript\nFloat.isFinite(1.0) // true\nFloat.isFinite(Float.Constants.nan) // false\nFloat.isFinite(Float.Constants.positiveInfinity) // false\n```" + ], + "signature": "let isFinite: float => bool" + }, + { + "id": "Core.Float.parseFloat", + "kind": "value", + "name": "parseFloat", + "docstrings": [ + "`parseFloat(v)` parse the given `v` and returns a float. Leading whitespace in\n`v` is ignored. Returns `NaN` if `v` can't be parsed. Use [`fromString`] to\nensure it returns a valid float and not `NaN`.\nSee [`parseFloat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat) on MDN.\n\n## Examples\n\n```rescript\nFloat.parseFloat(\"1.0\") // 1.0\nFloat.parseFloat(\" 3.14 \") // 3.14\nFloat.parseFloat(\"3.0\") // 3.0\nFloat.parseFloat(\"3.14some non-digit characters\") // 3.14\nFloat.parseFloat(\"error\")->Float.isNaN // true\n```" + ], + "signature": "let parseFloat: string => float" + }, + { + "id": "Core.Float.parseInt", + "kind": "value", + "name": "parseInt", + "docstrings": [ + "`parseInt(v, ~radix=?)` parse the given `v` and returns a float. Leading\nwhitespace in this argument `v`is ignored. `radix` specifies the radix base to\nuse for the formatted number. The value must be in the range [2, 36] (inclusive).\nReturns `NaN` if `v` can't be parsed and `radix` is smaller than 2 or bigger\nthan 36.\nSee [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt) on MDN.\n\n## Examples\n\n```rescript\nFloat.parseInt(\"1.0\") // 1.0\nFloat.parseInt(\" 3.14 \") // 3.0\nFloat.parseInt(3) // 3.0\nFloat.parseInt(\"3.14some non-digit characters\") // 3.0\nFloat.parseInt(\"error\")->Float.isNaN // true\nFloat.parseInt(\"10.0\", ~radix=2) // 2.0\nFloat.parseInt(\"15 * 3\", ~radix=10) // 15.0\nFloat.parseInt(\"12\", ~radix=13) // 15.0\nFloat.parseInt(\"17\", ~radix=40)->Float.isNaN // true\n```" + ], + "signature": "let parseInt: ('a, ~radix: int=?) => float" + }, + { + "id": "Core.Float.parseIntWithRadix", + "kind": "value", + "name": "parseIntWithRadix", + "docstrings": [ + "`parseIntWithRadix(v, ~radix)` parse the given `v` and returns a float. Leading\nwhitespace in this argument `v`is ignored. `radix` specifies the radix base to\nuse for the formatted number. The value must be in the range [2, 36] (inclusive).\nReturns `NaN` if `v` can't be parsed and `radix` is smaller than 2 or bigger\nthan 36.\nSee [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt) on MDN.\n\n## Examples\n\n```rescript\nFloat.parseIntWithRadix(\"10.0\", ~radix=2) // 2.0\nFloat.parseIntWithRadix(\"15 * 3\", ~radix=10) // 15.0\nFloat.parseIntWithRadix(\"12\", ~radix=13) // 15.0\nFloat.parseIntWithRadix(\"17\", ~radix=40)->Float.isNaN // true\n```" + ], + "signature": "let parseIntWithRadix: ('a, ~radix: int) => float", + "deprecated": "Use `parseInt` instead" + }, + { + "id": "Core.Float.toExponential", + "kind": "value", + "name": "toExponential", + "docstrings": [ + "`toExponential(v, ~digits=?)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point.\nSee [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\n\n```rescript\nFloat.toExponential(1000.0) // \"1e+3\"\nFloat.toExponential(-1000.0) // \"-1e+3\"\nFloat.toExponential(77.0, ~digits=2) // \"7.70e+1\"\nFloat.toExponential(5678.0, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10." + ], + "signature": "let toExponential: (float, ~digits: int=?) => string" + }, + { + "id": "Core.Float.toExponentialWithPrecision", + "kind": "value", + "name": "toExponentialWithPrecision", + "docstrings": [ + "`toExponential(v, ~digits)` return a `string` representing the given value in\nexponential notation. `digits` specifies how many digits should appear after\nthe decimal point.\nSee [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\n\n```rescript\nFloat.toExponentialWithPrecision(77.0, ~digits=2) // \"7.70e+1\"\nFloat.toExponentialWithPrecision(5678.0, ~digits=2) // \"5.68e+3\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` less than 0 or greater than 10." + ], + "signature": "let toExponentialWithPrecision: (float, ~digits: int) => string", + "deprecated": "Use `toExponential` instead" + }, + { + "id": "Core.Float.toFixed", + "kind": "value", + "name": "toFixed", + "docstrings": [ + "`toFixed(v, ~digits=?)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point.\nSee [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) on MDN.\n\n## Examples\n\n```rescript\nFloat.toFixed(123456.0) // \"123456.00\"\nFloat.toFixed(10.0) // \"10.00\"\nFloat.toFixed(300.0, ~digits=4) // \"300.0000\"\nFloat.toFixed(300.0, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100." + ], + "signature": "let toFixed: (float, ~digits: int=?) => string" + }, + { + "id": "Core.Float.toFixedWithPrecision", + "kind": "value", + "name": "toFixedWithPrecision", + "docstrings": [ + "`toFixedWithPrecision(v, ~digits)` return a `string` representing the given\nvalue using fixed-point notation. `digits` specifies how many digits should\nappear after the decimal point.\nSee [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) on MDN.\n\n## Examples\n\n```rescript\nFloat.toFixedWithPrecision(300.0, ~digits=4) // \"300.0000\"\nFloat.toFixedWithPrecision(300.0, ~digits=1) // \"300.0\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is less than 0 or larger than 100." + ], + "signature": "let toFixedWithPrecision: (float, ~digits: int) => string", + "deprecated": "Use `toFixed` instead" + }, + { + "id": "Core.Float.toPrecision", + "kind": "value", + "name": "toPrecision", + "docstrings": [ + "`toPrecision(v, ~digits=?)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits.\nSee [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nFloat.toPrecision(100.0) // \"100\"\nFloat.toPrecision(1.0) // \"1\"\nFloat.toPrecision(100.0, ~digits=2) // \"1.0e+2\"\nFloat.toPrecision(1.0, ~digits=1) // \"1\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\nImplementations are allowed to support larger and smaller values as well.\nECMA-262 only requires a precision of up to 21 significant digits." + ], + "signature": "let toPrecision: (float, ~digits: int=?) => string" + }, + { + "id": "Core.Float.toPrecisionWithPrecision", + "kind": "value", + "name": "toPrecisionWithPrecision", + "docstrings": [ + "`toPrecisionWithPrecision(v, ~digits)` return a `string` representing the giver value with\nprecision. `digits` specifies the number of significant digits.\nSee [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\n\n```rescript\nFloat.toPrecisionWithPrecision(100.0, ~digits=2) // \"1.0e+2\"\nFloat.toPrecisionWithPrecision(1.0, ~digits=1) // \"1\"\n```\n\n## Exceptions\n\n- `RangeError`: If `digits` is not between 1 and 100 (inclusive).\nImplementations are allowed to support larger and smaller values as well.\nECMA-262 only requires a precision of up to 21 significant digits." + ], + "signature": "let toPrecisionWithPrecision: (float, ~digits: int) => string", + "deprecated": "Use `toPrecision` instead" + }, + { + "id": "Core.Float.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "`toString(v)` return a `string` representing the given value.\nSee [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\n\n```rescript\nFloat.toString(1000.0) // \"1000\"\nFloat.toString(-1000.0) // \"-1000\"\n```" + ], + "signature": "let toString: (float, ~radix: int=?) => string" + }, + { + "id": "Core.Float.toStringWithRadix", + "kind": "value", + "name": "toStringWithRadix", + "docstrings": [ + "`toStringWithRadix(v, ~radix)` return a `string` representing the given value.\n`~radix` specifies the radix base to use for the formatted number.\nSee [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\n\n```rescript\nFloat.toStringWithRadix(6.0, ~radix=2) // \"110\"\nFloat.toStringWithRadix(3735928559.0, ~radix=16) // \"deadbeef\"\nFloat.toStringWithRadix(123456.0, ~radix=36) // \"2n9c\"\n```\n\n## Exceptions\n\n`RangeError`: if `radix` is less than 2 or greater than 36." + ], + "signature": "let toStringWithRadix: (float, ~radix: int) => string", + "deprecated": "Use `toString` with `~radix` instead" + }, + { + "id": "Core.Float.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [ + "`toLocaleString(v)` return a `string` with language-sensitive representing the\ngiven value.\nSee [`Number.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString) on MDN.\n\n## Examples\n\n```rescript\n// If the application uses English as the default language\nFloat.toLocaleString(1000.0) // \"1,000\"\n\n// If the application uses Portuguese Brazil as the default language\nFloat.toLocaleString(1000.0) // \"1.000\"\n```" + ], + "signature": "let toLocaleString: float => string" + }, + { + "id": "Core.Float.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [ + "`fromString(str)` return an `option` representing the given value `str`.\n\n## Examples\n\n```rescript\nFloat.fromString(\"0\") == Some(0.0)\nFloat.fromString(\"NaN\") == None\nFloat.fromString(\"6\") == Some(6.0)\n```" + ], + "signature": "let fromString: string => option" + }, + { + "id": "Core.Float.toInt", + "kind": "value", + "name": "toInt", + "docstrings": [ + "`toInt(v)` returns an int to given float `v`.\n\n## Examples\n\n```rescript\nFloat.toInt(2.0) == 2\nFloat.toInt(1.0) == 1\nFloat.toInt(1.1) == 1\nFloat.toInt(1.6) == 1\n```" + ], + "signature": "let toInt: float => int" + }, + { + "id": "Core.Float.fromInt", + "kind": "value", + "name": "fromInt", + "docstrings": [ + "`fromInt(v)` returns a float to given int `v`.\n\n## Examples\n\n```rescript\nFloat.fromInt(2) == 2.0\nFloat.fromInt(1) == 1.0\n```" + ], + "signature": "let fromInt: int => float" + }, + { + "id": "Core.Float.mod", + "kind": "value", + "name": "mod", + "docstrings": [ + "`mod(n1, n2)` calculates the modulo (remainder after division) of two floats.\n\n## Examples\n\n```rescript\nFloat.mod(7.0, 4.0) == 3.0\n```" + ], + "signature": "let mod: (float, float) => float" + }, + { + "id": "Core.Float.clamp", + "kind": "value", + "name": "clamp", + "docstrings": [ + "`clamp(~min=?, ~max=?, value)` returns `value`, optionally bounded by `min` and `max`.\n\nif `max` < `min` returns `min`.\n\n## Examples\n\n```rescript\nFloat.clamp(4.2) == 4.2\nFloat.clamp(4.2, ~min=4.3) == 4.3\nFloat.clamp(4.2, ~max=4.1) == 4.1\nFloat.clamp(4.2, ~min=4.3, ~max=4.1) == 4.3\n```" + ], + "signature": "let clamp: (~min: float=?, ~max: float=?, float) => float" + } + ] + }, + "core/error": { + "id": "Core.Error", + "name": "Error", + "docstrings": [ + "Functions for working with JavaScript exceptions.\n\nSee [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) on MDN." + ], + "items": [ + { + "id": "Core.Error.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Represents a JavaScript exception." + ], + "signature": "type t = Js.Exn.t" + }, + { + "id": "Core.Error.fromException", + "kind": "value", + "name": "fromException", + "docstrings": [], + "signature": "let fromException: exn => option" + }, + { + "id": "Core.Error.toException", + "kind": "value", + "name": "toException", + "docstrings": [ + "Turns an `Error.t` into an `exn`.\n\n## Examples\n```rescript\nlet error = Error.make(\"Something went wrong.\")\n\nlet asExn = error->Error.toException // `asExn` is now type `exn`\n```" + ], + "signature": "let toException: t => exn" + }, + { + "id": "Core.Error.stack", + "kind": "value", + "name": "stack", + "docstrings": [ + "`stack(error)` retrieves the `stack` property of the error, if it exists. The stack is a list of what functions were called, and what files they are defined in, prior to the error happening.\n\nSee [`Error.prototype.stack`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack) on MDN.\n\n## Example\n```rescript\nlet error = Error.make(\"error\")\nConsole.log(error->Error.stack) // Logs `stack` if it exists on `someError`\n```" + ], + "signature": "let stack: t => option" + }, + { + "id": "Core.Error.message", + "kind": "value", + "name": "message", + "docstrings": [ + "`message(error)` retrieves the `message` property of the error, if it exists.\n\nSee [`Error.prototype.message`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/message) on MDN.\n\n## Example\n```rescript\nlet error = Error.SyntaxError.make(\"Some message here\")\nConsole.log(error->Error.message) // Logs \"Some message here\" to the console\n```" + ], + "signature": "let message: t => option" + }, + { + "id": "Core.Error.name", + "kind": "value", + "name": "name", + "docstrings": [ + "`name(error)` retrieves the `name` property of the error, if it exists.\n\nSee [`Error.prototype.name`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name) on MDN.\n\n## Example\n```rescript\nlet error = Error.SyntaxError.make(\"Some message here\")\nConsole.log(error->Error.name) // Logs \"SyntaxError\" to the console\n```" + ], + "signature": "let name: t => option" + }, + { + "id": "Core.Error.fileName", + "kind": "value", + "name": "fileName", + "docstrings": [ + "`fileName(error)` retrieves the `fileName` property of the error, if it exists.\n\nSee [`Error.prototype.fileName`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/fileName) on MDN." + ], + "signature": "let fileName: t => option" + }, + { + "id": "Core.Error.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(message)` creates a new error, setting its `message` to the provided value.\n\nSee [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Error) on MDN.\n\n## Example\n```rescript\nlet error = Error.make(\"Some message here\")\nConsole.log(error->Error.message) // Logs \"Some message here\" to the console\nConsole.log(error->Error.name) // Logs \"Error\" to the console, because this is a regular error\n```" + ], + "signature": "let make: string => t" + }, + { + "id": "Core.Error.raise", + "kind": "value", + "name": "raise", + "docstrings": [ + "Raises (throws in JavaScript language) the provided `Error.t`, which will stop execution.\n\n## Examples\n```rescript\nlet error = Error.make(\"Everything is upside down.\")\n\nif 5 > 10 {\n error->Error.raise\n} else {\n Console.log(\"Phew, sanity still rules.\")\n}\n```" + ], + "signature": "let raise: t => 'a" + }, + { + "id": "Core.Error.panic", + "kind": "value", + "name": "panic", + "docstrings": [ + "Raises a panic exception with the given message.\n\nA panic exception is a native JavaScript exception that is not intended to be caught and\nhandled. Compared to a ReScript exception this will give a better stack trace and\ndebugging experience.\n\n## Examples\n```rescript\nError.panic(\"Uh oh. This was unexpected!\")\n```" + ], + "signature": "let panic: string => 'a" + } + ] + }, + "core/dict": { + "id": "Core.Dict", + "name": "Dict", + "docstrings": [ + "A mutable dictionary with string keys.\n\nCompiles to a regular JavaScript object." + ], + "items": [ + { + "id": "Core.Dict.t", + "kind": "type", + "name": "t", + "docstrings": [ + "Type representing a dictionary of value `'a`." + ], + "signature": "type t<'a> = Js.Dict.t<'a>" + }, + { + "id": "Core.Dict.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [ + "`getUnsafe(dict, key)` Returns the `value` at the provided `key`.\n\nThis is _unsafe_, meaning it will return `undefined` value if `key` does not exist in `dict`.\n\nUse `Dict.getUnsafe` only when you are sure the key exists (i.e. when iterating `Dict.keys` result).\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([(\"key1\", \"value1\"), (\"key2\", \"value2\")])\nlet value = dict->Dict.getUnsafe(\"key1\")\nConsole.log(value) // value1\n```" + ], + "signature": "let getUnsafe: (t<'a>, string) => 'a" + }, + { + "id": "Core.Dict.get", + "kind": "value", + "name": "get", + "docstrings": [ + "Returns the value at the provided key, if it exists. Returns an option.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([(\"someKey\", \"someValue\")])\n\nswitch dict->Dict.get(\"someKey\") {\n| None => Console.log(\"Nope, didn't have the key.\")\n| Some(value) => Console.log(value)\n}\n```" + ], + "signature": "let get: (t<'a>, string) => option<'a>" + }, + { + "id": "Core.Dict.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set(dictionary, key, value)` sets the value at the provided key to the provided value.\n\n## Examples\n```rescript\nlet dict = Dict.make()\n\ndict->Dict.set(\"someKey\", \"someValue\")\n```" + ], + "signature": "let set: (t<'a>, string, 'a) => unit" + }, + { + "id": "Core.Dict.delete", + "kind": "value", + "name": "delete", + "docstrings": [ + "`delete(dictionary, key)` deletes the value at `key`, if it exists.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([(\"someKey\", \"someValue\")])\n\ndict->Dict.delete(\"someKey\")\n```" + ], + "signature": "let delete: (t<'a>, string) => unit" + }, + { + "id": "Core.Dict.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make()` creates a new, empty dictionary.\n\n## Examples\n```rescript\nlet dict1: Dict.t = Dict.make() // You can annotate the type of the values of your dict yourself if you want\n\nlet dict2 = Dict.make() // Or you can let ReScript infer it via usage.\ndict2->Dict.set(\"someKey\", 12)\n```" + ], + "signature": "let make: unit => t<'a>" + }, + { + "id": "Core.Dict.fromArray", + "kind": "value", + "name": "fromArray", + "docstrings": [ + "`fromArray(entries)` creates a new dictionary from the provided array of key/value pairs.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([(\"key1\", \"value1\"), (\"key2\", \"value2\")])\n```" + ], + "signature": "let fromArray: array<(string, 'a)> => t<'a>" + }, + { + "id": "Core.Dict.fromIterator", + "kind": "value", + "name": "fromIterator", + "docstrings": [ + "`fromIterator(entries)` creates a new dictionary from the provided iterator of key/value pairs.\n\n## Examples\n```rescript\n// Pretend we have an iterator of the correct shape\n@val external someIterator: Iterator.t<(string, int)> = \"someIterator\"\n\nlet dict = Dict.fromIterator(someIterator) // Dict.t\n```" + ], + "signature": "let fromIterator: Core__Iterator.t<(string, 'a)> => t<'a>" + }, + { + "id": "Core.Dict.toArray", + "kind": "value", + "name": "toArray", + "docstrings": [ + "`toArray(dictionary)` returns an array of all the key/value pairs of the dictionary.\n\n## Examples\n```rescript\nlet dict = Dict.make()\ndict->Dict.set(\"someKey\", 1)\ndict->Dict.set(\"someKey2\", 2)\nlet asArray = dict->Dict.toArray\nConsole.log(asArray) // Logs `[[\"someKey\", 1], [\"someKey2\", 2]]` to the console\n```" + ], + "signature": "let toArray: t<'a> => array<(string, 'a)>" + }, + { + "id": "Core.Dict.keysToArray", + "kind": "value", + "name": "keysToArray", + "docstrings": [ + "`keysToArray(dictionary)` returns an array of all the keys of the dictionary.\n\n## Examples\n```rescript\nlet dict = Dict.make()\ndict->Dict.set(\"someKey\", 1)\ndict->Dict.set(\"someKey2\", 2)\nlet keys = dict->Dict.keysToArray\nConsole.log(keys) // Logs `[\"someKey\", \"someKey2\"]` to the console\n```" + ], + "signature": "let keysToArray: t<'a> => array" + }, + { + "id": "Core.Dict.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "docstrings": [ + "`valuesToArray(dictionary)` returns an array of all the values of the dictionary.\n\n## Examples\n```rescript\nlet dict = Dict.make()\ndict->Dict.set(\"someKey\", 1)\ndict->Dict.set(\"someKey2\", 2)\nlet values = dict->Dict.valuesToArray\nConsole.log(values) // Logs `[1, 2]` to the console\n```" + ], + "signature": "let valuesToArray: t<'a> => array<'a>" + }, + { + "id": "Core.Dict.assign", + "kind": "value", + "name": "assign", + "docstrings": [ + "`assign(dictionary1, dictionary2)` [shallowly](https://developer.mozilla.org/en-US/docs/Glossary/Shallow_copy) merges dictionary2 into dictionary1, and returns dictionary1.\n\nBeware this will *mutate* dictionary1. If you're looking for a way to copy a dictionary, check out `Dict.copy`.\n\n## Examples\n```rescript\nlet dict1 = Dict.make()\ndict1->Dict.set(\"firstKey\", 1)\nConsole.log(dict1->Dict.keysToArray) // Logs `[\"firstKey\"]`\n\nlet dict2 = Dict.make()\ndict2->Dict.set(\"someKey\", 2)\ndict2->Dict.set(\"someKey2\", 3)\n\nlet dict1 = dict1->Dict.assign(dict2)\n\nConsole.log(dict1->Dict.keysToArray) // Logs `[\"firstKey\", \"someKey\", \"someKey2\"]`\n\n```" + ], + "signature": "let assign: (t<'a>, t<'a>) => t<'a>" + }, + { + "id": "Core.Dict.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "`copy(dictionary)` [shallowly copies](https://developer.mozilla.org/en-US/docs/Glossary/Shallow_copy) the provided dictionary to a new dictionary.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([(\"key1\", \"value1\"), (\"key2\", \"value2\")])\nlet dict2 = dict->Dict.copy\n\n// Both log `[\"key1\", \"key2\"]` here.\nConsole.log2(dict->Dict.keysToArray, dict2->Dict.keysToArray)\n```" + ], + "signature": "let copy: t<'a> => t<'a>" + }, + { + "id": "Core.Dict.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(dictionary, f)` iterates through all values of the dict.\n\n> Please note that this is *without the keys*, just the values. If you need the key as well, use `Dict.forEachWithKey`.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([(\"key1\", \"value1\"), (\"key2\", \"value2\")])\n\ndict->Dict.forEach(value => {\n Console.log(value)\n})\n```" + ], + "signature": "let forEach: (t<'a>, 'a => unit) => unit" + }, + { + "id": "Core.Dict.forEachWithKey", + "kind": "value", + "name": "forEachWithKey", + "docstrings": [ + "`forEachWithKey(dictionary, f)` iterates through all values of the dict, including the key for each value.\n\n## Examples\n```rescript\nlet dict = Dict.fromArray([(\"key1\", \"value1\"), (\"key2\", \"value2\")])\n\ndict->Dict.forEachWithKey((value, key) => {\n Console.log2(value, key)\n})\n```" + ], + "signature": "let forEachWithKey: (t<'a>, ('a, string) => unit) => unit" + }, + { + "id": "Core.Dict.mapValues", + "kind": "value", + "name": "mapValues", + "docstrings": [ + "`mapValues(dictionary, f)` returns a new dictionary with the same keys, and `f` applied to each value in the original dictionary.\n\n## Examples\n\n```rescript\nlet dict = Dict.fromArray([(\"key1\", 1), (\"key2\", 2)])\n\ndict->Dict.mapValues(v => v + 10)->Dict.toArray // [(\"key1\", 11), (\"key2\", 12)]\ndict->Dict.mapValues(v => Int.toString(v))->Dict.toArray // [(\"key1\", \"1\"), (\"key2\", \"2\")]\n```" + ], + "signature": "let mapValues: (t<'a>, 'a => 'b) => t<'b>" + } + ] + }, + "core/date": { + "id": "Core.Date", + "name": "Date", + "docstrings": [ + "Functions for interacting with JavaScript Dates." + ], + "items": [ + { + "id": "Core.Date.t", + "kind": "type", + "name": "t", + "docstrings": [ + "A type representing a JavaScript date." + ], + "signature": "type t = Js.Date.t" + }, + { + "id": "Core.Date.msSinceEpoch", + "kind": "type", + "name": "msSinceEpoch", + "docstrings": [ + "Time, in milliseconds, since / until the UNIX epoch (January 1, 1970 00:00:00 UTC).\nPositive numbers represent dates after, negative numbers dates before epoch." + ], + "signature": "type msSinceEpoch = float" + }, + { + "id": "Core.Date.localeOptions", + "kind": "type", + "name": "localeOptions", + "docstrings": [ + "A type representing date time format options.\n\nNote: There are some properties missing:\n- fractionalSecondDigits\n- dayPeriod\n- calendar\n- numberingSystem\n- localeMatcher\n- timeZone\n- hour12\n- hourCycle\n- formatMatcher\n\nSee full spec at https://tc39.es/ecma402/#datetimeformat-objects" + ], + "signature": "type localeOptions = {\n dateStyle?: [#full | #long | #medium | #short],\n timeStyle?: [#full | #long | #medium | #short],\n weekday?: [#long | #narrow | #short],\n era?: [#long | #narrow | #short],\n year?: [#\"2-digit\" | #numeric],\n month?: [\n | #\"2-digit\"\n | #long\n | #narrow\n | #numeric\n | #short\n ],\n day?: [#\"2-digit\" | #numeric],\n hour?: [#\"2-digit\" | #numeric],\n minute?: [#\"2-digit\" | #numeric],\n second?: [#\"2-digit\" | #numeric],\n timeZoneName?: [#long | #short],\n}" + }, + { + "id": "Core.Date.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make()`\n\nCreates a date object with the current date time as value.\n\n## Examples\n```rescript\nDate.make()\n```" + ], + "signature": "let make: unit => t" + }, + { + "id": "Core.Date.fromString", + "kind": "value", + "name": "fromString", + "docstrings": [ + "`fromString(dateTimeString)`\n\nCreates a date object from given date time string.\nThe string has to be in the ISO 8601 format YYYY-MM-DDTHH:mm:ss.sssZ (https://tc39.es/ecma262/#sec-date-time-string-format).\n\nInvalid date time strings will create invalid dates.\nYou can use the result like any valid date, but many functions like `toString` will return \"Invalid Date\" or functions like `Date.getTime` will return NaN.\n\n## Examples\n```rescript\nDate.fromString(\"2023\") // 2023-01-01T00:00:00.000Z\n\nDate.fromString(\"2023-02-20\") // 2023-02-20T00:00:00.000Z\n\nDate.fromString(\"2023-02-20T16:40:00.00Z\") // 2023-02-20T16:40:00.000Z\n\nDate.fromString(\"\") // Invalid Date\n\nDate.fromString(\"\")->Date.getTime // NaN\n```" + ], + "signature": "let fromString: string => t" + }, + { + "id": "Core.Date.fromTime", + "kind": "value", + "name": "fromTime", + "docstrings": [ + "`fromTime(msSinceEpoch)`\n\nCreates a date object from the given time in milliseconds since / until UNIX epoch (January 1, 1970 00:00:00 UTC).\nPositive numbers create dates after epoch, negative numbers create dates before epoch.\n\n## Examples\n```rescript\nDate.fromTime(0.0)\n// 1970-01-01T00:00:00.000Z\n\nDate.fromTime(-86_400_000.0)\n// 1969-12-31T00:00:00.000Z\n\nDate.fromTime(86_400_000.0)\n// 1970-01-02T00:00:00.000Z\n```" + ], + "signature": "let fromTime: msSinceEpoch => t" + }, + { + "id": "Core.Date.makeWithYM", + "kind": "value", + "name": "makeWithYM", + "docstrings": [ + "Creates a date object with the given year and month.\nBe aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\nMonths are 0-indexed (0 = January, 11 = December).\nValues, which are out of range, will be carried over to the next bigger unit (s. example).\n\n## Examples\n```rescript\nDate.makeWithYM(~year=2023, ~month=0)\n// 2023-01-01T00:00:00.000Z\n\nDate.makeWithYM(~year=2023, ~month=11)\n// 2023-12-01T00:00:00.000Z\n\nDate.makeWithYM(~year=2023, ~month=12)\n// 2024-01-01T00:00:00.000Z\n\nDate.makeWithYM(~year=2023, ~month=-1)\n// 2022-12-01T00:00:00.000Z\n\n// Note: The output depends on your local time zone.\n// In nodejs you can change it by using the TZ env (`export TZ='Europe/London' && node index.bs.js`)\n\n```" + ], + "signature": "let makeWithYM: (~year: int, ~month: int) => t" + }, + { + "id": "Core.Date.makeWithYMD", + "kind": "value", + "name": "makeWithYMD", + "docstrings": [ + "Creates a date object with the given year, month and date (day of month).\nBe aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\nMonths are 0-indexed (0 = January, 11 = December).\nValues, which are out of range, will be carried over to the next bigger unit (s. example).\n\n## Examples\n```rescript\nDate.makeWithYMD(~year=2023, ~month=1, ~date=20)\n// 2023-02-20T00:00:00.000Z\n\nDate.makeWithYMD(~year=2023, ~month=1, ~date=-1)\n// 2022-11-29T00:00:00.000Z\n\nDate.makeWithYMD(~year=2023, ~month=1, ~date=29)\n// 2023-03-01T00:00:00.000Z\n```" + ], + "signature": "let makeWithYMD: (~year: int, ~month: int, ~date: int) => t" + }, + { + "id": "Core.Date.makeWithYMDH", + "kind": "value", + "name": "makeWithYMDH", + "docstrings": [ + "Creates a date object with the given year, month, date (day of month) and hours.\nBe aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\nMonths are 0-indexed (0 = January, 11 = December).\nValues, which are out of range, will be carried over to the next bigger unit (s. example).\n\n## Examples\n```rescript\nDate.makeWithYMDH(~year=2023, ~month=1, ~date=20, ~hours=16)\n// 2023-02-20T16:00:00.000Z\n\nDate.makeWithYMDH(~year=2023, ~month=1, ~date=20, ~hours=24)\n// 2023-02-21T00:00:00.000Z\n\nDate.makeWithYMDH(~year=2023, ~month=1, ~date=20, ~hours=-1)\n// 2023-02-19T23:00:00.000Z\n\n// Note: The output depends on your local time zone.\n// In nodejs you can change it by using the TZ env (`export TZ='Europe/London' && node index.bs.js`)\n\n```" + ], + "signature": "let makeWithYMDH: (~year: int, ~month: int, ~date: int, ~hours: int) => t" + }, + { + "id": "Core.Date.makeWithYMDHM", + "kind": "value", + "name": "makeWithYMDHM", + "docstrings": [ + "Creates a date object with the given year, month, date (day of month), hours and minutes.\nBe aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\nMonths are 0-indexed (0 = January, 11 = December).\nValues, which are out of range, will be carried over to the next bigger unit (s. example).\n\n## Examples\n```rescript\nDate.makeWithYMDHM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40)\n// 2023-02-20T16:40:00.000Z\n\nDate.makeWithYMDHM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=60)\n// 2023-02-20T17:00:00.000Z\n\nDate.makeWithYMDHM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=-1)\n// 2023-02-20T15:59:00.000Z\n\n// Note: The output depends on your local time zone.\n// In nodejs you can change it by using the TZ env (`export TZ='Europe/London' && node index.bs.js`)\n\n```" + ], + "signature": "let makeWithYMDHM: (\n ~year: int,\n ~month: int,\n ~date: int,\n ~hours: int,\n ~minutes: int,\n) => t" + }, + { + "id": "Core.Date.makeWithYMDHMS", + "kind": "value", + "name": "makeWithYMDHMS", + "docstrings": [ + "Creates a date object with the given year, month, date (day of month), hours, minutes and seconds.\nBe aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\nMonths are 0-indexed (0 = January, 11 = December).\nValues, which are out of range, will be carried over to the next bigger unit (s. example).\n\n## Examples\n```rescript\nDate.makeWithYMDHMS(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=0)\n// 2023-02-20T16:40:00.000Z\n\nDate.makeWithYMDHMS(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=60)\n// 2023-02-20T16:41:00.000Z\n\nDate.makeWithYMDHMS(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=-1)\n// 2023-02-20T16:39:59.000Z\n\n// Note: The output depends on your local time zone.\n// In nodejs you can change it by using the TZ env (`export TZ='Europe/London' && node index.bs.js`)\n\n```" + ], + "signature": "let makeWithYMDHMS: (\n ~year: int,\n ~month: int,\n ~date: int,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n) => t" + }, + { + "id": "Core.Date.makeWithYMDHMSM", + "kind": "value", + "name": "makeWithYMDHMSM", + "docstrings": [ + "Creates a date object with the given year, month, date (day of month), hours, minutes, seconds and milliseconds.\nBe aware of using a value for year < 100, because it behaves inconsistent (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\nMonths are 0-indexed (0 = January, 11 = December).\nValues, which are out of range, will be carried over to the next bigger unit (s. example).\n\n## Examples\n```rescript\nDate.makeWithYMDHMSM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=0)\n// 2023-02-20T16:40:00.000Z\n\nDate.makeWithYMDHMSM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=1000)\n// 2023-02-20T16:40:01.000Z\n\nDate.makeWithYMDHMSM(~year=2023, ~month=1, ~date=20, ~hours=16, ~minutes=40, ~seconds=0, ~milliseconds=-1)\n// 2023-02-20T16:39:59.999Z\n\n// Note: The output depends on your local time zone.\n// In nodejs you can change it by using the TZ env (`export TZ='Europe/London' && node index.bs.js`)\n\n```" + ], + "signature": "let makeWithYMDHMSM: (\n ~year: int,\n ~month: int,\n ~date: int,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n ~milliseconds: int,\n) => t" + }, + { + "id": "Core.Date.now", + "kind": "value", + "name": "now", + "docstrings": [ + "`now()`\n\nReturns the time, in milliseconds, between UNIX epoch (January 1, 1970 00:00:00 UTC) and the current date time." + ], + "signature": "let now: unit => msSinceEpoch" + }, + { + "id": "Core.Date.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: (t, t) => bool" + }, + { + "id": "Core.Date.compare", + "kind": "value", + "name": "compare", + "docstrings": [], + "signature": "let compare: (t, t) => Core__Ordering.t" + }, + { + "id": "Core.Date.getTime", + "kind": "value", + "name": "getTime", + "docstrings": [ + "`getTime(date)`\n\nReturns the time, in milliseconds, between UNIX epoch (January 1, 1970 00:00:00 UTC) and the current date time.\nInvalid dates will return NaN.\nDates before epoch will return negative numbers.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20\")->Date.getTime\n// 1676851200000\n```" + ], + "signature": "let getTime: t => msSinceEpoch" + }, + { + "id": "Core.Date.getTimezoneOffset", + "kind": "value", + "name": "getTimezoneOffset", + "docstrings": [ + "`getTimezoneOffset(date)`\n\nReturns the time in minutes between the UTC time and the locale time.\nThe timezone of the given date doesn't matter.\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01\")->Date.getTimezoneOffset\n// -60 with local time zone = Europe/Berlin\n\nDate.fromString(\"2023-06-01\")->Date.getTimezoneOffset\n// -120 with local time zone = Europe/Berlin\n```" + ], + "signature": "let getTimezoneOffset: t => int" + }, + { + "id": "Core.Date.getFullYear", + "kind": "value", + "name": "getFullYear", + "docstrings": [ + "`getFullYear(date)`\n\nReturns the year of a given date (according to local time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20\")->Date.getFullYear\n// 2023\n```" + ], + "signature": "let getFullYear: t => int" + }, + { + "id": "Core.Date.getMonth", + "kind": "value", + "name": "getMonth", + "docstrings": [ + "`getMonth(date)`\n\nReturns the month (0-indexed) of a given date (according to local time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01\")->Date.getMonth\n// 0\n```" + ], + "signature": "let getMonth: t => int" + }, + { + "id": "Core.Date.getDate", + "kind": "value", + "name": "getDate", + "docstrings": [ + "`getDate(date)`\n\nReturns the date (day of month) of a given date (according to local time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.getDate\n// 20\n```" + ], + "signature": "let getDate: t => int" + }, + { + "id": "Core.Date.getHours", + "kind": "value", + "name": "getHours", + "docstrings": [ + "`getHours(date)`\n\nReturns the hours of a given date (according to local time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.getHours\n// 16\n```" + ], + "signature": "let getHours: t => int" + }, + { + "id": "Core.Date.getMinutes", + "kind": "value", + "name": "getMinutes", + "docstrings": [ + "`getMinutes(date)`\n\nReturns the minutes of a given date (according to local time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.getMinutes\n// 40\n```" + ], + "signature": "let getMinutes: t => int" + }, + { + "id": "Core.Date.getSeconds", + "kind": "value", + "name": "getSeconds", + "docstrings": [ + "`getSeconds(date)`\n\nReturns the seconds of a given date (according to local time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.getSeconds\n// 0\n```" + ], + "signature": "let getSeconds: t => int" + }, + { + "id": "Core.Date.getMilliseconds", + "kind": "value", + "name": "getMilliseconds", + "docstrings": [ + "`getMilliseconds(date)`\n\nReturns the milliseconds of a given date (according to local time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.getMilliseconds\n// 0\n```" + ], + "signature": "let getMilliseconds: t => int" + }, + { + "id": "Core.Date.getDay", + "kind": "value", + "name": "getDay", + "docstrings": [ + "`getDay(date)`\n\nReturns the day of week of a given date (according to local time).\n0 = Sunday, 1 = Monday, ... 6 = Saturday\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.getDay\n// 1\n```" + ], + "signature": "let getDay: t => int" + }, + { + "id": "Core.Date.setFullYear", + "kind": "value", + "name": "setFullYear", + "docstrings": [ + "`setFullYear(date, year)`\n\nSets the year of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setFullYear(2024)\n```" + ], + "signature": "let setFullYear: (t, int) => unit" + }, + { + "id": "Core.Date.setFullYearM", + "kind": "value", + "name": "setFullYearM", + "docstrings": [ + "`setFullYearM(date, ~year, ~month)`\n\nSets the year and month of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setFullYearM(~year=2024, ~month=0)\n```" + ], + "signature": "let setFullYearM: (t, ~year: int, ~month: int) => unit" + }, + { + "id": "Core.Date.setFullYearMD", + "kind": "value", + "name": "setFullYearMD", + "docstrings": [ + "`setFullYearMD(date, ~year, ~month, ~date)`\n\nSets the year, month and date (day of month) of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setFullYearMD(~year=2024, ~month=0, ~date=1)\n```" + ], + "signature": "let setFullYearMD: (t, ~year: int, ~month: int, ~date: int) => unit" + }, + { + "id": "Core.Date.setMonth", + "kind": "value", + "name": "setMonth", + "docstrings": [ + "`setMonth(date, month)`\n\nSets the month of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setMonth(0)\n```" + ], + "signature": "let setMonth: (t, int) => unit" + }, + { + "id": "Core.Date.setDate", + "kind": "value", + "name": "setDate", + "docstrings": [ + "`setDate(date, day)`\n\nSets the date (day of month) of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setDate(1)\n```" + ], + "signature": "let setDate: (t, int) => unit" + }, + { + "id": "Core.Date.setHours", + "kind": "value", + "name": "setHours", + "docstrings": [ + "`setHours(date, hours)`\n\nSets the hours of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setHours(0)\n```" + ], + "signature": "let setHours: (t, int) => unit" + }, + { + "id": "Core.Date.setHoursM", + "kind": "value", + "name": "setHoursM", + "docstrings": [ + "`setHoursM(date, ~hours, ~minutes)`\n\nSets the hours and minutes of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setHoursM(~hours=0, ~minutes=0)\n```" + ], + "signature": "let setHoursM: (t, ~hours: int, ~minutes: int) => unit" + }, + { + "id": "Core.Date.setHoursMS", + "kind": "value", + "name": "setHoursMS", + "docstrings": [ + "`setHoursMS(date, ~hours, ~minutes, ~seconds)`\n\nSets the hours, minutes and seconds of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setHoursMS(~hours=0, ~minutes=0, ~seconds=0)\n```" + ], + "signature": "let setHoursMS: (t, ~hours: int, ~minutes: int, ~seconds: int) => unit" + }, + { + "id": "Core.Date.setHoursMSMs", + "kind": "value", + "name": "setHoursMSMs", + "docstrings": [ + "`setHoursMSMs(date, ~hours, ~minutes, ~seconds, ~milliseconds)`\n\nSets the hours, minutes, seconds and milliseconds of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setHoursMSMs(~hours=0, ~minutes=0, ~seconds=0, ~milliseconds=0)\n```" + ], + "signature": "let setHoursMSMs: (\n t,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n ~milliseconds: int,\n) => unit" + }, + { + "id": "Core.Date.setMinutes", + "kind": "value", + "name": "setMinutes", + "docstrings": [ + "`setMinutes(date, minutes)`\n\nSets the minutes of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setMinutes(0)\n```" + ], + "signature": "let setMinutes: (t, int) => unit" + }, + { + "id": "Core.Date.setMinutesS", + "kind": "value", + "name": "setMinutesS", + "docstrings": [ + "`setMinutesS(date, ~minutes, ~seconds)`\n\nSets the minutes and seconds of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setMinutesS(~minutes=0, ~seconds=0)\n```" + ], + "signature": "let setMinutesS: (t, ~minutes: int, ~seconds: int) => unit" + }, + { + "id": "Core.Date.setMinutesSMs", + "kind": "value", + "name": "setMinutesSMs", + "docstrings": [ + "`setMinutesSMs(date, ~minutes, ~seconds, ~milliseconds)`\n\nSets the minutes, seconds and milliseconds of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setMinutesSMs(~minutes=0, ~seconds=0, ~milliseconds=0)\n```" + ], + "signature": "let setMinutesSMs: (\n t,\n ~minutes: int,\n ~seconds: int,\n ~milliseconds: int,\n) => unit" + }, + { + "id": "Core.Date.setSeconds", + "kind": "value", + "name": "setSeconds", + "docstrings": [ + "`setSeconds(date, seconds)`\n\nSets the seconds of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setSeconds(0)\n```" + ], + "signature": "let setSeconds: (t, int) => unit" + }, + { + "id": "Core.Date.setSecondsMs", + "kind": "value", + "name": "setSecondsMs", + "docstrings": [ + "`setSecondsMs(date, ~seconds, ~milliseconds)`\n\nSets the seconds and milliseconds of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setSecondsMs(~seconds=0, ~milliseconds=0)\n```" + ], + "signature": "let setSecondsMs: (t, ~seconds: int, ~milliseconds: int) => unit" + }, + { + "id": "Core.Date.setMilliseconds", + "kind": "value", + "name": "setMilliseconds", + "docstrings": [ + "`setMilliseconds(date, milliseconds)`\n\nSets the milliseconds of a date (according to local time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setMilliseconds(0)\n```" + ], + "signature": "let setMilliseconds: (t, int) => unit" + }, + { + "id": "Core.Date.getUTCFullYear", + "kind": "value", + "name": "getUTCFullYear", + "docstrings": [ + "`getUTCFullYear(date)`\n\nReturns the year of a given date (according to UTC time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.getUTCFullYear // 2022\n```" + ], + "signature": "let getUTCFullYear: t => int" + }, + { + "id": "Core.Date.getUTCMonth", + "kind": "value", + "name": "getUTCMonth", + "docstrings": [ + "`getUTCMonth(date)`\n\nReturns the month of a given date (according to UTC time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.getUTCMonth // 11\n```" + ], + "signature": "let getUTCMonth: t => int" + }, + { + "id": "Core.Date.getUTCDate", + "kind": "value", + "name": "getUTCDate", + "docstrings": [ + "`getUTCDate(date)`\n\nReturns the date (day of month) of a given date (according to UTC time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.getUTCDate // 31\n```" + ], + "signature": "let getUTCDate: t => int" + }, + { + "id": "Core.Date.getUTCHours", + "kind": "value", + "name": "getUTCHours", + "docstrings": [ + "`getUTCHours(date)`\n\nReturns the hours of a given date (according to UTC time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.getUTCHours // 23\n```" + ], + "signature": "let getUTCHours: t => int" + }, + { + "id": "Core.Date.getUTCMinutes", + "kind": "value", + "name": "getUTCMinutes", + "docstrings": [ + "`getUTCMinutes(date)`\n\nReturns the minutes of a given date (according to UTC time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.getUTCMinutes // 0\n```" + ], + "signature": "let getUTCMinutes: t => int" + }, + { + "id": "Core.Date.getUTCSeconds", + "kind": "value", + "name": "getUTCSeconds", + "docstrings": [ + "`getUTCSeconds(date)`\n\nReturns the seconds of a given date (according to UTC time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.getUTCSeconds // 0\n```" + ], + "signature": "let getUTCSeconds: t => int" + }, + { + "id": "Core.Date.getUTCMilliseconds", + "kind": "value", + "name": "getUTCMilliseconds", + "docstrings": [ + "`getUTCMilliseconds(date)`\n\nReturns the milliseconds of a given date (according to UTC time).\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.getUTCMilliseconds // 0\n```" + ], + "signature": "let getUTCMilliseconds: t => int" + }, + { + "id": "Core.Date.getUTCDay", + "kind": "value", + "name": "getUTCDay", + "docstrings": [ + "`getUTCDay(date)`\n\nReturns the day (day of week) of a given date (according to UTC time).\n0 = Sunday, 1 = Monday, ... 6 = Saturday\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.getUTCDay // 6\n```" + ], + "signature": "let getUTCDay: t => int" + }, + { + "id": "Core.Date.setUTCFullYear", + "kind": "value", + "name": "setUTCFullYear", + "docstrings": [ + "`setUTCFullYear(date, year)`\n\nSets the year of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCFullYear(2024)\n```" + ], + "signature": "let setUTCFullYear: (t, int) => unit" + }, + { + "id": "Core.Date.setUTCFullYearM", + "kind": "value", + "name": "setUTCFullYearM", + "docstrings": [ + "`setUTCFullYearM(date, ~year, ~month)`\n\nSets the year and month of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCFullYearM(~year=2024, ~month=0)\n```" + ], + "signature": "let setUTCFullYearM: (t, ~year: int, ~month: int) => unit" + }, + { + "id": "Core.Date.setUTCFullYearMD", + "kind": "value", + "name": "setUTCFullYearMD", + "docstrings": [ + "`setUTCFullYearMD(date, ~year, ~month, ~date)`\n\nSets the year, month and date (day of month) of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCFullYearMD(~year=2024, ~month=0, ~date=1)\n```" + ], + "signature": "let setUTCFullYearMD: (t, ~year: int, ~month: int, ~date: int) => unit" + }, + { + "id": "Core.Date.setUTCMonth", + "kind": "value", + "name": "setUTCMonth", + "docstrings": [ + "`setUTCMonth(date, month)`\n\nSets the month of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCMonth(0)\n```" + ], + "signature": "let setUTCMonth: (t, int) => unit" + }, + { + "id": "Core.Date.setUTCDate", + "kind": "value", + "name": "setUTCDate", + "docstrings": [ + "`setDate(date, day)`\n\nSets the date (day of month) of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCDate(1)\n```" + ], + "signature": "let setUTCDate: (t, int) => unit" + }, + { + "id": "Core.Date.setUTCHours", + "kind": "value", + "name": "setUTCHours", + "docstrings": [ + "`setUTCHours(date, hours)`\n\nSets the hours of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCHours(0)\n```" + ], + "signature": "let setUTCHours: (t, int) => unit" + }, + { + "id": "Core.Date.setUTCHoursM", + "kind": "value", + "name": "setUTCHoursM", + "docstrings": [ + "`setHoursM(date, ~hours, ~minutes)`\n\nSets the hours and minutes of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCHoursM(~hours=0, ~minutes=0)\n```" + ], + "signature": "let setUTCHoursM: (t, ~hours: int, ~minutes: int) => unit" + }, + { + "id": "Core.Date.setUTCHoursMS", + "kind": "value", + "name": "setUTCHoursMS", + "docstrings": [ + "`setUTCHoursMS(date, ~hours, ~minutes, ~seconds)`\n\nSets the hours, minutes and seconds of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCHoursMS(~hours=0, ~minutes=0, ~seconds=0)\n```" + ], + "signature": "let setUTCHoursMS: (t, ~hours: int, ~minutes: int, ~seconds: int) => unit" + }, + { + "id": "Core.Date.setUTCHoursMSMs", + "kind": "value", + "name": "setUTCHoursMSMs", + "docstrings": [ + "`setUTCHoursMSMs(date, ~hours, ~minutes, ~seconds, ~milliseconds)`\n\nSets the hours, minutes, seconds and milliseconds of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCHoursMSMs(~hours=0, ~minutes=0, ~seconds=0, ~milliseconds=0)\n```" + ], + "signature": "let setUTCHoursMSMs: (\n t,\n ~hours: int,\n ~minutes: int,\n ~seconds: int,\n ~milliseconds: int,\n) => unit" + }, + { + "id": "Core.Date.setUTCMinutes", + "kind": "value", + "name": "setUTCMinutes", + "docstrings": [ + "`setUTCMinutes(date, minutes)`\n\nSets the minutes of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCMinutes(0)\n```" + ], + "signature": "let setUTCMinutes: (t, int) => unit" + }, + { + "id": "Core.Date.setUTCMinutesS", + "kind": "value", + "name": "setUTCMinutesS", + "docstrings": [ + "`setUTCMinutesS(date, ~minutes, ~seconds)`\n\nSets the minutes and seconds of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCMinutesS(~minutes=0, ~seconds=0)\n```" + ], + "signature": "let setUTCMinutesS: (t, ~minutes: int, ~seconds: int) => unit" + }, + { + "id": "Core.Date.setUTCMinutesSMs", + "kind": "value", + "name": "setUTCMinutesSMs", + "docstrings": [ + "`setUTCMinutesSMs(date, ~minutes, ~seconds, ~milliseconds)`\n\nSets the minutes, seconds and milliseconds of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCMinutesSMs(~minutes=0, ~seconds=0, ~milliseconds=0)\n```" + ], + "signature": "let setUTCMinutesSMs: (\n t,\n ~minutes: int,\n ~seconds: int,\n ~milliseconds: int,\n) => unit" + }, + { + "id": "Core.Date.setUTCSeconds", + "kind": "value", + "name": "setUTCSeconds", + "docstrings": [ + "`setUTCSeconds(date, seconds)`\n\nSets the seconds of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCSeconds(0)\n```" + ], + "signature": "let setUTCSeconds: (t, int) => unit" + }, + { + "id": "Core.Date.setUTCSecondsMs", + "kind": "value", + "name": "setUTCSecondsMs", + "docstrings": [ + "`setUTCSecondsMs(date, ~seconds, ~milliseconds)`\n\nSets the seconds and milliseconds of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCSecondsMs(~seconds=0, ~milliseconds=0)\n```" + ], + "signature": "let setUTCSecondsMs: (t, ~seconds: int, ~milliseconds: int) => unit" + }, + { + "id": "Core.Date.setUTCMilliseconds", + "kind": "value", + "name": "setUTCMilliseconds", + "docstrings": [ + "`setUTCMilliseconds(date, milliseconds)`\n\nSets the milliseconds of a date (according to UTC time).\nBeware this will *mutate* the date.\n\n## Examples\n```rescript\nDate.fromString(\"2023-02-20T16:40:00.00\")->Date.setUTCMilliseconds(0)\n```" + ], + "signature": "let setUTCMilliseconds: (t, int) => unit" + }, + { + "id": "Core.Date.toDateString", + "kind": "value", + "name": "toDateString", + "docstrings": [ + "`toDateString(date)`\n\nConverts a JavaScript date to a standard date string. The date will be mapped to the current time zone.\nIf you want to convert it to a localized string, use `Date.toLocaleDateString` instead.\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.toDateString->Console.log\n// Sun Jan 01 2023\n\nDate.fromString(\"2023-01-01T00:00:00.00+08:00\")->Date.toDateString->Console.log\n// Sat Dec 31 2022\n```" + ], + "signature": "let toDateString: t => string" + }, + { + "id": "Core.Date.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "`toString(date)`\n\nConverts a JavaScript date to a standard date time string. The date will be mapped to the current time zone.\nIf you want to convert it to a localized string, use `Date.toLocaleString` instead.\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.toString->Console.log\n// Sun Jan 01 2023 00:00:00 GMT+0100 (Central European Standard Time)\n\nDate.fromString(\"2023-06-01T00:00:00.00+01:00\")->Date.toString->Console.log\n// Thu Jun 01 2023 01:00:00 GMT+0200 (Central European Summer Time)\n```" + ], + "signature": "let toString: t => string" + }, + { + "id": "Core.Date.toTimeString", + "kind": "value", + "name": "toTimeString", + "docstrings": [ + "`toTimeString(date)`\n\nConverts a JavaScript date to a standard time string. The date will be mapped to the current time zone.\nIf you want to convert it to a localized string, use `Date.toLocaleStimeString` instead.\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+01:00\")->Date.toTimeString->Console.log\n// 00:00:00 GMT+0100 (Central European Standard Time)\n\nDate.fromString(\"2023-01-01T00:00:00.00+08:00\")->Date.toTimeString->Console.log\n// 17:00:00 GMT+0100 (Central European Standard Time)\n```" + ], + "signature": "let toTimeString: t => string" + }, + { + "id": "Core.Date.toLocaleDateString", + "kind": "value", + "name": "toLocaleDateString", + "docstrings": [ + "`toLocaleDateString(date)`\n\nConverts a JavaScript date to a localized date string. It will use the current locale.\n\n## Examples\n```rescript\nDate.make()->Date.toLocaleDateString->Console.log\n// 2/19/2023\n```" + ], + "signature": "let toLocaleDateString: t => string" + }, + { + "id": "Core.Date.toLocaleDateStringWithLocale", + "kind": "value", + "name": "toLocaleDateStringWithLocale", + "docstrings": [ + "`toLocaleDateStringWithLocale(date, locale)`\n\nConverts a JavaScript date to a localized date string. It will use the specified locale.\n\n## Examples\n```rescript\nDate.make()->Date.toLocaleDateStringWithLocale(\"en-US\")->Console.log\n// 2/19/2023\n```" + ], + "signature": "let toLocaleDateStringWithLocale: (t, string) => string" + }, + { + "id": "Core.Date.toLocaleDateStringWithLocaleAndOptions", + "kind": "value", + "name": "toLocaleDateStringWithLocaleAndOptions", + "docstrings": [ + "`toLocaleDateStringWithLocaleAndOptions(date, locale, options)`\n\nConverts a JavaScript date to a localized date string. It will use the specified locale and formatting options.\n\n## Examples\n```rescript\nDate.make()->Date.toLocaleDateStringWithLocaleAndOptions(\"en-US\", { dateStyle: #long })->Console.log\n// February 19, 2023\n\nDate.make()->Date.toLocaleDateStringWithLocaleAndOptions(\"de\", { hour: #\"2-digit\", minute: #\"2-digit\" })->Console.log\n// 19.2.2023, 15:40\n\nDate.make()->Date.toLocaleDateStringWithLocaleAndOptions(\"de\", { year: #numeric })->Console.log\n// 2023\n```" + ], + "signature": "let toLocaleDateStringWithLocaleAndOptions: (t, string, localeOptions) => string" + }, + { + "id": "Core.Date.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [ + "`toLocaleString(date)`\n\nConverts a JavaScript date to a localized date-time string. It will use the current locale.\n\n## Examples\n```rescript\nDate.make()->Date.toLocaleString->Console.log\n// 2/19/2023, 3:40:00 PM\n```" + ], + "signature": "let toLocaleString: t => string" + }, + { + "id": "Core.Date.toLocaleStringWithLocale", + "kind": "value", + "name": "toLocaleStringWithLocale", + "docstrings": [ + "`toLocaleStringWithLocale(date, locale)`\n\nConverts a JavaScript date to a localized date-time string. It will use the specified locale.\n\n## Examples\n```rescript\nDate.make()->Date.toLocaleStringWithLocale(\"en-US\")->Console.log\n// 2/19/2023, 3:40:00 PM\n```" + ], + "signature": "let toLocaleStringWithLocale: (t, string) => string" + }, + { + "id": "Core.Date.toLocaleStringWithLocaleAndOptions", + "kind": "value", + "name": "toLocaleStringWithLocaleAndOptions", + "docstrings": [ + "`toLocaleStringWithLocaleAndOptions(date, locale, options)`\n\nConverts a JavaScript date to a localized date-time string. It will use the specified locale and formatting options.\n\n## Examples\n```rescript\nDate.make()->Date.toLocaleStringWithLocaleAndOptions(\"en\", { dateStyle: #short, timeStyle: #short })->Console.log\n// 2/19/23, 3:40 PM\n\nDate.make()->Date.toLocaleStringWithLocaleAndOptions(\"en\", { era: #long, year: #numeric, month: #\"2-digit\", day: #\"2-digit\", hour: #numeric, timeZoneName: #short })->Console.log\n// 02/19/2023 Anno Domini, 3 PM GMT+1\n```" + ], + "signature": "let toLocaleStringWithLocaleAndOptions: (t, string, localeOptions) => string" + }, + { + "id": "Core.Date.toLocaleTimeString", + "kind": "value", + "name": "toLocaleTimeString", + "docstrings": [ + "`toLocaleTimeString(date)`\n\nConverts a JavaScript date to a localized time string. It will use the current locale.\n\n## Examples\n```rescript\nDate.make()->Date.toLocaleTimeString->Console.log\n// 3:40:00 PM\n```" + ], + "signature": "let toLocaleTimeString: t => string" + }, + { + "id": "Core.Date.toLocaleTimeStringWithLocale", + "kind": "value", + "name": "toLocaleTimeStringWithLocale", + "docstrings": [ + "`toLocaleTimeStringWithLocale(date, locale)`\n\nConverts a JavaScript date to a localized time string. It will use the specified locale.\n\n## Examples\n```rescript\nDate.make()->Date.toLocaleTimeStringWithLocale(\"en-US\")->Console.log\n// 3:40:00 PM\n```" + ], + "signature": "let toLocaleTimeStringWithLocale: (t, string) => string" + }, + { + "id": "Core.Date.toLocaleTimeStringWithLocaleAndOptions", + "kind": "value", + "name": "toLocaleTimeStringWithLocaleAndOptions", + "docstrings": [ + "`toLocaleTimeStringWithLocaleAndOptions(date, locale, options)`\n\nConverts a JavaScript date to a localized time string. It will use the specified locale and formatting options.\n\n## Examples\n```rescript\nDate.make()->Date.toLocaleTimeStringWithLocaleAndOptions(\"en-US\", { timeStyle: #long })->Console.log\n// 3:40:00 PM GMT+1\n\nDate.make()->Date.toLocaleTimeStringWithLocaleAndOptions(\"de\", { hour: #\"2-digit\", minute: #\"2-digit\" })->Console.log\n// 15:40\n```" + ], + "signature": "let toLocaleTimeStringWithLocaleAndOptions: (t, string, localeOptions) => string" + }, + { + "id": "Core.Date.toISOString", + "kind": "value", + "name": "toISOString", + "docstrings": [ + "`toISOString(date)`\n\nConverts a JavaScript date to a ISO 8601 string (YYYY-MM-DDTHH:mm:ss.sssZ). The date will be mapped to the UTC time.\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+00:00\")->Date.toISOString->Console.log\n// 2023-01-01T00:00:00.000Z\n\nDate.fromString(\"2023-01-01T00:00:00.00+08:00\")->Date.toISOString->Console.log\n// 2022-12-31T16:00:00.000Z\n```" + ], + "signature": "let toISOString: t => string" + }, + { + "id": "Core.Date.toUTCString", + "kind": "value", + "name": "toUTCString", + "docstrings": [ + "`toUTCString(date)`\n\nConverts a JavaScript date to date time string. The date will be mapped to the UTC time.\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+00:00\")->Date.toUTCString->Console.log\n// Sun, 01 Jan 2023 00:00:00 GMT\n\nDate.fromString(\"2023-01-01T00:00:00.00+08:00\")->Date.toUTCString->Console.log\n// Sat, 31 Dec 2022 16:00:00 GMT\n```" + ], + "signature": "let toUTCString: t => string" + }, + { + "id": "Core.Date.toJSON", + "kind": "value", + "name": "toJSON", + "docstrings": [ + "`toJSON(date)`\n\nConverts a JavaScript date to a string.\nIf the date is valid, the function will return the same result as `Date.toISOString`.\nInvalid dates will return `None`.\n\n## Examples\n```rescript\nDate.fromString(\"2023-01-01T00:00:00.00+00:00\")->Date.toJSON\n// Some(\"2023-01-01T00:00:00.000Z\")\n\nDate.fromString(\"\")->Date.toJSON\n// None\n```" + ], + "signature": "let toJSON: t => option" + } + ] + }, + "core/dataview": { + "id": "Core.DataView", + "name": "DataView", + "docstrings": [], + "items": [ + { + "id": "Core.DataView.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t" + }, + { + "id": "Core.DataView.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "docstrings": [], + "signature": "let fromBuffer: Core__ArrayBuffer.t => t" + }, + { + "id": "Core.DataView.fromBufferToEnd", + "kind": "value", + "name": "fromBufferToEnd", + "docstrings": [], + "signature": "let fromBufferToEnd: (Core__ArrayBuffer.t, ~byteOffset: int) => t" + }, + { + "id": "Core.DataView.fromBufferWithRange", + "kind": "value", + "name": "fromBufferWithRange", + "docstrings": [], + "signature": "let fromBufferWithRange: (Core__ArrayBuffer.t, ~byteOffset: int, ~length: int) => t" + }, + { + "id": "Core.DataView.buffer", + "kind": "value", + "name": "buffer", + "docstrings": [], + "signature": "let buffer: t => Core__ArrayBuffer.t" + }, + { + "id": "Core.DataView.byteLength", + "kind": "value", + "name": "byteLength", + "docstrings": [], + "signature": "let byteLength: t => int" + }, + { + "id": "Core.DataView.byteOffset", + "kind": "value", + "name": "byteOffset", + "docstrings": [], + "signature": "let byteOffset: t => int" + }, + { + "id": "Core.DataView.getInt8", + "kind": "value", + "name": "getInt8", + "docstrings": [], + "signature": "let getInt8: t => int" + }, + { + "id": "Core.DataView.getUint8", + "kind": "value", + "name": "getUint8", + "docstrings": [], + "signature": "let getUint8: t => int" + }, + { + "id": "Core.DataView.getInt16", + "kind": "value", + "name": "getInt16", + "docstrings": [], + "signature": "let getInt16: t => int" + }, + { + "id": "Core.DataView.getUint16", + "kind": "value", + "name": "getUint16", + "docstrings": [], + "signature": "let getUint16: t => int" + }, + { + "id": "Core.DataView.getInt32", + "kind": "value", + "name": "getInt32", + "docstrings": [], + "signature": "let getInt32: t => int" + }, + { + "id": "Core.DataView.getUint32", + "kind": "value", + "name": "getUint32", + "docstrings": [], + "signature": "let getUint32: t => int" + }, + { + "id": "Core.DataView.getFloat32", + "kind": "value", + "name": "getFloat32", + "docstrings": [], + "signature": "let getFloat32: t => float" + }, + { + "id": "Core.DataView.getFloat64", + "kind": "value", + "name": "getFloat64", + "docstrings": [], + "signature": "let getFloat64: t => float" + }, + { + "id": "Core.DataView.getBigInt64", + "kind": "value", + "name": "getBigInt64", + "docstrings": [], + "signature": "let getBigInt64: t => bigint" + }, + { + "id": "Core.DataView.getBigUint64", + "kind": "value", + "name": "getBigUint64", + "docstrings": [], + "signature": "let getBigUint64: t => bigint" + }, + { + "id": "Core.DataView.setInt8", + "kind": "value", + "name": "setInt8", + "docstrings": [], + "signature": "let setInt8: (t, int) => unit" + }, + { + "id": "Core.DataView.setUint8", + "kind": "value", + "name": "setUint8", + "docstrings": [], + "signature": "let setUint8: (t, int) => unit" + }, + { + "id": "Core.DataView.setInt16", + "kind": "value", + "name": "setInt16", + "docstrings": [], + "signature": "let setInt16: (t, int) => unit" + }, + { + "id": "Core.DataView.setUint16", + "kind": "value", + "name": "setUint16", + "docstrings": [], + "signature": "let setUint16: (t, int) => unit" + }, + { + "id": "Core.DataView.setInt32", + "kind": "value", + "name": "setInt32", + "docstrings": [], + "signature": "let setInt32: (t, int) => unit" + }, + { + "id": "Core.DataView.setUint32", + "kind": "value", + "name": "setUint32", + "docstrings": [], + "signature": "let setUint32: (t, int) => unit" + }, + { + "id": "Core.DataView.setFloat32", + "kind": "value", + "name": "setFloat32", + "docstrings": [], + "signature": "let setFloat32: (t, float) => unit" + }, + { + "id": "Core.DataView.setFloat64", + "kind": "value", + "name": "setFloat64", + "docstrings": [], + "signature": "let setFloat64: (t, float) => unit" + }, + { + "id": "Core.DataView.setBigInt64", + "kind": "value", + "name": "setBigInt64", + "docstrings": [], + "signature": "let setBigInt64: (t, bigint) => unit" + }, + { + "id": "Core.DataView.setBigUint64", + "kind": "value", + "name": "setBigUint64", + "docstrings": [], + "signature": "let setBigUint64: (t, bigint) => unit" + } + ] + }, + "core/console": { + "id": "Core.Console", + "name": "Console", + "docstrings": [ + "Functions for interacting with JavaScript console.\n\nSee: [`console`](https://developer.mozilla.org/en-US/docs/Web/API/Console)." + ], + "items": [ + { + "id": "Core.Console.assert_", + "kind": "value", + "name": "assert_", + "docstrings": [ + "`assert_(assertion, value)` print a message to console if `assertion` evaluates `false`. Does nothing if it's `true`.\n\nSee [`console.assert`](https://developer.mozilla.org/en-US/docs/Web/API/console/assert)\non MDN.\n\n## Examples\n\n```rescript\nConsole.assert_(false, \"Hello World!\")\nConsole.assert_(42 == 42, \"The answer\")\n```" + ], + "signature": "let assert_: (bool, 'a) => unit" + }, + { + "id": "Core.Console.assert2", + "kind": "value", + "name": "assert2", + "docstrings": [ + "`assert2(v1, v2)`. Like `assert_`, but with two arguments.\n\n## Examples\n\n```rescript\nConsole.assert2(false, \"Hello\", \"World\")\nConsole.assert2(42 == 42, [1, 2, 3], '4')\n```" + ], + "signature": "let assert2: (bool, 'a, 'b) => unit" + }, + { + "id": "Core.Console.assert3", + "kind": "value", + "name": "assert3", + "docstrings": [ + "`assert3(v1, v2, v3)`. Like `assert_`, but with three arguments.\n\n## Examples\n\n```rescript\nConsole.assert3(false, \"Hello\", \"World\", \"ReScript\")\nConsole.assert3(42 == 42, \"One\", 2, #3)\n```" + ], + "signature": "let assert3: (bool, 'a, 'b, 'c) => unit" + }, + { + "id": "Core.Console.assert4", + "kind": "value", + "name": "assert4", + "docstrings": [ + "`assert4(v1, v2, v3, v4)`. Like `assert_`, but with four arguments.\n\n## Examples\n\n```rescript\nlet value = 42\nConsole.assert4(false, \"Hello\", \"World\", \"ReScript\", \"!!!\")\nConsole.assert4(value == 42, [1, 2], (3, 4), [#5, #6], #\"polyvar\")\n```" + ], + "signature": "let assert4: (bool, 'a, 'b, 'c, 'd) => unit" + }, + { + "id": "Core.Console.assert5", + "kind": "value", + "name": "assert5", + "docstrings": [ + "`assert5(v1, v2, v3, v4, v5)`. Like `assert_`, but with five arguments.\n\n## Examples\n\n```rescript\nlet value = 42\nConsole.assert5(false, \"Hello\", \"World\", \"JS\", '!', '!')\nConsole.assert5(value == 42, [1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"})\n```" + ], + "signature": "let assert5: (bool, 'a, 'b, 'c, 'd, 'e) => unit" + }, + { + "id": "Core.Console.assert6", + "kind": "value", + "name": "assert6", + "docstrings": [ + "`assert6(v1, v2)`. Like `assert_`, but with six arguments.\n\n## Examples\n\n```rescript\nlet value = 42\nConsole.assert6(false, \"Hello\", \"World\", \"JS\", '!', '!', '?')\nConsole.assert6(value == 42, [1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"}, 42)\n```" + ], + "signature": "let assert6: (bool, 'a, 'b, 'c, 'd, 'e, 'f) => unit" + }, + { + "id": "Core.Console.assertMany", + "kind": "value", + "name": "assertMany", + "docstrings": [ + "`assertMany(assertion, arr)`. Like `assert_`, but variadic.\n\n## Examples\n\n```rescript\nlet value = 42\nConsole.assertMany(false, [\"Hello\", \"World\"])\nConsole.assertMany(value == 42, [1, 2, 3])\n```" + ], + "signature": "let assertMany: (bool, array<'a>) => unit" + }, + { + "id": "Core.Console.clear", + "kind": "value", + "name": "clear", + "docstrings": [ + "`clear()` clears the console, if allowed.\n\nSee [`console.clear`](https://developer.mozilla.org/en-US/docs/Web/API/console/clear)\non MDN.\n\n## Examples\n\n```rescript\nConsole.clear()\n```" + ], + "signature": "let clear: unit => unit" + }, + { + "id": "Core.Console.count", + "kind": "value", + "name": "count", + "docstrings": [ + "`count(label)` prints to the console the number of times it's been called with the given label.\n\nSee [`console.count`](https://developer.mozilla.org/en-US/docs/Web/API/console/count)\non MDN.\n\n## Examples\n\n```rescript\nConsole.count(\"rescript\")\n```" + ], + "signature": "let count: string => unit" + }, + { + "id": "Core.Console.countReset", + "kind": "value", + "name": "countReset", + "docstrings": [ + "`countReset(label)` resets the count for the given label to 0.\n\nSee [`console.countReset`](https://developer.mozilla.org/en-US/docs/Web/API/console/countReset)\non MDN.\n\n## Examples\n\n```rescript\nConsole.countReset(\"rescript\")\n```" + ], + "signature": "let countReset: string => unit" + }, + { + "id": "Core.Console.debug", + "kind": "value", + "name": "debug", + "docstrings": [ + "`debug(value)` print a debug message to console.\n\nSee [`console.debug`](https://developer.mozilla.org/en-US/docs/Web/API/console/debug)\non MDN.\n\n## Examples\n\n```rescript\nConsole.debug(\"Hello\")\nlet obj = {\"name\": \"ReScript\", \"version\": 10}\nConsole.debug(obj)\n```" + ], + "signature": "let debug: 'a => unit" + }, + { + "id": "Core.Console.debug2", + "kind": "value", + "name": "debug2", + "docstrings": [ + "`debug2(v1, v2)`. Like `debug`, but with two arguments.\n\n## Examples\n\n```rescript\nConsole.debug2(\"Hello\", \"World\")\nConsole.debug2([1, 2, 3], '4')\n```" + ], + "signature": "let debug2: ('a, 'b) => unit" + }, + { + "id": "Core.Console.debug3", + "kind": "value", + "name": "debug3", + "docstrings": [ + "`debug3(v1, v2, v3)`. Like `debug`, but with three arguments.\n\n## Examples\n\n```rescript\nConsole.debug3(\"Hello\", \"World\", \"ReScript\")\nConsole.debug3(\"One\", 2, #3)\n```" + ], + "signature": "let debug3: ('a, 'b, 'c) => unit" + }, + { + "id": "Core.Console.debug4", + "kind": "value", + "name": "debug4", + "docstrings": [ + "`debug4(v1, v2, v3, v4)`. Like `debug`, but with four arguments.\n\n## Examples\n\n```rescript\nConsole.debug4(\"Hello\", \"World\", \"ReScript\", \"!!!\")\nConsole.debug4([1, 2], (3, 4), [#5, #6], #\"polyvar\")\n```" + ], + "signature": "let debug4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Core.Console.debug5", + "kind": "value", + "name": "debug5", + "docstrings": [ + "`debug5(v1, v2, v3, v4, v5)`. Like `debug`, but with five arguments.\n\n## Examples\n\n```rescript\nConsole.debug5(\"Hello\", \"World\", \"JS\", '!', '!')\nConsole.debug5([1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"})\n```" + ], + "signature": "let debug5: ('a, 'b, 'c, 'd, 'e) => unit" + }, + { + "id": "Core.Console.debug6", + "kind": "value", + "name": "debug6", + "docstrings": [ + "`debug6(v1, v2, v3, v4, v5, v6)`. Like `debug`, but with six arguments.\n\n## Examples\n\n```rescript\nConsole.debug6(\"Hello\", \"World\", \"JS\", '!', '!', '?')\nConsole.debug6([1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"}, 42)\n```" + ], + "signature": "let debug6: ('a, 'b, 'c, 'd, 'e, 'f) => unit" + }, + { + "id": "Core.Console.debugMany", + "kind": "value", + "name": "debugMany", + "docstrings": [ + "`debugMany(arr)`. Like `debug`, but variadic.\n\n## Examples\n\n```rescript\nConsole.debugMany([\"Hello\", \"World\"])\nConsole.debugMany([1, 2, 3])\n```" + ], + "signature": "let debugMany: array<'a> => unit" + }, + { + "id": "Core.Console.dir", + "kind": "value", + "name": "dir", + "docstrings": [ + "`dir(object)` displays an interactive view of the object in the console.\n\nSee [`console.dir`](https://developer.mozilla.org/en-US/docs/Web/API/console/dir)\non MDN.\n\n## Examples\n\n```rescript\nConsole.dir({\"language\": \"rescript\", \"version\": \"10.1.2\"})\n```" + ], + "signature": "let dir: 'a => unit" + }, + { + "id": "Core.Console.dirxml", + "kind": "value", + "name": "dirxml", + "docstrings": [ + "`dirxml(object)` displays an interactive tree view of an XML/HTML element in the console.\n\nSee [`console.dirxml`](https://developer.mozilla.org/en-US/docs/Web/API/console/dirxml)\non MDN." + ], + "signature": "let dirxml: 'a => unit" + }, + { + "id": "Core.Console.error", + "kind": "value", + "name": "error", + "docstrings": [ + "`error(value)` prints an error message to console.\n\nSee [`console.error`](https://developer.mozilla.org/en-US/docs/Web/API/console/error)\non MDN.\n\n## Examples\n\n```rescript\nConsole.error(\"error message\")\nConsole.error((\"error\", \"invalid value\"))\n```" + ], + "signature": "let error: 'a => unit" + }, + { + "id": "Core.Console.error2", + "kind": "value", + "name": "error2", + "docstrings": [ + "`error(v1, v2)`. Like `error`, but two arguments.\n\n## Examples\n\n```rescript\nConsole.error2(\"Error\", \"here\")\nConsole.error2((\"log\", \"error\"), \"message\")\n```" + ], + "signature": "let error2: ('a, 'b) => unit" + }, + { + "id": "Core.Console.error3", + "kind": "value", + "name": "error3", + "docstrings": [ + "`error3(v1, v2, v3)`. Like `error`, but three arguments.\n\n## Examples\n\n```rescript\nConsole.error3(\"Hello\", \"World\", \"!!!\")\nConsole.error3(#first, #second, #third)\n```" + ], + "signature": "let error3: ('a, 'b, 'c) => unit" + }, + { + "id": "Core.Console.error4", + "kind": "value", + "name": "error4", + "docstrings": [ + "`error4(v1, v2, v3, v4)`. Like `error`, but with four arguments.\n\n## Examples\n\n```rescript\nConsole.error4(\"Hello\", \"World\", \"ReScript\", '!')\nConsole.error4(#first, #second, #third, (\"fourth\"))\n```" + ], + "signature": "let error4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Core.Console.error5", + "kind": "value", + "name": "error5", + "docstrings": [ + "`error5(v1, v2, v3, v4, v5)`. Like `error`, but with five arguments.\n\n## Examples\n\n```rescript\nConsole.error5('e', 'r', 'r', 'o', 'r')\nConsole.error5(1, #second, #third, (\"fourth\"), 'c')\n```" + ], + "signature": "let error5: ('a, 'b, 'c, 'd, 'e) => unit" + }, + { + "id": "Core.Console.error6", + "kind": "value", + "name": "error6", + "docstrings": [ + "`error6(v1, v2, v3, v4, v5, v6)`. Like `error`, but with six arguments.\n\n## Examples\n\n```rescript\nConsole.error6(\"Hello\", \"World\", \"from\", \"JS\", \"!!!\", '!')\nConsole.error6([1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"}, 42)\n```" + ], + "signature": "let error6: ('a, 'b, 'c, 'd, 'e, 'f) => unit" + }, + { + "id": "Core.Console.group", + "kind": "value", + "name": "group", + "docstrings": [ + "`group(label)` creates a new \"group\" level with the given label.\n\nSee [`console.group`](https://developer.mozilla.org/en-US/docs/Web/API/console/group)\non MDN.\n\n## Example\n\n```rescript\nConsole.group(\"first group\")\nConsole.group(\"second group\")\nConsole.log(\"a message on the second level\")\nConsole.groupEnd()\nConsole.log(\"a message message on the first level\")\nConsole.groupEnd()\n```" + ], + "signature": "let group: string => unit" + }, + { + "id": "Core.Console.groupCollapsed", + "kind": "value", + "name": "groupCollapsed", + "docstrings": [ + "`groupCollapsed(label)`. Like `group` but collapses the group initially.\n\nSee [`console.groupCollapsed`](https://developer.mozilla.org/en-US/docs/Web/API/console/groupCollapsed)\non MDN." + ], + "signature": "let groupCollapsed: string => unit" + }, + { + "id": "Core.Console.groupEnd", + "kind": "value", + "name": "groupEnd", + "docstrings": [ + "`groupEnd()` ends the current group.\n\nSee [`console.groupEnd`](https://developer.mozilla.org/en-US/docs/Web/API/console/groupEnd)\non MDN." + ], + "signature": "let groupEnd: unit => unit" + }, + { + "id": "Core.Console.errorMany", + "kind": "value", + "name": "errorMany", + "docstrings": [ + "`errorMany(arr)`. Like `error`, but variadic.\n\n## Examples\n\n```rescript\nConsole.errorMany([\"Hello\", \"World\"])\nConsole.errorMany([1, 2, 3])\n```" + ], + "signature": "let errorMany: array<'a> => unit" + }, + { + "id": "Core.Console.info", + "kind": "value", + "name": "info", + "docstrings": [ + "`info(value)` print an informational message to console.\n\nSee [`console.info`](https://developer.mozilla.org/en-US/docs/Web/API/console/info)\non MDN.\n\n## Examples\n\n```rescript\nConsole.info(\"Information\")\nConsole.info((\"Hello\", \"JS\"))\n```" + ], + "signature": "let info: 'a => unit" + }, + { + "id": "Core.Console.info2", + "kind": "value", + "name": "info2", + "docstrings": [ + "`info2(v1, v2)`. Like `info`, but with two arguments.\n\n## Examples\n\n```rescript\nConsole.info2(\"Info\", \"failed to download\")\nConsole.info2(#info, {\"name\": \"ReScript\"})\n```" + ], + "signature": "let info2: ('a, 'b) => unit" + }, + { + "id": "Core.Console.info3", + "kind": "value", + "name": "info3", + "docstrings": [ + "`info3(v1, v2, v3)`. Like `info`, but with three arguments.\n\n## Examples\n\n```rescript\nConsole.info3(\"Hello\", \"World\", \"ReScript\")\nConsole.info3([1, 2, 3], #4, #5)\n```" + ], + "signature": "let info3: ('a, 'b, 'c) => unit" + }, + { + "id": "Core.Console.info4", + "kind": "value", + "name": "info4", + "docstrings": [ + "`info4(v1, v2, v3, v4)`. Like `info`, but with four arguments.\n\n## Examples\n\n```rescript\nConsole.info4(\"Hello\", \"World\", \"ReScript\", '!')\nConsole.info4([1, 2, 3], #4, #5, #lastinfo)\n```" + ], + "signature": "let info4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Core.Console.info5", + "kind": "value", + "name": "info5", + "docstrings": [ + "`info5(v1, v2, v3, v4, v5)`. Like `info`, but with five arguments.\n\n## Examples\n\n```rescript\nConsole.info5(\"Hello\", \"World\", \"from\", \"JS\", \"!!!\")\nConsole.info5([1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"})\n```" + ], + "signature": "let info5: ('a, 'b, 'c, 'd, 'e) => unit" + }, + { + "id": "Core.Console.info6", + "kind": "value", + "name": "info6", + "docstrings": [ + "`info6(v1, v2, v3, v4, v5, v6)`. Like `info`, but with six arguments.\n\n## Examples\n\n```rescript\nConsole.info6(\"Hello\", \"World\", \"from\", \"JS\", \"!!!\", '!')\nConsole.info6([1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"}, 42)\n```" + ], + "signature": "let info6: ('a, 'b, 'c, 'd, 'e, 'f) => unit" + }, + { + "id": "Core.Console.infoMany", + "kind": "value", + "name": "infoMany", + "docstrings": [ + "`infoMany(arr)`. Like `info`, but variadic.\n\n## Examples\n\n```rescript\nConsole.infoMany([\"Hello\", \"World\"])\nConsole.infoMany([1, 2, 3])\n```" + ], + "signature": "let infoMany: array<'a> => unit" + }, + { + "id": "Core.Console.log", + "kind": "value", + "name": "log", + "docstrings": [ + "`log(value)` print a message to console.\n\nSee [`console.log`](https://developer.mozilla.org/en-US/docs/Web/API/console/log)\non MDN.\n\n## Examples\n\n```rescript\nConsole.log(\"Hello\")\nlet obj = {\"name\": \"ReScript\", \"version\": 10}\nConsole.log(obj)\n```" + ], + "signature": "let log: 'a => unit" + }, + { + "id": "Core.Console.log2", + "kind": "value", + "name": "log2", + "docstrings": [ + "`log2(v1, v2)`. Like `log`, but with two arguments.\n\n## Examples\n\n```rescript\nConsole.log2(\"Hello\", \"World\")\nConsole.log2([1, 2, 3], '4')\n```" + ], + "signature": "let log2: ('a, 'b) => unit" + }, + { + "id": "Core.Console.log3", + "kind": "value", + "name": "log3", + "docstrings": [ + "`log3(v1, v2, v3)`. Like `log`, but with three arguments.\n\n## Examples\n\n```rescript\nConsole.log3(\"Hello\", \"World\", \"ReScript\")\nConsole.log3(\"One\", 2, #3)\n```" + ], + "signature": "let log3: ('a, 'b, 'c) => unit" + }, + { + "id": "Core.Console.log4", + "kind": "value", + "name": "log4", + "docstrings": [ + "`log4(v1, v2, v3, v4)`. Like `log`, but with four arguments.\n\n## Examples\n\n```rescript\nConsole.log4(\"Hello\", \"World\", \"ReScript\", \"!!!\")\nConsole.log4([1, 2], (3, 4), [#5, #6], #\"polyvar\")\n```" + ], + "signature": "let log4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Core.Console.log5", + "kind": "value", + "name": "log5", + "docstrings": [ + "`log5(v1, v2, v3, v4, v5)`. Like `log`, but with five arguments.\n\n## Examples\n\n```rescript\nConsole.log5(\"Hello\", \"World\", \"JS\", '!', '!')\nConsole.log5([1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"})\n```" + ], + "signature": "let log5: ('a, 'b, 'c, 'd, 'e) => unit" + }, + { + "id": "Core.Console.log6", + "kind": "value", + "name": "log6", + "docstrings": [ + "`log6(v1, v2, v3, v4, v5, v6)`. Like `log`, but with six arguments.\n\n## Examples\n\n```rescript\nConsole.log6(\"Hello\", \"World\", \"JS\", '!', '!', '?')\nConsole.log6([1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"}, 42)\n```" + ], + "signature": "let log6: ('a, 'b, 'c, 'd, 'e, 'f) => unit" + }, + { + "id": "Core.Console.logMany", + "kind": "value", + "name": "logMany", + "docstrings": [ + "`logMany(arr)`. Like `log`, but variadic.\n\n## Examples\n\n```rescript\nConsole.logMany([\"Hello\", \"World\"])\nConsole.logMany([1, 2, 3])\n```" + ], + "signature": "let logMany: array<'a> => unit" + }, + { + "id": "Core.Console.table", + "kind": "value", + "name": "table", + "docstrings": [ + "`table(object)` displays an tabular view of the object in the console.\n\nSee [`console.table`](https://developer.mozilla.org/en-US/docs/Web/API/console/table)\non MDN.\n\n## Examples\n\n```rescript\nConsole.table({\"language\": \"rescript\", \"version\": \"10.1.2\"})\n```" + ], + "signature": "let table: 'a => unit" + }, + { + "id": "Core.Console.time", + "kind": "value", + "name": "time", + "docstrings": [ + "`time(label)` creates a timer to measure how long an operation takes. `label`\nmust be a unique name. Call `console.timeEnd` with the same `label` to print\noutput time.\n\nSee [`console.time`](https://developer.mozilla.org/en-US/docs/Web/API/console/time)\non MDN.\n\n## Examples\n\n```rescript\nConsole.time(\"for_time\")\nfor x in 3 downto 1 {\n Console.log(x)\n Console.timeLog(\"for_time\")\n}\nConsole.timeEnd(\"for_time\")\n```" + ], + "signature": "let time: string => unit" + }, + { + "id": "Core.Console.timeEnd", + "kind": "value", + "name": "timeEnd", + "docstrings": [ + "`timeEnd(label)` stops a timer created by `time`.\n\nSee [`console.timeEnd`](https://developer.mozilla.org/en-US/docs/Web/API/console/timeEnd)\non MDN.\n\n## Examples\n\n```rescript\nConsole.time(\"for_time\")\nfor x in 3 downto 1 {\n Console.log(x)\n Console.timeLog(\"for_time\")\n}\nConsole.timeEnd(\"for_time\")\n```" + ], + "signature": "let timeEnd: string => unit" + }, + { + "id": "Core.Console.timeLog", + "kind": "value", + "name": "timeLog", + "docstrings": [ + "`timeLog(label)` prints the current elapsed time of the given timer to the console.\n\nSee [`console.timeLog`](https://developer.mozilla.org/en-US/docs/Web/API/console/timeLog)\non MDN.\n\n## Examples\n\n```rescript\nConsole.time(\"for_time\")\nfor x in 3 downto 1 {\n Console.log(x)\n Console.timeLog(\"for_time\")\n}\nConsole.timeEnd(\"for_time\")\n```" + ], + "signature": "let timeLog: string => unit" + }, + { + "id": "Core.Console.trace", + "kind": "value", + "name": "trace", + "docstrings": [ + "`trace()` print a stack trace to console.\n\nSee [`console.trace`](https://developer.mozilla.org/en-US/docs/Web/API/console/trace)\non MDN.\n\n## Examples\n\n```rescript\nlet main = () => {\n Console.trace()\n}\nmain()\n// In the console, the following trace will be displayed:\n// main\n// \n```" + ], + "signature": "let trace: unit => unit" + }, + { + "id": "Core.Console.warn", + "kind": "value", + "name": "warn", + "docstrings": [ + "`warn(value)` print a warning message to console.\n\nSee [`console.warn`](https://developer.mozilla.org/en-US/docs/Web/API/console/warn)\non MDN.\n\n## Examples\n\n```rescript\nConsole.warn(\"Warning\")\nConsole.warn((\"Warning\", \"invalid number\"))\n```" + ], + "signature": "let warn: 'a => unit" + }, + { + "id": "Core.Console.warn2", + "kind": "value", + "name": "warn2", + "docstrings": [ + "`warn2(v1, v2)`. Like `warn`, but two arguments.\n\n## Examples\n\n```rescript\nConsole.warn2(\"Hello\", \"World\")\nConsole.warn2([1, 2, 3], 4)\n```" + ], + "signature": "let warn2: ('a, 'b) => unit" + }, + { + "id": "Core.Console.warn3", + "kind": "value", + "name": "warn3", + "docstrings": [ + "`warn3(v1, v2, v3)`. Like `warn`, but three arguments.\n\n## Examples\n\n```rescript\nConsole.warn3(\"Hello\", \"World\", \"ReScript\")\nConsole.warn3([1, 2, 3], #4, #5)\n```" + ], + "signature": "let warn3: ('a, 'b, 'c) => unit" + }, + { + "id": "Core.Console.warn4", + "kind": "value", + "name": "warn4", + "docstrings": [ + "`warn4(v1, v2, v3, v4)`. Like `warn`, but with four arguments.\n\n## Examples\n\n```rescript\nConsole.warn4(\"Hello\", \"World\", \"ReScript\", \"!!!\")\nConsole.warn4(#first, #second, #third, (\"fourth\"))\n```" + ], + "signature": "let warn4: ('a, 'b, 'c, 'd) => unit" + }, + { + "id": "Core.Console.warn5", + "kind": "value", + "name": "warn5", + "docstrings": [ + "`warn5(v1, v2, v3, v4, v5)`. Like `warn`, but with five arguments.\n\n## Examples\n\n```rescript\nConsole.warn5(\"Hello\", \"World\", \"from\", \"JS\", \"!!!\")\nConsole.warn5([1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"})\n```" + ], + "signature": "let warn5: ('a, 'b, 'c, 'd, 'e) => unit" + }, + { + "id": "Core.Console.warn6", + "kind": "value", + "name": "warn6", + "docstrings": [ + "`warn6(v1, v2, v3, v4, v5, v6)`. Like `warn`, but with six arguments.\n\n## Examples\n\n```rescript\nConsole.warn6(\"Hello\", \"World\", \"from\", \"JS\", \"!!!\", '!')\nConsole.warn6([1, 2], (3, 4), [#5, #6], #\"polyvar\", {\"name\": \"ReScript\"}, 42)\n```" + ], + "signature": "let warn6: ('a, 'b, 'c, 'd, 'e, 'f) => unit" + }, + { + "id": "Core.Console.warnMany", + "kind": "value", + "name": "warnMany", + "docstrings": [ + "`warnMany(arr)`. Like `warn`, but variadic.\n\n## Examples\n\n```rescript\nConsole.warnMany([\"Hello\", \"World\"])\nConsole.warnMany([1, 2, 3])\n```" + ], + "signature": "let warnMany: array<'a> => unit" + } + ] + }, + "core/array": { + "id": "Core.Array", + "name": "Array", + "docstrings": [], + "items": [ + { + "id": "Core.Array.fromIterator", + "kind": "value", + "name": "fromIterator", + "docstrings": [ + "`fromIterator(iterator)`\n\n Creates an array from the provided `iterator`\n\n ```res example\n let map = Map.fromArray([(\"foo\", 1), (\"bar\", 2)])\n\n Array.fromIterator(map->Map.values) // [1, 2]\n ```" + ], + "signature": "let fromIterator: Core__Iterator.t<'a> => array<'a>" + }, + { + "id": "Core.Array.fromArrayLike", + "kind": "value", + "name": "fromArrayLike", + "docstrings": [], + "signature": "let fromArrayLike: Js.Array2.array_like<'a> => array<'a>" + }, + { + "id": "Core.Array.fromArrayLikeWithMap", + "kind": "value", + "name": "fromArrayLikeWithMap", + "docstrings": [], + "signature": "let fromArrayLikeWithMap: (Js.Array2.array_like<'a>, 'a => 'b) => array<'b>" + }, + { + "id": "Core.Array.make", + "kind": "value", + "name": "make", + "docstrings": [ + "`make(~length, init)`\n\n Creates an array of length `length` initialized with the value of `init`.\n\n ```res example\n Array.make(~length=3, #apple) == [#apple, #apple, #apple]\n ```" + ], + "signature": "let make: (~length: int, 'a) => array<'a>" + }, + { + "id": "Core.Array.fromInitializer", + "kind": "value", + "name": "fromInitializer", + "docstrings": [ + "`fromInitializer(~length, f)`\n\n Creates an array of length `length` initialized with the value returned from `f ` for each index.\n\n ```res example\n Array.fromInitializer(~length=3, i => i + 3) == [3, 4, 5]\n ```" + ], + "signature": "let fromInitializer: (~length: int, int => 'a) => array<'a>" + }, + { + "id": "Core.Array.equal", + "kind": "value", + "name": "equal", + "docstrings": [], + "signature": "let equal: (array<'a>, array<'a>, ('a, 'a) => bool) => bool" + }, + { + "id": "Core.Array.compare", + "kind": "value", + "name": "compare", + "docstrings": [], + "signature": "let compare: (\n array<'a>,\n array<'a>,\n ('a, 'a) => Core__Ordering.t,\n) => Core__Ordering.t" + }, + { + "id": "Core.Array.isArray", + "kind": "value", + "name": "isArray", + "docstrings": [], + "signature": "let isArray: 'a => bool" + }, + { + "id": "Core.Array.length", + "kind": "value", + "name": "length", + "docstrings": [ + "`length(array)` returns the length of (i.e. number of items in) the array.\n\nSee [`Array.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length) on MDN.\n\n## Examples\n```rescript\nlet someArray = [\"hi\", \"hello\"]\n\nConsole.log(someArray->Array.length) // 2\n```" + ], + "signature": "let length: array<'a> => int" + }, + { + "id": "Core.Array.copyAllWithin", + "kind": "value", + "name": "copyAllWithin", + "docstrings": [], + "signature": "let copyAllWithin: (array<'a>, ~target: int) => array<'a>" + }, + { + "id": "Core.Array.copyWithinToEnd", + "kind": "value", + "name": "copyWithinToEnd", + "docstrings": [], + "signature": "let copyWithinToEnd: (array<'a>, ~target: int, ~start: int) => array<'a>" + }, + { + "id": "Core.Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "docstrings": [], + "signature": "let copyWithin: (\n array<'a>,\n ~target: int,\n ~start: int,\n ~end: int,\n) => array<'a>" + }, + { + "id": "Core.Array.fillAll", + "kind": "value", + "name": "fillAll", + "docstrings": [ + "`fillAll(array, value)` fills the entire `array` with `value`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN.\n\n## Examples\n```rescript\nlet myArray = [1, 2, 3, 4]\nmyArray->Array.fillAll(9)\n\nConsole.log(myArray) // [9, 9, 9, 9]\n```" + ], + "signature": "let fillAll: (array<'a>, 'a) => unit" + }, + { + "id": "Core.Array.fillToEnd", + "kind": "value", + "name": "fillToEnd", + "docstrings": [ + "`fillToEnd(array, value, ~start)` fills `array` with `value` from the `start` index.\n\nBeware this will *mutate* the array.\n\nSee [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN.\n\n## Examples\n```rescript\nlet myArray = [1, 2, 3, 4]\nmyArray->Array.fillToEnd(9, ~start=1)\n\nConsole.log(myArray) // [1, 9, 9, 9]\n```" + ], + "signature": "let fillToEnd: (array<'a>, 'a, ~start: int) => unit" + }, + { + "id": "Core.Array.fill", + "kind": "value", + "name": "fill", + "docstrings": [ + "`fill(array, value, ~start, ~end)` fills `array` with `value` from `start` to `end`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill) on MDN.\n\n## Examples\n```rescript\nlet myArray = [1, 2, 3, 4]\nmyArray->Array.fill(9, ~start=1, ~end=2)\n\nConsole.log(myArray) // [1, 9, 9, 4]\n```" + ], + "signature": "let fill: (array<'a>, 'a, ~start: int, ~end: int) => unit" + }, + { + "id": "Core.Array.pop", + "kind": "value", + "name": "pop", + "docstrings": [ + "`pop(array)` removes the last item from `array` and returns it.\n\nBeware this will *mutate* the array.\n\nSee [`Array.pop`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop) on MDN.\n\n## Examples\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nlet lastItem = someArray->Array.pop // \"hello\"\n\nConsole.log(someArray) // [\"hi\"]. Notice last item is gone.\n```" + ], + "signature": "let pop: array<'a> => option<'a>" + }, + { + "id": "Core.Array.push", + "kind": "value", + "name": "push", + "docstrings": [ + "`push(array, item)` appends `item` to the end of `array`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) on MDN.\n\n## Examples\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.push(\"yay\")\n\nConsole.log(someArray) // [\"hi\", \"hello\", \"yay\"]\n```" + ], + "signature": "let push: (array<'a>, 'a) => unit" + }, + { + "id": "Core.Array.pushMany", + "kind": "value", + "name": "pushMany", + "docstrings": [ + "`pushMany(array, itemsArray)` appends many new items to the end of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push) on MDN.\n\n## Examples\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.pushMany([\"yay\", \"wehoo\"])\n\nConsole.log(someArray) // [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```" + ], + "signature": "let pushMany: (array<'a>, array<'a>) => unit" + }, + { + "id": "Core.Array.reverse", + "kind": "value", + "name": "reverse", + "docstrings": [ + "`reverse(array)` reverses the order of the items in `array`.\n\nBeware this will *mutate* the array.\n\nSee [`Array.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse) on MDN.\n\n## Examples\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.reverse\n\nConsole.log(someArray) // [\"hello\", \"h1\"]\n```" + ], + "signature": "let reverse: array<'a> => unit" + }, + { + "id": "Core.Array.shift", + "kind": "value", + "name": "shift", + "docstrings": [ + "`shift(array)` removes the first item in the array, and returns it.\n\nBeware this will *mutate* the array.\n\nSee [`Array.shift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift) on MDN.\n\n## Examples\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nlet lastItem = someArray->Array.shift // \"hi\"\n\nConsole.log(someArray) // [\"hello\"]. Notice first item is gone.\n```" + ], + "signature": "let shift: array<'a> => option<'a>" + }, + { + "id": "Core.Array.toSorted", + "kind": "value", + "name": "toSorted", + "docstrings": [ + "`toSorted(array, comparator)` returns a new, sorted array from `array`, using the `comparator` function.\n\nSee [`Array.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted) on MDN.\n\n## Examples\n```rescript\nlet someArray = [3, 2, 1]\nlet sorted = someArray->Array.toSorted(Int.compare)\n\nConsole.log(sorted) // [1, 2, 3]\nConsole.log(someArray) // [3, 2, 1]. Original unchanged\n```" + ], + "signature": "let toSorted: (array<'a>, ('a, 'a) => Core__Ordering.t) => array<'a>" + }, + { + "id": "Core.Array.sort", + "kind": "value", + "name": "sort", + "docstrings": [ + "`sort(array, comparator)` sorts `array` in-place using the `comparator` function.\n\nBeware this will *mutate* the array.\n\nSee [`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) on MDN.\n\n## Examples\n```rescript\nlet someArray = [3, 2, 1]\nsomeArray->Array.sort((a, b) => float(a - b))\n\nConsole.log(someArray) // [1, 2, 3]\n```" + ], + "signature": "let sort: (array<'a>, ('a, 'a) => Core__Ordering.t) => unit" + }, + { + "id": "Core.Array.splice", + "kind": "value", + "name": "splice", + "docstrings": [], + "signature": "let splice: (\n array<'a>,\n ~start: int,\n ~remove: int,\n ~insert: array<'a>,\n) => unit" + }, + { + "id": "Core.Array.toSpliced", + "kind": "value", + "name": "toSpliced", + "docstrings": [], + "signature": "let toSpliced: (\n array<'a>,\n ~start: int,\n ~remove: int,\n ~insert: array<'a>,\n) => array<'a>" + }, + { + "id": "Core.Array.with", + "kind": "value", + "name": "with", + "docstrings": [], + "signature": "let with: (array<'a>, int, 'a) => array<'a>" + }, + { + "id": "Core.Array.unshift", + "kind": "value", + "name": "unshift", + "docstrings": [ + "`unshift(array, item)` inserts a new item at the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.unshift`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshift(\"yay\")\n\nConsole.log(someArray) // [\"yay\", \"hi\", \"hello\"]\n```" + ], + "signature": "let unshift: (array<'a>, 'a) => unit" + }, + { + "id": "Core.Array.unshiftMany", + "kind": "value", + "name": "unshiftMany", + "docstrings": [ + "`unshiftMany(array, itemsArray)` inserts many new items to the start of the array.\n\nBeware this will *mutate* the array.\n\nSee [`Array.push`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) on MDN.\n\n## Examples\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nsomeArray->Array.unshiftMany([\"yay\", \"wehoo\"])\n\nConsole.log(someArray) // [\"yay\", \"wehoo\", \"hi\", \"hello\"]\n```" + ], + "signature": "let unshiftMany: (array<'a>, array<'a>) => unit" + }, + { + "id": "Core.Array.concat", + "kind": "value", + "name": "concat", + "docstrings": [ + "`concat(array1, array2)` concatenates the two arrays, creating a new array.\n\nSee [`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) on MDN.\n\n## Examples\n```rescript\nlet array1 = [\"hi\", \"hello\"]\nlet array2 = [\"yay\", \"wehoo\"]\n\nlet someArray = array1->Array.concat(array2)\n\nConsole.log(someArray) // [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```" + ], + "signature": "let concat: (array<'a>, array<'a>) => array<'a>" + }, + { + "id": "Core.Array.concatMany", + "kind": "value", + "name": "concatMany", + "docstrings": [ + "`concatMany(array1, arrays)` concatenates array1 with several other arrays, creating a new array.\n\nSee [`Array.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) on MDN.\n\n## Examples\n```rescript\nlet array1 = [\"hi\", \"hello\"]\nlet array2 = [\"yay\"]\nlet array3 = [\"wehoo\"]\n\nlet someArray = array1->Array.concatMany([array2, array3])\n\nConsole.log(someArray) // [\"hi\", \"hello\", \"yay\", \"wehoo\"]\n```" + ], + "signature": "let concatMany: (array<'a>, array>) => array<'a>" + }, + { + "id": "Core.Array.flat", + "kind": "value", + "name": "flat", + "docstrings": [ + "`flat(arrays)` concatenates an array of arrays into a single array.\n\nSee [`Array.flat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) on MDN.\n\n## Examples\n```rescript\nConsole.log([[1], [2], [3, 4]]->Array.flat) // [1, 2, 3, 4]\n```" + ], + "signature": "let flat: array> => array<'a>" + }, + { + "id": "Core.Array.includes", + "kind": "value", + "name": "includes", + "docstrings": [ + "`includes(array, item)` checks whether `array` includes `item`, by doing a [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality).\n\nSee [`Array.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes) on MDN.\n\n## Examples\n```rescript\nConsole.log([1, 2]->Array.includes(1)) // true\nConsole.log([1, 2]->Array.includes(3)) // false\nConsole.log([{\"language\": \"ReScript\"}]->Array.includes({\"language\": \"ReScript\"})) // false, because of strict equality\n```" + ], + "signature": "let includes: (array<'a>, 'a) => bool" + }, + { + "id": "Core.Array.indexOf", + "kind": "value", + "name": "indexOf", + "docstrings": [ + "`indexOf(array, item)` returns the index of the provided `item` in `array`. Uses [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality) when comparing items.\n\nReturns `-1` if the item doesn not exist. Check out `Array.indexOfOpt` for a version that returns `None` instead of `-1` if the item does not exist.\n\nSee [`Array.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) on MDN.\n\n## Examples\n```rescript\nConsole.log([1, 2]->Array.indexOf(2)) // 1\nConsole.log([1, 2]->Array.indexOf(3)) // -1\nConsole.log([{\"language\": \"ReScript\"}]->Array.indexOf({\"language\": \"ReScript\"})) // -1, because of strict equality\n```" + ], + "signature": "let indexOf: (array<'a>, 'a) => int" + }, + { + "id": "Core.Array.indexOfOpt", + "kind": "value", + "name": "indexOfOpt", + "docstrings": [ + "`indexOfOpt(array, item)` returns an option of the index of the provided `item` in `array`. Uses [strict check for equality](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality) when comparing items.\n\nSee [`Array.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) on MDN.\n\n## Examples\n```rescript\nConsole.log([1, 2]->Array.indexOfOpt(2)) // Some(1)\nConsole.log([1, 2]->Array.indexOfOpt(3)) // None\nConsole.log([{\"language\": \"ReScript\"}]->Array.indexOfOpt({\"language\": \"ReScript\"})) // None, because of strict equality\n```" + ], + "signature": "let indexOfOpt: (array<'a>, 'a) => option" + }, + { + "id": "Core.Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "docstrings": [], + "signature": "let indexOfFrom: (array<'a>, 'a, int) => int" + }, + { + "id": "Core.Array.join", + "kind": "value", + "name": "join", + "docstrings": [ + "`join(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Array items must be strings, to join number or other arrays, use `joinUnsafe`. Under the hood this will run JavaScript's `toString` on all the array items.\n\nSee [Array.join](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join)\n\n## Examples\n```rescript\nlet array = [\"One\", \"Two\", \"Three\"]\n\nConsole.log(array->Array.join(\" -- \")) // One -- Two -- Three\n```" + ], + "signature": "let join: (array, string) => string" + }, + { + "id": "Core.Array.joinWith", + "kind": "value", + "name": "joinWith", + "docstrings": [ + "`joinWith(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Array items must be strings, to join number or other arrays, use `joinWithUnsafe`. Under the hood this will run JavaScript's `toString` on all the array items.\n\n## Examples\n```rescript\nlet array = [\"One\", \"Two\", \"Three\"]\n\nConsole.log(array->Array.joinWith(\" -- \")) // One -- Two -- Three\n```" + ], + "signature": "let joinWith: (array, string) => string", + "deprecated": "Use `join` instead" + }, + { + "id": "Core.Array.joinUnsafe", + "kind": "value", + "name": "joinUnsafe", + "docstrings": [ + "`joinUnsafe(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Under the hood this will run JavaScript's `toString` on all the array items.\n\nSee [Array.join](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join)\n\n## Examples\n```rescript\nlet array = [1, 2, 3]\n\nConsole.log(array->Array.joinUnsafe(\" -- \")) // 1 -- 2 -- 3\n```" + ], + "signature": "let joinUnsafe: (array<'a>, string) => string" + }, + { + "id": "Core.Array.joinWithUnsafe", + "kind": "value", + "name": "joinWithUnsafe", + "docstrings": [ + "`joinWithUnsafe(array, separator)` produces a string where all items of `array` are printed, separated by `separator`. Under the hood this will run JavaScript's `toString` on all the array items.\n\n## Examples\n```rescript\nlet array = [1, 2, 3]\n\nConsole.log(array->Array.joinWithUnsafe(\" -- \")) // 1 -- 2 -- 3\n```" + ], + "signature": "let joinWithUnsafe: (array<'a>, string) => string", + "deprecated": "Use `joinUnsafe` instead" + }, + { + "id": "Core.Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "docstrings": [], + "signature": "let lastIndexOf: (array<'a>, 'a) => int" + }, + { + "id": "Core.Array.lastIndexOfOpt", + "kind": "value", + "name": "lastIndexOfOpt", + "docstrings": [], + "signature": "let lastIndexOfOpt: (array<'a>, 'a) => option" + }, + { + "id": "Core.Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "docstrings": [], + "signature": "let lastIndexOfFrom: (array<'a>, 'a, int) => int" + }, + { + "id": "Core.Array.slice", + "kind": "value", + "name": "slice", + "docstrings": [ + "`slice(array, ~start, ~end)` creates a new array of items copied from `array` from `start` until (but not including) `end`.\n\nSee [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) on MDN.\n\n## Examples\n```rescript\nlet myArray = [1, 2, 3, 4]\n\nConsole.log(myArray->Array.slice(~start=1, ~end=3)) // [2, 3]\n```" + ], + "signature": "let slice: (array<'a>, ~start: int, ~end: int) => array<'a>" + }, + { + "id": "Core.Array.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "docstrings": [ + "`sliceToEnd(array, start)` creates a new array from `array`, with all items from `array` starting from `start`.\n\nSee [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) on MDN.\n\n## Examples\n```rescript\nlet myArray = [1, 2, 3, 4]\n\nConsole.log(myArray->Array.sliceToEnd(~start=1)) // [2, 3, 4]\n```" + ], + "signature": "let sliceToEnd: (array<'a>, ~start: int) => array<'a>" + }, + { + "id": "Core.Array.copy", + "kind": "value", + "name": "copy", + "docstrings": [ + "`copy(array)` makes a copy of the array with the items in it, but does not make copies of the items themselves.\n\n## Examples\n```rescript\nlet myArray = [1, 2, 3]\nlet copyOfMyArray = myArray->Array.copy\n\nConsole.log(copyOfMyArray) // [1, 2, 3]\nConsole.log(myArray === copyOfMyArray) // false\n```" + ], + "signature": "let copy: array<'a> => array<'a>" + }, + { + "id": "Core.Array.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "`toString(array)` stringifies `array` by running `toString` on all of the array elements and joining them with \",\".\n\nSee [`Array.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString) on MDN.\n\n## Examples\n```rescript\nlet array = [1, 2, 3, 4]\n\nConsole.log(array->Array.toString) // \"1,2,3,4\"\n```" + ], + "signature": "let toString: array<'a> => string" + }, + { + "id": "Core.Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [], + "signature": "let toLocaleString: array<'a> => string" + }, + { + "id": "Core.Array.every", + "kind": "value", + "name": "every", + "docstrings": [ + "`every(array, predicate)` returns true if `predicate` returns true for all items in `array`.\n\nSee [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN.\n\n## Examples\n```rescript\nlet array = [1, 2, 3, 4]\n\nConsole.log(array->Array.every(num => num <= 4)) // true\nConsole.log(array->Array.every(num => num === 1)) // false\n```" + ], + "signature": "let every: (array<'a>, 'a => bool) => bool" + }, + { + "id": "Core.Array.everyWithIndex", + "kind": "value", + "name": "everyWithIndex", + "docstrings": [ + "`everyWithIndex(array, checker)` returns true if all items in `array` returns true when running the provided `checker` function.\n\nSee [`Array.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) on MDN.\n\n## Examples\n```rescript\nlet array = [1, 2, 3, 4]\n\nConsole.log(array->Array.everyWithIndex((num, index) => index < 2 && num <= 2)) // true\nConsole.log(array->Array.everyWithIndex((num, index) => index < 2 && num >= 2)) // false\n```" + ], + "signature": "let everyWithIndex: (array<'a>, ('a, int) => bool) => bool" + }, + { + "id": "Core.Array.filter", + "kind": "value", + "name": "filter", + "docstrings": [ + "`filter(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n```rescript\nlet array = [1, 2, 3, 4]\n\nConsole.log(array->Array.filter(num => num > 2)) // [3, 4]\n```" + ], + "signature": "let filter: (array<'a>, 'a => bool) => array<'a>" + }, + { + "id": "Core.Array.filterWithIndex", + "kind": "value", + "name": "filterWithIndex", + "docstrings": [ + "`filterWithIndex(array, checker)` returns a new array containing all elements from `array` for which the provided `checker` function returns true.\n\nSee [`Array.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) on MDN.\n\n## Examples\n```rescript\nlet array = [1, 2, 3, 4]\n\nConsole.log(array->Array.filterWithIndex((num, index) => index === 0 || num === 2)) // [1, 2]\n```" + ], + "signature": "let filterWithIndex: (array<'a>, ('a, int) => bool) => array<'a>" + }, + { + "id": "Core.Array.find", + "kind": "value", + "name": "find", + "docstrings": [ + "`find(array, checker)` returns the first element of `array` where the provided `checker` function returns true.\n\nSee [`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) on MDN.\n\n## Examples\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\nswitch array->Array.find(item => item == ReScript) {\n| None => Console.log(\"No item...\")\n| Some(_) => Console.log(\"Yay, ReScript!\")\n}\n```" + ], + "signature": "let find: (array<'a>, 'a => bool) => option<'a>" + }, + { + "id": "Core.Array.findWithIndex", + "kind": "value", + "name": "findWithIndex", + "docstrings": [ + "`findWithIndex(array, checker)` returns the first element of `array` where the provided `checker` function returns true.\n\nSee [`Array.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) on MDN.\n\n## Examples\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [TypeScript, JavaScript, ReScript]\n\nswitch array->Array.findWithIndex((item, index) => index > 1 && item == ReScript) {\n| None => Console.log(\"No item...\")\n| Some(_) => Console.log(\"Yay, ReScript exists in a later position!\")\n}\n```" + ], + "signature": "let findWithIndex: (array<'a>, ('a, int) => bool) => option<'a>" + }, + { + "id": "Core.Array.findIndex", + "kind": "value", + "name": "findIndex", + "docstrings": [ + "`findIndex(array, checker)` returns the index of the first element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) on MDN.\n\n## Examples\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript]\n\nConsole.log(array->Array.findIndex(item => item == ReScript)) // 0\nConsole.log(array->Array.findIndex(item => item == TypeScript)) // -1\n```" + ], + "signature": "let findIndex: (array<'a>, 'a => bool) => int" + }, + { + "id": "Core.Array.findIndexWithIndex", + "kind": "value", + "name": "findIndexWithIndex", + "docstrings": [ + "`findIndexWithIndex(array, checker)` returns the index of the first element of `array` where the provided `checker` function returns true.\n\nReturns `-1` if the item does not exist. Consider using `Array.findIndexOpt` if you want an option instead (where `-1` would be `None`).\n\nSee [`Array.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) on MDN.\n\n## Examples\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, JavaScript]\n\nlet isReScriptFirst = array->Array.findIndexWithIndex((item, index) => index === 0 && item == ReScript)\nlet isTypeScriptFirst = array->Array.findIndexWithIndex((item, index) => index === 0 && item == TypeScript)\n\nConsole.log(isReScriptFirst) // 0\nConsole.log(isTypeScriptFirst) // -1\n```" + ], + "signature": "let findIndexWithIndex: (array<'a>, ('a, int) => bool) => int" + }, + { + "id": "Core.Array.forEach", + "kind": "value", + "name": "forEach", + "docstrings": [ + "`forEach(array, fn)` runs the provided `fn` on every element of `array`.\n\nSee [`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) on MDN.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.forEach(item => {\n Console.log(item)\n})\n```" + ], + "signature": "let forEach: (array<'a>, 'a => unit) => unit" + }, + { + "id": "Core.Array.forEachWithIndex", + "kind": "value", + "name": "forEachWithIndex", + "docstrings": [ + "`forEachWithIndex(array, fn)` runs the provided `fn` on every element of `array`.\n\nSee [`Array.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) on MDN.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.forEachWithIndex((item, index) => {\n Console.log(\"At item \" ++ Int.toString(index) ++ \": \" ++ item)\n})\n```" + ], + "signature": "let forEachWithIndex: (array<'a>, ('a, int) => unit) => unit" + }, + { + "id": "Core.Array.map", + "kind": "value", + "name": "map", + "docstrings": [ + "`map(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray = array->Array.map(greeting => greeting ++ \" to you\")\n\nConsole.log(mappedArray) // [\"Hello to you\", \"Hi to you\", \"Good bye to you\"]\n```" + ], + "signature": "let map: (array<'a>, 'a => 'b) => array<'b>" + }, + { + "id": "Core.Array.mapWithIndex", + "kind": "value", + "name": "mapWithIndex", + "docstrings": [ + "`mapWithIndex(array, fn)` returns a new array with all elements from `array`, each element transformed using the provided `fn`.\n\nSee [`Array.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on MDN.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet mappedArray =\n array->Array.mapWithIndex((greeting, index) =>\n greeting ++ \" at position \" ++ Int.toString(index)\n )\n\nConsole.log(mappedArray) // [\"Hello at position 0\", \"Hi at position 1\", \"Good bye at position 2\"]\n```" + ], + "signature": "let mapWithIndex: (array<'a>, ('a, int) => 'b) => array<'b>" + }, + { + "id": "Core.Array.reduce", + "kind": "value", + "name": "reduce", + "docstrings": [ + "`reduce(xs, init, fn)`\n\n Applies `fn` to each element of `xs` from beginning to end. Function `fn` 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 ```res example\n Array.reduce([2, 3, 4], 1, (a, b) => a + b) == 10\n\n Array.reduce([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"abcd\"\n ```" + ], + "signature": "let reduce: (array<'a>, 'b, ('b, 'a) => 'b) => 'b" + }, + { + "id": "Core.Array.reduceWithIndex", + "kind": "value", + "name": "reduceWithIndex", + "docstrings": [ + "`reduceWithIndex(x, init, fn)`\n\n Applies `fn` to each element of `xs` from beginning to end. Function `fn` 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 ```res example\n Array.reduceWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16\n ```" + ], + "signature": "let reduceWithIndex: (array<'a>, 'b, ('b, 'a, int) => 'b) => 'b" + }, + { + "id": "Core.Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "docstrings": [ + "`reduceRight(xs, init, fn)`\n\n Works like `Array.reduce`; except that function `fn` is applied to each item of `xs` from the last back to the first.\n\n ```res example\n Array.reduceRight([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"dcba\"\n ```" + ], + "signature": "let reduceRight: (array<'a>, 'b, ('b, 'a) => 'b) => 'b" + }, + { + "id": "Core.Array.reduceRightWithIndex", + "kind": "value", + "name": "reduceRightWithIndex", + "docstrings": [ + "`reduceRightWithIndex(xs, init, fn)`\n\n Like `reduceRight`, but with an additional index argument on the callback function.\n\n ```res example\n Array.reduceRightWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16\n ```" + ], + "signature": "let reduceRightWithIndex: (array<'a>, 'b, ('b, 'a, int) => 'b) => 'b" + }, + { + "id": "Core.Array.some", + "kind": "value", + "name": "some", + "docstrings": [ + "`some(array, predicate)` returns true if `predicate` returns true for any element in `array`.\n\nSee [`Array.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) on MDN.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\nConsole.log(array->Array.some(greeting => greeting === \"Hello\")) // true\n```" + ], + "signature": "let some: (array<'a>, 'a => bool) => bool" + }, + { + "id": "Core.Array.someWithIndex", + "kind": "value", + "name": "someWithIndex", + "docstrings": [ + "`someWithIndex(array, checker)` returns true if running the provided `checker` function on any element in `array` returns true.\n\nSee [`Array.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) on MDN.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\nConsole.log(array->Array.someWithIndex((greeting, index) => greeting === \"Hello\" && index === 0)) // true\n```" + ], + "signature": "let someWithIndex: (array<'a>, ('a, int) => bool) => bool" + }, + { + "id": "Core.Array.get", + "kind": "value", + "name": "get", + "docstrings": [ + "`get(array, index)` returns the element at `index` of `array`.\n\nReturns `None` if the index does not exist in the array. Equivalent to doing `array[index]` in JavaScript.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.get(0) == Some(\"Hello\") // true\narray->Array.get(3) == None // true\n```" + ], + "signature": "let get: (array<'a>, int) => option<'a>" + }, + { + "id": "Core.Array.set", + "kind": "value", + "name": "set", + "docstrings": [ + "`set(array, index, item)` sets the provided `item` at `index` of `array`.\n\nBeware this will *mutate* the array.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\narray->Array.set(1, \"Hello\")\n\nConsole.log(array[1]) // \"Hello\"\n```" + ], + "signature": "let set: (array<'a>, int, 'a) => unit" + }, + { + "id": "Core.Array.getSymbol", + "kind": "value", + "name": "getSymbol", + "docstrings": [], + "signature": "let getSymbol: (array<'a>, Core__Symbol.t) => option<'b>" + }, + { + "id": "Core.Array.getSymbolUnsafe", + "kind": "value", + "name": "getSymbolUnsafe", + "docstrings": [], + "signature": "let getSymbolUnsafe: (array<'a>, Core__Symbol.t) => 'b" + }, + { + "id": "Core.Array.setSymbol", + "kind": "value", + "name": "setSymbol", + "docstrings": [], + "signature": "let setSymbol: (array<'a>, Core__Symbol.t, 'b) => unit" + }, + { + "id": "Core.Array.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "docstrings": [ + "`getUnsafe(array, index)` returns the element at `index` of `array`.\n\nThis is _unsafe_, meaning it will return `undefined` value if `index` does not exist in `array`.\n\nUse `Array.getUnsafe` only when you are sure the `index` exists (i.e. when using for-loop).\n\n## Examples\n```rescript\nlet array = [1, 2, 3]\nfor index in 0 to array->Array.length - 1 {\n let value = array->Array.getUnsafe(index)\n Console.log(value)\n}\n```" + ], + "signature": "let getUnsafe: (array<'a>, int) => 'a" + }, + { + "id": "Core.Array.setUnsafe", + "kind": "value", + "name": "setUnsafe", + "docstrings": [ + "`setUnsafe(array, index, item)` sets the provided `item` at `index` of `array`.\n\nBeware this will *mutate* the array, and is *unsafe*.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\narray->Array.setUnsafe(1, \"Hello\")\n\nConsole.log(array[1]) // \"Hello\"\n```" + ], + "signature": "let setUnsafe: (array<'a>, int, 'a) => unit" + }, + { + "id": "Core.Array.findIndexOpt", + "kind": "value", + "name": "findIndexOpt", + "docstrings": [ + "`findIndexOpt(array, checker)` returns the index of the first element of `array` where the provided `checker` function returns true.\n\nReturns `None` if no item matches.\n\nSee [`Array.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) on MDN.\n\n## Examples\n```rescript\ntype languages = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\nswitch array->Array.findIndexOpt(item => item == ReScript) {\n| None => Console.log(\"Ahh, no ReScript...\")\n| Some(index) => Console.log(\"Yay, ReScript at index \" ++ Int.toString(index))\n}\n```" + ], + "signature": "let findIndexOpt: (array<'a>, 'a => bool) => option" + }, + { + "id": "Core.Array.toReversed", + "kind": "value", + "name": "toReversed", + "docstrings": [ + "`toReversed(array)` creates a new array with all items from `array` in reversed order.\n\nSee [`Array.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toReversed) on MDN.\n\n## Examples\n```rescript\nlet someArray = [\"hi\", \"hello\"]\nlet reversed = someArray->Array.toReversed\n\nConsole.log(reversed) // [\"hello\", \"h1\"]\nConsole.log(someArray) // [\"h1\", \"hello\"]. Original unchanged\n```" + ], + "signature": "let toReversed: array<'a> => array<'a>" + }, + { + "id": "Core.Array.filterMap", + "kind": "value", + "name": "filterMap", + "docstrings": [ + "`filterMap(array, fn)`\n\nCalls `fn` for each element and returns a new array containing results of the `fn` calls which are not `None`.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\nConsole.log(\n array->Array.filterMap(item =>\n switch item {\n | \"Hello\" => Some(item->String.length)\n | _ => None\n }\n ),\n) // [5]\n```" + ], + "signature": "let filterMap: (array<'a>, 'a => option<'b>) => array<'b>" + }, + { + "id": "Core.Array.keepSome", + "kind": "value", + "name": "keepSome", + "docstrings": [ + "`keepSome(arr)`\n\n Returns a new array containing `value` for all elements that are `Some(value)`\n and ignoring every value that is `None`\n\n ```res example\n Array.keepSome([Some(1), None, Some(3)]) == [1, 3]\n ```" + ], + "signature": "let keepSome: array> => array<'a>" + }, + { + "id": "Core.Array.toShuffled", + "kind": "value", + "name": "toShuffled", + "docstrings": [ + "`toShuffled(array)` returns a new array with all items in `array` in a random order.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\nlet shuffledArray = array->Array.toShuffled\n\nConsole.log(shuffledArray)\n```" + ], + "signature": "let toShuffled: array<'a> => array<'a>" + }, + { + "id": "Core.Array.shuffle", + "kind": "value", + "name": "shuffle", + "docstrings": [ + "`shuffle(array)` randomizes the position of all items in `array`.\n\nBeware this will *mutate* the array.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\narray->Array.shuffle\n\nConsole.log(array)\n```" + ], + "signature": "let shuffle: array<'a> => unit" + }, + { + "id": "Core.Array.flatMap", + "kind": "value", + "name": "flatMap", + "docstrings": [ + "`flatMap(array, mapper)` returns a new array concatenating the arrays returned from running `mapper` on all items in `array`.\n\n## Examples\n```rescript\ntype language = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\nConsole.log(\n array->Array.flatMap(item =>\n switch item {\n | ReScript => [1, 2, 3]\n | TypeScript => [4, 5, 6]\n | JavaScript => [7, 8, 9]\n }\n ),\n)\n// [1, 2, 3, 4, 5, 6, 7, 8, 9]\n```" + ], + "signature": "let flatMap: (array<'a>, 'a => array<'b>) => array<'b>" + }, + { + "id": "Core.Array.flatMapWithIndex", + "kind": "value", + "name": "flatMapWithIndex", + "docstrings": [ + "`flatMapWithIndex(array, mapper)` returns a new array concatenating the arrays returned from running `mapper` on all items in `array`.\n\n## Examples\n```rescript\ntype language = ReScript | TypeScript | JavaScript\n\nlet array = [ReScript, TypeScript, JavaScript]\n\nConsole.log(\n array->Array.flatMapWithIndex((item, index) =>\n switch item {\n | ReScript => [index]\n | TypeScript => [index, index + 1]\n | JavaScript => [index, index + 1, index + 2]\n }\n ),\n)\n// [0, 1, 2, 2, 3, 4]\n```" + ], + "signature": "let flatMapWithIndex: (array<'a>, ('a, int) => array<'b>) => array<'b>" + }, + { + "id": "Core.Array.findMap", + "kind": "value", + "name": "findMap", + "docstrings": [ + "`findMap(arr, fn)`\n\n Calls `fn` for each element and returns the first value from `fn` that is `Some(_)`.\n Otherwise returns `None`\n\n ```res example\n Array.findMap([1, 2, 3], n => mod(n, 2) == 0 ? Some(n - 2) : None) == Some(0) // true\n ```" + ], + "signature": "let findMap: (array<'a>, 'a => option<'b>) => option<'b>" + }, + { + "id": "Core.Array.at", + "kind": "value", + "name": "at", + "docstrings": [ + "`at(array, index)`\n\n Get an element by its index. Negative indices count backwards from the last item.\n\n ## Examples\n ```rescript\n [\"a\", \"b\", \"c\"]->Array.at(0) // Some(\"a\")\n [\"a\", \"b\", \"c\"]->Array.at(2) // Some(\"c\")\n [\"a\", \"b\", \"c\"]->Array.at(3) // None\n [\"a\", \"b\", \"c\"]->Array.at(-1) // Some(\"c\")\n [\"a\", \"b\", \"c\"]->Array.at(-3) // Some(\"a\")\n [\"a\", \"b\", \"c\"]->Array.at(-4) // None\n ```" + ], + "signature": "let at: (array<'a>, int) => option<'a>" + }, + { + "id": "Core.Array.last", + "kind": "value", + "name": "last", + "docstrings": [ + "`last(array)` returns the last element of `array`.\n\nReturns `None` if the array is empty.\n\n## Examples\n```rescript\nlet array = [\"Hello\", \"Hi\", \"Good bye\"]\n\narray->Array.last == Some(\"Good bye\") // true\n[]->Array.last == None // true\n```" + ], + "signature": "let last: array<'a> => option<'a>" + } + ] + } +} \ No newline at end of file diff --git a/data/api/v12.0.0/dom.json b/data/api/v12.0.0/dom.json new file mode 100644 index 000000000..3d1372099 --- /dev/null +++ b/data/api/v12.0.0/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<\n _htmlAnchorElement,\n>" + }, + { + "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<\n _htmlButtonElement,\n>" + }, + { + "id": "Dom._htmlCanvasElement", + "kind": "type", + "name": "_htmlCanvasElement", + "docstrings": [], + "signature": "type _htmlCanvasElement" + }, + { + "id": "Dom.htmlCanvasElement", + "kind": "type", + "name": "htmlCanvasElement", + "docstrings": [], + "signature": "type htmlCanvasElement = htmlElement_like<\n _htmlCanvasElement,\n>" + }, + { + "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<\n _htmlDataListElement,\n>" + }, + { + "id": "Dom._htmlDialogElement", + "kind": "type", + "name": "_htmlDialogElement", + "docstrings": [], + "signature": "type _htmlDialogElement" + }, + { + "id": "Dom.htmlDialogElement", + "kind": "type", + "name": "htmlDialogElement", + "docstrings": [], + "signature": "type htmlDialogElement = htmlElement_like<\n _htmlDialogElement,\n>" + }, + { + "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<\n _htmlFieldSetElement,\n>" + }, + { + "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<\n _htmlHeadingElement,\n>" + }, + { + "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<\n _htmlIframeElement,\n>" + }, + { + "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<\n _htmlLegendElement,\n>" + }, + { + "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<\n _htmlObjectElement,\n>" + }, + { + "id": "Dom._htmlOptGroupElement", + "kind": "type", + "name": "_htmlOptGroupElement", + "docstrings": [], + "signature": "type _htmlOptGroupElement" + }, + { + "id": "Dom.htmlOptGroupElement", + "kind": "type", + "name": "htmlOptGroupElement", + "docstrings": [], + "signature": "type htmlOptGroupElement = htmlElement_like<\n _htmlOptGroupElement,\n>" + }, + { + "id": "Dom._htmlOptionElement", + "kind": "type", + "name": "_htmlOptionElement", + "docstrings": [], + "signature": "type _htmlOptionElement" + }, + { + "id": "Dom.htmlOptionElement", + "kind": "type", + "name": "htmlOptionElement", + "docstrings": [], + "signature": "type htmlOptionElement = htmlElement_like<\n _htmlOptionElement,\n>" + }, + { + "id": "Dom._htmlOutputElement", + "kind": "type", + "name": "_htmlOutputElement", + "docstrings": [], + "signature": "type _htmlOutputElement" + }, + { + "id": "Dom.htmlOutputElement", + "kind": "type", + "name": "htmlOutputElement", + "docstrings": [], + "signature": "type htmlOutputElement = htmlElement_like<\n _htmlOutputElement,\n>" + }, + { + "id": "Dom._htmlParagraphElement", + "kind": "type", + "name": "_htmlParagraphElement", + "docstrings": [], + "signature": "type _htmlParagraphElement" + }, + { + "id": "Dom.htmlParagraphElement", + "kind": "type", + "name": "htmlParagraphElement", + "docstrings": [], + "signature": "type htmlParagraphElement = htmlElement_like<\n _htmlParagraphElement,\n>" + }, + { + "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<\n _htmlProgressElement,\n>" + }, + { + "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<\n _htmlScriptElement,\n>" + }, + { + "id": "Dom._htmlSelectElement", + "kind": "type", + "name": "_htmlSelectElement", + "docstrings": [], + "signature": "type _htmlSelectElement" + }, + { + "id": "Dom.htmlSelectElement", + "kind": "type", + "name": "htmlSelectElement", + "docstrings": [], + "signature": "type htmlSelectElement = htmlElement_like<\n _htmlSelectElement,\n>" + }, + { + "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<\n _htmlSourceElement,\n>" + }, + { + "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<\n _htmlTableCaptionElement,\n>" + }, + { + "id": "Dom._htmlTableCellElement", + "kind": "type", + "name": "_htmlTableCellElement", + "docstrings": [], + "signature": "type _htmlTableCellElement" + }, + { + "id": "Dom.htmlTableCellElement", + "kind": "type", + "name": "htmlTableCellElement", + "docstrings": [], + "signature": "type htmlTableCellElement = htmlElement_like<\n _htmlTableCellElement,\n>" + }, + { + "id": "Dom._htmlTableColElement", + "kind": "type", + "name": "_htmlTableColElement", + "docstrings": [], + "signature": "type _htmlTableColElement" + }, + { + "id": "Dom.htmlTableColElement", + "kind": "type", + "name": "htmlTableColElement", + "docstrings": [], + "signature": "type htmlTableColElement = htmlElement_like<\n _htmlTableColElement,\n>" + }, + { + "id": "Dom._htmlTableDataCellElement", + "kind": "type", + "name": "_htmlTableDataCellElement", + "docstrings": [], + "signature": "type _htmlTableDataCellElement" + }, + { + "id": "Dom.htmlTableDataCellElement", + "kind": "type", + "name": "htmlTableDataCellElement", + "docstrings": [], + "signature": "type htmlTableDataCellElement = htmlElement_like<\n _htmlTableDataCellElement,\n>" + }, + { + "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<\n _htmlTableHeaderCellElement,\n>" + }, + { + "id": "Dom._htmlTableRowElement", + "kind": "type", + "name": "_htmlTableRowElement", + "docstrings": [], + "signature": "type _htmlTableRowElement" + }, + { + "id": "Dom.htmlTableRowElement", + "kind": "type", + "name": "htmlTableRowElement", + "docstrings": [], + "signature": "type htmlTableRowElement = htmlElement_like<\n _htmlTableRowElement,\n>" + }, + { + "id": "Dom._htmlTableSectionElement", + "kind": "type", + "name": "_htmlTableSectionElement", + "docstrings": [], + "signature": "type _htmlTableSectionElement" + }, + { + "id": "Dom.htmlTableSectionElement", + "kind": "type", + "name": "htmlTableSectionElement", + "docstrings": [], + "signature": "type htmlTableSectionElement = htmlElement_like<\n _htmlTableSectionElement,\n>" + }, + { + "id": "Dom._htmlTextAreaElement", + "kind": "type", + "name": "_htmlTextAreaElement", + "docstrings": [], + "signature": "type _htmlTextAreaElement" + }, + { + "id": "Dom.htmlTextAreaElement", + "kind": "type", + "name": "htmlTextAreaElement", + "docstrings": [], + "signature": "type htmlTextAreaElement = htmlElement_like<\n _htmlTextAreaElement,\n>" + }, + { + "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<\n _htmlUnknownElement,\n>" + }, + { + "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<\n _idbVersionChangeEvent,\n>" + }, + { + "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/api/v12.0.0/js.json b/data/api/v12.0.0/js.json new file mode 100644 index 000000000..c9b052ef9 --- /dev/null +++ b/data/api/v12.0.0/js.json @@ -0,0 +1,14987 @@ +{ + "js": { + "id": "Js", + "name": "Js", + "docstrings": [ + "The Js module mostly contains ReScript bindings to _standard JavaScript APIs_\nlike [console.log](https://developer.mozilla.org/en-US/docs/Web/API/Console/log),\nor 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)\nclasses.\n\nIt 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/array2) over [Belt.Array](belt/array)\n\n## Argument Order\n\nFor historical reasons, some APIs in the Js namespace (e.g. [Js.String](js/string)) are\nusing the data-last argument order whereas others (e.g. [Js.Date](js/date)) are using data-first.\n\nFor 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\nIn the meantime, there are several options for dealing with the data-last APIs:\n\n## Examples\n\n```rescript\n/* Js.String (data-last API used with pipe last operator) */\nJs.log(\"2019-11-10\" |> Js.String.split(\"-\"))\nJs.log(\"ReScript\" |> Js.String.startsWith(\"Re\"))\n\n/* Js.String (data-last API used with pipe first operator) */\nJs.log(\"2019-11-10\"->Js.String.split(\"-\", _))\nJs.log(\"ReScript\"->Js.String.startsWith(\"Re\", _))\n\n/* Js.String (data-last API used without any piping) */\nJs.log(Js.String.split(\"-\", \"2019-11-10\"))\nJs.log(Js.String.startsWith(\"Re\", \"ReScript\"))\n```\n## Js.Xxx2 Modules\n\nPrefer `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\n 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": [ + "The DataView view provides a low-level interface for reading and writing\nmultiple number types in an ArrayBuffer irrespective of the platform's endianness.\n\n**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)" + ], + "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": [ + "The underlying buffer that the typed arrays provide views of\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)" + ], + "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": [ + "The DataView view provides a low-level interface for reading and writing\nmultiple number types in an ArrayBuffer irrespective of the platform's endianness.\n\n**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)" + ], + "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<\n 'a,\n> = 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", + "deprecated": "use `make` instead" + }, + { + "id": "Js.Typed_array.Float64Array.of_buffer", + "kind": "value", + "name": "of_buffer", + "docstrings": [], + "signature": "let of_buffer: array_buffer => t", + "deprecated": "use `fromBuffer` instead" + } + ] + }, + "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<\n 'a,\n> = 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", + "deprecated": "use `make` instead" + }, + { + "id": "Js.Typed_array.Float32Array.of_buffer", + "kind": "value", + "name": "of_buffer", + "docstrings": [], + "signature": "let of_buffer: array_buffer => t", + "deprecated": "use `fromBuffer` instead" + } + ] + }, + "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<\n 'a,\n> = 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<\n 'a,\n> = 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", + "deprecated": "use `make` instead" + }, + { + "id": "Js.Typed_array.Int32Array.of_buffer", + "kind": "value", + "name": "of_buffer", + "docstrings": [], + "signature": "let of_buffer: array_buffer => t", + "deprecated": "use `fromBuffer` instead" + } + ] + }, + "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<\n 'a,\n> = 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<\n 'a,\n> = 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<\n 'a,\n> = 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<\n 'a,\n> = 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<\n 'a,\n> = 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": [ + "The underlying buffer that the typed arrays provide views of\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)" + ], + "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", + "ES6 WeakMap API" + ], + "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", + "ES6 Map API" + ], + "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", + "ES6 WeakSet API" + ], + "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", + "ES6 Set API" + ], + "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 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)", + "deprecated": "Please use `Belt.Result.t` instead" + } + ] + }, + "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", + "deprecated": "Use `getWithDefault` instead since default has special meaning in ES module" + }, + { + "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", + "JavaScript Blob API" + ], + "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", + "JavaScript File API" + ], + "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", + "JavaScript BigInt API" + ], + "items": [ + { + "id": "Js.BigInt.fromStringExn", + "kind": "value", + "name": "fromStringExn", + "docstrings": [ + "Parses the given `string` into a `bigint` using JavaScript semantics. Return the\nnumber as a `bigint` if successfully parsed. Uncaught syntax exception otherwise.\n\n## Examples\n\n```rescript\n/* returns 123n */\nJs.BigInt.fromStringExn(\"123\")\n\n/* returns 0n */\nJs.BigInt.fromStringExn(\"\")\n\n/* returns 17n */\nJs.BigInt.fromStringExn(\"0x11\")\n\n/* returns 3n */\nJs.BigInt.fromStringExn(\"0b11\")\n\n/* returns 9n */\nJs.BigInt.fromStringExn(\"0o11\")\n\n/* catch exception */\ntry {\n Js.BigInt.fromStringExn(\"a\")\n} catch {\n| _ => ...\n}\n```" + ], + "signature": "let fromStringExn: string => bigint" + }, + { + "id": "Js.BigInt.~-", + "kind": "value", + "name": "~-", + "docstrings": [], + "signature": "let ~-: bigint => bigint" + }, + { + "id": "Js.BigInt.~+", + "kind": "value", + "name": "~+", + "docstrings": [], + "signature": "let ~+: bigint => bigint" + }, + { + "id": "Js.BigInt.+", + "kind": "value", + "name": "+", + "docstrings": [], + "signature": "let +: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.-", + "kind": "value", + "name": "-", + "docstrings": [], + "signature": "let -: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.*", + "kind": "value", + "name": "*", + "docstrings": [], + "signature": "let *: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt./", + "kind": "value", + "name": "/", + "docstrings": [], + "signature": "let /: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.mod", + "kind": "value", + "name": "mod", + "docstrings": [], + "signature": "let mod: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.**", + "kind": "value", + "name": "**", + "docstrings": [], + "signature": "let **: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.land", + "kind": "value", + "name": "land", + "docstrings": [], + "signature": "let land: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.lor", + "kind": "value", + "name": "lor", + "docstrings": [], + "signature": "let lor: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.lxor", + "kind": "value", + "name": "lxor", + "docstrings": [], + "signature": "let lxor: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.lnot", + "kind": "value", + "name": "lnot", + "docstrings": [], + "signature": "let lnot: bigint => bigint" + }, + { + "id": "Js.BigInt.lsl", + "kind": "value", + "name": "lsl", + "docstrings": [], + "signature": "let lsl: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.asr", + "kind": "value", + "name": "asr", + "docstrings": [], + "signature": "let asr: (bigint, bigint) => bigint" + }, + { + "id": "Js.BigInt.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Formats a `bigint` as a string. Return a `string` representing the given value.\nSee [`toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\n\n```rescript\n/* prints \"123\" */\nJs.BigInt.toString(123n)->Js.log\n```" + ], + "signature": "let toString: bigint => string" + }, + { + "id": "Js.BigInt.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "docstrings": [ + "Returns a string with a language-sensitive representation of this BigInt value.\n\n## Examples\n\n```rescript\n/* prints \"123\" */\nJs.BigInt.toString(123n)->Js.log\n```" + ], + "signature": "let toLocaleString: bigint => string" + } + ] + }, + "js/int": { + "id": "Js.Int", + "name": "Int", + "docstrings": [ + "Provide utilities for int", + "Provide utilities for handling `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\nSee [`toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\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\nSee [`toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\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\nSee [`toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\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\nSee [`toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\n## Examples\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\nSee [`toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\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\nSee [`toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\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", + "Provide utilities for JS float." + ], + "items": [ + { + "id": "Js.Float._NaN", + "kind": "value", + "name": "_NaN", + "docstrings": [ + "The special value \"Not a Number\". See [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN) on MDN." + ], + "signature": "let _NaN: float" + }, + { + "id": "Js.Float.isNaN", + "kind": "value", + "name": "isNaN", + "docstrings": [ + "Tests if the given value is `_NaN`\n\nNote that both `_NaN = _NaN` and `_NaN == _NaN` will return `false`. `isNaN` is\ntherefore necessary to test for `_NaN`. Return `true` if the given value is\n`_NaN`, `false` otherwise. See [`isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN) on MDN." + ], + "signature": "let isNaN: float => bool" + }, + { + "id": "Js.Float.isFinite", + "kind": "value", + "name": "isFinite", + "docstrings": [ + "Tests if the given value is finite. Return `true` if the given value is a finite\nnumber, `false` otherwise. See [`isFinite`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite) on MDN.\n\n## Examples\n\n```rescript\n/* returns [false] */\nJs.Float.isFinite(infinity)\n\n/* returns [false] */\nJs.Float.isFinite(neg_infinity)\n\n/* returns [false] */\nJs.Float.isFinite(Js.Float._NaN)\n\n/* returns [true] */\nJs.Float.isFinite(1234.)\n```" + ], + "signature": "let isFinite: float => bool" + }, + { + "id": "Js.Float.toExponential", + "kind": "value", + "name": "toExponential", + "docstrings": [ + "Formats a `float` using exponential (scientific) notation. Return a\n`string` representing the given value in exponential notation. Raise\nRangeError if digits is not in the range [0, 20] (inclusive). See [`toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\n\n```rescript\n/* prints \"7.71234e+1\" */\nJs.Float.toExponential(77.1234)->Js.log\n\n/* prints \"7.7e+1\" */\nJs.Float.toExponential(77.)->Js.log\n```" + ], + "signature": "let toExponential: float => string" + }, + { + "id": "Js.Float.toExponentialWithPrecision", + "kind": "value", + "name": "toExponentialWithPrecision", + "docstrings": [ + "Formats a `float` using exponential (scientific) notation. `digits` specifies\nhow many digits should appear after the decimal point. The value must be in\nthe range [0, 20] (inclusive). Return a `string` representing the given value\nin exponential notation. The output will be rounded or padded with zeroes if\nnecessary. Raise RangeError if `digits` is not in the range [0, 20] (inclusive).\nSee [`toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) on MDN.\n\n## Examples\n\n```rescript\n/* prints \"7.71e+1\" */\nJs.Float.toExponentialWithPrecision(77.1234, ~digits=2)->Js.log\n```" + ], + "signature": "let toExponentialWithPrecision: (float, ~digits: int) => string" + }, + { + "id": "Js.Float.toFixed", + "kind": "value", + "name": "toFixed", + "docstrings": [ + "Formats a `float` using fixed point notation. Return a `string` representing the\ngiven value in fixed-point notation (usually). Raise RangeError if digits is not\nin the range [0, 20] (inclusive). See [`toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) on MDN.\n\n## Examples\n\n```rescript\n/* prints \"12346\" (note the rounding) */\nJs.Float.toFixed(12345.6789)->Js.log\n\n/* print \"1.2e+21\" */\nJs.Float.toFixed(1.2e21)->Js.log\n```" + ], + "signature": "let toFixed: float => string" + }, + { + "id": "Js.Float.toFixedWithPrecision", + "kind": "value", + "name": "toFixedWithPrecision", + "docstrings": [ + "Formats a `float` using fixed point notation. `digits` specifies how many digits\nshould appear after the decimal point. The value must be in the range [0, 20]\n(inclusive). Defaults to `0`. Return a `string` representing the given value in\nfixed-point notation (usually). See [`toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) on MDN.\n\nThe output will be rounded or padded with zeroes if necessary.\n\nRaise RangeError if digits is not in the range [0, 20] (inclusive)\n\n## Examples\n\n```rescript\n/* prints \"12345.7\" (note the rounding) */\nJs.Float.toFixedWithPrecision(12345.6789, ~digits=1)->Js.log\n\n/* prints \"0.00\" (note the added zeroes) */\nJs.Float.toFixedWithPrecision(0., ~digits=2)->Js.log\n```" + ], + "signature": "let toFixedWithPrecision: (float, ~digits: int) => string" + }, + { + "id": "Js.Float.toPrecision", + "kind": "value", + "name": "toPrecision", + "docstrings": [ + "Formats a `float` using some fairly arbitrary rules. Return a `string`\nrepresenting the given value in fixed-point (usually). `toPrecision` differs\nfrom `Js.Float.toFixed` in that the former will format the number with full\nprecision, while the latter will not output any digits after the decimal point.\nSee [`toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\nRaise RangeError if digits is not in the range accepted by this function (what do you mean \"vague\"?)\n\n## Examples\n\n```rescript\n/* prints \"12345.6789\" */\nJs.Float.toPrecision(12345.6789)->Js.log\n\n/* print \"1.2e+21\" */\nJs.Float.toPrecision(1.2e21)->Js.log\n```" + ], + "signature": "let toPrecision: float => string" + }, + { + "id": "Js.Float.toPrecisionWithPrecision", + "kind": "value", + "name": "toPrecisionWithPrecision", + "docstrings": [ + "Formats a `float` using some fairly arbitrary rules. `digits` specifies how many\ndigits should appear in total. The value must between 0 and some arbitrary number\nthat's hopefully at least larger than 20 (for Node it's 21. Why? Who knows).\nSee [`toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision) on MDN.\n\nReturn a `string` representing the given value in fixed-point or scientific\nnotation. The output will be rounded or padded with zeroes if necessary.\n\n`toPrecisionWithPrecision` differs from `toFixedWithPrecision` in that the former\nwill count all digits against the precision, while the latter will count only\nthe digits after the decimal point. `toPrecisionWithPrecision` will also use\nscientific notation if the specified precision is less than the number for digits\nbefore the decimal point.\n\nRaise RangeError if digits is not in the range accepted by this function (what do you mean \"vague\"?)\n\n## Examples\n\n```rescript\n/* prints \"1e+4\" */\nJs.Float.toPrecisionWithPrecision(12345.6789, ~digits=1)->Js.log\n\n/* prints \"0.0\" */\nJs.Float.toPrecisionWithPrecision(0., ~digits=2)->Js.log\n```" + ], + "signature": "let toPrecisionWithPrecision: (float, ~digits: int) => string" + }, + { + "id": "Js.Float.toString", + "kind": "value", + "name": "toString", + "docstrings": [ + "Formats a `float` as a string. Return a `string` representing the given value in\nfixed-point (usually). See [`toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\n## Examples\n\n```rescript\n/* prints \"12345.6789\" */\nJs.Float.toString(12345.6789)->Js.log\n```" + ], + "signature": "let toString: float => string" + }, + { + "id": "Js.Float.toStringWithRadix", + "kind": "value", + "name": "toStringWithRadix", + "docstrings": [ + "Formats a `float` as a string. `radix` specifies the radix base to use for the\nformatted number. The value must be in the range [2, 36] (inclusive). Return a\n`string` representing the given value in fixed-point (usually). See [`toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString) on MDN.\n\nRaise RangeError if radix is not in the range [2, 36] (inclusive)\n\n## Examples\n\n```rescript\n/* prints \"110\" */\nJs.Float.toStringWithRadix(6., ~radix=2)->Js.log\n\n/* prints \"11.001000111101011100001010001111010111000010100011111\" */\nJs.Float.toStringWithRadix(3.14, ~radix=2)->Js.log\n\n/* prints \"deadbeef\" */\nJs.Float.toStringWithRadix(3735928559., ~radix=16)->Js.log\n\n/* prints \"3f.gez4w97ry0a18ymf6qadcxr\" */\nJs.Float.toStringWithRadix(123.456, ~radix=36)->Js.log\n```" + ], + "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. Return the\nnumber as a `float` if successfully parsed, `_NaN` otherwise.\n\n## Examples\n\n```rescript\n/* returns 123 */\nJs.Float.fromString(\"123\")\n\n/* returns 12.3 */\nJs.Float.fromString(\"12.3\")\n\n/* returns 0 */\nJs.Float.fromString(\"\")\n\n/* returns 17 */\nJs.Float.fromString(\"0x11\")\n\n/* returns 3 */\nJs.Float.fromString(\"0b11\")\n\n/* returns 9 */\nJs.Float.fromString(\"0o11\")\n\n/* returns [_NaN] */\nJs.Float.fromString(\"hello\")\n\n/* returns [_NaN] */\nJs.Float.fromString(\"100a\")\n```" + ], + "signature": "let fromString: string => float" + } + ] + }, + "js/types": { + "id": "Js.Types", + "name": "Types", + "docstrings": [ + "Provide utilities for manipulating JS types", + "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`.\nThis is useful for doing runtime reflection on any given value.\n\n## Examples\n\n```rescript\ntest(\"test\", String) == true\ntest(() => true, Function) == true\ntest(\"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", + "JavaScript Typed Array API\n\n**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)" + ], + "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", + "JavaScript Typed Array API\n\n**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)" + ], + "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`", + "Provides functions for inspecting and manipulating native JavaScript objects" + ], + "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## Examples\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", + "Provide utilities for JS Math. Note: The constants `_E`, `_LN10`, `_LN2`,\n`_LOG10E`, `_LOG2E`, `_PI`, `_SQRT1_2`, and `_SQRT2` begin with an underscore\nbecause ReScript variable names cannot begin with a capital letter. (Module\nnames begin with upper case.)" + ], + "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)\non 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)\non 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)\non 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)\non 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)\non 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)\non 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)\non 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)\non 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)\non 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)\non 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\nthe range [-1.0, 1.0]. See\n[`Math.acos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acos)\non 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\nis less than 1.0. See\n[`Math.acosh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acosh)\non 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\nthe range [-1.0, 1.0]. See\n[`Math.asin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asin)\non 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)\non 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)\non 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\nis is outside the range [-1.0, 1.0]. Returns `-Infinity` and `Infinity` for\narguments -1.0 and 1.0. See\n[`Math.atanh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh)\non 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\nbetween 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)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.atan2(~y=0.0, ~x=10.0, ()) == 0.0\nJs.Math.atan2(~x=5.0, ~y=5.0, ()) == Js.Math._PI /. 4.0\nJs.Math.atan2(~x=-5.0, ~y=5.0, ())\nJs.Math.atan2(~x=-5.0, ~y=5.0, ()) == 3.0 *. Js.Math._PI /. 4.0\nJs.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)\non 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\nfunction may return values not representable by `int`, whose range is\n-2147483648 to 2147483647. This is because, in JavaScript, there are only\n64-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)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.unsafe_ceil_int(3.1) == 4\nJs.Math.unsafe_ceil_int(3.0) == 3\nJs.Math.unsafe_ceil_int(-3.1) == -3\nJs.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": [], + "signature": "let unsafe_ceil: float => int", + "deprecated": "Please use `unsafe_ceil_int` instead" + }, + { + "id": "Js.Math.ceil_int", + "kind": "value", + "name": "ceil_int", + "docstrings": [ + "Returns the smallest `int` greater than or equal to the argument; the result\nis 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)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.ceil_int(3.1) == 4\nJs.Math.ceil_int(3.0) == 3\nJs.Math.ceil_int(-3.1) == -3\nJs.Math.ceil_int(-1.0e15) == -2147483648\nJs.Math.ceil_int(1.0e15) == 2147483647\n```" + ], + "signature": "let ceil_int: float => int" + }, + { + "id": "Js.Math.ceil", + "kind": "value", + "name": "ceil", + "docstrings": [], + "signature": "let ceil: float => int", + "deprecated": "Please use `ceil_int` instead" + }, + { + "id": "Js.Math.ceil_float", + "kind": "value", + "name": "ceil_float", + "docstrings": [ + "Returns the smallest integral value greater than or equal to the argument.\nThe result is a `float` and is not restricted to the `int` data type range.\nSee\n[`Math.ceil`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.ceil_float(3.1) == 4.0\nJs.Math.ceil_float(3.0) == 3.0\nJs.Math.ceil_float(-3.1) == -3.0\nJs.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)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.clz32(0) == 32\nJs.Math.clz32(-1) == 0\nJs.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)\non 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)\non 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\npower of the given argument. See\n[`Math.exp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/exp)\non 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\nargument minus 1. See\n[`Math.expm1`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/expm1)\non 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\nmay return values not representable by `int`, whose range is -2147483648 to\n2147483647. This is because, in JavaScript, there are only 64-bit floating\npoint 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)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.unsafe_floor_int(3.7) == 3\nJs.Math.unsafe_floor_int(3.0) == 3\nJs.Math.unsafe_floor_int(-3.7) == -4\nJs.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": [], + "signature": "let unsafe_floor: float => int", + "deprecated": "Please use `unsafe_floor_int` instead" + }, + { + "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\npinned 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)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.floor_int(3.7) == 3\nJs.Math.floor_int(3.0) == 3\nJs.Math.floor_int(-3.1) == -4\nJs.Math.floor_int(-1.0e15) == -2147483648\nJs.Math.floor_int(1.0e15) == 2147483647\n```" + ], + "signature": "let floor_int: float => int" + }, + { + "id": "Js.Math.floor", + "kind": "value", + "name": "floor", + "docstrings": [], + "signature": "let floor: float => int", + "deprecated": "Please use `floor_int` instead" + }, + { + "id": "Js.Math.floor_float", + "kind": "value", + "name": "floor_float", + "docstrings": [ + "Returns the largest integral value less than or equal to the argument. The\nresult 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)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.floor_float(3.7) == 3.0\nJs.Math.floor_float(3.0) == 3.0\nJs.Math.floor_float(-3.1) == -4.0\nJs.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)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.fround(5.5) == 5.5\nJs.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\nPythagorean formula). See\n[`Math.hypot`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot)\non 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\nargument (generalized Pythagorean equation). Using an array allows you to\nhave more than two items. See\n[`Math.hypot`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot)\non MDN.\n\n## Examples\n\n```rescript\nJs.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\nperformance 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)\non 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\nthat *e**x* equals the argument. Returns `NaN` for negative\narguments. See\n[`Math.log`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.log(Js.Math._E) == 1.0\nJs.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\narguments less than -1. See\n[`Math.log1p`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log1p)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.log1p(Js.Math._E -. 1.0) == 1.0\nJs.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\narguments. See\n[`Math.log10`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log10)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.log10(1000.0) == 3.0\nJs.Math.log10(0.01) == -2.0\nJs.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\narguments. See\n[`Math.log2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.log2(512.0) == 9.0\nJs.Math.log2(0.125) == -3.0\nJs.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)\non 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)\non 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)\non 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)\non 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)\non 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)\non 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)\non 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)\non 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\nintegers.) See\n[`Math.pow`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.pow_int(~base=3, ~exp=4) == 81\n```" + ], + "signature": "let pow_int: (~base: int, ~exp: int) => int", + "deprecated": "use `pow_float` instead, the return type may be not int" + }, + { + "id": "Js.Math.pow_float", + "kind": "value", + "name": "pow_float", + "docstrings": [ + "Raises the given base to the given exponent. (Arguments and result are\nfloats.) 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)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.pow_float(~base=3.0, ~exp=4.0) == 81.0\nJs.Math.pow_float(~base=4.0, ~exp=-2.0) == 0.0625\nJs.Math.pow_float(~base=625.0, ~exp=0.5) == 25.0\nJs.Math.pow_float(~base=625.0, ~exp=-0.5) == 0.04\nJs.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)\non 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\nhalf-closed interval [minVal, maxVal). See\n[`Math.random`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random)\non 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\nof exactly 0.5, the argument is rounded to the next integer in the direction\nof positive infinity. This function may return values not representable by\n`int`, whose range is -2147483648 to 2147483647. This is because, in\nJavaScript, there are only 64-bit floating point numbers, which can represent\nintegers in the range ±(253-1) exactly. See\n[`Math.round`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round)\non MDN.\n\n## Examples\n\n```rescript\nJs.Math.unsafe_round(3.7) == 4\nJs.Math.unsafe_round(-3.5) == -3\nJs.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)\non 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\npositive. See\n[`Math.sign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign)\non 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\npositive. See\n[`Math.sign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign)\non 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)\non 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)\non 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)\non 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\nargument is positive infinity or negative infinity. See\n[`Math.cos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos)\non 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)\non 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\nreturn values not representable by `int`, whose range is -2147483648 to\n2147483647. This is because, in JavaScript, there are only 64-bit floating\npoint numbers, which can represent integers in the range ±(253-1)\nexactly. See\n[`Math.trunc`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc)\non 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)\non MDN." + ], + "signature": "let trunc: float => float" + } + ] + }, + "js/json": { + "id": "Js.Json", + "name": "Json", + "docstrings": [ + "Provide utilities for json", + "Efficient JSON encoding using JavaScript API\n\n**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/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\nSee [`parse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) on MDN.\n\n## Examples\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\nSee [`stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) on MDN.\n\n## Examples\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\nSee [`stringify`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) on MDN.\n\n## Examples\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## Examples\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\nmany objects as possible and deserialize it back\n\nIt 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", + "Contains functions available in the global scope (`window` in a browser context)" + ], + "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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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\nSee [`encodeURI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI) on MDN." + ], + "signature": "let encodeURI: string => string" + }, + { + "id": "Js.Global.decodeURI", + "kind": "value", + "name": "decodeURI", + "docstrings": [ + "Decodes a URL-enmcoded string produced by `encodeURI`\n\nSee [`decodeURI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI) on MDN." + ], + "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\nSee [`encodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) on MDN." + ], + "signature": "let encodeURIComponent: string => string" + }, + { + "id": "Js.Global.decodeURIComponent", + "kind": "value", + "name": "decodeURIComponent", + "docstrings": [ + "Decodes a URL-enmcoded string produced by `encodeURIComponent`\n\nSee [`decodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) on MDN." + ], + "signature": "let decodeURIComponent: string => string" + } + ] + }, + "js/dict": { + "id": "Js.Dict", + "name": "Dict", + "docstrings": [ + "Provide utilities for JS dictionary object", + "Provide utilities for JS dictionary object.\n\n**Note:** This module's examples will assume this predeclared dictionary:\n\n## Examples\n\n```rescript\nlet ages = Js.Dict.fromList(list{(\"Maria\", 30), (\"Vinh\", 22), (\"Fred\", 49)})\n```" + ], + "items": [ + { + "id": "Js.Dict.t", + "kind": "type", + "name": "t", + "docstrings": [], + "signature": "type t<'a> = dict<'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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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", + "Provide bindings to JS date. (See\n[`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)\non MDN.) JavaScript stores dates as the number of milliseconds since the UNIX\n*epoch*, midnight 1 January 1970, UTC." + ], + "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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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: (\n ~year: float,\n ~month: float,\n ~date: float,\n ~hours: float,\n unit,\n) => 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## Examples\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## Examples\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: (\n ~year: float,\n ~month: float,\n ~date: float,\n ~hours: float,\n unit,\n) => 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", + "deprecated": "Please use `fromString` instead" + }, + { + "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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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", + "deprecated": "Use `getFullYear` instead." + }, + { + "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## Examples\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## Examples\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## Examples\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## Examples\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: (\n t,\n ~year: float,\n ~month: float,\n ~date: float,\n unit,\n) => 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## Examples\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## Examples\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## Examples\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: (\n t,\n ~hours: float,\n ~minutes: float,\n ~seconds: float,\n unit,\n) => 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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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: (\n t,\n ~minutes: float,\n ~seconds: float,\n ~milliseconds: float,\n unit,\n) => 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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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: (\n t,\n ~year: float,\n ~month: float,\n ~date: float,\n unit,\n) => 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## Examples\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## Examples\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## Examples\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: (\n t,\n ~hours: float,\n ~minutes: float,\n ~seconds: float,\n unit,\n) => 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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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: (\n t,\n ~minutes: float,\n ~seconds: float,\n ~milliseconds: float,\n unit,\n) => 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## Examples\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## Examples\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## Examples\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## Examples\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", + "deprecated": "Use `setFullYear` instead" + }, + { + "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## Examples\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", + "deprecated": "Use `toUTCString` instead" + }, + { + "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## Examples\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", + "deprecated": "This method is unsafe. It will be changed to return option in a future \\\n release. Please use toJSONUnsafe instead." + }, + { + "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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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: (\n (~resolve: 'a => unit, ~reject: exn => unit) => unit,\n) => 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: (\n (promise<'a0>, promise<'a1>, promise<'a2>),\n) => promise<('a0, 'a1, 'a2)>" + }, + { + "id": "Js.Promise2.all4", + "kind": "value", + "name": "all4", + "docstrings": [], + "signature": "let all4: (\n (promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>),\n) => promise<('a0, 'a1, 'a2, 'a3)>" + }, + { + "id": "Js.Promise2.all5", + "kind": "value", + "name": "all5", + "docstrings": [], + "signature": "let all5: (\n (\n promise<'a0>,\n promise<'a1>,\n promise<'a2>,\n promise<'a3>,\n promise<'a4>,\n ),\n) => promise<('a0, 'a1, 'a2, 'a3, 'a4)>" + }, + { + "id": "Js.Promise2.all6", + "kind": "value", + "name": "all6", + "docstrings": [], + "signature": "let all6: (\n (\n promise<'a0>,\n promise<'a1>,\n promise<'a2>,\n promise<'a3>,\n promise<'a4>,\n promise<'a5>,\n ),\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", + "Deprecation note: These bindings are pretty outdated and cannot be used properly\nwith the `->` operator.\n\nMore details on proper Promise usage can be found here:\nhttps://rescript-lang.org/docs/manual/latest/promise#promise-legacy" + ], + "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: (\n (~resolve: 'a => unit, ~reject: exn => unit) => unit,\n) => 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: (\n (promise<'a0>, promise<'a1>, promise<'a2>),\n) => promise<('a0, 'a1, 'a2)>" + }, + { + "id": "Js.Promise.all4", + "kind": "value", + "name": "all4", + "docstrings": [], + "signature": "let all4: (\n (promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>),\n) => promise<('a0, 'a1, 'a2, 'a3)>" + }, + { + "id": "Js.Promise.all5", + "kind": "value", + "name": "all5", + "docstrings": [], + "signature": "let all5: (\n (\n promise<'a0>,\n promise<'a1>,\n promise<'a2>,\n promise<'a3>,\n promise<'a4>,\n ),\n) => promise<('a0, 'a1, 'a2, 'a3, 'a4)>" + }, + { + "id": "Js.Promise.all6", + "kind": "value", + "name": "all6", + "docstrings": [], + "signature": "let all6: (\n (\n promise<'a0>,\n promise<'a1>,\n promise<'a2>,\n promise<'a3>,\n promise<'a4>,\n promise<'a5>,\n ),\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", + "Provide bindings to JS regular expressions (RegExp).\n\n**Note:** This is not an immutable API. A RegExp object with the `global` (\"g\")\nflag set will modify the [`lastIndex`]() property when the RegExp object is used,\nand subsequent uses will continue the search from the previous [`lastIndex`]()." + ], + "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\nremaining are the substring captures." + ], + "signature": "let captures: result => array>" + }, + { + "id": "Js.Re.matches", + "kind": "value", + "name": "matches", + "docstrings": [], + "signature": "let matches: result => array", + "deprecated": "Use Js.Re.captures instead" + }, + { + "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`.\nRegex literals `%re(\"/.../\")` should generally be preferred, but `fromString`\nis useful when you need to dynamically construct a regex using strings,\nexactly like when you do so in JavaScript.\n\n## Examples\n\n```rescript\nlet 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\"\nfirstReScriptFileExtension(\"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.\nSee `Js.Re.fromString`.\n\nValid 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\nwill be modified when the RegExp object is used, if the global (\"g\") flag is\nset.\n\n## Examples\n\n```rescript\nlet re = %re(\"/ab*TODO/g\")\nlet str = \"abbcdefabh\"\n\nlet break = ref(false)\nwhile !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\nSee\n[`RegExp: lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex)\non 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.\nReturns `Some(Js.Re.result)` if a match is found, `None` otherwise.\n\n## Examples\n\n```rescript\n/* Match \"quick brown\" followed by \"jumps\", ignoring characters in between\n * Remember \"brown\" and \"jumps\"\n * Ignore case\n */\n\nlet re = %re(\"/quick\\s(brown).+?(jumps)/ig\")\nlet result = Js.Re.exec_(re, \"The Quick Brown Fox Jumps Over The Lazy Dog\")\n```\n\nSee [`RegExp.prototype.exec()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec)\non 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`.\nReturns true if a match is found, false otherwise.\n\n## Examples\n\n```rescript\n/* A simple implementation of Js.String.startsWith */\n\nlet str = \"hello world!\"\n\nlet startsWith = (target, substring) =>\n Js.Re.fromString(\"^\" ++ substring)->Js.Re.test_(target)\n\nJs.log(str->startsWith(\"hello\")) /* prints \"true\" */\n```\n\nSee [`RegExp.prototype.test()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\non MDN." + ], + "signature": "let test_: (t, string) => bool" + } + ] + }, + "js/string2": { + "id": "Js.String2", + "name": "String2", + "docstrings": [ + "Provide bindings to JS string", + "Provide bindings to JS string. Optimized for pipe-first." + ], + "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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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`.\n\n## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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", + "JavaScript String API" + ], + "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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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`.\n\n## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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", + "Provides bindings to JavaScript’s `Array` functions. These bindings are optimized for pipe-first (`->`), where the array to be processed is the first parameter in the function.\n\nHere is an example to find the sum of squares of all even numbers in an array.\nWithout pipe first, we must call the functions in reverse order:\n\n## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\nlet square = x => x * x\nlet result = {\n open Js.Array2\n reduce(map(filter([5, 2, 3, 4, 1], isEven), square), \"+\", 0)\n}\n```\n\nWith pipe first, we call the functions in the “natural” order:\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\nlet square = x => x * x\nlet result = {\n open Js.Array2\n [5, 2, 3, 4, 1]->filter(isEven)->map(square)->reduce(\"+\", 0)\n}\n```" + ], + "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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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>", + "deprecated": "`append` is not type-safe. Use `concat` instead." + }, + { + "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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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## Examples\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", + "Provides bindings to JavaScript’s `Array` functions. These bindings are\noptimized for pipe-last (`|>`), where the array to be processed is the last\nparameter in the function.\n\nHere is an example to find the sum of squares of all even numbers in an array.\nWithout pipe last, we must call the functions in reverse order:\n\n## Examples\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\nlet square = x => x * x\nlet result = {\n open Js.Array\n reduce(\\\"+\", 0, map(square, filter(isEven, [5, 2, 3, 4, 1])))\n}\n```\n\nWith pipe last, we call the functions in the “natural” order:\n\n```rescript\nlet isEven = x => mod(x, 2) == 0\nlet square = x => x * x\nlet result = {\n open Js.Array\n [5, 2, 3, 4, 1] |> filter(isEven) |> map(square) |> reduce(\"+\", 0)\n}\n```" + ], + "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## Examples\n\n```rescript\nlet strArr = Js.String.castToArrayLike(\"abcd\")\nJs.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\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## Examples\n\n```rescript\nlet strArr = Js.String.castToArrayLike(\"abcd\")\nlet code = s => Js.String.charCodeAt(0, s)\nJs.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## Examples\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\nJs.Array.pop(arr) == Some(104)\narr == [100, 101, 102, 103]\n\nlet empty: array = []\nJs.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## Examples\n\n```rescript\nlet arr = [\"ant\", \"bee\", \"cat\"]\nJs.Array.reverseInPlace(arr) == [\"cat\", \"bee\", \"ant\"]\narr == [\"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## Examples\n\n```rescript\nlet arr = [100, 101, 102, 103, 104]\nJs.Array.shift(arr) == Some(100)\narr == [101, 102, 103, 104]\n\nlet empty: array = []\nJs.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## Examples\n\n```rescript\nlet words = [\"bee\", \"dog\", \"ant\", \"cat\"]\nJs.Array.sortInPlace(words) == [\"ant\", \"bee\", \"cat\", \"dog\"]\nwords == [\"ant\", \"bee\", \"cat\", \"dog\"]\n\nlet numbers = [3, 30, 10, 1, 20, 2]\nJs.Array.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.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": [], + "signature": "let join: t<'a> => string", + "deprecated": "please use joinWith instead" + }, + { + "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)\non 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\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## Examples\n\n```rescript\nJs.Array.toString([3.5, 4.6, 7.8]) == \"3.5,4.6,7.8\"\nJs.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.\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## Examples\n\n```rescript\nJs.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## Examples\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## Examples\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", + "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\nin 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\nThis function is mostly useful for cases where you want to unify a type of a value\nthat potentially is either exn, a JS error, or any other JS value really (e.g. for\na 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## Examples\n\n```rescript\nswitch (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": [ + "Contains functionality for dealing with values that can be both `null` and `undefined`" + ], + "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## Examples\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## Examples\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>", + "deprecated": "Use fromOption instead" + }, + { + "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>", + "deprecated": "Use toOption instead" + } + ] + }, + "js/nullable": { + "id": "Js.Nullable", + "name": "Nullable", + "docstrings": [ + "Provide utilities for `Js.null_undefined`", + "Contains functionality for dealing with values that can be both `null` and `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## Examples\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## Examples\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>", + "deprecated": "Use fromOption instead" + }, + { + "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>", + "deprecated": "Use toOption instead" + } + ] + }, + "js/undefined": { + "id": "Js.Undefined", + "name": "Undefined", + "docstrings": [ + "Provide utilities for `Js.undefined<'a>`", + "Provides functionality for dealing with the `Js.undefined<'a>` type" + ], + "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", + "deprecated": "Use = Js.undefined directly" + }, + { + "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## Examples\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## Examples\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>", + "deprecated": "Use fromOption instead" + }, + { + "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>", + "deprecated": "use toOption instead" + } + ] + }, + "js/null": { + "id": "Js.Null", + "name": "Null", + "docstrings": [ + "Provide utilities for `Js.null<'a>`", + "Provides functionality for dealing with the `Js.null<'a>` type" + ], + "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", + "deprecated": "Use = Js.null directly " + }, + { + "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## Examples\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## Examples\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>", + "deprecated": "Use fromOption instead" + }, + { + "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>", + "deprecated": "Use toOption instead" + } + ] + } +} \ No newline at end of file diff --git a/data/api/v12.0.0/toc_tree.json b/data/api/v12.0.0/toc_tree.json new file mode 100644 index 000000000..faf8bb122 --- /dev/null +++ b/data/api/v12.0.0/toc_tree.json @@ -0,0 +1 @@ +{"js":{"name":"Js","path":["js"],"children":[{"name":"WeakMap","path":["js","weakmap"],"children":[]},{"name":"Map","path":["js","map"],"children":[]},{"name":"WeakSet","path":["js","weakset"],"children":[]},{"name":"Set","path":["js","set"],"children":[]},{"name":"Console","path":["js","console"],"children":[]},{"name":"Vector","path":["js","vector"],"children":[]},{"name":"List","path":["js","list"],"children":[]},{"name":"Result","path":["js","result"],"children":[]},{"name":"Option","path":["js","option"],"children":[]},{"name":"Blob","path":["js","blob"],"children":[]},{"name":"File","path":["js","file"],"children":[]},{"name":"BigInt","path":["js","bigint"],"children":[]},{"name":"Int","path":["js","int"],"children":[]},{"name":"Float","path":["js","float"],"children":[]},{"name":"Types","path":["js","types"],"children":[]},{"name":"TypedArray2","path":["js","typedarray2"],"children":[{"name":"DataView","path":["js","typedarray2","dataview"],"children":[]},{"name":"Float64Array","path":["js","typedarray2","float64array"],"children":[]},{"name":"Float32Array","path":["js","typedarray2","float32array"],"children":[]},{"name":"Uint32Array","path":["js","typedarray2","uint32array"],"children":[]},{"name":"Int32Array","path":["js","typedarray2","int32array"],"children":[]},{"name":"Uint16Array","path":["js","typedarray2","uint16array"],"children":[]},{"name":"Int16Array","path":["js","typedarray2","int16array"],"children":[]},{"name":"Uint8ClampedArray","path":["js","typedarray2","uint8clampedarray"],"children":[]},{"name":"Uint8Array","path":["js","typedarray2","uint8array"],"children":[]},{"name":"Int8Array","path":["js","typedarray2","int8array"],"children":[]},{"name":"ArrayBuffer","path":["js","typedarray2","arraybuffer"],"children":[]}]},{"name":"Typed_array","path":["js","typed_array"],"children":[{"name":"DataView","path":["js","typed_array","dataview"],"children":[]},{"name":"Float64_array","path":["js","typed_array","float64_array"],"children":[]},{"name":"Float64Array","path":["js","typed_array","float64array"],"children":[]},{"name":"Float32_array","path":["js","typed_array","float32_array"],"children":[]},{"name":"Float32Array","path":["js","typed_array","float32array"],"children":[]},{"name":"Uint32Array","path":["js","typed_array","uint32array"],"children":[]},{"name":"Int32_array","path":["js","typed_array","int32_array"],"children":[]},{"name":"Int32Array","path":["js","typed_array","int32array"],"children":[]},{"name":"Uint16Array","path":["js","typed_array","uint16array"],"children":[]},{"name":"Int16Array","path":["js","typed_array","int16array"],"children":[]},{"name":"Uint8ClampedArray","path":["js","typed_array","uint8clampedarray"],"children":[]},{"name":"Uint8Array","path":["js","typed_array","uint8array"],"children":[]},{"name":"Int8Array","path":["js","typed_array","int8array"],"children":[]},{"name":"S","path":["js","typed_array","s"],"children":[]},{"name":"ArrayBuffer","path":["js","typed_array","arraybuffer"],"children":[]},{"name":"Type","path":["js","typed_array","type"],"children":[]}]},{"name":"Obj","path":["js","obj"],"children":[]},{"name":"Math","path":["js","math"],"children":[]},{"name":"Json","path":["js","json"],"children":[{"name":"Kind","path":["js","json","kind"],"children":[]}]},{"name":"Global","path":["js","global"],"children":[]},{"name":"Dict","path":["js","dict"],"children":[]},{"name":"Date","path":["js","date"],"children":[]},{"name":"Promise2","path":["js","promise2"],"children":[]},{"name":"Promise","path":["js","promise"],"children":[]},{"name":"Re","path":["js","re"],"children":[]},{"name":"String2","path":["js","string2"],"children":[]},{"name":"String","path":["js","string"],"children":[]},{"name":"Array2","path":["js","array2"],"children":[]},{"name":"Array","path":["js","array"],"children":[]},{"name":"Exn","path":["js","exn"],"children":[]},{"name":"Null_undefined","path":["js","null_undefined"],"children":[]},{"name":"Nullable","path":["js","nullable"],"children":[]},{"name":"Undefined","path":["js","undefined"],"children":[]},{"name":"Null","path":["js","null"],"children":[]}]},"belt":{"name":"Belt","path":["belt"],"children":[{"name":"Float","path":["belt","float"],"children":[]},{"name":"Int","path":["belt","int"],"children":[]},{"name":"Result","path":["belt","result"],"children":[]},{"name":"Option","path":["belt","option"],"children":[]},{"name":"HashMap","path":["belt","hashmap"],"children":[{"name":"String","path":["belt","hashmap","string"],"children":[]},{"name":"Int","path":["belt","hashmap","int"],"children":[]}]},{"name":"HashSet","path":["belt","hashset"],"children":[{"name":"String","path":["belt","hashset","string"],"children":[]},{"name":"Int","path":["belt","hashset","int"],"children":[]}]},{"name":"MutableMap","path":["belt","mutablemap"],"children":[{"name":"String","path":["belt","mutablemap","string"],"children":[]},{"name":"Int","path":["belt","mutablemap","int"],"children":[]}]},{"name":"MutableSet","path":["belt","mutableset"],"children":[{"name":"String","path":["belt","mutableset","string"],"children":[]},{"name":"Int","path":["belt","mutableset","int"],"children":[]}]},{"name":"Map","path":["belt","map"],"children":[{"name":"Dict","path":["belt","map","dict"],"children":[]},{"name":"String","path":["belt","map","string"],"children":[]},{"name":"Int","path":["belt","map","int"],"children":[]}]},{"name":"Set","path":["belt","set"],"children":[{"name":"Dict","path":["belt","set","dict"],"children":[]},{"name":"String","path":["belt","set","string"],"children":[]},{"name":"Int","path":["belt","set","int"],"children":[]}]},{"name":"Range","path":["belt","range"],"children":[]},{"name":"List","path":["belt","list"],"children":[]},{"name":"MutableStack","path":["belt","mutablestack"],"children":[]},{"name":"MutableQueue","path":["belt","mutablequeue"],"children":[]},{"name":"SortArray","path":["belt","sortarray"],"children":[{"name":"String","path":["belt","sortarray","string"],"children":[]},{"name":"Int","path":["belt","sortarray","int"],"children":[]}]},{"name":"Array","path":["belt","array"],"children":[]},{"name":"Id","path":["belt","id"],"children":[{"name":"MakeHashable","path":["belt","id","makehashable"],"children":[]},{"name":"MakeHashableU","path":["belt","id","makehashableu"],"children":[]},{"name":"MakeComparable","path":["belt","id","makecomparable"],"children":[]},{"name":"MakeComparableU","path":["belt","id","makecomparableu"],"children":[]}]}]},"dom":{"name":"Dom","path":["dom"],"children":[{"name":"Storage2","path":["dom","storage2"],"children":[]},{"name":"Storage","path":["dom","storage"],"children":[]}]},"core":{"name":"Core","path":["core"],"children":[{"name":"Result","path":["core","result"],"children":[]},{"name":"List","path":["core","list"],"children":[]},{"name":"Option","path":["core","option"],"children":[]},{"name":"Exn","path":["core","exn"],"children":[]},{"name":"Intl","path":["core","intl"],"children":[{"name":"Segments","path":["core","intl","segments"],"children":[]},{"name":"Segmenter","path":["core","intl","segmenter"],"children":[]},{"name":"RelativeTimeFormat","path":["core","intl","relativetimeformat"],"children":[]},{"name":"PluralRules","path":["core","intl","pluralrules"],"children":[]},{"name":"NumberFormat","path":["core","intl","numberformat"],"children":[{"name":"Grouping","path":["core","intl","numberformat","grouping"],"children":[]}]},{"name":"Locale","path":["core","intl","locale"],"children":[]},{"name":"ListFormat","path":["core","intl","listformat"],"children":[]},{"name":"DateTimeFormat","path":["core","intl","datetimeformat"],"children":[]},{"name":"Collator","path":["core","intl","collator"],"children":[]},{"name":"Common","path":["core","intl","common"],"children":[]}]},{"name":"BigUint64Array","path":["core","biguint64array"],"children":[{"name":"Constants","path":["core","biguint64array","constants"],"children":[]}]},{"name":"BigInt64Array","path":["core","bigint64array"],"children":[{"name":"Constants","path":["core","bigint64array","constants"],"children":[]}]},{"name":"Uint8ClampedArray","path":["core","uint8clampedarray"],"children":[{"name":"Constants","path":["core","uint8clampedarray","constants"],"children":[]}]},{"name":"Uint32Array","path":["core","uint32array"],"children":[{"name":"Constants","path":["core","uint32array","constants"],"children":[]}]},{"name":"Uint16Array","path":["core","uint16array"],"children":[{"name":"Constants","path":["core","uint16array","constants"],"children":[]}]},{"name":"Uint8Array","path":["core","uint8array"],"children":[{"name":"Constants","path":["core","uint8array","constants"],"children":[]}]},{"name":"Int32Array","path":["core","int32array"],"children":[{"name":"Constants","path":["core","int32array","constants"],"children":[]}]},{"name":"Int16Array","path":["core","int16array"],"children":[{"name":"Constants","path":["core","int16array","constants"],"children":[]}]},{"name":"Int8Array","path":["core","int8array"],"children":[{"name":"Constants","path":["core","int8array","constants"],"children":[]}]},{"name":"Float64Array","path":["core","float64array"],"children":[{"name":"Constants","path":["core","float64array","constants"],"children":[]}]},{"name":"Float32Array","path":["core","float32array"],"children":[{"name":"Constants","path":["core","float32array","constants"],"children":[]}]},{"name":"TypedArray","path":["core","typedarray"],"children":[]},{"name":"ArrayBuffer","path":["core","arraybuffer"],"children":[]},{"name":"WeakSet","path":["core","weakset"],"children":[]},{"name":"Set","path":["core","set"],"children":[]},{"name":"WeakMap","path":["core","weakmap"],"children":[]},{"name":"Map","path":["core","map"],"children":[]},{"name":"AsyncIterator","path":["core","asynciterator"],"children":[]},{"name":"Iterator","path":["core","iterator"],"children":[]},{"name":"JSON","path":["core","json"],"children":[{"name":"Decode","path":["core","json","decode"],"children":[]},{"name":"Encode","path":["core","json","encode"],"children":[]},{"name":"Classify","path":["core","json","classify"],"children":[]}]},{"name":"Type","path":["core","type"],"children":[{"name":"Classify","path":["core","type","classify"],"children":[]}]},{"name":"Symbol","path":["core","symbol"],"children":[]},{"name":"String","path":["core","string"],"children":[]},{"name":"RegExp","path":["core","regexp"],"children":[{"name":"Result","path":["core","regexp","result"],"children":[]}]},{"name":"Promise","path":["core","promise"],"children":[]},{"name":"Ordering","path":["core","ordering"],"children":[]},{"name":"Object","path":["core","object"],"children":[]},{"name":"Nullable","path":["core","nullable"],"children":[]},{"name":"Null","path":["core","null"],"children":[]},{"name":"Math","path":["core","math"],"children":[{"name":"Int","path":["core","math","int"],"children":[]},{"name":"Constants","path":["core","math","constants"],"children":[]}]},{"name":"BigInt","path":["core","bigint"],"children":[]},{"name":"Int","path":["core","int"],"children":[{"name":"Constants","path":["core","int","constants"],"children":[]}]},{"name":"Float","path":["core","float"],"children":[{"name":"Constants","path":["core","float","constants"],"children":[]}]},{"name":"Error","path":["core","error"],"children":[{"name":"URIError","path":["core","error","urierror"],"children":[]},{"name":"TypeError","path":["core","error","typeerror"],"children":[]},{"name":"SyntaxError","path":["core","error","syntaxerror"],"children":[]},{"name":"ReferenceError","path":["core","error","referenceerror"],"children":[]},{"name":"RangeError","path":["core","error","rangeerror"],"children":[]},{"name":"EvalError","path":["core","error","evalerror"],"children":[]}]},{"name":"Dict","path":["core","dict"],"children":[]},{"name":"Date","path":["core","date"],"children":[{"name":"UTC","path":["core","date","utc"],"children":[]}]},{"name":"DataView","path":["core","dataview"],"children":[]},{"name":"Console","path":["core","console"],"children":[]},{"name":"Array","path":["core","array"],"children":[]}]}} \ No newline at end of file diff --git a/data/sidebar_gentype_latest.json b/data/sidebar_gentype_latest.json deleted file mode 100644 index d9a57bf9c..000000000 --- a/data/sidebar_gentype_latest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Overview": [ - "introduction", - "getting-started", - "usage" - ], - "Advanced": [ - "supported-types" - ] -} diff --git a/data/sidebar_manual_latest.json b/data/sidebar_manual_v1100.json similarity index 100% rename from data/sidebar_manual_latest.json rename to data/sidebar_manual_v1100.json diff --git a/data/sidebar_manual_v1200.json b/data/sidebar_manual_v1200.json new file mode 100644 index 000000000..d783a4eb3 --- /dev/null +++ b/data/sidebar_manual_v1200.json @@ -0,0 +1,77 @@ +{ + "Overview": [ + "introduction", + "installation", + "migrate-to-v11", + "editor-plugins", + "try" + ], + "Language Features": [ + "overview", + "let-binding", + "type", + "primitive-types", + "tuple", + "record", + "object", + "variant", + "polymorphic-variant", + "null-undefined-option", + "array-and-list", + "function", + "control-flow", + "pipe", + "pattern-matching-destructuring", + "mutation", + "jsx", + "exception", + "lazy-values", + "promise", + "async-await", + "tagged-templates", + "module", + "import-export", + "attribute", + "reserved-keywords", + "equality-comparison" + ], + "Advanced Features": [ + "extensible-variant", + "scoped-polymorphic-types" + ], + "JavaScript Interop": [ + "interop-cheatsheet", + "embed-raw-javascript", + "shared-data-types", + "external", + "bind-to-js-object", + "bind-to-js-function", + "import-from-export-to-js", + "bind-to-global-js-values", + "json", + "inlining-constants", + "use-illegal-identifier-names", + "generate-converters-accessors", + "browser-support-polyfills", + "libraries", + "typescript-integration" + ], + "Build System": [ + "build-overview", + "build-configuration", + "build-configuration-schema", + "build-external-stdlib", + "build-pinned-dependencies", + "interop-with-js-build-systems", + "build-performance", + "warning-numbers" + ], + "Guides": [ + "converting-from-js" + ], + "Extra": [ + "newcomer-examples", + "project-structure", + "faq" + ] +} \ No newline at end of file diff --git a/next.config.mjs b/next.config.mjs index a2d4e8df0..d8b12ed46 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,3 +1,4 @@ +// @ts-check import fs from "fs"; import webpack from "webpack"; import rehypeSlug from "rehype-slug"; @@ -7,17 +8,19 @@ import remarkFrontmatter from "remark-frontmatter"; import remarkMdxFrontmatter from "remark-mdx-frontmatter"; import { createLoader } from "simple-functional-loader"; -const bsconfig = JSON.parse(fs.readFileSync("./rescript.json")); +const bsconfig = JSON.parse(fs.readFileSync("./rescript.json").toString()); const { ProvidePlugin } = webpack; const transpileModules = ["rescript"].concat(bsconfig["bs-dependencies"]); const config = { - output: process.env.BUILD_STATIC === 'true' ? 'export' : undefined, + output: process.env.BUILD_STATIC === "true" ? "export" : undefined, pageExtensions: ["jsx", "js", "bs.js", "mdx", "mjs"], env: { ENV: process.env.NODE_ENV, + VERSION_LATEST: process.env.VERSION_LATEST, + VERSION_NEXT: process.env.VERSION_NEXT, }, swcMinify: false, webpack: (config, options) => { @@ -123,6 +126,16 @@ const config = { destination: "/docs/manual/latest/typescript-integration", permanent: true, }, + { + source: "/docs/manual/latest/:slug*", + destination: `/docs/manual/${process.env.VERSION_LATEST}/:slug*`, + permanent: false, + }, + { + source: "/docs/manual/next/:slug*", + destination: `/docs/manual/${process.env.VERSION_NEXT}/:slug*`, + permanent: false, + }, ]; }, }; diff --git a/package-lock.json b/package-lock.json index 20b8fcaef..005a06992 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,6 +52,7 @@ "@mdx-js/react": "^2.3.0", "autoprefixer": "^10.4.14", "cssnano": "^6.0.1", + "dotenv": "^16.4.7", "esbuild-loader": "^2.20.0", "postcss": "^8.4.27", "postcss-cli": "^8.3.0", @@ -3691,6 +3692,19 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com/" + } + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -16898,6 +16912,12 @@ "domhandler": "^5.0.3" } }, + "dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "dev": true + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", diff --git a/package.json b/package.json index 094138d55..962a156d2 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "@mdx-js/react": "^2.3.0", "autoprefixer": "^10.4.14", "cssnano": "^6.0.1", + "dotenv": "^16.4.7", "esbuild-loader": "^2.20.0", "postcss": "^8.4.27", "postcss-cli": "^8.3.0", diff --git a/pages/docs/manual/latest/api.mdx b/pages/docs/manual/v11.0.0/api.mdx similarity index 100% rename from pages/docs/manual/latest/api.mdx rename to pages/docs/manual/v11.0.0/api.mdx diff --git a/pages/docs/manual/latest/api/[...slug].js b/pages/docs/manual/v11.0.0/api/[...slug].js similarity index 64% rename from pages/docs/manual/latest/api/[...slug].js rename to pages/docs/manual/v11.0.0/api/[...slug].js index 2098f7129..16be65f8b 100644 --- a/pages/docs/manual/latest/api/[...slug].js +++ b/pages/docs/manual/v11.0.0/api/[...slug].js @@ -1,16 +1,16 @@ import { getStaticPathsByVersion, - getStaticPropsByVersion + getStaticPropsByVersion, } from "src/ApiDocs.mjs"; import APIDocs from "src/ApiDocs.mjs"; export async function getStaticProps(ctx) { - return await getStaticPropsByVersion({ ...ctx, version: "latest" }); + return await getStaticPropsByVersion({ ...ctx, version: "v11.0.0" }); } export async function getStaticPaths(ctx) { - return await getStaticPathsByVersion("latest"); + return await getStaticPathsByVersion("v11.0.0"); } export default function Comp(props) { diff --git a/pages/docs/manual/latest/array-and-list.mdx b/pages/docs/manual/v11.0.0/array-and-list.mdx similarity index 98% rename from pages/docs/manual/latest/array-and-list.mdx rename to pages/docs/manual/v11.0.0/array-and-list.mdx index c411fe964..ddc553633 100644 --- a/pages/docs/manual/latest/array-and-list.mdx +++ b/pages/docs/manual/v11.0.0/array-and-list.mdx @@ -1,7 +1,7 @@ --- title: "Array & List" description: "Arrays and List data structures" -canonical: "/docs/manual/latest/array-and-list" +canonical: "/docs/manual/v11.0.0/array-and-list" --- # Array and List diff --git a/pages/docs/manual/latest/async-await.mdx b/pages/docs/manual/v11.0.0/async-await.mdx similarity index 99% rename from pages/docs/manual/latest/async-await.mdx rename to pages/docs/manual/v11.0.0/async-await.mdx index 5688e41b3..76d07dcac 100644 --- a/pages/docs/manual/latest/async-await.mdx +++ b/pages/docs/manual/v11.0.0/async-await.mdx @@ -1,7 +1,7 @@ --- title: "Async / Await" description: "Async / await for asynchronous operations" -canonical: "/docs/manual/latest/async-await" +canonical: "/docs/manual/v11.0.0/async-await" --- diff --git a/pages/docs/manual/latest/attribute.mdx b/pages/docs/manual/v11.0.0/attribute.mdx similarity index 98% rename from pages/docs/manual/latest/attribute.mdx rename to pages/docs/manual/v11.0.0/attribute.mdx index 6392dccb9..32e9fad09 100644 --- a/pages/docs/manual/latest/attribute.mdx +++ b/pages/docs/manual/v11.0.0/attribute.mdx @@ -1,7 +1,7 @@ --- title: "Attribute (Decorator)" description: "Annotations in ReScript" -canonical: "/docs/manual/latest/attribute" +canonical: "/docs/manual/v11.0.0/attribute" --- # Attribute (Decorator) diff --git a/pages/docs/manual/latest/bind-to-global-js-values.mdx b/pages/docs/manual/v11.0.0/bind-to-global-js-values.mdx similarity index 98% rename from pages/docs/manual/latest/bind-to-global-js-values.mdx rename to pages/docs/manual/v11.0.0/bind-to-global-js-values.mdx index c08d45a1e..6d1455f37 100644 --- a/pages/docs/manual/latest/bind-to-global-js-values.mdx +++ b/pages/docs/manual/v11.0.0/bind-to-global-js-values.mdx @@ -1,7 +1,7 @@ --- title: "Bind to Global JS Values" description: "JS interop with global JS values in ReScript" -canonical: "/docs/manual/latest/bind-to-global-js-values" +canonical: "/docs/manual/v11.0.0/bind-to-global-js-values" --- # Bind to Global JS Values diff --git a/pages/docs/manual/latest/bind-to-js-function.mdx b/pages/docs/manual/v11.0.0/bind-to-js-function.mdx similarity index 99% rename from pages/docs/manual/latest/bind-to-js-function.mdx rename to pages/docs/manual/v11.0.0/bind-to-js-function.mdx index 58449fa16..f893d693b 100644 --- a/pages/docs/manual/latest/bind-to-js-function.mdx +++ b/pages/docs/manual/v11.0.0/bind-to-js-function.mdx @@ -1,7 +1,7 @@ --- title: "Bind to JS Function" description: "JS interop with functions in ReScript" -canonical: "/docs/manual/latest/bind-to-js-function" +canonical: "/docs/manual/v11.0.0/bind-to-js-function" --- # Function diff --git a/pages/docs/manual/latest/bind-to-js-object.mdx b/pages/docs/manual/v11.0.0/bind-to-js-object.mdx similarity index 98% rename from pages/docs/manual/latest/bind-to-js-object.mdx rename to pages/docs/manual/v11.0.0/bind-to-js-object.mdx index 09a21c226..17974feb4 100644 --- a/pages/docs/manual/latest/bind-to-js-object.mdx +++ b/pages/docs/manual/v11.0.0/bind-to-js-object.mdx @@ -1,7 +1,7 @@ --- title: "Bind to JS Object" description: "Interop with JS objects in ReScript" -canonical: "/docs/manual/latest/bind-to-js-object" +canonical: "/docs/manual/v11.0.0/bind-to-js-object" --- # Bind to JS Object diff --git a/pages/docs/manual/latest/browser-support-polyfills.mdx b/pages/docs/manual/v11.0.0/browser-support-polyfills.mdx similarity index 90% rename from pages/docs/manual/latest/browser-support-polyfills.mdx rename to pages/docs/manual/v11.0.0/browser-support-polyfills.mdx index c1de7a491..5cd65a93f 100644 --- a/pages/docs/manual/latest/browser-support-polyfills.mdx +++ b/pages/docs/manual/v11.0.0/browser-support-polyfills.mdx @@ -1,7 +1,7 @@ --- title: "Browser Support & Polyfills" description: "Note on browser support in ReScript" -canonical: "/docs/manual/latest/browser-support-polyfills" +canonical: "/docs/manual/v11.0.0/browser-support-polyfills" --- # Browser Support & Polyfills diff --git a/pages/docs/manual/latest/build-configuration-schema.mdx b/pages/docs/manual/v11.0.0/build-configuration-schema.mdx similarity index 88% rename from pages/docs/manual/latest/build-configuration-schema.mdx rename to pages/docs/manual/v11.0.0/build-configuration-schema.mdx index 21e098dfb..af0f6d1f5 100644 --- a/pages/docs/manual/latest/build-configuration-schema.mdx +++ b/pages/docs/manual/v11.0.0/build-configuration-schema.mdx @@ -2,7 +2,7 @@ title: "Configuration Schema" metaTitle: "Build System Configuration Schema" description: "Schema exploration widget for the ReScript configuration file" -canonical: "/docs/manual/latest/build-configuration-schema" +canonical: "/docs/manual/v11.0.0/build-configuration-schema" --- import dynamic from "next/dynamic"; diff --git a/pages/docs/manual/latest/build-configuration.mdx b/pages/docs/manual/v11.0.0/build-configuration.mdx similarity index 99% rename from pages/docs/manual/latest/build-configuration.mdx rename to pages/docs/manual/v11.0.0/build-configuration.mdx index 3c548a36a..fe83a9f8c 100644 --- a/pages/docs/manual/latest/build-configuration.mdx +++ b/pages/docs/manual/v11.0.0/build-configuration.mdx @@ -2,7 +2,7 @@ title: "Configuration" metaTitle: "Build System Configuration" description: "Details about the configuration of the ReScript build system (rescript.json)" -canonical: "/docs/manual/latest/build-configuration" +canonical: "/docs/manual/v11.0.0/build-configuration" --- # Configuration diff --git a/pages/docs/manual/latest/build-external-stdlib.mdx b/pages/docs/manual/v11.0.0/build-external-stdlib.mdx similarity index 97% rename from pages/docs/manual/latest/build-external-stdlib.mdx rename to pages/docs/manual/v11.0.0/build-external-stdlib.mdx index ae796932c..3ead7e802 100644 --- a/pages/docs/manual/latest/build-external-stdlib.mdx +++ b/pages/docs/manual/v11.0.0/build-external-stdlib.mdx @@ -2,7 +2,7 @@ title: "External Stdlib" metaTitle: "External Stdlib" description: "Configuring an external ReScript stdlib package" -canonical: "/docs/manual/latest/build-external-stdlib" +canonical: "/docs/manual/v11.0.0/build-external-stdlib" --- # External Stdlib diff --git a/pages/docs/manual/latest/build-overview.mdx b/pages/docs/manual/v11.0.0/build-overview.mdx similarity index 97% rename from pages/docs/manual/latest/build-overview.mdx rename to pages/docs/manual/v11.0.0/build-overview.mdx index 845d34351..f638ebc51 100644 --- a/pages/docs/manual/latest/build-overview.mdx +++ b/pages/docs/manual/v11.0.0/build-overview.mdx @@ -2,7 +2,7 @@ title: "Overview" metaTitle: "Build System Overview" description: "Documentation about the ReScript build system and its toolchain" -canonical: "/docs/manual/latest/build-overview" +canonical: "/docs/manual/v11.0.0/build-overview" --- # Build System Overview diff --git a/pages/docs/manual/latest/build-performance.mdx b/pages/docs/manual/v11.0.0/build-performance.mdx similarity index 97% rename from pages/docs/manual/latest/build-performance.mdx rename to pages/docs/manual/v11.0.0/build-performance.mdx index f1bf8e6c5..cf04a3dfc 100644 --- a/pages/docs/manual/latest/build-performance.mdx +++ b/pages/docs/manual/v11.0.0/build-performance.mdx @@ -2,7 +2,7 @@ title: "Performance" metaTitle: "Build Performance" description: "ReScript build performance and measuring tools" -canonical: "/docs/manual/latest/build-performance" +canonical: "/docs/manual/v11.0.0/build-performance" --- # Build Performance @@ -21,7 +21,11 @@ Run the above command at your ReScript project's root; it'll spit out a JSON fil import Image from "src/components/Image"; - + ## Under the Hood diff --git a/pages/docs/manual/latest/build-pinned-dependencies.mdx b/pages/docs/manual/v11.0.0/build-pinned-dependencies.mdx similarity index 91% rename from pages/docs/manual/latest/build-pinned-dependencies.mdx rename to pages/docs/manual/v11.0.0/build-pinned-dependencies.mdx index ebab8d179..a2b87299c 100644 --- a/pages/docs/manual/latest/build-pinned-dependencies.mdx +++ b/pages/docs/manual/v11.0.0/build-pinned-dependencies.mdx @@ -2,7 +2,7 @@ title: "Pinned Dependencies" metaTitle: "Pinned Dependencies" description: "Handling multiple packages within one ReScript project with pinned dependencies" -canonical: "/docs/manual/latest/build-pinned-dependencies" +canonical: "/docs/manual/v11.0.0/build-pinned-dependencies" --- # Pinned Dependencies @@ -26,6 +26,7 @@ Whenever a package is being built (`rescript build`), the build system will buil The build system respects the following rules for each package type: **Toplevel** + - Warnings reported - Warn-error respected - Builds dev dependencies @@ -34,6 +35,7 @@ The build system respects the following rules for each package type: - Package-specs like JavaScript module or CommonJS overrides all its dependencies **Pinned dependencies** + - Warnings reported - Warn-error respected - Ignores pinned dependencies @@ -41,6 +43,7 @@ The build system respects the following rules for each package type: - Runs custom rules **Normal dependencies** + - Warnings, warn-error ignored - Ignores dev directories - Ignores pinned dependencies @@ -75,16 +78,11 @@ Our `package.json` file within our codebase root would look like this: "name": "myproject", "private": true, "workspaces": { - "packages": [ - "app", - "common", - "myplugin" - ] + "packages": ["app", "common", "myplugin"] } } ``` - Our `app` folder would be our toplevel package, consuming our `common` and `myplugin` packages as `pinned-dependencies`. The configuration for `app/rescript.json` looks like this: ```json @@ -92,15 +90,12 @@ Our `app` folder would be our toplevel package, consuming our `common` and `mypl "name": "app", "version": "1.0.0", "sources": { - "dir" : "src", - "subdirs" : true + "dir": "src", + "subdirs": true }, /* ... */ - "bs-dependencies": [ - "common", - "myplugin" - ], - "pinned-dependencies": ["common", "myplugin"], + "bs-dependencies": ["common", "myplugin"], + "pinned-dependencies": ["common", "myplugin"] /* ... */ } ``` diff --git a/pages/docs/manual/latest/control-flow.mdx b/pages/docs/manual/v11.0.0/control-flow.mdx similarity index 98% rename from pages/docs/manual/latest/control-flow.mdx rename to pages/docs/manual/v11.0.0/control-flow.mdx index 0609725a6..fb2c7a72a 100644 --- a/pages/docs/manual/latest/control-flow.mdx +++ b/pages/docs/manual/v11.0.0/control-flow.mdx @@ -1,7 +1,7 @@ --- title: "If-Else & Loops" description: "If, else, ternary, for, and while" -canonical: "/docs/manual/latest/control-flow" +canonical: "/docs/manual/v11.0.0/control-flow" --- # If-Else & Loops diff --git a/pages/docs/manual/latest/converting-from-js.mdx b/pages/docs/manual/v11.0.0/converting-from-js.mdx similarity index 99% rename from pages/docs/manual/latest/converting-from-js.mdx rename to pages/docs/manual/v11.0.0/converting-from-js.mdx index 5f44b3a19..81bf96b45 100644 --- a/pages/docs/manual/latest/converting-from-js.mdx +++ b/pages/docs/manual/v11.0.0/converting-from-js.mdx @@ -1,7 +1,7 @@ --- title: "Converting from JS" description: "How to convert to ReScript with an existing JS codebase" -canonical: "/docs/manual/latest/converting-from-js" +canonical: "/docs/manual/v11.0.0/converting-from-js" --- # Converting from JS diff --git a/pages/docs/manual/latest/editor-plugins.mdx b/pages/docs/manual/v11.0.0/editor-plugins.mdx similarity index 92% rename from pages/docs/manual/latest/editor-plugins.mdx rename to pages/docs/manual/v11.0.0/editor-plugins.mdx index 41393093f..357af4d04 100644 --- a/pages/docs/manual/latest/editor-plugins.mdx +++ b/pages/docs/manual/v11.0.0/editor-plugins.mdx @@ -1,7 +1,7 @@ --- title: "Editor Plugins" description: "List of ReScript editor plugins" -canonical: "/docs/manual/latest/editor-plugins" +canonical: "/docs/manual/v11.0.0/editor-plugins" --- # Editor Plugins diff --git a/pages/docs/manual/latest/embed-raw-javascript.mdx b/pages/docs/manual/v11.0.0/embed-raw-javascript.mdx similarity index 98% rename from pages/docs/manual/latest/embed-raw-javascript.mdx rename to pages/docs/manual/v11.0.0/embed-raw-javascript.mdx index a1c965c6c..51d6df489 100644 --- a/pages/docs/manual/latest/embed-raw-javascript.mdx +++ b/pages/docs/manual/v11.0.0/embed-raw-javascript.mdx @@ -1,7 +1,7 @@ --- title: "Embed Raw JavaScript" description: "Utility syntax to for raw JS usage in ReScript" -canonical: "/docs/manual/latest/embed-raw-javascript" +canonical: "/docs/manual/v11.0.0/embed-raw-javascript" --- # Embed Raw JavaScript diff --git a/pages/docs/manual/latest/equality-comparison.mdx b/pages/docs/manual/v11.0.0/equality-comparison.mdx similarity index 98% rename from pages/docs/manual/latest/equality-comparison.mdx rename to pages/docs/manual/v11.0.0/equality-comparison.mdx index f862190a4..89252b884 100644 --- a/pages/docs/manual/latest/equality-comparison.mdx +++ b/pages/docs/manual/v11.0.0/equality-comparison.mdx @@ -1,7 +1,7 @@ --- title: "Equality and Comparison" description: "Handling equality and comparison checks" -canonical: "/docs/manual/latest/equality-comparison" +canonical: "/docs/manual/v11.0.0/equality-comparison" --- # Equality and Comparison diff --git a/pages/docs/manual/latest/exception.mdx b/pages/docs/manual/v11.0.0/exception.mdx similarity index 99% rename from pages/docs/manual/latest/exception.mdx rename to pages/docs/manual/v11.0.0/exception.mdx index f68c2d1d7..cba5ff865 100644 --- a/pages/docs/manual/latest/exception.mdx +++ b/pages/docs/manual/v11.0.0/exception.mdx @@ -1,7 +1,7 @@ --- title: "Exception" description: "Exceptions and exception handling in ReScript" -canonical: "/docs/manual/latest/exception" +canonical: "/docs/manual/v11.0.0/exception" --- # Exception diff --git a/pages/docs/manual/latest/extensible-variant.mdx b/pages/docs/manual/v11.0.0/extensible-variant.mdx similarity index 97% rename from pages/docs/manual/latest/extensible-variant.mdx rename to pages/docs/manual/v11.0.0/extensible-variant.mdx index d4133d584..8fa0b42ad 100644 --- a/pages/docs/manual/latest/extensible-variant.mdx +++ b/pages/docs/manual/v11.0.0/extensible-variant.mdx @@ -1,7 +1,7 @@ --- title: "Extensible Variant" description: "Extensible Variants in ReScript" -canonical: "/docs/manual/latest/extensible-variant" +canonical: "/docs/manual/v11.0.0/extensible-variant" --- # Extensible Variant diff --git a/pages/docs/manual/latest/external.mdx b/pages/docs/manual/v11.0.0/external.mdx similarity index 98% rename from pages/docs/manual/latest/external.mdx rename to pages/docs/manual/v11.0.0/external.mdx index d722646b9..b4d3a89f9 100644 --- a/pages/docs/manual/latest/external.mdx +++ b/pages/docs/manual/v11.0.0/external.mdx @@ -1,7 +1,7 @@ --- title: "External (Bind to Any JS Library)" description: "The external keyword" -canonical: "/docs/manual/latest/external" +canonical: "/docs/manual/v11.0.0/external" --- # External (Bind to Any JS Library) diff --git a/pages/docs/manual/latest/faq.mdx b/pages/docs/manual/v11.0.0/faq.mdx similarity index 93% rename from pages/docs/manual/latest/faq.mdx rename to pages/docs/manual/v11.0.0/faq.mdx index b99590aed..5400024fc 100644 --- a/pages/docs/manual/latest/faq.mdx +++ b/pages/docs/manual/v11.0.0/faq.mdx @@ -1,7 +1,7 @@ --- title: "FAQ" description: "Frequently asked questions about ReScript and its ecosystem" -canonical: "/docs/manual/latest/faq" +canonical: "/docs/manual/v11.0.0/faq" --- # Frequently Asked Questions @@ -10,23 +10,20 @@ canonical: "/docs/manual/latest/faq" We aim to provide the best typed language experience for the JavaScript platform. - **What’s the relationship with BuckleScript?** BuckleScript is ReScript's old branding, with a sharper focus on proper JS support and familiarity which we previously couldn't achieve to the degree we wanted, due to us needing to cater to various different crowds. **What’s ReScript's relationship with OCaml?** -We reuse and adjust the excellent type system and lots of other high quality components from OCaml for JS experience. -Additionally, ReScript provides its own syntax, build system, IDE, backend, JS interop, extra language features, etc. +We reuse and adjust the excellent type system and lots of other high quality components from OCaml for JS experience. +Additionally, ReScript provides its own syntax, build system, IDE, backend, JS interop, extra language features, etc. -The ReScript toolchain is developed using OCaml, however, the version of ReScript is decoupled against the version of OCaml, +The ReScript toolchain is developed using OCaml, however, the version of ReScript is decoupled against the version of OCaml, ReScript compiler should build against any reasonable modern version of OCaml compiler. For the majority of ReScript users, they don't need to learn OCaml or use OCaml toolchain to be productive in ReScript. - - **What’s the relationship with Reason?** See [here](/blog/bucklescript-is-rebranding). Reason is a syntax layer for OCaml that BuckleScript also adopted. The current ReScript compiler also supports the old Reason syntax v3.6 for backward compatibility. We will support it for a long time to make sure existing users do not get breaking changes. diff --git a/pages/docs/manual/latest/function.mdx b/pages/docs/manual/v11.0.0/function.mdx similarity index 99% rename from pages/docs/manual/latest/function.mdx rename to pages/docs/manual/v11.0.0/function.mdx index 70005e323..8be81acaf 100644 --- a/pages/docs/manual/latest/function.mdx +++ b/pages/docs/manual/v11.0.0/function.mdx @@ -1,7 +1,7 @@ --- title: "Function" description: "Function syntax in ReScript" -canonical: "/docs/manual/latest/function" +canonical: "/docs/manual/v11.0.0/function" --- # Function diff --git a/pages/docs/manual/latest/generate-converters-accessors.mdx b/pages/docs/manual/v11.0.0/generate-converters-accessors.mdx similarity index 98% rename from pages/docs/manual/latest/generate-converters-accessors.mdx rename to pages/docs/manual/v11.0.0/generate-converters-accessors.mdx index 27defa849..3dc42a317 100644 --- a/pages/docs/manual/latest/generate-converters-accessors.mdx +++ b/pages/docs/manual/v11.0.0/generate-converters-accessors.mdx @@ -1,7 +1,7 @@ --- title: "Generate Converters & Helpers" description: "All about the @deriving decorator, and how to generate code from types" -canonical: "/docs/manual/latest/generate-converters-accessors" +canonical: "/docs/manual/v11.0.0/generate-converters-accessors" --- # Generate Converters & Helpers diff --git a/pages/docs/manual/latest/import-export.mdx b/pages/docs/manual/v11.0.0/import-export.mdx similarity index 96% rename from pages/docs/manual/latest/import-export.mdx rename to pages/docs/manual/v11.0.0/import-export.mdx index dea3feccc..1ebdb39c4 100644 --- a/pages/docs/manual/latest/import-export.mdx +++ b/pages/docs/manual/v11.0.0/import-export.mdx @@ -1,7 +1,7 @@ --- title: "Import & Export" description: "Importing / exporting in ReScript modules" -canonical: "/docs/manual/latest/import-export" +canonical: "/docs/manual/v11.0.0/import-export" --- # Import & Export diff --git a/pages/docs/manual/latest/import-from-export-to-js.mdx b/pages/docs/manual/v11.0.0/import-from-export-to-js.mdx similarity index 99% rename from pages/docs/manual/latest/import-from-export-to-js.mdx rename to pages/docs/manual/v11.0.0/import-from-export-to-js.mdx index 6328666c1..fb149fd2e 100644 --- a/pages/docs/manual/latest/import-from-export-to-js.mdx +++ b/pages/docs/manual/v11.0.0/import-from-export-to-js.mdx @@ -1,7 +1,7 @@ --- title: "Import from / Export to JS" description: "Importing / exporting JS module content in ReScript" -canonical: "/docs/manual/latest/import-from-export-to-js" +canonical: "/docs/manual/v11.0.0/import-from-export-to-js" --- # Import from/Export to JS diff --git a/pages/docs/manual/latest/inlining-constants.mdx b/pages/docs/manual/v11.0.0/inlining-constants.mdx similarity index 97% rename from pages/docs/manual/latest/inlining-constants.mdx rename to pages/docs/manual/v11.0.0/inlining-constants.mdx index 3f8c40a08..053c6ccd2 100644 --- a/pages/docs/manual/latest/inlining-constants.mdx +++ b/pages/docs/manual/v11.0.0/inlining-constants.mdx @@ -1,7 +1,7 @@ --- title: "Inlining Constants" description: "Inlining constants" -canonical: "/docs/manual/latest/inlining-constants" +canonical: "/docs/manual/v11.0.0/inlining-constants" --- # Inlining Constants diff --git a/pages/docs/manual/latest/installation.mdx b/pages/docs/manual/v11.0.0/installation.mdx similarity index 97% rename from pages/docs/manual/latest/installation.mdx rename to pages/docs/manual/v11.0.0/installation.mdx index 86f9a935d..5fa992e07 100644 --- a/pages/docs/manual/latest/installation.mdx +++ b/pages/docs/manual/v11.0.0/installation.mdx @@ -1,7 +1,7 @@ --- title: "Installation" description: "ReScript installation and setup instructions" -canonical: "/docs/manual/latest/installation" +canonical: "/docs/manual/v11.0.0/installation" --- # Installation @@ -144,7 +144,7 @@ Since ReScript compiles to clean readable JS files, the rest of your existing to Helpful guides: -- [Converting from JS](converting-from-js). +- [Converting from JS](/docs/manual/latest/converting-from-js). - [Shared Data Types](shared-data-types). - [Import from/Export to JS](import-from-export-to-js). diff --git a/pages/docs/manual/latest/interop-cheatsheet.mdx b/pages/docs/manual/v11.0.0/interop-cheatsheet.mdx similarity index 99% rename from pages/docs/manual/latest/interop-cheatsheet.mdx rename to pages/docs/manual/v11.0.0/interop-cheatsheet.mdx index 41c4b195e..fed6d34ce 100644 --- a/pages/docs/manual/latest/interop-cheatsheet.mdx +++ b/pages/docs/manual/v11.0.0/interop-cheatsheet.mdx @@ -1,7 +1,7 @@ --- title: "Interop Cheatsheet" description: "Cheatsheet for various interop scenarios in ReScript" -canonical: "/docs/manual/latest/interop-cheatsheet" +canonical: "/docs/manual/v11.0.0/interop-cheatsheet" --- # Interop Cheatsheet diff --git a/pages/docs/manual/latest/interop-with-js-build-systems.mdx b/pages/docs/manual/v11.0.0/interop-with-js-build-systems.mdx similarity index 98% rename from pages/docs/manual/latest/interop-with-js-build-systems.mdx rename to pages/docs/manual/v11.0.0/interop-with-js-build-systems.mdx index e043504b9..c5e6b2220 100644 --- a/pages/docs/manual/latest/interop-with-js-build-systems.mdx +++ b/pages/docs/manual/v11.0.0/interop-with-js-build-systems.mdx @@ -1,7 +1,7 @@ --- title: "Interop with JS Build Systems" description: "Documentation on how to interact with existing JS build systems" -canonical: "/docs/manual/latest/interop-with-js-build-systems" +canonical: "/docs/manual/v11.0.0/interop-with-js-build-systems" --- # Interop with JS Build Systems diff --git a/pages/docs/manual/latest/introduction.mdx b/pages/docs/manual/v11.0.0/introduction.mdx similarity index 99% rename from pages/docs/manual/latest/introduction.mdx rename to pages/docs/manual/v11.0.0/introduction.mdx index 9fa73cdca..747ae1344 100644 --- a/pages/docs/manual/latest/introduction.mdx +++ b/pages/docs/manual/v11.0.0/introduction.mdx @@ -1,7 +1,7 @@ --- title: "Introduction" description: "The hows and whys of ReScript" -canonical: "/docs/manual/latest/introduction" +canonical: "/docs/manual/v11.0.0/introduction" --- # ReScript diff --git a/pages/docs/manual/latest/json.mdx b/pages/docs/manual/v11.0.0/json.mdx similarity index 98% rename from pages/docs/manual/latest/json.mdx rename to pages/docs/manual/v11.0.0/json.mdx index cc6d5cec0..a0004bcd5 100644 --- a/pages/docs/manual/latest/json.mdx +++ b/pages/docs/manual/v11.0.0/json.mdx @@ -1,7 +1,7 @@ --- title: "JSON" description: "Interacting with JSON in ReScript" -canonical: "/docs/manual/latest/json" +canonical: "/docs/manual/v11.0.0/json" --- # JSON diff --git a/pages/docs/manual/latest/jsx.mdx b/pages/docs/manual/v11.0.0/jsx.mdx similarity index 99% rename from pages/docs/manual/latest/jsx.mdx rename to pages/docs/manual/v11.0.0/jsx.mdx index 6973a9731..f3bc8bb32 100644 --- a/pages/docs/manual/latest/jsx.mdx +++ b/pages/docs/manual/v11.0.0/jsx.mdx @@ -1,7 +1,7 @@ --- title: "JSX" description: "JSX syntax in ReScript and React" -canonical: "/docs/manual/latest/jsx" +canonical: "/docs/manual/v11.0.0/jsx" --- # JSX diff --git a/pages/docs/manual/latest/lazy-values.mdx b/pages/docs/manual/v11.0.0/lazy-values.mdx similarity index 98% rename from pages/docs/manual/latest/lazy-values.mdx rename to pages/docs/manual/v11.0.0/lazy-values.mdx index a8743f8a2..1b9bf27de 100644 --- a/pages/docs/manual/latest/lazy-values.mdx +++ b/pages/docs/manual/v11.0.0/lazy-values.mdx @@ -1,7 +1,7 @@ --- title: "Lazy Value" description: "Data type for deferred computation in ReScript" -canonical: "/docs/manual/latest/lazy-values" +canonical: "/docs/manual/v11.0.0/lazy-values" --- # Lazy Value diff --git a/pages/docs/manual/latest/let-binding.mdx b/pages/docs/manual/v11.0.0/let-binding.mdx similarity index 99% rename from pages/docs/manual/latest/let-binding.mdx rename to pages/docs/manual/v11.0.0/let-binding.mdx index 9372c9fae..54602b353 100644 --- a/pages/docs/manual/latest/let-binding.mdx +++ b/pages/docs/manual/v11.0.0/let-binding.mdx @@ -1,7 +1,7 @@ --- title: "Let Binding" description: "Let binding syntax for binding to values in ReScript" -canonical: "/docs/manual/latest/let-binding" +canonical: "/docs/manual/v11.0.0/let-binding" --- # Let Binding diff --git a/pages/docs/manual/latest/libraries.mdx b/pages/docs/manual/v11.0.0/libraries.mdx similarity index 97% rename from pages/docs/manual/latest/libraries.mdx rename to pages/docs/manual/v11.0.0/libraries.mdx index 302f80fb1..df230de26 100644 --- a/pages/docs/manual/latest/libraries.mdx +++ b/pages/docs/manual/v11.0.0/libraries.mdx @@ -1,7 +1,7 @@ --- title: "Libraries & Publishing" description: "Install & publish ReScript packages" -canonical: "/docs/manual/latest/libraries" +canonical: "/docs/manual/v11.0.0/libraries" --- # Libraries & Publishing diff --git a/pages/docs/manual/latest/migrate-to-v11.mdx b/pages/docs/manual/v11.0.0/migrate-to-v11.mdx similarity index 99% rename from pages/docs/manual/latest/migrate-to-v11.mdx rename to pages/docs/manual/v11.0.0/migrate-to-v11.mdx index 81faf323b..f63c09ec8 100644 --- a/pages/docs/manual/latest/migrate-to-v11.mdx +++ b/pages/docs/manual/v11.0.0/migrate-to-v11.mdx @@ -1,7 +1,7 @@ --- title: "Migrate to v11" description: "Instructions on upgrading to ReScript 11" -canonical: "/docs/manual/latest/migrate-to-v11" +canonical: "/docs/manual/v11.0.0/migrate-to-v11" --- # Migrate to ReScript 11 diff --git a/pages/docs/manual/latest/module-functions.mdx b/pages/docs/manual/v11.0.0/module-functions.mdx similarity index 99% rename from pages/docs/manual/latest/module-functions.mdx rename to pages/docs/manual/v11.0.0/module-functions.mdx index 04c6ff458..18f74a4bb 100644 --- a/pages/docs/manual/latest/module-functions.mdx +++ b/pages/docs/manual/v11.0.0/module-functions.mdx @@ -1,7 +1,7 @@ --- title: "Module Functions" description: "Module Functions in ReScript" -canonical: "/docs/manual/latest/module-functions" +canonical: "/docs/manual/v11.0.0/module-functions" --- # Module Functions diff --git a/pages/docs/manual/latest/module.mdx b/pages/docs/manual/v11.0.0/module.mdx similarity index 99% rename from pages/docs/manual/latest/module.mdx rename to pages/docs/manual/v11.0.0/module.mdx index 018785b5d..3d9f29800 100644 --- a/pages/docs/manual/latest/module.mdx +++ b/pages/docs/manual/v11.0.0/module.mdx @@ -1,7 +1,7 @@ --- title: "Module" description: "ReScript modules, module signatures and interface files" -canonical: "/docs/manual/latest/module" +canonical: "/docs/manual/v11.0.0/module" --- # Module diff --git a/pages/docs/manual/latest/mutation.mdx b/pages/docs/manual/v11.0.0/mutation.mdx similarity index 97% rename from pages/docs/manual/latest/mutation.mdx rename to pages/docs/manual/v11.0.0/mutation.mdx index 750613a4a..33d4050f0 100644 --- a/pages/docs/manual/latest/mutation.mdx +++ b/pages/docs/manual/v11.0.0/mutation.mdx @@ -1,7 +1,7 @@ --- title: "Mutation" description: "Imperative and mutative programming capabilities in ReScript" -canonical: "/docs/manual/latest/mutation" +canonical: "/docs/manual/v11.0.0/mutation" --- # Mutation diff --git a/pages/docs/manual/latest/newcomer-examples.mdx b/pages/docs/manual/v11.0.0/newcomer-examples.mdx similarity index 98% rename from pages/docs/manual/latest/newcomer-examples.mdx rename to pages/docs/manual/v11.0.0/newcomer-examples.mdx index 87d4168e4..30b241781 100644 --- a/pages/docs/manual/latest/newcomer-examples.mdx +++ b/pages/docs/manual/v11.0.0/newcomer-examples.mdx @@ -1,7 +1,7 @@ --- title: "Newcomer Examples" description: "Quick examples for users new to ReScript" -canonical: "/docs/manual/latest/newcomer-examples" +canonical: "/docs/manual/v11.0.0/newcomer-examples" --- # Newcomer Examples diff --git a/pages/docs/manual/latest/null-undefined-option.mdx b/pages/docs/manual/v11.0.0/null-undefined-option.mdx similarity index 99% rename from pages/docs/manual/latest/null-undefined-option.mdx rename to pages/docs/manual/v11.0.0/null-undefined-option.mdx index f49153ce2..fc7bb5dbd 100644 --- a/pages/docs/manual/latest/null-undefined-option.mdx +++ b/pages/docs/manual/v11.0.0/null-undefined-option.mdx @@ -1,7 +1,7 @@ --- title: "Null, Undefined and Option" description: "JS interop with nullable and optional values in ReScript" -canonical: "/docs/manual/latest/null-undefined-option" +canonical: "/docs/manual/v11.0.0/null-undefined-option" --- # Null, Undefined and Option diff --git a/pages/docs/manual/latest/object.mdx b/pages/docs/manual/v11.0.0/object.mdx similarity index 99% rename from pages/docs/manual/latest/object.mdx rename to pages/docs/manual/v11.0.0/object.mdx index 41adf4485..6a16984ab 100644 --- a/pages/docs/manual/latest/object.mdx +++ b/pages/docs/manual/v11.0.0/object.mdx @@ -1,7 +1,7 @@ --- title: "Object" description: "Interoping with JS objects in ReScript" -canonical: "/docs/manual/latest/object" +canonical: "/docs/manual/v11.0.0/object" --- # Object diff --git a/pages/docs/manual/latest/overview.mdx b/pages/docs/manual/v11.0.0/overview.mdx similarity index 52% rename from pages/docs/manual/latest/overview.mdx rename to pages/docs/manual/v11.0.0/overview.mdx index 9ffd6bbc4..4d5c2a382 100644 --- a/pages/docs/manual/latest/overview.mdx +++ b/pages/docs/manual/v11.0.0/overview.mdx @@ -2,7 +2,7 @@ title: "Overview" metaTitle: "Language Features Overview" description: "A quick overview on ReScript's syntax" -canonical: "/docs/manual/latest/overview" +canonical: "/docs/manual/v11.0.0/overview" --- # Overview @@ -11,9 +11,9 @@ canonical: "/docs/manual/latest/overview" ### Semicolon -| JavaScript | ReScript | -| ------------------------------------ | -------------------- | -| Rules enforced by linter/formatter | No semicolon needed! | +| JavaScript | ReScript | +| ---------------------------------- | -------------------- | +| Rules enforced by linter/formatter | No semicolon needed! | ### Comments @@ -26,21 +26,21 @@ canonical: "/docs/manual/latest/overview" ### Variable -| JavaScript | ReScript | -| ----------------------- | ------------------------------ | -| `const x = 5;` | `let x = 5` | -| `var x = y;` | No equivalent (thankfully) | +| JavaScript | ReScript | +| ----------------------- | ------------------------------------- | +| `const x = 5;` | `let x = 5` | +| `var x = y;` | No equivalent (thankfully) | | `let x = 5; x = x + 1;` | `let x = ref(5); x := x.contents + 1` | ### String & Character -| JavaScript | ReScript | -| ----------------------------- | --------------------- | -| `"Hello world!"` | Same | -| `'Hello world!'` | Strings must use `"` | -| `"hello " + "world"` | `"hello " ++ "world"` | -| `` `hello ${message}` `` | Same | -| `` sql`select ${fnName};` `` | Same | +| JavaScript | ReScript | +| ---------------------------- | --------------------- | +| `"Hello world!"` | Same | +| `'Hello world!'` | Strings must use `"` | +| `"hello " + "world"` | `"hello " ++ "world"` | +| `` `hello ${message}` `` | Same | +| `` sql`select ${fnName};` `` | Same | ### Boolean @@ -77,11 +77,11 @@ canonical: "/docs/manual/latest/overview" ### Array -| JavaScript | ReScript | -| --------------------- | ---------------------------------- | -| `[1, 2, 3]` | Same | -| `myArray[1] = 10` | Same | -| `[1, "Bob", true]` | `(1, "Bob", true)` \* | +| JavaScript | ReScript | +| ------------------ | --------------------- | +| `[1, 2, 3]` | Same | +| `myArray[1] = 10` | Same | +| `[1, "Bob", true]` | `(1, "Bob", true)` \* | \* ReScript does not have heterogenous arrays. Use tuples or [Untagged Variants](variant#untagged-variants) instead. @@ -104,12 +104,12 @@ canonical: "/docs/manual/latest/overview" ### Async Function / Await -| JavaScript | ReScript | -| ---------------------------------------- | ---------------------------------- | -| `async (arg) => {...}` | Same | -| `async function named(arg) {...}` | `let named = async (arg) => {...}` | -| `await somePromise` | Same | -| `async (arg): Promise => {...}` | `async (arg): string => {...}` (note the return type)| +| JavaScript | ReScript | +| --------------------------------------- | ----------------------------------------------------- | +| `async (arg) => {...}` | Same | +| `async function named(arg) {...}` | `let named = async (arg) => {...}` | +| `await somePromise` | Same | +| `async (arg): Promise => {...}` | `async (arg): string => {...}` (note the return type) | ### Blocks @@ -146,31 +146,31 @@ canonical: "/docs/manual/latest/overview" ### If-else -| JavaScript | ReScript | -| --------------------- | ------------------------------------------------------------------- | -| `if (a) {b} else {c}` | `if a {b} else {c}` \* | -| `a ? b : c` | Same | +| JavaScript | ReScript | +| --------------------- | --------------------------------------------------------------------------------- | +| `if (a) {b} else {c}` | `if a {b} else {c}` \* | +| `a ? b : c` | Same | | `switch` | `switch` but [super-powered pattern matching!](pattern-matching-destructuring.md) | \* Our conditionals are always expressions! You can write `let result = if a {"hello"} else {"bye"}` ### Destructuring -| JavaScript | ReScript | -| ----------------------------- | --------------------------------------------- | -| `const {a, b} = data` | `let {a, b} = data` | -| `const [a, b] = data` | `let [a, b] = data` \* | -| `const {a: aa, b: bb} = data` | `let {a: aa, b: bb} = data` | +| JavaScript | ReScript | +| ----------------------------- | --------------------------- | +| `const {a, b} = data` | `let {a, b} = data` | +| `const [a, b] = data` | `let [a, b] = data` \* | +| `const {a: aa, b: bb} = data` | `let {a: aa, b: bb} = data` | \* Gives good compiler warning that `data` might not be of length 2. ### Loop -| JavaScript | ReScript | -| ------------------------------------- | ------------------------------ | -| `for (let i = 0; i <= 10; i++) {...}` | `for i in 0 to 10 {...}` | -| `for (let i = 10; i >= 0; i--) {...}` | `for i in 10 downto 0 {...}` | -| `while (true) {...}` | `while true {...}` | +| JavaScript | ReScript | +| ------------------------------------- | ---------------------------- | +| `for (let i = 0; i <= 10; i++) {...}` | `for i in 0 to 10 {...}` | +| `for (let i = 10; i >= 0; i--) {...}` | `for i in 10 downto 0 {...}` | +| `while (true) {...}` | `while true {...}` | ### JSX @@ -185,10 +185,10 @@ canonical: "/docs/manual/latest/overview" ### Exception -| JavaScript | ReScript | -| ----------------------------------------------- | ------------------------------------------ | -| `throw new SomeError(...)` | `raise(SomeError(...))` | -| `try {a} catch (err) {...} finally {...}` | `try a catch { \| SomeError(err) => ...}` \* | +| JavaScript | ReScript | +| ----------------------------------------- | -------------------------------------------- | +| `throw new SomeError(...)` | `raise(SomeError(...))` | +| `try {a} catch (err) {...} finally {...}` | `try a catch { \| SomeError(err) => ...}` \* | \* No finally. @@ -229,27 +229,27 @@ The last expression of a block delimited by `{}` implicitly returns (including f ## Common Features' JS Output -Feature | Example | JavaScript Output ---------------------------------|--------------------------------------|---------------------- -String | `"Hello"` | `"Hello"` -String Interpolation | `` `Hello ${message}` `` | `"Hello " + message` -Character (disrecommended) | `'x'` | `120` (char code) -Integer | `23`, `-23` | `23`, `-23` -Float | `23.0`, `-23.0` | `23.0`, `-23.0` -Integer Addition | `23 + 1` | `23 + 1` -Float Addition | `23.0 +. 1.0` | `23.0 + 1.0` -Integer Division/Multiplication | `2 / 23 * 1` | `2 / 23 * 1` -Float Division/Multiplication | `2.0 /. 23.0 *. 1.0` | `2.0 / 23.0 * 1.0` -Float Exponentiation | `2.0 ** 3.0` | `Math.pow(2.0, 3.0)` -String Concatenation | `"Hello " ++ "World"` | `"Hello " + "World"` -Comparison | `>`, `<`, `>=`, `<=` | `>`, `<`, `>=`, `<=` -Boolean operation | `!`, `&&`, || | `!`, `&&`, || -Shallow and deep Equality | `===`, `==` | `===`, `==` -List (disrecommended) | `list{1, 2, 3}` | `{hd: 1, tl: {hd: 2, tl: {hd: 3, tl: 0}}}` -List Prepend | `list{a1, a2, ...oldList}` | `{hd: a1, tl: {hd: a2, tl: theRest}}` -Array | `[1, 2, 3]` | `[1, 2, 3]` -Record | `type t = {b: int}; let a = {b: 10}` | `var a = {b: 10}` -Multiline Comment | `/* Comment here */` | Not in output -Single line Comment | `// Comment here` | Not in output +| Feature | Example | JavaScript Output | +| ------------------------------- | ------------------------------------ | ------------------------------------------ | +| String | `"Hello"` | `"Hello"` | +| String Interpolation | `` `Hello ${message}` `` | `"Hello " + message` | +| Character (disrecommended) | `'x'` | `120` (char code) | +| Integer | `23`, `-23` | `23`, `-23` | +| Float | `23.0`, `-23.0` | `23.0`, `-23.0` | +| Integer Addition | `23 + 1` | `23 + 1` | +| Float Addition | `23.0 +. 1.0` | `23.0 + 1.0` | +| Integer Division/Multiplication | `2 / 23 * 1` | `2 / 23 * 1` | +| Float Division/Multiplication | `2.0 /. 23.0 *. 1.0` | `2.0 / 23.0 * 1.0` | +| Float Exponentiation | `2.0 ** 3.0` | `Math.pow(2.0, 3.0)` | +| String Concatenation | `"Hello " ++ "World"` | `"Hello " + "World"` | +| Comparison | `>`, `<`, `>=`, `<=` | `>`, `<`, `>=`, `<=` | +| Boolean operation | `!`, `&&`, || | `!`, `&&`, || | +| Shallow and deep Equality | `===`, `==` | `===`, `==` | +| List (disrecommended) | `list{1, 2, 3}` | `{hd: 1, tl: {hd: 2, tl: {hd: 3, tl: 0}}}` | +| List Prepend | `list{a1, a2, ...oldList}` | `{hd: a1, tl: {hd: a2, tl: theRest}}` | +| Array | `[1, 2, 3]` | `[1, 2, 3]` | +| Record | `type t = {b: int}; let a = {b: 10}` | `var a = {b: 10}` | +| Multiline Comment | `/* Comment here */` | Not in output | +| Single line Comment | `// Comment here` | Not in output | _Note that this is a cleaned-up comparison table; a few examples' JavaScript output are slightly different in reality._ diff --git a/pages/docs/manual/latest/pattern-matching-destructuring.mdx b/pages/docs/manual/v11.0.0/pattern-matching-destructuring.mdx similarity index 99% rename from pages/docs/manual/latest/pattern-matching-destructuring.mdx rename to pages/docs/manual/v11.0.0/pattern-matching-destructuring.mdx index 2aa70d210..64e8a445c 100644 --- a/pages/docs/manual/latest/pattern-matching-destructuring.mdx +++ b/pages/docs/manual/v11.0.0/pattern-matching-destructuring.mdx @@ -1,7 +1,7 @@ --- title: "Pattern Matching / Destructuring" description: "Pattern matching and destructuring complex data structures in ReScript" -canonical: "/docs/manual/latest/pattern-matching-destructuring" +canonical: "/docs/manual/v11.0.0/pattern-matching-destructuring" --- # Pattern Matching / Destructuring diff --git a/pages/docs/manual/latest/pipe.mdx b/pages/docs/manual/v11.0.0/pipe.mdx similarity index 99% rename from pages/docs/manual/latest/pipe.mdx rename to pages/docs/manual/v11.0.0/pipe.mdx index 32c45277a..86826e7de 100644 --- a/pages/docs/manual/latest/pipe.mdx +++ b/pages/docs/manual/v11.0.0/pipe.mdx @@ -1,7 +1,7 @@ --- title: "Pipe" description: "The Pipe operator (->)" -canonical: "/docs/manual/latest/pipe" +canonical: "/docs/manual/v11.0.0/pipe" --- # Pipe diff --git a/pages/docs/manual/latest/polymorphic-variant.mdx b/pages/docs/manual/v11.0.0/polymorphic-variant.mdx similarity index 99% rename from pages/docs/manual/latest/polymorphic-variant.mdx rename to pages/docs/manual/v11.0.0/polymorphic-variant.mdx index 084d4cf59..66bf22ec5 100644 --- a/pages/docs/manual/latest/polymorphic-variant.mdx +++ b/pages/docs/manual/v11.0.0/polymorphic-variant.mdx @@ -1,7 +1,7 @@ --- title: "Polymorphic Variant" description: "The Polymorphic Variant data structure in ReScript" -canonical: "/docs/manual/latest/polymorphic-variant" +canonical: "/docs/manual/v11.0.0/polymorphic-variant" --- # Polymorphic Variant diff --git a/pages/docs/manual/latest/primitive-types.mdx b/pages/docs/manual/v11.0.0/primitive-types.mdx similarity index 99% rename from pages/docs/manual/latest/primitive-types.mdx rename to pages/docs/manual/v11.0.0/primitive-types.mdx index 7c5843bb7..4e86665b0 100644 --- a/pages/docs/manual/latest/primitive-types.mdx +++ b/pages/docs/manual/v11.0.0/primitive-types.mdx @@ -1,7 +1,7 @@ --- title: "Primitive Types" description: "Primitive Data Types in ReScript" -canonical: "/docs/manual/latest/primitive-types" +canonical: "/docs/manual/v11.0.0/primitive-types" --- # Primitive Types diff --git a/pages/docs/manual/latest/project-structure.mdx b/pages/docs/manual/v11.0.0/project-structure.mdx similarity index 98% rename from pages/docs/manual/latest/project-structure.mdx rename to pages/docs/manual/v11.0.0/project-structure.mdx index 93e77f0f0..0e1ee94c6 100644 --- a/pages/docs/manual/latest/project-structure.mdx +++ b/pages/docs/manual/v11.0.0/project-structure.mdx @@ -1,7 +1,7 @@ --- title: "Project Structure" description: "Notes on project structure and other rough ReScript guidelines" -canonical: "/docs/manual/latest/project-structure" +canonical: "/docs/manual/v11.0.0/project-structure" --- # Project Structure diff --git a/pages/docs/manual/latest/promise.mdx b/pages/docs/manual/v11.0.0/promise.mdx similarity index 99% rename from pages/docs/manual/latest/promise.mdx rename to pages/docs/manual/v11.0.0/promise.mdx index 16a2b891e..6aa9c5b76 100644 --- a/pages/docs/manual/latest/promise.mdx +++ b/pages/docs/manual/v11.0.0/promise.mdx @@ -1,7 +1,7 @@ --- title: "Promises" description: "JS Promise handling in ReScript" -canonical: "/docs/manual/latest/promise" +canonical: "/docs/manual/v11.0.0/promise" --- # Promise diff --git a/pages/docs/manual/latest/record.mdx b/pages/docs/manual/v11.0.0/record.mdx similarity index 99% rename from pages/docs/manual/latest/record.mdx rename to pages/docs/manual/v11.0.0/record.mdx index b251d7aa4..c95afb258 100644 --- a/pages/docs/manual/latest/record.mdx +++ b/pages/docs/manual/v11.0.0/record.mdx @@ -1,7 +1,7 @@ --- title: "Record" description: "Record types in ReScript" -canonical: "/docs/manual/latest/record" +canonical: "/docs/manual/v11.0.0/record" --- # Record diff --git a/pages/docs/manual/latest/reserved-keywords.mdx b/pages/docs/manual/v11.0.0/reserved-keywords.mdx similarity index 75% rename from pages/docs/manual/latest/reserved-keywords.mdx rename to pages/docs/manual/v11.0.0/reserved-keywords.mdx index 519050c5a..3426a8c32 100644 --- a/pages/docs/manual/latest/reserved-keywords.mdx +++ b/pages/docs/manual/v11.0.0/reserved-keywords.mdx @@ -1,7 +1,7 @@ --- title: "Reserved Keywords" description: "All reserved keywords in ReScript" -canonical: "/docs/manual/latest/reserved-keywords" +canonical: "/docs/manual/v11.0.0/reserved-keywords" --- # Reserved Keywords @@ -14,79 +14,67 @@ canonical: "/docs/manual/latest/reserved-keywords" - `as` - `assert` - - -- `constraint` +- `constraint` - - `else` - - + + - `exception` - `external` - -- `false` -- `for` - - - - +* `false` +* `for` + + + - `if` - `in` - `include` - - - - -- `lazy` -- `let` + + +* `lazy` +* `let` - `module` - `mutable` - - + - `of` - `open` - - + - - `rec` - -- `switch` +- `switch` + - `true` - `try` - `type` - - - `when` - `while` - `with` diff --git a/pages/docs/manual/latest/scoped-polymorphic-types.mdx b/pages/docs/manual/v11.0.0/scoped-polymorphic-types.mdx similarity index 98% rename from pages/docs/manual/latest/scoped-polymorphic-types.mdx rename to pages/docs/manual/v11.0.0/scoped-polymorphic-types.mdx index a693fff74..822f34f95 100644 --- a/pages/docs/manual/latest/scoped-polymorphic-types.mdx +++ b/pages/docs/manual/v11.0.0/scoped-polymorphic-types.mdx @@ -1,7 +1,7 @@ --- title: "Scoped Polymorphic Types" description: "Scoped Polymorphic Types in ReScript" -canonical: "/docs/manual/latest/scoped-polymorphic-types" +canonical: "/docs/manual/v11.0.0/scoped-polymorphic-types" --- # Scoped Polymorphic Types diff --git a/pages/docs/manual/latest/shared-data-types.mdx b/pages/docs/manual/v11.0.0/shared-data-types.mdx similarity index 98% rename from pages/docs/manual/latest/shared-data-types.mdx rename to pages/docs/manual/v11.0.0/shared-data-types.mdx index 530713b8d..59e2919d3 100644 --- a/pages/docs/manual/latest/shared-data-types.mdx +++ b/pages/docs/manual/v11.0.0/shared-data-types.mdx @@ -1,7 +1,7 @@ --- title: "Shared Data Types" description: "Data types that share runtime presentation between JS and ReScript" -canonical: "/docs/manual/latest/shared-data-types" +canonical: "/docs/manual/v11.0.0/shared-data-types" --- # Shared Data Types @@ -13,6 +13,7 @@ This means that if you're passing e.g. a ReScript string to the JavaScript side, Unlike most compiled-to-js languages, in ReScript, **you don't need to write data converters back and forth for most of our values**! **Shared, bidirectionally usable types**: + - String. ReScript strings are JavaScript strings, vice-versa. (Caveat: only our backtick string `` `hello 👋 ${personName}` `` supports unicode and interpolation). - Float. ReScript floats are JS numbers, vice-versa. - Array. In addition to the [Array API](api/core/array), we provide our own [Belt.Array](api/belt/array#set) API too. @@ -26,6 +27,7 @@ Unlike most compiled-to-js languages, in ReScript, **you don't need to write dat - Unit. The `unit` type, which has a single value `()`, compiles to `undefined` too. Likewise, you can treat an incoming JS `undefined` as `()` if that's the only value it'll ever be. **Types that are slightly different than JS, but that you can still use from JS**: + - Int. **Ints are 32-bits**! Be careful, you can potentially treat them as JS numbers and vice-versa, but if the number's large, then you better treat JS numbers as floats. For example, we bind to `Date` using `float`s. - Option. The `option` type's `None` value compiles into JS `undefined`. The `Some` value, e.g. `Some(5)`, compiles to `5`. Likewise, you can treat an incoming JS `undefined` as `None`. **JS `null` isn't handled here**. If your JS value can be `null`, use [Nullable](api/core/nullable) helpers. - Exception. diff --git a/pages/docs/manual/latest/tagged-templates.mdx b/pages/docs/manual/v11.0.0/tagged-templates.mdx similarity index 98% rename from pages/docs/manual/latest/tagged-templates.mdx rename to pages/docs/manual/v11.0.0/tagged-templates.mdx index f3dabb194..a3d3e0ac1 100644 --- a/pages/docs/manual/latest/tagged-templates.mdx +++ b/pages/docs/manual/v11.0.0/tagged-templates.mdx @@ -1,7 +1,7 @@ --- title: "Tagged templates" description: "Using tagged templates in ReScript" -canonical: "/docs/manual/latest/tagged-templates" +canonical: "/docs/manual/v11.0.0/tagged-templates" --- # Tagged templates diff --git a/pages/docs/manual/latest/try.mdx b/pages/docs/manual/v11.0.0/try.mdx similarity index 89% rename from pages/docs/manual/latest/try.mdx rename to pages/docs/manual/v11.0.0/try.mdx index 1f6c913ff..8969401a3 100644 --- a/pages/docs/manual/latest/try.mdx +++ b/pages/docs/manual/v11.0.0/try.mdx @@ -1,7 +1,7 @@ --- title: "Try" description: "Try ReScript via Command Line" -canonical: "/docs/manual/latest/try" +canonical: "/docs/manual/v11.0.0/try" --- ## Try Online diff --git a/pages/docs/manual/latest/tuple.mdx b/pages/docs/manual/v11.0.0/tuple.mdx similarity index 98% rename from pages/docs/manual/latest/tuple.mdx rename to pages/docs/manual/v11.0.0/tuple.mdx index 951584c4f..13a5e1483 100644 --- a/pages/docs/manual/latest/tuple.mdx +++ b/pages/docs/manual/v11.0.0/tuple.mdx @@ -1,7 +1,7 @@ --- title: "Tuple" description: "Tuple types and values in ReScript" -canonical: "/docs/manual/latest/tuple" +canonical: "/docs/manual/v11.0.0/tuple" --- # Tuple diff --git a/pages/docs/manual/latest/type.mdx b/pages/docs/manual/v11.0.0/type.mdx similarity index 99% rename from pages/docs/manual/latest/type.mdx rename to pages/docs/manual/v11.0.0/type.mdx index b39bca6d4..cc0548173 100644 --- a/pages/docs/manual/latest/type.mdx +++ b/pages/docs/manual/v11.0.0/type.mdx @@ -1,7 +1,7 @@ --- title: "Type" description: "Types and type definitions in ReScript" -canonical: "/docs/manual/latest/type" +canonical: "/docs/manual/v11.0.0/type" --- # Type diff --git a/pages/docs/manual/latest/typescript-integration.mdx b/pages/docs/manual/v11.0.0/typescript-integration.mdx similarity index 99% rename from pages/docs/manual/latest/typescript-integration.mdx rename to pages/docs/manual/v11.0.0/typescript-integration.mdx index 193683cec..8a96548a0 100644 --- a/pages/docs/manual/latest/typescript-integration.mdx +++ b/pages/docs/manual/v11.0.0/typescript-integration.mdx @@ -1,7 +1,7 @@ --- title: "TypeScript" description: "GenType - Interoperability between ReScript and TypeScript" -canonical: "/docs/manual/latest/typescript-integration" +canonical: "/docs/manual/v11.0.0/typescript-integration" --- # ReScript & TypeScript diff --git a/pages/docs/manual/latest/use-illegal-identifier-names.mdx b/pages/docs/manual/v11.0.0/use-illegal-identifier-names.mdx similarity index 94% rename from pages/docs/manual/latest/use-illegal-identifier-names.mdx rename to pages/docs/manual/v11.0.0/use-illegal-identifier-names.mdx index a1e2eaf58..f1ced4ca1 100644 --- a/pages/docs/manual/latest/use-illegal-identifier-names.mdx +++ b/pages/docs/manual/v11.0.0/use-illegal-identifier-names.mdx @@ -1,7 +1,7 @@ --- title: "Use Illegal Identifier Names" description: "Handling (JS) naming collisions in ReScript" -canonical: "/docs/manual/latest/use-illegal-identifier-names" +canonical: "/docs/manual/v11.0.0/use-illegal-identifier-names" --- # Use Illegal Identifier Names diff --git a/pages/docs/manual/latest/variant.mdx b/pages/docs/manual/v11.0.0/variant.mdx similarity index 99% rename from pages/docs/manual/latest/variant.mdx rename to pages/docs/manual/v11.0.0/variant.mdx index 69e1d7973..ff9599e3e 100644 --- a/pages/docs/manual/latest/variant.mdx +++ b/pages/docs/manual/v11.0.0/variant.mdx @@ -1,7 +1,7 @@ --- title: "Variant" description: "Variant data structures in ReScript" -canonical: "/docs/manual/latest/variant" +canonical: "/docs/manual/v11.0.0/variant" --- # Variant diff --git a/pages/docs/manual/latest/warning-numbers.mdx b/pages/docs/manual/v11.0.0/warning-numbers.mdx similarity index 90% rename from pages/docs/manual/latest/warning-numbers.mdx rename to pages/docs/manual/v11.0.0/warning-numbers.mdx index 80800170d..55eb1f04b 100644 --- a/pages/docs/manual/latest/warning-numbers.mdx +++ b/pages/docs/manual/v11.0.0/warning-numbers.mdx @@ -1,7 +1,7 @@ --- title: "Warning Numbers" description: "Available compiler warning numbers in ReScript" -canonical: "/docs/manual/latest/warning-numbers" +canonical: "/docs/manual/v11.0.0/warning-numbers" --- import { make as WarningTable } from "src/components/WarningTable.mjs"; diff --git a/pages/docs/manual/v12.0.0/api.mdx b/pages/docs/manual/v12.0.0/api.mdx new file mode 100644 index 000000000..933480b1c --- /dev/null +++ b/pages/docs/manual/v12.0.0/api.mdx @@ -0,0 +1,18 @@ +# Overview + +## ReScript Core + +[Core](api/core) is ReScript's new standard library. It replaces the complete `Js` module as well as some of the more frequently used modules from `Belt` and is recommended to use with uncurried mode. + +In ReScript 11, it is shipped as a separate npm package `@rescript/core` that is added to your project as per the [installation instructions](/docs/manual/next/installation). In future ReScript versions, it will be included with the `rescript` npm package itself. + +## Additional Libraries + +ReScript ships with these two additional modules in its standard library: + +- [Belt](api/belt): immutable collections and extra helpers not available in JavaScript / [Core](api/core). +- [Dom](api/dom): Dom related types and modules. Contains our standardized types used by various userland DOM bindings. + +## Legacy Modules + +The [Js](api/js) module is superseded by [Core](api/core). diff --git a/pages/docs/manual/v12.0.0/api/[...slug].js b/pages/docs/manual/v12.0.0/api/[...slug].js new file mode 100644 index 000000000..5a21c79ba --- /dev/null +++ b/pages/docs/manual/v12.0.0/api/[...slug].js @@ -0,0 +1,18 @@ +import { + getStaticPathsByVersion, + getStaticPropsByVersion, +} from "src/ApiDocs.mjs"; + +import APIDocs from "src/ApiDocs.mjs"; + +export async function getStaticProps(ctx) { + return await getStaticPropsByVersion({ ...ctx, version: "v12.0.0" }); +} + +export async function getStaticPaths(ctx) { + return await getStaticPathsByVersion("v12.0.0"); +} + +export default function Comp(props) { + return ; +} diff --git a/pages/docs/manual/v12.0.0/array-and-list.mdx b/pages/docs/manual/v12.0.0/array-and-list.mdx new file mode 100644 index 000000000..c70eed178 --- /dev/null +++ b/pages/docs/manual/v12.0.0/array-and-list.mdx @@ -0,0 +1,219 @@ +--- +title: "Array & List" +description: "Arrays and List data structures" +canonical: "/docs/manual/v12.0.0/array-and-list" +--- + +# Array and List + +## Array + +Arrays are our main ordered data structure. They work the same way as JavaScript arrays: they can be randomly accessed, dynamically resized, updated, etc. + + + +```res example +let myArray = ["hello", "world", "how are you"] +``` +```js +var myArray = ["hello", "world", "how are you"]; +``` + + + +ReScript arrays' items must have the same type, i.e. homogeneous. + +### Usage +#### Access +Accessing items in an array will return an `option` and can be done like so: + + + +```res example +let myArray = ["hello", "world", "how are you"] + +let firstItem = myArray[0] // Some("hello") + +let tenthItem = myArray->Array.get(10) // None +``` +```js +var myArray = ["hello", "world", "how are you"]; + +var firstItem = myArray[0]; + +var tenthItem = myArray[10]; +``` + + + +The behavior of returning an `option` is new to V11 when you have [Core](api/core) open. +It provides a safer way to access array items, which is especially useful when you're not sure if the index is out of bounds. +If you would like to not use an `option`, you can use [`Array.getUnsafe`](api/core/array#value-getUnsafe). + +#### Update +Items in an array can be updated by assigning a value to an index or using a function: + + + +```res example +let myArray = ["hello", "world", "how are you"] + +myArray[0] = "hey" // now ["hey", "world", "how are you"] + +myArray->Array.push("?") // ["hey", "world", "how are you", "?"] + +myArray->Array.set(0, "bye") // ["bye", "world", "how are you", "?"] +``` +```js +var myArray = ["hello", "world", "how are you"]; + +myArray[0] = "hey"; + +myArray.push("?"); + +myArray[0] = "bye"; +``` + + + +### Array spreads + +**Since 11.1** + + +You can spread arrays of the the same type into new arrays, just like in JavaScript: + + + +```res example +let y = [1, 2] +let x = [4, 5, ...y] +let x2 = [4, 5, ...y, 7, ...y] +let x3 = [...y] +``` + +```javascript +var Belt_Array = require("rescript/lib/js/belt_Array.js"); + +var y = [ + 1, + 2 +]; + +var x = Belt_Array.concatMany([ + [ + 4, + 5 + ], + y + ]); + +var x2 = Belt_Array.concatMany([ + [ + 4, + 5 + ], + y, + [7], + y + ]); + +var x3 = Belt_Array.concatMany([y]); +``` + + +> Note that array spreads compiles to `Belt.Array.concatMany` right now. This is likely to change to native array spreads in the future. + +## List + +ReScript provides a singly linked list too. Lists are: + +- immutable +- fast at prepending items +- fast at getting the head +- slow at everything else + + + +```res example +let myList = list{1, 2, 3} +``` +```js +var myList = { + hd: 1, + tl: { + hd: 2, + tl: { + hd: 3, + tl: 0 + } + } +}; +``` + + + +Like arrays, lists' items need to be of the same type. + +### Usage + +You'd use list for its resizability, its fast prepend (adding at the head), and its fast split, all of which are immutable and relatively efficient. + +Do **not** use list if you need to randomly access an item or insert at non-head position. Your code would end up obtuse and/or slow. + +The standard lib provides a [List module](api/core/list). + +#### Immutable Prepend + +Use the spread syntax: + + + +```res prelude +let myList = list{1, 2, 3} +let anotherList = list{0, ...myList} +``` +```js +var myList = { + hd: 1, + tl: { + hd: 2, + tl: { + hd: 3, + tl: 0 + } + } +}; + +var anotherList = { + hd: 0, + tl: myList +}; +``` + + + +`myList` didn't mutate. `anotherList` is now `list{0, 1, 2, 3}`. This is efficient (constant time, not linear). `anotherList`'s last 3 elements are shared with `myList`! + +**Note that `list{a, ...b, ...c}` was a syntax error** before compiler v10.1. In general, the pattern should be used with care as its performance and allocation overhead are linear (`O(n)`). + +#### Access + +`switch` (described in the [pattern matching section](pattern-matching-destructuring.md)) is usually used to access list items: + + + +```res example +let message = + switch myList { + | list{} => "This list is empty" + | list{a, ...rest} => "The head of the list is the string " ++ Int.toString(a) + } +``` +```js +var message = myList + ? "The head of the list is the string " + (1).toString() + : "This list is empty"; +``` + + diff --git a/pages/docs/manual/v12.0.0/async-await.mdx b/pages/docs/manual/v12.0.0/async-await.mdx new file mode 100644 index 000000000..ebe40b49c --- /dev/null +++ b/pages/docs/manual/v12.0.0/async-await.mdx @@ -0,0 +1,326 @@ +--- +title: "Async / Await" +description: "Async / await for asynchronous operations" +canonical: "/docs/manual/v12.0.0/async-await" +--- + + +
    + +```res prelude +@val external fetchUserMail: string => promise = "GlobalAPI.fetchUserMail" +@val external sendAnalytics: string => promise = "GlobalAPI.sendAnalytics" +``` + +
    + + + +# Async / Await + +ReScript comes with `async` / `await` support to make asynchronous, `Promise` based code easier to read and write. This feature is very similar to its JS equivalent, so if you are already familiar with JS' `async` / `await`, you will feel right at home. + +## How it looks + +Let's start with a quick example to show-case the syntax: + + + + +```res +// Some fictive functionality that offers asynchronous network actions +@val external fetchUserMail: string => promise = "GlobalAPI.fetchUserMail" +@val external sendAnalytics: string => promise = "GlobalAPI.sendAnalytics" + +// We use the `async` keyword to allow the use of `await` in the function body +let logUserDetails = async (userId: string) => { + // We use `await` to fetch the user email from our fictive user endpoint + let email = await fetchUserMail(userId) + + await sendAnalytics(`User details have been logged for ${userId}`) + + Console.log(`Email address for user ${userId}: ${email}`) +} +``` + +```js +async function logUserDetails(userId) { + var email = await GlobalAPI.fetchUserMail(userId); + await GlobalAPI.sendAnalytics("User details have been logged for " + userId + ""); + console.log("Email address for user " + userId + ": " + email + ""); +} +``` + + + +As we can see above, an `async` function is defined via the `async` keyword right before the function's parameter list. In the function body, we are now able to use the `await` keyword to explicitly wait for a `Promise` value and assign its content to a let binding `email`. + +You will probably notice that this looks very similar to `async` / `await` in JS, but there are still a few details that are specific to ReScript. The next few sections will go through all the details that are specific to the ReScript type system. + +## Basics + +- You may only use `await` in `async` function bodies +- `await` may only be called on a `promise` value +- `await` calls are expressions, therefore they can be used in pattern matching (`switch`) +- A function returning a `promise<'a>` is equivalent to an `async` function returning a value `'a` (important for writing signature files and bindings) +- `promise` values and types returned from an `async` function don't auto-collapse into a "flat promise" like in JS (more on this later) + + +## Types and `async` functions + +### `async` function type signatures + +Function type signatures (i.e defined in signature files) don't require any special keywords for `async` usage. Whenever you want to type an `async` function, use a `promise` return type. + +```resi +// Demo.resi + +let fetchUserMail: string => promise +``` + +The same logic applies to type definitions in `.res` files: + +```res example +// function type +type someAsyncFn = int => promise + +// Function type annotation +let fetchData: string => promise = async (userId) => { + await fetchUserMail(userId) +} +``` + +**BUT:** When typing `async` functions in your implementation files, you need to omit the `promise<'a>` type: + +```res +// This function is compiled into a `string => promise` type. +// The promise<...> part is implicitly added by the compiler. +let fetchData = async (userId: string): string => { + await fetchUserMail("test") +} +``` + +For completeness reasons, let's expand the full signature and inline type definitions in one code snippet: + +```res +// Note how the inline return type uses `string`, while the type definition uses `promise` +let fetchData: string => promise = async (userId: string): string { + await fetchUserMail(userId) +} +``` + +**Note:** In a practical scenario you'd either use a type signature, or inline types, not both at the same time. In case you are interested in the design decisions, check out [this discussion](https://github.com/rescript-lang/rescript-compiler/pull/5913#issuecomment-1359003870). + +### Promises don't auto-collapse in async functions + +In JS, nested promises (i.e. `promise>`) will automatically collapse into a flat promise (`promise<'a>`). This is not the case in ReScript. Use the `await` function to manually unwrap any nested promises within an `async` function instead. + +```res +let fetchData = async (userId: string): string => { + // We can't just return the result of `fetchUserMail`, otherwise we'd get a + // type error due to our function return type of type `string` + await fetchUserMail(userId) +} +``` + +## Error handling + +You may use `try / catch` or `switch` to handle exceptions during async execution. + +```res +// For simulation purposes +let authenticate = async () => { + raise(Exn.raiseRangeError("Authentication failed.")) +} + +let checkAuth = async () => { + try { + await authenticate() + } catch { + | Exn.Error(e) => + switch Exn.message(e) { + | Some(msg) => Console.log("JS error thrown: " ++ msg) + | None => Console.log("Some other exception has been thrown") + } + } +} +``` + +Note how we are essentially catching JS errors the same way as described in our [Exception](exception#catch-rescript-exceptions-from-js) section. + +You may unify error and value handling in a single switch as well: + +```res +let authenticate = async () => { + raise(Exn.raiseRangeError("Authentication failed.")) +} + +let checkAuth = async () => { + switch await authenticate() { + | _ => Console.log("ok") + | exception Exn.Error(e) => + switch Exn.message(e) { + | Some(msg) => Console.log("JS error thrown: " ++ msg) + | None => Console.log("Some other exception has been thrown") + } + } +} +``` + +**Important:** When using `await` with a `switch`, always make sure to put the actual await call in the `switch` expression, otherwise your `await` error will not be caught. + +## Piping `await` calls + +You may want to pipe the result of an `await` call right into another function. +This can be done by wrapping your `await` calls in a new `{}` closure. + + + +```res example +@val external fetchUserMail: string => promise = "GlobalAPI.fetchUserMail" + +let fetchData = async () => { + let mail = {await fetchUserMail("1234")}->String.toUpperCase + Console.log(`All upper-cased mail: ${mail}`) +} +``` + +```js +async function fetchData(param) { + var mail = (await GlobalAPI.fetchUserMail("1234")).toUpperCase(); + console.log("All upper-cased mail: " + mail + ""); +} +``` + + + +Note how the original closure was removed in the final JS output. No extra allocations! + +## Pattern matching on `await` calls + +`await` calls are just another kind of expression, so you can use `switch` pattern matching for more complex logic. + + + +```res example +@val external fetchUserMail: string => promise = "GlobalAPI.fetchUserMail" + +let fetchData = async () => { + switch (await fetchUserMail("user1"), await fetchUserMail("user2")) { + | (user1Mail, user2Mail) => { + Console.log("user 1 mail: " ++ user1Mail) + Console.log("user 2 mail: " ++ user2Mail) + } + + | exception JsError(err) => Console.log2("Some error occurred", err) + } +} +``` + +```js +async function fetchData(param) { + var val; + var val$1; + try { + val = await GlobalAPI.fetchUserMail("user1"); + val$1 = await GlobalAPI.fetchUserMail("user2"); + } + catch (raw_err){ + var err = Caml_js_exceptions.internalToOCamlException(raw_err); + if (err.RE_EXN_ID === "JsError") { + console.log("Some error occurred", err._1); + return ; + } + throw err; + } + console.log("user 1 mail: " + val); + console.log("user 2 mail: " + val$1); +} +``` + + + +## `await` multiple promises + +We can utilize the `Promise` module to handle multiple promises. E.g. let's use `Promise.all` to wait for multiple promises before continuing the program: + +```res +let pauseReturn = (value, timeout) => { + Promise.make((resolve, _reject) => { + setTimeout(() => { + resolve(value) + }, timeout)->ignore + }) +} + +let logMultipleValues = async () => { + let promise1 = pauseReturn("value1", 2000) + let promise2 = pauseReturn("value2", 1200) + let promise3 = pauseReturn("value3", 500) + + let all = await Promise.all([promise1, promise2, promise3]) + + switch all { + | [v1, v2, v3] => Console.log(`All values: ${v1}, ${v2}, ${v3}`) + | _ => Console.log("this should never happen") + } +} +``` + +## JS Interop with `async` functions + +`async` / `await` practically works with any function that returns a `promise<'a>` value. Map your `promise` returning function via an `external`, and use it in an `async` function as usual. + +Here's a full example of using the MDN `fetch` API, using `async` / `await` to simulate a login: + +```res +// A generic Response type for typing our fetch requests +module Response = { + type t<'data> + @send external json: t<'data> => promise<'data> = "json" +} + +// A binding to our globally available `fetch` function. `fetch` is a +// standardized function to retrieve data from the network that is available in +// all modern browsers. +@val @scope("globalThis") +external fetch: ( + string, + 'params, +) => promise, "error": Nullable.t}>> = + "fetch" + +// We now use our asynchronous `fetch` function to simulate a login. +// Note how we use `await` with regular functions returning a `promise`. +let login = async (email: string, password: string) => { + let body = { + "email": email, + "password": password, + } + + let params = { + "method": "POST", + "headers": { + "Content-Type": "application/json", + }, + "body": Json.stringifyAny(body), + } + + try { + let response = await fetch("http://github.com/service/https://reqres.in/api/login", params) + let data = await response->Response.json + + switch Nullable.toOption(data["error"]) { + | Some(msg) => Error(msg) + | None => + switch Nullable.toOption(data["token"]) { + | Some(token) => Ok(token) + | None => Error("Didn't return a token") + } + } + } catch { + | _ => Error("Unexpected network error occurred") + } +} +``` + diff --git a/pages/docs/manual/v12.0.0/attribute.mdx b/pages/docs/manual/v12.0.0/attribute.mdx new file mode 100644 index 000000000..cea6170a2 --- /dev/null +++ b/pages/docs/manual/v12.0.0/attribute.mdx @@ -0,0 +1,90 @@ +--- +title: "Attribute (Decorator)" +description: "Annotations in ReScript" +canonical: "/docs/manual/v12.0.0/attribute" +--- + +# Attribute (Decorator) + +Like many other languages, ReScript allows annotating a piece of code to express extra functionality. Here's an example: + + + +```res +@inline +let mode = "dev" + +let mode2 = mode +``` +```js +var mode2 = "dev"; +``` + + + +The `@inline` annotation tells `mode`'s value to be inlined into its usage sites (see output). We call such annotation "attribute" (or "decorator" in JavaScript). + +An attribute starts with `@` and goes before the item it annotates. In the above example, it's hooked onto the let binding. + +## Usage + +> **Note:** In previous versions (< 8.3) all our interop related attributes started with a `bs.` prefix (`bs.module`, `bs.val`). Our formatter will automatically drop them in newer ReScript versions. + +You can put an attribute almost anywhere. You can even add extra data to them by using them visually like a function call. Here are a few famous attributes (explained in other sections): + + + +```res +@@warning("-27") + + +@unboxed +type a = Name(string) + +@val external message: string = "message" + +type student = { + age: int, + @as("aria-label") ariaLabel: string, +} + +@deprecated +let customDouble = foo => foo * 2 + +@deprecated("Use SomeOther.customTriple instead") +let customTriple = foo => foo * 3 +``` +```js +``` + + + +1. `@@warning("-27")` is a standalone attribute that annotates the entire file. Those attributes start with `@@`. Here, it carries the data `"-27"`. You can find a full list of all available warnings [here](./warning-numbers). +2. `@unboxed` annotates the type definition. +3. `@val` annotates the `external` statement. +4. `@as("aria-label")` annotates the `ariaLabel` record field. +5. `@deprecated` annotates the `customDouble` expression. This shows a warning while compiling telling consumers to not rely on this method long-term. +6. `@deprecated("Use SomeOther.customTriple instead")` annotates the `customTriple` expression with a string to describe the reason for deprecation. + +For a list of all decorators and their usage, please refer to the [Syntax Lookup](/syntax-lookup) page. + +## Extension Point + +There's a second category of attributes, called "extension points" (a remnant term of our early systems): + + + +```res +%raw("var a = 1") +``` +```js +var a = 1 +``` + + + +Extension points are attributes that don't _annotate_ an item; they _are_ the item. Usually they serve as placeholders for the compiler to implicitly substitute them with another item. + +Extension points start with `%`. A standalone extension point (akin to a standalone regular attribute) starts with `%%`. + +For a list of all extension points and their usage, please refer to the [Syntax Lookup](/syntax-lookup) page. \ No newline at end of file diff --git a/pages/docs/manual/v12.0.0/bind-to-global-js-values.mdx b/pages/docs/manual/v12.0.0/bind-to-global-js-values.mdx new file mode 100644 index 000000000..17d5954a2 --- /dev/null +++ b/pages/docs/manual/v12.0.0/bind-to-global-js-values.mdx @@ -0,0 +1,145 @@ +--- +title: "Bind to Global JS Values" +description: "JS interop with global JS values in ReScript" +canonical: "/docs/manual/v12.0.0/bind-to-global-js-values" +--- + +# Bind to Global JS Values + +**First**, make sure the value you'd like to model doesn't already exist in our [provided API](api/core). + +Some JS values, like `setTimeout`, live in the global scope. You can bind to them like so: + + + +```res example +@val external setTimeout: (unit => unit, int) => float = "setTimeout" +@val external clearTimeout: float => unit = "clearTimeout" +``` +```js +// Empty output +``` + + + +(We already provide `setTimeout`, `clearTimeout` and others in the [Core API](api/core) module). + +This binds to the JavaScript [`setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrworkerGlobalScope/setTimeout) methods and the corresponding `clearTimeout`. The `external`'s type annotation specifies that `setTimeout`: + +- Takes a function that accepts `unit` and returns `unit` (which on the JS side turns into a function that accepts nothing and returns nothing aka `undefined`), +- and an integer that specifies the duration before calling said function, +- returns a number that is the timeout's ID. This number might be big, so we're modeling it as a float rather than the 32-bit int. + +### Tips & Tricks + +**The above isn't ideal**. See how `setTimeout` returns a `float` and `clearTimeout` accepts one. There's no guarantee that you're passing the float created by `setTimeout` into `clearTimeout`! For all we know, someone might pass it `Math.random()` into the latter. + +We're in a language with a great type system now! Let's leverage a popular feature to solve this problem: abstract types. + + + +```res example +type timerId +@val external setTimeout: (unit => unit, int) => timerId = "setTimeout" +@val external clearTimeout: timerId => unit = "clearTimeout" + +let id = setTimeout(() => Console.log("hello"), 100) +clearTimeout(id) +``` +```js +var id = setTimeout(function (param) { + console.log("hello"); +}, 100); + +clearTimeout(id); +``` + + + +Clearly, `timerId` is a type that can only be created by `setTimeout`! Now we've guaranteed that `clearTimeout` _will_ be passed a valid ID. Whether it's a number under the hood is now a mere implementation detail. + +Since `external`s are inlined, we end up with JS output as readable as hand-written JS. + +## Global Modules + +If you want to bind to a value inside a global module, e.g. `Math.random`, attach a `scope` to your `val` external: + + + +```res example +@scope("Math") @val external random: unit => float = "random" +let someNumber = random() +``` +```js +var someNumber = Math.random(); +``` + + + +you can bind to an arbitrarily deep object by passing a tuple to `scope`: + + + +```res example +@val @scope(("window", "location", "ancestorOrigins")) +external length: int = "length" +``` +```js +// Empty output +``` + + + +This binds to `window.location.ancestorOrigins.length`. + +## Special Global Values + +Global values like `__filename` and `__DEV__` don't always exist; you can't even model them as an `option`, since the mere act of referring to them in ReScript (then compiled into JS) would trigger the usual `Uncaught ReferenceError: __filename is not defined` error in e.g. the browser environment. + +For these troublesome global values, ReScript provides a special approach: `%external(a_single_identifier)`. + + + +```res example +switch %external(__DEV__) { +| Some(_) => Console.log("dev mode") +| None => Console.log("production mode") +} +``` +```js +var match = typeof __DEV__ === "undefined" ? undefined : __DEV__; + +if (match !== undefined) { + console.log("dev mode"); +} else { + console.log("production mode"); +} +``` + + + +That first line's `typeof` check won't trigger a JS ReferenceError. + +Another example: + + + +```res example +switch %external(__filename) { +| Some(f) => Console.log(f) +| None => Console.log("non-node environment") +}; +``` +```js +var match = typeof (__filename) === "undefined" ? undefined : (__filename); + +if (match !== undefined) { + console.log(match); +} else { + console.log("non-node environment"); +} +``` + + + + diff --git a/pages/docs/manual/v12.0.0/bind-to-js-function.mdx b/pages/docs/manual/v12.0.0/bind-to-js-function.mdx new file mode 100644 index 000000000..360ed48a0 --- /dev/null +++ b/pages/docs/manual/v12.0.0/bind-to-js-function.mdx @@ -0,0 +1,490 @@ +--- +title: "Bind to JS Function" +description: "JS interop with functions in ReScript" +canonical: "/docs/manual/v12.0.0/bind-to-js-function" +--- + +# Function + +Binding a JS function is like binding any other value: + + + +```res example +// Import nodejs' path.dirname +@module("path") external dirname: string => string = "dirname" +let root = dirname("/User/github") // returns "User" +``` +```js +var Path = require("path"); +var root = Path.dirname("/User/github"); +``` + + + +We also expose a few special features, described below. + +## Labeled Arguments + +ReScript has [labeled arguments](function.md#labeled-arguments) (that can also be optional). These work on an `external` too! You'd use them to _fix_ a JS function's unclear usage. Assuming we're modeling this: + +```js +// MyGame.js + +function draw(x, y, border) { + // suppose `border` is optional and defaults to false +} +draw(10, 20) +draw(20, 20, true) +``` + +It'd be nice if on ReScript's side, we can bind & call `draw` while labeling things a bit: + + + +```res example +@module("MyGame") +external draw: (~x: int, ~y: int, ~border: bool=?) => unit = "draw" + +draw(~x=10, ~y=20, ~border=true) +draw(~x=10, ~y=20) +``` +```js +var MyGame = require("MyGame"); + +MyGame.draw(10, 20, true); +MyGame.draw(10, 20, undefined); +``` + + + +We've compiled to the same function, but now the usage is much clearer on the ReScript side thanks to labels! + +Note that you can freely reorder the labels on the ReScript side; they'll always correctly appear in their declaration order in the JavaScript output: + + + +```res example +@module("MyGame") +external draw: (~x: int, ~y: int, ~border: bool=?) => unit = "draw" + +draw(~x=10, ~y=20) +draw(~y=20, ~x=10) +``` +```js +var MyGame = require("MyGame"); + +MyGame.draw(10, 20, undefined); +MyGame.draw(10, 20, undefined); +``` + + + +## Object Method + +Functions attached to a JS objects (other than JS modules) require a special way of binding to them, using `send`: + + + +```res example +type document // abstract type for a document object +@send external getElementById: (document, string) => Dom.element = "getElementById" +@val external doc: document = "document" + +let el = getElementById(doc, "myId") +``` +```js +var el = document.getElementById("myId"); +``` + + + +In a `send`, the object is always the first argument. Actual arguments of the method follow (this is a bit what modern OOP objects are really). + +### Chaining + +Ever used `foo().bar().baz()` chaining ("fluent api") in JS OOP? We can model that in ReScript too, through the [pipe operator](pipe.md). + +### Nested function call + +`@send` can also accept a `@scope(("itemOne","itemTwo"))` to access a function on a nested property. + + +```res example +type stripe + +@module("stripe") @new +external make: string => stripe = "default" + +type createSession = {} + +type sessionResult + +@send +@scope(("checkout", "sessions")) +external createCheckoutSession: (stripe, createSession) => + Promise.t = "create" + +let stripe = make("sk_...") +let session = stripe->createCheckoutSession({}) +``` +```js +import Stripe from "stripe"; + +var stripe = new Stripe("sk_..."); +var session = stripe.checkout.sessions.create({}); +``` + + +## Variadic Function Arguments + +You might have JS functions that take an arbitrary amount of arguments. ReScript supports modeling those, under the condition that the arbitrary arguments part is homogenous (aka of the same type). If so, add `variadic` to your `external`. + + + +```res example +@module("path") @variadic +external join: array => string = "join" + +let v = join(["a", "b"]) +``` +```js +var Path = require("path"); +var v = Path.join("a", "b"); +``` + + + +`module` will be explained in [Import from/Export to JS](import-from-export-to-js.md). + +## Modeling Polymorphic Function + +Apart from the above special-case, JS functions in general are often arbitrarily overloaded in terms of argument types and number. How would you bind to those? + +### Trick 1: Multiple `external`s + +If you can exhaustively enumerate the many forms an overloaded JS function can take, simply bind to each differently: + + + +```res example +@module("MyGame") external drawCat: unit => unit = "draw" +@module("MyGame") external drawDog: (~giveName: string) => unit = "draw" +@module("MyGame") external draw: (string, ~useRandomAnimal: bool) => unit = "draw" +``` +```js +// Empty output +``` + + + +Note how all three externals bind to the same JS function, `draw`. + +### Trick 2: Polymorphic Variant + `unwrap` + +If you have the irresistible urge of saying "if only this JS function argument was a variant instead of informally being either `string` or `int`", then good news: we do provide such `external` features through annotating a parameter as a polymorphic variant! Assuming you have the following JS function you'd like to bind to: + +```js +function padLeft(value, padding) { + if (typeof padding === "number") { + return Array(padding + 1).join(" ") + value; + } + if (typeof padding === "string") { + return padding + value; + } + throw new Error(`Expected string or number, got '${padding}'.`); +} +``` + +Here, `padding` is really conceptually a variant. Let's model it as such. + + + +```res example +@val +external padLeft: ( + string, + @unwrap [ + | #Str(string) + | #Int(int) + ]) + => string = "padLeft" +padLeft("Hello World", #Int(4)) +padLeft("Hello World", #Str("Message from ReScript: ")) +``` +```js +padLeft("Hello World", 4); +padLeft("Hello World", "Message from ReScript: "); +``` + + + +Obviously, the JS side couldn't have an argument that's a polymorphic variant! But here, we're just piggy backing on poly variants' type checking and syntax. The secret is the `@unwrap` annotation on the type. It strips the variant constructors and compile to just the payload's value. See the output. + +## Constrain Arguments Better + +Consider the Node `fs.readFileSync`'s second argument. It can take a string, but really only a defined set: `"ascii"`, `"utf8"`, etc. You can still bind it as a string, but we can use poly variants + `string` to ensure that our usage's more correct: + + + +```res example +@module("fs") +external readFileSync: ( + ~name: string, + @string [ + | #utf8 + | @as("ascii") #useAscii + ], +) => string = "readFileSync" + +readFileSync(~name="xx.txt", #useAscii) +``` +```js +var Fs = require("fs"); +Fs.readFileSync("xx.txt", "ascii"); +``` + + + +- Attaching `@string` to the whole poly variant type makes its constructor compile to a string of the same name. +- Attaching a `@as("bla")` to a constructor lets you customize the final string. + +And now, passing something like `"myOwnUnicode"` or other variant constructor names to `readFileSync` would correctly error. + +Aside from string, you can also compile an argument to an int, using `int` instead of `string` in a similar way: + + + +```res example +@val +external testIntType: ( + @int [ + | #onClosed + | @as(20) #onOpen + | #inBinary + ]) + => int = "testIntType" +testIntType(#inBinary) +``` +```js +testIntType(21); +``` + + + +`onClosed` compiles to `0`, `onOpen` to `20` and `inBinary` to **`21`**. + +## Unknown for type safety + +It is best practice to inspect data received from untrusted external functions to ensure it contains what you expect. This helps avoid run-time crashes and unexpected behavior. If you're certain about what an external function returns, simply assert the return value as `string` or `array` or whatever you want it to be. Otherwise use `unknown`. The ReScript type system will prevent you from using an `unknown` until you first inspect it and "convert" it using JSON parsing utilities or similar tools. + +Consider the example below of two external functions that access the value of a property on a JavaScript object. `getPropertyUnsafe` returns an `'a`, which means "anything you want it to be." ReScript allows you to use this value as a `string` or `array` or any other type. Quite convenient! But if the property is missing or contains something unexpected, your code might break. You can make the binding more safe by changing `'a` to `string` or `option<'a>`, but this doesn't completely eliminate the problem. + +The `getPropertySafe` function returns an `unknown`, which could be `null` or a `string` or anything else. But ReScript prevents you from using this value inappropriately until it has been safely parsed. + +```res example +@get_index external getPropertyUnsafe: ({..}, string) => 'a = "" +@get_index external getPropertySafe: ({..}, string) => unknown = "" + +let person = {"name": "Bob", "age": 12} + +let greeting1 = "Hello, " ++ getPropertyUnsafe(person, "name") // works (this time!) +// let greeting2 = "Hello, " ++ getPropertySafe(person, "name") // syntax error +``` + +## Special-case: Event Listeners + +One last trick with polymorphic variants: + + + +```res example +type readline + +@send +external on: ( + readline, + @string [ + | #close(unit => unit) + | #line(string => unit) + ] + ) + => readline = "on" + +let register = rl => + rl + ->on(#close(event => ())) + ->on(#line(line => Console.log(line))); +``` +```js +function register(rl) { + return rl + .on("close", function($$event) {}) + .on("line", function(line) { + console.log(line); + }); +} +``` + + + + + +## Fixed Arguments + +Sometimes it's convenient to bind to a function using an `external`, while passing predetermined argument values to the JS function: + + + +```res example +@val +external processOnExit: ( + @as("exit") _, + int => unit +) => unit = "process.on" + +processOnExit(exitCode => + Console.log("error code: " ++ Int.toString(exitCode)) +); +``` +```js +process.on("exit", function (exitCode) { + console.log("error code: " + exitCode.toString()); +}); +``` + + + +The `@as("exit")` and the placeholder `_` argument together indicates that you want the first argument to compile to the string `"exit"`. You can also use any JSON literal with `as`: `` @as(json`true`) ``, `` @as(json`{"name": "John"}`) ``, etc. + +## Ignore arguments + +You can also explicitly "hide" `external` function parameters in the JS output, which may be useful if you want to add type constraints to other parameters without impacting the JS side: + + + +```res +@val external doSomething: (@ignore 'a, 'a) => unit = "doSomething" + +doSomething("this only shows up in ReScript code", "test") +``` + +```js +doSomething("test"); +``` + + + +**Note:** It's a pretty niche feature, mostly used to map to polymorphic JS APIs. + +## Modeling `this`-based Callbacks + +Many JS libraries have callbacks which rely on this (the source), for example: + +```js +x.onload = function(v) { + console.log(this.response + v) +} +``` + +Here, `this` would point to `x` (actually, it depends on how `onload` is called, but we digress). It's not correct to declare `x.onload` of type `(. unit) -> unit`. Instead, we introduced a special attribute, `this`, which allows us to type `x` as so: + + + +```res example +type x +@val external x: x = "x" +@set external setOnload: (x, @this ((x, int) => unit)) => unit = "onload" +@get external resp: x => int = "response" +setOnload(x, @this (o, v) => Console.log(resp(o) + v)) +``` +```js +x.onload = function (v) { + var o = this; + console.log((o.response + v) | 0); +}; +``` + + + +`@this` reserves the first parameter for the `this` value, and for arity of 0, there is no need for a redundant `unit` type. + +## Function Nullable Return Value Wrapping + +For JS functions that return a value that can also be `undefined` or `null`, we provide `@return(...)`. To automatically convert that value to an `option` type (recall that ReScript `option` type's `None` value only compiles to `undefined` and not `null`). + + + +```res example +type element +type dom + +@send @return(nullable) +external getElementById: (dom, string) => option = "getElementById" + +let test = dom => { + let elem = dom->(getElementById("haha")) + switch (elem) { + | None => 1 + | Some(_ui) => 2 + } +} +``` +```js +function test(dom) { + var elem = dom.getElementById("haha"); + if (elem == null) { + return 1; + } else { + console.log(elem); + return 2; + } +} + +``` + + + +`return(nullable)` attribute will automatically convert `null` and `undefined` to `option` type. + +Currently 4 directives are supported: `null_to_opt`, `undefined_to_opt`, `nullable` and `identity`. + + + +`identity` will make sure that compiler will do nothing about the returned value. It is rarely used, but introduced here for debugging purpose. + +## Tagged template functions + +**Since 11.1** + +**Experimental** You can easily bind to [JS tagged template functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates). +Tag functions in JS expect as input an array of strings and variadic parameters for the arguments of the interpolation. +To bind to those functions in ReScript, the binding signature must have two arrays as arguments, +the first one being an array of strings and the second can be an array of anything. +You add the `@taggedTemplate` annotation and you're good to go! + + + +```res example +// see https://bun.sh/docs/runtime/shell +type result = {exitCode: int} +@module("bun") @taggedTemplate +external sh: (array, array) => promise = "$" + +let filename = "index.res" +let result = await sh`ls ${filename}` +``` + +```js +import * as $$Bun from "bun"; +var filename = "index.res"; +var result = await $$Bun.$`ls ${filename}`; +``` + + + +Notice that it gets compiled to tagged template literals in JS, which allows +to use JS tools that only work on the literals and not by calling directly the tag function. + +There are plenty of useful JS tools you can bind to, like [`gql`](https://github.com/apollographql/graphql-tag), +[`sql`](https://github.com/porsager/postgres), [`css`](https://github.com/mayank99/ecsstatic) and a lot others! diff --git a/pages/docs/manual/v12.0.0/bind-to-js-object.mdx b/pages/docs/manual/v12.0.0/bind-to-js-object.mdx new file mode 100644 index 000000000..c6fcc831c --- /dev/null +++ b/pages/docs/manual/v12.0.0/bind-to-js-object.mdx @@ -0,0 +1,197 @@ +--- +title: "Bind to JS Object" +description: "Interop with JS objects in ReScript" +canonical: "/docs/manual/v12.0.0/bind-to-js-object" +--- + +# Bind to JS Object + +JavaScript objects are a combination of several use-cases: + +- As a "record" or "struct" in other languages (like ReScript and C). +- As a hash map. +- As a class. +- As a module to import/export. + +ReScript cleanly separates the binding methods for JS object based on these 4 use-cases. This page documents the first three. Binding to JS module objects is described in the [Import from/Export to JS](import-from-export-to-js.md) section. + + + +## Bind to Record-like JS Objects + +### Bind Using ReScript Record + +If your JavaScript object has fixed fields, then it's conceptually like a ReScript record. Since a ReScript record compiles to a clean JavaScript object, you can definitely type a JS object as a ReScript record! + + + +```res example +type person = { + name: string, + friends: array, + age: int, +} + +@module("MySchool") external john: person = "john" + +let johnName = john.name +``` +```js +var MySchool = require("MySchool"); + +var johnName = MySchool.john.name; +``` + + + +External is documented [here](external.md). `@module` is documented [here](import-from-export-to-js.md). + +If you want or need to use different field names on the ReScript and the JavaScript side, you can use the `@as` decorator: + + + +```res example +type action = { + @as("type") type_: string +} + +let action = {type_: "ADD_USER"} +``` +```js +var action = { + type: "ADD_USER" +}; +``` + + + +This is useful to map to JavaScript attribute names that cannot be expressed in ReScript (such as keywords). + +It is also possible to map a ReScript record to a JavaScript array by passing indices to the `@as` decorator: + + + +```res +type t = { + @as("0") foo: int, + @as("1") bar: string, +} + +let value = {foo: 7, bar: "baz"} +``` + +```js +var value = [ + 7, + "baz" +]; +``` + + + + +### Bind Using ReScript Object + +Alternatively, you can use [ReScript object](object.md) to model a JS object too: + + + +```res example +type person = { + "name": string, + "friends": array, + "age": int, +} + +@module("MySchool") external john: person = "john" + +let johnName = john["name"] +``` +```js +var MySchool = require("MySchool"); + +var johnName = MySchool.john.name; +``` + + + +### Bind Using Special Getter and Setter Attributes + +Alternatively, you can use `get` and `set` to bind to individual fields of a JS object: + + + +```res example +type textarea +@set external setName: (textarea, string) => unit = "name" +@get external getName: textarea => string = "name" +``` +```js +``` + + + +You can also use `get_index` and `set_index` to access a dynamic property or an index: + + + +```res example +type t +@new external create: int => t = "Int32Array" +@get_index external get: (t, int) => int = "" +@set_index external set: (t, int, int) => unit = "" + +let i32arr = create(3) +i32arr->set(0, 42) +Console.log(i32arr->get(0)) +``` +```js +var i32arr = new Int32Array(3); +i32arr[0] = 42; +console.log(i32arr[0]); +``` + + + +## Bind to Hash Map-like JS Object + +If your JavaScript object: + +- might or might not add/remove keys +- contains only values that are of the same type + +Then it's not really an object, it's a hash map. Use [Dict](api/core/dict), which contains operations like `get`, `set`, etc. and cleanly compiles to a JavaScript object still. + +## Bind to a JS Object That's a Class + +Use `new` to emulate e.g. `new Date()`: + + + +```res example +type t +@new external createDate: unit => t = "Date" + +let date = createDate() +``` +```js +var date = new Date(); +``` + + + +You can chain `new` and `module` if the JS module you're importing is itself a class: + + + +```res example +type t +@new @module external book: unit => t = "Book" +let myBook = book() +``` +```js +var Book = require("Book"); +var myBook = new Book(); +``` + + diff --git a/pages/docs/manual/v12.0.0/browser-support-polyfills.mdx b/pages/docs/manual/v12.0.0/browser-support-polyfills.mdx new file mode 100644 index 000000000..dbdeeeed7 --- /dev/null +++ b/pages/docs/manual/v12.0.0/browser-support-polyfills.mdx @@ -0,0 +1,18 @@ +--- +title: "Browser Support & Polyfills" +description: "Note on browser support in ReScript" +canonical: "/docs/manual/v12.0.0/browser-support-polyfills" +--- + +# Browser Support & Polyfills + +ReScript compiles to JavaScript **ES5**, with the exception of optionally allowing to compile to ES6's module import & export. + +For [old browsers](https://caniuse.com/#search=typed%20array), you also need to polyfill TypedArray. The following standard library functions require it: + +- `Int64.float_of_bits` +- `Int64.bits_of_float` +- `Int32.float_of_bits` +- `Int32.bits_of_float` + +If you don't use these functions, you're fine. Otherwise, it'll be a runtime failure. diff --git a/pages/docs/manual/v12.0.0/build-configuration-schema.mdx b/pages/docs/manual/v12.0.0/build-configuration-schema.mdx new file mode 100644 index 000000000..a9c454341 --- /dev/null +++ b/pages/docs/manual/v12.0.0/build-configuration-schema.mdx @@ -0,0 +1,23 @@ +--- +title: "Configuration Schema" +metaTitle: "Build System Configuration Schema" +description: "Schema exploration widget for the ReScript configuration file" +canonical: "/docs/manual/v12.0.0/build-configuration-schema" +--- + +import dynamic from "next/dynamic"; + +export const Docson = dynamic( + () => + import("src/components/Docson").then((comp) => { + return comp.make; + }), + { + ssr: false, + loading: () =>
    Loading...
    , + } +); + +export default function BuildConfigurationSchemaPage() { + return ; +} diff --git a/pages/docs/manual/v12.0.0/build-configuration.mdx b/pages/docs/manual/v12.0.0/build-configuration.mdx new file mode 100644 index 000000000..e848b7c6c --- /dev/null +++ b/pages/docs/manual/v12.0.0/build-configuration.mdx @@ -0,0 +1,245 @@ +--- +title: "Configuration" +metaTitle: "Build System Configuration" +description: "Details about the configuration of the ReScript build system (rescript.json)" +canonical: "/docs/manual/v12.0.0/build-configuration" +--- + +# Configuration + +`rescript.json` (or `bsconfig.json` in versions prior ReScript 11) is the single, mandatory build meta file needed for `rescript`. + +**The complete configuration schema is [here](./build-configuration-schema)**. We'll _non-exhaustively_ highlight the important parts in prose below. + +## name, namespace + +`name` is the name of the library, used as its "namespace". You can activate namespacing through `"namespace": true` in your `rescript.json`. Namespacing is almost **mandatory**; we haven't turned it on by default yet to preserve backward-compatibility. + +**Explanation**: by default, your files, once used as a third-party dependency, are available globally to the consumer. E.g. if you have a `Util.res` and the consumer also has a file of the same name, they will clash. Turning on `namespace` avoids this by wrapping all your own project's files into an extra module layer; instead of a global `Util` module, the consumer will see you as `MyProject.Util`. **The namespacing affects your consumers, not yourself**. + +Aka, in ReScript, "namespace" is just a fancy term for an auto-generated module that wraps all your project's files (efficiently and correctly, of course!) for third-party consumption. + +We don't do folder-level namespacing for your own project; all your own file names must be unique. This is a constraint that enables several features such as fast search and easier project reorganization. + +**Note**: the `rescript.json` `name` should be the same as the `package.json` `name`, to avoid confusing corner-cases. However, this means that you can't use a camelCased names such as `MyProject`, since `package.json` and npm forbid you to do so (some file systems are case-insensitive). To have the namespace/module as `MyProject`, write `"name": "my-project"`. ReScript will turn that into the camelCased name correctly. + +**Note on custom namespacing**: if for some reason, you need a namespace that is different from what your `name` will produce, you can directly send a string to the `namespace` option. For example, if your package is a binding named `bs-some-thing`, you can use `"namespace": "some-thing"` to get `SomeThing` namespace instead of `BsSomeThing`. + +## sources + +Your source files need to be specified explicitly (we don't want to accidentally drill down into some unrelated directories). Examples: + +```json +{ + "sources": ["src", "examples"] +} +``` + +```json +{ + "sources": { + "dir": "src", + "subdirs": ["page"] + } +} +``` + +```json +{ + "sources": [ + "examples", + { + "dir": "src", + "subdirs": true // recursively builds every subdirectory + } + ] +} +``` + +You can mark your directories as dev-only (for e.g. tests). These won't be built and exposed to third-parties, or even to other "dev" directories in the same project: + +```json +{ + "sources": { + "dir": "test", + "type": "dev" + } +} +``` + +You can also explicitly allow which modules can be seen from outside. This feature is especially useful for library authors who want to have a single entry point for their users. +Here, the file `src/MyMainModule.res` is exposed to outside consumers, while all other files are private. + +```json +{ + "sources": { + "dir": "src", + "public": ["MyMainModule"] + } +} +``` + +## bs-dependencies, bs-dev-dependencies + +List of ReScript dependencies. Just like `package.json`'s dependencies, they'll be searched in `node_modules`. + +Note that only sources marked with `"type":"dev"` will be able to resolve modules from `bs-dev-dependencies`. + +## pinned-dependencies + +**Since 8.4**: List of pinned dependencies. A pinned dependency will always be rebuilt whenever you build a toplevel package (e.g. your main app) with `rescript`. + +This is useful for working on multiple independent ReScript packages simultaneously. More usage details can be found in our dedicated [pinned dependencies](./build-pinned-dependencies) page. + +## external-stdlib + +**Since 9.0**: This setting allows depending on an externally built stdlib package (instead of a locally built stdlib runtime). Useful for shipping packages that are only consumed in JS or TS without any dependencies to the ReScript development toolchain. + +More details can be found on our [external stdlib](./build-external-stdlib) page. + +## js-post-build + +Hook that's invoked every time a file is recompiled. Good for JS build system interop, but please use it **sparingly**. Calling your custom command for every recompiled file slows down your build and worsens the building experience for even third-party users of your lib. + +Example: + +```json +{ + "js-post-build": { + "cmd": "/path/to/node ../../postProcessTheFile.js" + } +} +``` + +Note that the path resolution for the command (`node` in this case) is done so: + +- `/myCommand` is resolved into `/myCommand` +- `package/myCommand` is resolved into `node_modules/package/myCommand` +- `./myCommand` is resolved into `myProjectRoot/myCommand` +- `myCommand` is just called as `myCommand`, aka a globally available executable. But note that ReScript doesn't read into your shell's environment, so if you put e.g. `node`, it won't find it unless you specify an absolute path. Alternatively, add `#!/usr/local/bin/node` to the top of your script to directly call it without prepending `node`. + +The command itself is called from inside `lib/bs`. + +## package-specs + +Output to either CommonJS (the default) or JavaScript module. Example: + +```json +{ + "package-specs": { + "module": "commonjs", + "in-source": true + } +} +``` + +- `"module": "commonjs"` generates output as CommonJS format. +- `"module": "esmodule"` generates output as JavaScript module format. Will be default value in next major. +- `"in-source": true` generates output alongside source files. If you omit it, it'll generate the artifacts into `lib/js`. The output directory is not configurable otherwise. + +This configuration only applies to you, when you develop the project. When the project is used as a third-party library, the consumer's own `rescript.json` `package-specs` overrides the configuration here, logically. + +## suffix + +**Since 11.0**: The suffix can now be freely chosen. However, we still suggest you stick to the convention and use +one of the following: + +- `".js` +- `".mjs"` +- `".cjs"` +- `".res.js"` +- `".res.mjs"` +- `".res.cjs"` + +### Design Decisions + +Generating JS files with the `.res.js` suffix means that, on the JS side, you can do `const myReScriptFile = require('./TheFile.res.js')`. The benefits: + +- It's immediately clear that we're dealing with a generated JS file here. +- It avoids clashes with a potential `TheFile.js` file in the same folder. +- It avoids the need of using a build system loader for ReScript files. This + in-source build means integrating a ReScript project into your pure JS codebase **basically doesn't touch anything in your build pipeline at all**. + +## uncurried + +**Since 11.0**: While we strongly encourage all users to use uncurried mode, it is still possible to opt out. Just set `"uncurried"` to `false` to get the old behavior back: + +```json +{ + "uncurried": false +} +``` + +More details can be found in the [blogpost about "Uncurried Mode"](/blog/uncurried-mode). + +## warnings + +Selectively turn on/off certain warnings and/or turn them into hard errors. Example: + +```json +{ + "warnings": { + "number": "-44-102", + "error": "+5" + } +} +``` + +Turn off warning `44` and `102` (polymorphic comparison). Turn warning `5` (partial application whose result has function type and is ignored) into a hard error. + +The warning numbers are shown in the build output when they're triggered. See [Warning Numbers](./warning-numbers) for the complete list. + +## bsc-flags + +Extra flags to pass to the compiler. For advanced usages. + +- `-open ABC` opens the module `ABC` for each file in the project. `ABC` can either be a dependency, namespaced project or local module of the current project. + +## gentypeconfig + +To enable genType, set `"gentypeconfig"` at top level in the project's `rescript.json`. + +```json +{ + "gentypeconfig": { + "module": "esmodule", + "moduleResolution": "node", + "generatedFileExtension": ".gen.tsx", + "debug": { + "all": false, + "basic": false + } + } +} +``` + +`generatedFileExtension`: File extension used for genType generated files (defaults to `".gen.tsx"`) + +`module`: Module format used for the generated `*.gen.tsx` files (supports `"esmodule"` and `"commonjs"`) + +`moduleResolution`: Module resolution strategy used in genType outputs. This may be required for compatibility with TypeScript projects. Specify the value as the same in `tsconfig.json`. + +- `"node"`(default): Drop extensions in import paths. +- `"node16"`: Use TS output's extension. This provides compatibility with projects using `"moduleResolution": "node16"` and ES Modules. +- `"bundler"`: Use TS input's extension. This provides compatibility with projects using `"moduleResolution": "bundler"` and ES Modules. This also requires TS v5.0+ and `compilerOptions.allowImportingTsExtensions` to `true` + +`debug`: Enable debug logs. + +### Deprecated options + +`language`: the `language` setting is not required from compiler v10.1. + +`shims`: Required only if one needs to export certain basic ReScript data types to JS when one cannot modify the sources to add annotations (e.g. exporting ReScript lists), and if the types are not first-classed in genType. + +## Environment Variables + +We heavily disrecommend the usage of environment variables, but for certain cases, they're justified. + +### Error Output Coloring: `NINJA_ANSI_FORCED` + +This is mostly for other programmatic usage of `rescript` where outputting colors is not desired. + +When `NINJA_ANSI_FORCED` is set to `1`: `rescript` produces color. +When `NINJA_ANSI_FORCED` is set to `0`: `rescript` doesn't produce color. +When `NINJA_ANSI_FORCED` is not set: `rescript` might or might not produce color, depending on a smart detection of where it's outputted. + +> Note that the underlying compiler will always be passed `-color always`. See more details in [this issue](https://github.com/rescript-lang/rescript-compiler/issues/2984#issuecomment-410669163). diff --git a/pages/docs/manual/v12.0.0/build-external-stdlib.mdx b/pages/docs/manual/v12.0.0/build-external-stdlib.mdx new file mode 100644 index 000000000..66123a3dd --- /dev/null +++ b/pages/docs/manual/v12.0.0/build-external-stdlib.mdx @@ -0,0 +1,59 @@ +--- +title: "External Stdlib" +metaTitle: "External Stdlib" +description: "Configuring an external ReScript stdlib package" +canonical: "/docs/manual/v12.0.0/build-external-stdlib" +--- + +# External Stdlib + +**Since 9.0** + +Your ReScript project depends on the `rescript` package as a [`devDependency`](https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file), which includes our compiler, build system and runtime like `Belt`. However, you had to move it to `dependency` in `package.json` if you publish your code: +- To Docker or other low-storage deployment devices. +- For pure JS/TS consumers who probably won't install `rescript` in their own project. + +In these cases, the size or mere presence of `rescript` can be troublesome, since it includes not just our necessary runtime like `Belt`, but also our compiler and build system. + +To solve that, we now publish our runtime as a standalone package at [`@rescript/std`](https://www.npmjs.com/package/@rescript/std), whose versions mirror `rescript`'s. Now you can keep `rescript` as a `devDependency` and have only `@rescript/std` as your runtime `dependency`. + +**This is an advanced feature**. Please only use it in the aforementioned scenarios. If you already use a JS bundler with dead code elimination, you might not need this feature. + +## Configuration + +Say you want to publish a JS-only ReScript 9.0 library. Install the packages like this: + +```sh +npm install rescript@11.0.1 --save-dev +npm install @rescript/std@11.0.1 +``` + +Then add this to `rescript.json`: + +```json +{ + // ... + "external-stdlib" : "@rescript/std" +} +``` + +Now the compiled JS code will import using the path defined by `external-stdlib`. Check the JS output tab: + + + +```res +Array.forEach([1, 2, 3], num => Console.log(num)) +``` + +```js +// Note the require path starting with "@rescript/std". +var Belt_Array = require("@rescript/std/lib/js/belt_Array.js"); + +Belt_Array.forEach([1, 2, 3], function (num) { + console.log(num); +}); +``` + + + +**Make sure the version number of `rescript` and `@rescript/std` match in your `package.json`** to avoid running into runtime issues due to mismatching stdlib assumptions. diff --git a/pages/docs/manual/v12.0.0/build-overview.mdx b/pages/docs/manual/v12.0.0/build-overview.mdx new file mode 100644 index 000000000..e2a739220 --- /dev/null +++ b/pages/docs/manual/v12.0.0/build-overview.mdx @@ -0,0 +1,83 @@ +--- +title: "Overview" +metaTitle: "Build System Overview" +description: "Documentation about the ReScript build system and its toolchain" +canonical: "/docs/manual/v12.0.0/build-overview" +--- + +# Build System Overview + +ReScript comes with a build system, [`rescript`](https://www.npmjs.com/package/rescript), that's fast, lean and used as the authoritative build system of the community. + +Every ReScript project needs a build description file, `rescript.json`. + +## Options + +See `rescript help`: + +``` +❯ rescript help +Usage: rescript + +`rescript` is equivalent to `rescript build` + +Options: + -v, -version display version number + -h, -help display help + +Subcommands: + build + clean + format + convert + dump + help + +Run `rescript -h` for subcommand help. Examples: + rescript build -h + rescript format -h +``` + +## Build Project + +Each build will create build artifacts from your project's source files. + +**To build a project (including its dependencies / pinned-dependencies)**, run: + +```sh +rescript +``` + +Which is an alias for `rescript build`. + +To keep a build watcher, run: + +```sh +rescript -w +``` + +Any new file change will be picked up and the build will re-run. + +**Note**: third-party libraries (in `node_modules`, or via `pinned-dependencies`) aren't watched, as doing so may exceed the node.js watcher count limit. + +**Note 2**: In case you want to set up a project in a JS-monorepo-esque approach (`npm` and `yarn` workspaces) where changes in your sub packages should be noticed by the build, you will need to define pinned dependencies in your main project's `rescript.json`. More details [here](./build-pinned-dependencies). + +## Clean Project + +If you ever get into a stale build for edge-case reasons, use: + +```sh +rescript clean +``` + +## Compile with stricter errors in CI + +**Since 11.1** + +You may want to compile your project with stricter rules for production, than when developing. With the `-warn-error` build flag, this can easily be done, for instance in a continuous integration script. E.g.: + +```sh +rescript -warn-error +110 +``` + +Here, warning number 110, which is triggered when a [`%todo`](/syntax-lookup#todo) has been found, gets promoted to an error. The full list of warning numbers can be found [here](/docs/manual/next/warning-numbers). diff --git a/pages/docs/manual/v12.0.0/build-performance.mdx b/pages/docs/manual/v12.0.0/build-performance.mdx new file mode 100644 index 000000000..7f358f548 --- /dev/null +++ b/pages/docs/manual/v12.0.0/build-performance.mdx @@ -0,0 +1,89 @@ +--- +title: "Performance" +metaTitle: "Build Performance" +description: "ReScript build performance and measuring tools" +canonical: "/docs/manual/v12.0.0/build-performance" +--- + +# Build Performance + +ReScript considers performance at install time, build time and run time as a serious feature; it's one of those things you don't notice until you realize it's missing. + +## Profile Your Build + +Sometime your build can be slow due to some confused infra setups. We provide an interactive visualization of your build's performance via `bstracing`: + +```sh +./node_modules/.bin/bstracing +``` + +Run the above command at your ReScript project's root; it'll spit out a JSON file you can drag and drop into `chrome://tracing`. + +import Image from "src/components/Image"; + + + +## Under the Hood + +ReScript itself uses a build system under the hood, called [Ninja](https://ninja-build.org). Ninja is like Make, but cross-platform, minimal, focuses on perf and destined to be more of a low-level building block than a full-blown build system. In this regard, Ninja's a great implementation detail for `rescript`. + +ReScript reads into `rescript.json` and generates the Ninja build file in `lib/bs`. The file contains the low-level compiler commands, namespacing rules, intermediate artifacts generation & others. It then runs `ninja` for the actual build. + +## The JS Wrapper + +`rescript` itself is a Node.js wrapper which takes care of some miscellaneous tasks, plus the watcher. The lower-level, watcher-less, fast native `rescript` is called `rescript.exe`. It's located at `node_modules/rescript/{your-platform}/rescript.exe`. + +If you don't need the watcher, you can run said `rescript.exe`. This side-steps Node.js' long startup time, which can be in the order of `100ms`. Our editor plugin finds and uses this native `rescript.exe` for better performance. + +## Numbers + +Raw `rescript.exe` build on a small project should be around `70ms`. This doubles when you use the JS `rescript` wrapper which comes with a watcher, which is practically faster since you don't manually run the build at every change (though you should opt for the raw `rescript.exe` for programmatic usage, e.g. inserting rescript into your existing JS build pipeline). + +No-op build (when no file's changed) should be around `15ms`. Incremental rebuild (described soon) of a single file in a project is around `70ms` too. + +Cleaning the artifacts should be instantaneous. + +### Extreme Test + +We've stress-tested `rescript.exe` on a big project of 10,000 files (2 directories, 5000 files each, first 5000 no dependencies, last 5000 10 dependencies on files from the former directory) using https://github.com/rescript-lang/build-benchmark, on a Retina Macbook Pro Early 2015 (3.1 GHz Intel Core i7). + + + +- No-op build of 10k files: `800ms` (the minimum amount of time required to check the mtimes of 10k files). +- Clean build: \<3 minutes. +- Incremental build: depends on the number of the dependents of the file. No dependent means `1s`. + +### Stability + +`rescript` is a file-based build system. We don't do in-memory build, even if that speeds up the build a lot. In-memory builds risk memory leaks, out-of-memory errors, corrupt halfway build and others. Our watcher mode stays open for days or months with no leak. + +The watcher is also just a thin file watcher that calls `rescript.exe`. We don't like babysitting daemon processes. + +## Incrementality & Correctness + +ReScript doesn't take whole seconds to run every time. The bulk of the build performance comes from incremental build, aka re-building a previously built project when a few files changed. + +In short, thanks to our compiler and the build system's architecture, we're able to **only build what's needed**. E.g. if `MyFile.res` isn't changed, then it's not recompiled. You can roughly emulate such incrementalism in languages like JavaScript, but the degree of correctness is unfortunately low. For example, if you rename or move a JS file, then the watcher might get confused and not pick up the "new" file or fail to clean things up correctly, resulting in you needing to clean your build and restart anew, which defeats the purpose. + +Say goodbye to stale build from your JavaScript ecosystem! + +## Speed Up Incremental Build + +ReScript uses the concept of interface files (`.resi`) (or, equivalently, [module signatures](module.md#signatures)). Exposing only what you need naturally speeds up incremental builds. E.g. if you change a `.res` file whose corresponding `.resi` file doesn't expose the changed part, then you've reduced the amount of dependent files you have to rebuild. + +## Programmatic Usage + +Unfortunately, JS build systems are usually the bottleneck for building a JS project nowadays. Having parts of the build blazingly fast doesn't matter much if the rest of the build takes seconds or literally minutes. Here are a few suggestions: + +- Convert more files into ReScript =). Fewer files going through fewer parts of the JS pipeline helps a ton. +- Careful with bringing in more dependencies: libraries, syntax transforms (e.g. the unofficially supported PPX), build step loaders, etc. The bulk of these dragging down the editing & building experience might out-weight the API benefits they provide. + +## Hot Reloading + +Hot reloading refers to maintaining a dev server and listening to file changes in a way that allows the server to pipe some delta changes right into the currently running browser page. This provides a relatively fast iteration workflow while working in specific frameworks. + +However, hot reloading is fragile by nature, and counts on the occasional inconsistencies (bad state, bad eval, etc.) and the heavy devserver setup/config being less of a hassle than the benefits it provides. We err on the side of caution and stability in general, and decided not to provide a built-in hot reloading _yet_. **Note**: you can still use the hot reloading facility provided by your JS build pipeline. diff --git a/pages/docs/manual/v12.0.0/build-pinned-dependencies.mdx b/pages/docs/manual/v12.0.0/build-pinned-dependencies.mdx new file mode 100644 index 000000000..405ac7f7c --- /dev/null +++ b/pages/docs/manual/v12.0.0/build-pinned-dependencies.mdx @@ -0,0 +1,105 @@ +--- +title: "Pinned Dependencies" +metaTitle: "Pinned Dependencies" +description: "Handling multiple packages within one ReScript project with pinned dependencies" +canonical: "/docs/manual/v12.0.0/build-pinned-dependencies" +--- + +# Pinned Dependencies + +Usually we'd recommend to use ReScript in a single-codebase style by using one `rescript.json` file for your whole codebase. + +There are scenarios where you still want to connect and build multiple independent ReScript packages for one main project though (`npm` workspaces-like "monorepos"). This is where `pinned-dependencies` come into play. + +## Package Types + +Before we go into detail, let's first explain all the different package types recognized by the build system: + +- Toplevel (this is usually the final app you are building, which has dependencies to other packages) +- Pinned dependencies (these are your local packages that should always rebuild when you build your toplevel, those should be listed in `bs-dependencies` and `pinned-dependencies`) +- Normal dependencies (these are packages that are consumed from npm and listed via `bs-dependencies`) + +Whenever a package is being built (`rescript build`), the build system will build the toplevel package with its pinned-dependencies. So any changes made in a pinned dependency will automatically be reflected in the final app. + +## Build System Package Rules + +The build system respects the following rules for each package type: + +**Toplevel** + +- Warnings reported +- Warn-error respected +- Builds dev dependencies +- Builds pinned dependencies +- Runs custom rules +- Package-specs like JavaScript module or CommonJS overrides all its dependencies + +**Pinned dependencies** + +- Warnings reported +- Warn-error respected +- Ignores pinned dependencies +- Builds dev dependencies +- Runs custom rules + +**Normal dependencies** + +- Warnings, warn-error ignored +- Ignores dev directories +- Ignores pinned dependencies +- Ignores custom generator rules + +So with that knowledge in mind, let's dive into some more concrete examples to see our pinned dependencies in action. + +## Examples + +### Yarn workspaces + +Let's assume we have a codebase like this: + +``` +myproject/ + app/ + - src/App.res + - rescript.json + common/ + - src/Header.res + - rescript.json + myplugin/ + - src/MyPlugin.res + - rescript.json + package.json +``` + +Our `package.json` file within our codebase root would look like this: + +```json +{ + "name": "myproject", + "private": true, + "workspaces": { + "packages": ["app", "common", "myplugin"] + } +} +``` + +Our `app` folder would be our toplevel package, consuming our `common` and `myplugin` packages as `pinned-dependencies`. The configuration for `app/rescript.json` looks like this: + +```json +{ + "name": "app", + "version": "1.0.0", + "sources": { + "dir": "src", + "subdirs": true + }, + /* ... */ + "bs-dependencies": ["common", "myplugin"], + "pinned-dependencies": ["common", "myplugin"] + /* ... */ +} +``` + +Now, whenever we are running `rescript build` within our `app` package, the compiler would always rebuild any changes within its pinned dependencies as well. + +**Important:** ReScript will not rebuild any `pinned-dependencies` in watch mode! This is due to the complexity of file watching, so you'd need to set up your own file-watcher process that runs `rescript build` on specific file changes. diff --git a/pages/docs/manual/v12.0.0/control-flow.mdx b/pages/docs/manual/v12.0.0/control-flow.mdx new file mode 100644 index 000000000..600684cb4 --- /dev/null +++ b/pages/docs/manual/v12.0.0/control-flow.mdx @@ -0,0 +1,211 @@ +--- +title: "If-Else & Loops" +description: "If, else, ternary, for, and while" +canonical: "/docs/manual/v12.0.0/control-flow" +--- + +# If-Else & Loops + +ReScript supports `if`, `else`, ternary expression (`a ? b : c`), `for` and `while`. + +ReScript also supports our famous pattern matching, which will be covered in [its own section](pattern-matching-destructuring.md) + +## If-Else & Ternary + +Unlike its JavaScript counterpart, ReScript's `if` is an expression; they evaluate to their body's content: + + + +```res +let message = if isMorning { + "Good morning!" +} else { + "Hello!" +} +``` +```js +var message = isMorning ? "Good morning!" : "Hello!"; +``` + + + +**Note:** an `if-else` expression without the final `else` branch implicitly gives `()` (aka the `unit` type). So this: + + + +```res +if showMenu { + displayMenu() +} +``` +```js +if (showMenu) { + displayMenu(); +} +``` + + + +is basically the same as: + + + +```res +if showMenu { + displayMenu() +} else { + () +} +``` +```js +if (showMenu) { + displayMenu() +} +``` + + + +Here's another way to look at it. This is clearly wrong: + +```res +let result = if showMenu { + 1 + 2 +} +``` + +It'll give a type error, saying basically that the implicit `else` branch has the type `unit` while the `if` branch has type `int`. Intuitively, this makes sense: what would `result`'s value be, if `showMenu` was `false`? + +We also have ternary sugar, but **we encourage you to prefer if-else when possible**. + + + +```res +let message = isMorning ? "Good morning!" : "Hello!" +``` +```js +var message = isMorning ? "Good morning!" : "Hello!"; +``` + + + +**`if-else` and ternary are much less used** in ReScript than in other languages; [Pattern-matching](pattern-matching-destructuring.md) kills a whole category of code that previously required conditionals. + +## For Loops + +For loops iterate from a starting value up to (and including) the ending value. + + + +```res +for i in startValueInclusive to endValueInclusive { + Console.log(i) +} +``` +```js +for(var i = startValueInclusive; i <= endValueInclusive; ++i){ + console.log(i); +} +``` + + + + + +```res example +// prints: 1 2 3, one per line +for x in 1 to 3 { + Console.log(x) +} +``` +```js +for(var x = 1; x <= 3; ++x){ + console.log(x); +} +``` + + + +You can make the `for` loop count in the opposite direction by using `downto`. + + + +```res +for i in startValueInclusive downto endValueInclusive { + Console.log(i) +} +``` +```js +for(var i = startValueInclusive; i >= endValueInclusive; --i){ + console.log(i); +} +``` + + + + + +```res example +// prints: 3 2 1, one per line +for x in 3 downto 1 { + Console.log(x) +} +``` +```js +for(var x = 3; x >= 1; --x){ + console.log(x); +} +``` + + + +## While Loops + +While loops execute its body code block while its condition is true. + + + +```res +while testCondition { + // body here +} +``` +```js +while (testCondition) { + // body here +} +``` + + + +### Tips & Tricks + +There's no loop-breaking `break` keyword (nor early `return` from functions, for that matter) in ReScript. However, we can break out of a while loop easily through using a [mutable binding](mutation.md). + + + +```res example +let break = ref(false) + +while !break.contents { + if Math.random() > 0.3 { + break := true + } else { + Console.log("Still running") + } +} +``` +```js +var $$break = { + contents: false +}; + +while(!$$break.contents) { + if (Math.random() > 0.3) { + $$break.contents = true; + } else { + console.log("Still running"); + } +}; +``` + + diff --git a/pages/docs/manual/v12.0.0/converting-from-js.mdx b/pages/docs/manual/v12.0.0/converting-from-js.mdx new file mode 100644 index 000000000..37ed1e330 --- /dev/null +++ b/pages/docs/manual/v12.0.0/converting-from-js.mdx @@ -0,0 +1,303 @@ +--- +title: "Converting from JS" +description: "How to convert to ReScript with an existing JS codebase" +canonical: "/docs/manual/v12.0.0/converting-from-js" +--- + +# Converting from JS + +ReScript offers a unique project conversion methodology which: +- Ensures minimal disruption to your teammates (very important!). +- Remove the typical friction of verifying conversion's correctness and performance guarantees. +- Doesn't force you to search for pre-made binding libraries made by others. **ReScript doesn't need the equivalent of TypeScript's `DefinitelyTyped`**. + +## Step 1: Install ReScript + +Run `npm install rescript` on your project, then imitate our [New Project](installation#new-project) workflow by adding a `rescript.json` at the root. Then start `npx rescript -w`. + +## Step 2: Copy Paste the Entire JS File + +Let's work on converting a file called `src/main.js`. + +```js +const school = require('school'); + +const defaultId = 10; + +function queryResult(usePayload, payload) { + if (usePayload) { + return payload.student; + } else { + return school.getStudentById(defaultId); + } +} +``` + +First, copy the entire file content over to a new file called `src/Main.res` by using our [`%%raw` JS embedding trick](embed-raw-javascript): + + + +```res example +%%raw(` +const school = require('school'); + +const defaultId = 10; + +function queryResult(usePayload, payload) { + if (usePayload) { + return payload.student; + } else { + return school.getStudentById(defaultId); + } +} +`) +``` +```js +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +const school = require('school'); + +const defaultId = 10; + +function queryResult(usePayload, payload) { + if (usePayload) { + return payload.student; + } else { + return school.getStudentById(defaultId); + } +} + +/* Not a pure module */ +``` + + + +Add this file to `rescript.json`: + +```json + "sources": { + "dir" : "src", + "subdirs" : true + }, +``` + +Open an editor tab for `src/Main.res.js`. Do a command-line `diff -u src/main.js src/Main.res.js`. Aside from whitespaces, you should see only minimal, trivial differences. You're already a third of the way done! + +**Always make sure** that at each step, you keep the ReScript output `.res.js` file open to compare against the existing JavaScript file. Our compilation output is very close to your hand-written JavaScript; you can simply eye the difference to catch conversion bugs! + +## Step 3: Extract Parts into Idiomatic ReScript + +Let's turn the `defaultId` variable into a ReScript let-binding: + + + +```res example +let defaultId = 10 + +%%raw(` +const school = require('school'); + +function queryResult(usePayload, payload) { + if (usePayload) { + return payload.student; + } else { + return school.getStudentById(defaultId); + } +} +`) +``` +```js +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +const school = require('school'); + +function queryResult(usePayload, payload) { + if usePayload { + return payload.student + } else { + return school.getStudentById(defaultId) + } +} + +var defaultId = 10; + +exports.defaultId = defaultId; +/* Not a pure module */ +``` + + + +Check the output. Diff it. Code still works. Moving on! Extract the function: + + + +```res +%%raw(` +const school = require('school'); +`) + +let defaultId = 10 + +let queryResult = (usePayload, payload) => { + if usePayload { + payload.student + } else { + school.getStudentById(defaultId) + } +} +``` +```js +``` + + + +Format the code: `./node_modules/.bin/rescript format src/Main.res`. + +We have a type error: "The record field student can't be found". That's fine! **Always ensure your code is syntactically valid first**. Fixing type errors comes later. + +## Step 4: Add `external`s, Fix Types + +The previous type error is caused by `payload`'s record declaration (which supposedly contains the field `student`) not being found. Since we're trying to convert as quickly as possible, let's use our [object](object) feature to avoid needing type declaration ceremonies: + + + +```res +%%raw(` +const school = require('school'); +`) + +let defaultId = 10 + +let queryResult = (usePayload, payload) => { + if usePayload { + payload["student"] + } else { + school["getStudentById"](defaultId) + } +} +``` +```js +``` + + + +Now this triggers the next type error, that `school` isn't found. Let's use [`external`](external) to bind to that module: + + + +```res example +@module external school: 'whatever = "school" + +let defaultId = 10 + +let queryResult = (usePayload, payload) => { + if usePayload { + payload["student"] + } else { + school["getStudentById"](defaultId) + } +} +``` +```js +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +var School = require("school"); + +function queryResult(usePayload, payload) { + if (usePayload) { + return payload.student; + } else { + return School.getStudentById(10); + } +} + +var defaultId = 10; + +exports.defaultId = defaultId; +exports.queryResult = queryResult; +/* school Not a pure module */ +``` + + + +We hurrily typed `school` as a polymorphic `'whatever` and let its type be inferred by its usage below. The inference is technically correct, but within the context of bringing it a value from JavaScript, slightly dangerous. This is just the interop trick we've shown in the [`external`](external) page. + +Anyway, the file passes the type checker again. Check the `.res.js` output, diff with the original `.js`; we've now converted a file over to ReScript! + +Now, you can delete the original, hand-written `main.js` file, and grep the files importing `main.js` and change them to importing `Main.res.js`. + +## (Optional) Step 5: Cleanup + +If you prefer more advanced, rigidly typed `payload` and `school`, feel free to do so: + + + +```res example +type school +type student +type payload = { + student: student +} + +@module external school: school = "school" +@send external getStudentById: (school, int) => student = "getStudentById" + +let defaultId = 10 + +let queryResult = (usePayload, payload) => { + if usePayload { + payload.student + } else { + school->getStudentById(defaultId) + } +} +``` +```js +// Generated by ReScript, PLEASE EDIT WITH CARE +'use strict'; + +var School = require("school"); + +function queryResult(usePayload, payload) { + if (usePayload) { + return payload.student; + } else { + return School.getStudentById(10); + } +} + +var defaultId = 10; + +exports.defaultId = defaultId; +exports.queryResult = queryResult; +/* school Not a pure module */ +``` + + + +We've: +- introduced an opaque types for `school` and `student` to prevent misuse of their values +- typed the payload as a record with only the `student` field +- typed `getStudentById` as the sole method of `student` + +Check that the `.res.js` output didn't change. How rigidly to type your JavaScript code is up to you; we recommend not typing them too elaborately; it's sometime an endless chase, and produces diminishing returns, especially considering that the elaborate-ness might turn off your potential teammates. + +## Tips & Tricks + +In the same vein of idea, **resist the urge to write your own wrapper functions for the JS code you're converting**. Use [`external`s](external), which are guaranteed to be erased in the output. And avoid trying to take the occasion to convert JS data structures into ReScript-specific data structures like variant or list. **This isn't the time for that**. + +The moment you produce extra conversion code in the output, your skeptical teammate's mental model might switch from "I recognize this output" to "this conversion might be introducing more problems than it solves. Why are we testing ReScript again?". Then you've lost. + +## Conclusion + +- Paste the JS code into a new ReScript file as embedded raw JS code. +- Compile and keep the output file open. Check and diff against original JS file. Free regression tests. +- Always make sure your file is syntactically valid. Don't worry about fixing types before that. +- (Ab)use [object](object.md) accesses to quickly convert things over. +- Optionally clean up the types for robustness. +- Don't go overboard and turn off your boss and fellow teammates. +- Proudly display that you've conserved the semantics and performance characteristics during the conversion by showing your teammates the eerily familiar output. +- Get promoted for introducing a new technology the safer, mature way. diff --git a/pages/docs/manual/v12.0.0/editor-plugins.mdx b/pages/docs/manual/v12.0.0/editor-plugins.mdx new file mode 100644 index 000000000..471f1b7e2 --- /dev/null +++ b/pages/docs/manual/v12.0.0/editor-plugins.mdx @@ -0,0 +1,19 @@ +--- +title: "Editor Plugins" +description: "List of ReScript editor plugins" +canonical: "/docs/manual/v12.0.0/editor-plugins" +--- + +# Editor Plugins + +- [VSCode](https://marketplace.visualstudio.com/items?itemName=chenglou92.rescript-vscode) +- [Sublime Text](https://github.com/rescript-lang/rescript-sublime) +- [Vim/Neovim](https://github.com/rescript-lang/vim-rescript) + +## Community Supported + +We don't officially support these; use them at your own risk! + +- [Neovim Tree-sitter](https://github.com/nkrkv/nvim-treesitter-rescript) +- [IDEA](https://github.com/reasonml-editor/reasonml-idea-plugin) +- [Emacs](https://github.com/jjlee/rescript-mode) diff --git a/pages/docs/manual/v12.0.0/embed-raw-javascript.mdx b/pages/docs/manual/v12.0.0/embed-raw-javascript.mdx new file mode 100644 index 000000000..b42675f4c --- /dev/null +++ b/pages/docs/manual/v12.0.0/embed-raw-javascript.mdx @@ -0,0 +1,110 @@ +--- +title: "Embed Raw JavaScript" +description: "Utility syntax to for raw JS usage in ReScript" +canonical: "/docs/manual/v12.0.0/embed-raw-javascript" +--- + +# Embed Raw JavaScript + +## Paste Raw JS Code + +First thing first. If you're ever stuck learning ReScript, remember that you can always just paste raw JavaScript code into our source file: + + + +```res example +%%raw(` +// look ma, regular JavaScript! +var message = "hello"; +function greet(m) { + console.log(m) +} +`) +``` +```js +// look ma, regular JavaScript! +var message = "hello"; +function greet(m) { + console.log(m) +} +``` + + + +The `%%raw` special ReScript call takes your code string and pastes it as-is into the output. **You've now technically written your first ReScript file!** + +(The back tick syntax is a multiline string, similar to JavaScript's. Except for us, no escaping is needed inside the string. More on string in a later section.) + +While `%%raw` lets you embed top-level raw JS code, `%raw` lets you embed expression-level JS code: + + + +```res example +let add = %raw(` + function(a, b) { + console.log("hello from raw JavaScript!"); + return a + b + } +`) + +Console.log(add(1, 2)) +``` +```js +var add = function(a, b) { + console.log("hello from raw JavaScript!"); + return a + b +}; + +console.log(add(1, 2)); +``` + + + +The above code: +- declared a ReScript variable `add`, +- with the raw JavaScript value of a function declaration, +- then called that function in ReScript. + +If your boss is ever worried that your teammates can't adopt ReScript, just let them keep writing JavaScript inside ReScript files =). + +## Debugger + +You can also drop a `%debugger` expression in a body: + + + +```res example +let f = (x, y) => { + %debugger + x + y +} +``` +```js +function f(x, y) { + debugger; + return x + y | 0; +} +``` + + + +Output: + +```js +function f(x, y) { + debugger; // JavaScript developer tools will set an breakpoint and stop here + x + y; +} +``` + +## Tips & Tricks + +Embedding raw JS snippets isn't the best way to experience ReScript, though it's also highly useful if you're just starting out. As a matter of fact, the first few ReScript projects were converted through: + +- pasting raw JS snippets inside a file +- examining the JS output (identical to the old hand-written JS) +- gradually extract a few values and functions and making sure the output still looks OK + +At the end, we get a fully safe, converted ReScript file whose JS output is clean enough that we can confidently assert that no new bug has been introduced during the conversion process. + +We have a small guide on this iteration [here](converting-from-js.md). Feel free to peruse it later. diff --git a/pages/docs/manual/v12.0.0/equality-comparison.mdx b/pages/docs/manual/v12.0.0/equality-comparison.mdx new file mode 100644 index 000000000..d3dc3f302 --- /dev/null +++ b/pages/docs/manual/v12.0.0/equality-comparison.mdx @@ -0,0 +1,125 @@ +--- +title: "Equality and Comparison" +description: "Handling equality and comparison checks" +canonical: "/docs/manual/v12.0.0/equality-comparison" +--- + +# Equality and Comparison + +ReScript has shallow equality `===`, deep equality `==`, and comparison operators `>`, `>=`, `<`, and `<=`. + +## Shallow equality +The shallow equality operator `===` compares two values and either compiles to `===` or a `bool` if the equality is known to the compiler. +It behaves the same as the strict equality operator `===` in JavaScript. + +Using `===` will never add a runtime cost. + + + +```res +let t1 = 1 === 1 // true +let t2 = "foo" === "foo" // true +let t3 = { "foo": "bar" } === { "foo": "bar"} // false + +let doStringsMatch = (s1: string, s2: string) => s1 === s2 +``` +```js +var t1 = true; +var t2 = "foo" === "foo"; +var t3 = ({ foo: "bar" }) === ({ foo: "bar" }); + +function doStringsMatch(s1, s2) { + return s1 === s2; +} +``` + + + +## Deep equality +ReScript has the deep equality operator `==` to check deep equality of two items, which is very different from the loose equality operator like `==` in JavaScript. + +When using `==` in ReScript it will never compile to `==` in JavaScript, +it will either compile to `===`, a runtime call to an internal function that deeply compares the equality, or a `bool` if the equality is known to the compiler. + + + +```res +let t1 = 1 == 1 // true +let t2 = "foo" == "foo" // true +let t3 = { "foo": "bar" } == { "foo": "bar"} // true + +let doStringsMatch = (s1: string, s2: string) => s1 == s2 +``` +```js +import * as Caml_obj from "./stdlib/caml_obj.js"; + +var t1 = true; +var t2 = true; +var t3 = Caml_obj.equal({ foo: "bar" }, { foo: "bar" }); + +function doStringsMatch(s1, s2) { + return s1 === s2; +} +``` + + +`==` will compile to `===` (or a `bool` if the compiler can determine equality) when: + +- Comparing `string`, `char`, `int`, `float`, `bool`, or `unit` +- Comparing variants or polymorphic variants that do not have constructor values + +`==` will compile to a runtime check for deep equality when: +- Comparing `array`, `tuple`, `list`, `object`, `record`, or regular expression `Re.t` +- Comparing variants or polymorphic variants that have constructor values + +> When using `==` pay close attention to the JavaScript output if you're not sure what `==` will compile to. + +## Comparison +ReScript has operators for comparing values that compile to the the same operator in JS, a runtime check using an internal function, or a `bool` if the equality is known to the compiler, + +| operator | comparison | +| --- | ----------- | +| `>` | greater than | +| `>=` | greater than or equal | +| `<` | less than | +| `<=` | less than or equal | + +Comparison can be done on any type. + +An operator will compile to the same operator (or a `bool` if the compiler can determine equality) when: +- Comparing `int`, `float`, `string`, `char`, `bool` + +An operator will compile to a runtime check for deep equality when: +- Comparing `array`, `tuple`, `list`, `object`, `record`, or regular expression (`Re.t`) +- Comparing variants or polymorphic variants + + + +```res +let compareInt = (a: int, b: int) => a > b +let t1 = 1 > 10 +let compareArray = (a: array, b: array) => a > b +let compareOptions = (a: option, b: option) => a < b +``` +```js +import * as Caml_obj from "./stdlib/caml_obj.js"; + +function compareInt(a, b) { + return a > b; +} + +var t1 = false; + +var compareArray = Caml_obj.greaterthan; + +var compareOptions = Caml_obj.lessthan; +``` + + +## Performance of runtime equality checks +The runtime equality check ReScript uses is quite fast and should be adequate for almost all use cases. +For small objects it can be 2x times faster than alternative deep compare functions such as Lodash's [`_.isEqual`](https://lodash.com/docs/4.17.15#isEqual). + +For larger objects instead of using `==` you could manually use a faster alternative such as [fast-deep-compare](https://www.npmjs.com/package/fast-deep-equal), or write a custom comparator function. + +[This repo](https://github.com/jderochervlk/rescript-perf) has benchmarks comparing results of different libraries compared to ReScript's built-in equality function. \ No newline at end of file diff --git a/pages/docs/manual/v12.0.0/exception.mdx b/pages/docs/manual/v12.0.0/exception.mdx new file mode 100644 index 000000000..1fb7facb4 --- /dev/null +++ b/pages/docs/manual/v12.0.0/exception.mdx @@ -0,0 +1,498 @@ +--- +title: "Exception" +description: "Exceptions and exception handling in ReScript" +canonical: "/docs/manual/v12.0.0/exception" +--- + +# Exception + +Exceptions are just a special kind of variant, thrown in **exceptional** cases (don't abuse them!). Consider using the [`option`](null-undefined-option.mdx) or [`result`](api/core/result) type for recoverable errors. + +You can create your own exceptions like you'd make a variant (exceptions need to be capitalized too). + + + +```res example +exception InputClosed(string) +// later on +raise(InputClosed("The stream has closed!")) +``` +```js +import * as Caml_exceptions from "./stdlib/caml_exceptions.js"; + +var InputClosed = /* @__PURE__ */Caml_exceptions.create("Playground.InputClosed"); + +throw { + RE_EXN_ID: InputClosed, + _1: "The stream has closed!", + Error: new Error() + }; +``` + + + +## Built-in Exceptions + +ReScript has some built-in exceptions: + +### `Not_found` + + + +```res prelude +let getItem = (item: int) => + if (item === 3) { + // return the found item here + 1 + } else { + raise(Not_found) + } + +let result = + try { + getItem(2) + } catch { + | Not_found => 0 // Default value if getItem throws + } +``` +```js +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +function getItem(item) { + if (item === 3) { + return 1; + } + throw { + RE_EXN_ID: "Not_found", + Error: new Error() + }; +} + +var result; + +try { + result = getItem(2); +} +catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Not_found") { + result = 0; + } else { + throw exn; + } +} +``` + + + +Note that the above is just for demonstration purposes; in reality, you'd return an `option` directly from `getItem` and avoid the `try` altogether. + +You can directly match on exceptions _while_ getting another return value from a function: + + + +```res prelude +switch list{1, 2, 3}->List.getExn(4) { +| item => Console.log(item) +| exception Not_found => Console.log("No such item found!") +} +``` +```js +import * as Core__List from "./stdlib/core__List.js"; +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +var exit = 0; + +var item; + +try { + item = Core__List.getExn({ + hd: 1, + tl: { + hd: 2, + tl: { + hd: 3, + tl: /* [] */0 + } + } + }, 4); + exit = 1; +} +catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Not_found") { + console.log("No such item found!"); + } else { + throw exn; + } +} + +if (exit === 1) { + console.log(item); +} +``` + + + +### `Invalid_argument` + +Used to check if argument is valid. This exception takes a string. + + +```res example +let divide = (a, b) => + if b == 0 { + raise(Invalid_argument("Denominator is zero")) + } else { + a / b + } + +// catch error +try divide(2, 0)->Console.log catch { +| Invalid_argument(msg) => Console.log(msg) // Denominator is zero +} +``` + +```js +import * as Caml_int32 from "./stdlib/caml_int32.js"; +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +function divide(a, b) { + if (b === 0) { + throw { + RE_EXN_ID: "Invalid_argument", + _1: "Denominator is zero", + Error: new Error() + }; + } + return Caml_int32.div(a, b); +} + +try { + console.log(divide(2, 0)); +} +catch (raw_msg){ + var msg = Caml_js_exceptions.internalToOCamlException(raw_msg); + if (msg.RE_EXN_ID === "Invalid_argument") { + console.log(msg._1); + } else { + throw msg; + } +} +``` + + + +### `Assert_failure` + +Raise when you use `assert(condition)` and `condition` is false. The arguments +are the location of the `assert` in the source code (file name, line number, column number). + + + +```res example +let decodeUser = (json: JSON.t) => + switch json { + | Object(userDict) => + switch (userDict->Dict.get("name"), userDict->Dict.get("age")) { + | (Some(String(name)), Some(Number(age))) => (name, age->Float.toInt) + | _ => assert(false) + } + | _ => assert(false) + } + + +try decodeUser(%raw("{}"))->Console.log catch { +| Assert_failure(loc) => Console.log(loc) // ("filename", line, col) +} +``` + +```js +mport * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +function decodeUser(json) { + if (!Array.isArray(json) && (json === null || typeof json !== "object") && typeof json !== "number" && typeof json !== "string" && typeof json !== "boolean") { + throw { + RE_EXN_ID: "Assert_failure", + _1: [ + "playground.res", + 8, + 9 + ], + Error: new Error() + }; + } + if (typeof json === "object" && !Array.isArray(json)) { + var match = json["name"]; + var match$1 = json["age"]; + if (match !== undefined && !(!Array.isArray(match) && (match === null || typeof match !== "object") && typeof match !== "number" && typeof match !== "string" && typeof match !== "boolean") && typeof match === "string" && match$1 !== undefined && !(!Array.isArray(match$1) && (match$1 === null || typeof match$1 !== "object") && typeof match$1 !== "number" && typeof match$1 !== "string" && typeof match$1 !== "boolean") && typeof match$1 === "number") { + return [ + match, + match$1 | 0 + ]; + } + throw { + RE_EXN_ID: "Assert_failure", + _1: [ + "playground.res", + 6, + 11 + ], + Error: new Error() + }; + } + throw { + RE_EXN_ID: "Assert_failure", + _1: [ + "playground.res", + 8, + 9 + ], + Error: new Error() + }; +} + +try { + console.log(decodeUser({})); +} +catch (raw_loc){ + var loc = Caml_js_exceptions.internalToOCamlException(raw_loc); + if (loc.RE_EXN_ID === "Assert_failure") { + console.log(loc._1); + } else { + throw loc; + } +} +``` + + + +### `Failure` + +Exception raised to signal that the given arguments do not make sense. This +exception takes a string as an argument. + + + +```res example +let isValidEmail = email => { + let hasAtSign = String.includes(email, "@") + let hasDot = String.includes(email, ".") + if !(hasAtSign && hasDot) { + raise(Failure("Invalid email address")) + } else { + true + } +} + + +let isValid = try isValidEmail("rescript.org") catch { +| Failure(msg) => { + Console.error(msg) + false + } +} +``` + +```js +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +function isValidEmail(email) { + var hasAtSign = email.includes("@"); + var hasDot = email.includes("."); + if (hasAtSign && hasDot) { + return true; + } + throw { + RE_EXN_ID: "Failure", + _1: "Invalid email address", + Error: new Error() + }; +} + +var isValid; + +try { + isValid = isValidEmail("rescript.org"); +} +catch (raw_msg){ + var msg = Caml_js_exceptions.internalToOCamlException(raw_msg); + if (msg.RE_EXN_ID === "Failure") { + console.error(msg._1); + isValid = false; + } else { + throw msg; + } +} +``` + + + +### `Division_by_zero` + +Exception raised by integer division and remainder operations when their second argument is zero. + + + +```res example +// ReScript raise `Division_by_zero` if the denominator is zero +let result = try Some(10 / 0) catch { +| Division_by_zero => None +} + +Console.log(result) // None +``` + +```js +import * as Caml_int32 from "./stdlib/caml_int32.js"; +import * as Caml_js_exceptions from "./stdlib/caml_js_exceptions.js"; + +var result; + +try { + result = Caml_int32.div(10, 0); +} +catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Division_by_zero") { + result = undefined; + } else { + throw exn; + } +} + +console.log(result); +``` + + + +## Catching JS Exceptions + +To distinguish between JavaScript exceptions and ReScript exceptions, ReScript namespaces JS exceptions under the `Exn.Error(payload)` variant. To catch an exception thrown from the JS side: + + +Throw an exception from JS: + +```js +// Example.js + +exports.someJsFunctionThatThrows = () => { + throw new Error("A Glitch in the Matrix!"); +} +``` + +Then catch it from ReScript: + +```res +// import the method in Example.js +@module("./Example") +external someJsFunctionThatThrows: () => unit = "someJsFunctionThatThrows" + +try { + // call the external method + someJSFunctionThatThrows() +} catch { +| Exn.Error(obj) => + switch Exn.message(obj) { + | Some(m) => Console.log("Caught a JS exception! Message: " ++ m) + | None => () + } +} +``` + +The `obj` here is of type `Exn.t`, intentionally opaque to disallow illegal operations. To operate on `obj`, do like the code above by using the standard library's [`Exn`](api/js/exn) module's helpers. + +## Raise a JS Exception + +`raise(MyException)` raises a ReScript exception. To raise a JavaScript exception (whatever your purpose is), use `Exn.raiseError`: + + + +```res example +let myTest = () => { + Exn.raiseError("Hello!") +} +``` +```js +var Js_exn = require("./stdlib/js_exn.js"); + +function myTest() { + return Js_exn.raiseError("Hello!"); +} +``` + + + +Then you can catch it from the JS side: + +```js +// after importing `myTest`... +try { + myTest() +} catch (e) { + console.log(e.message) // "Hello!" +} +``` + +## Catch ReScript Exceptions from JS + +The previous section is less useful than you think; to let your JS code work with your exception-throwing ReScript code, the latter doesn't actually need to throw a JS exception. ReScript exceptions can be used by JS code! + + + +```res example +exception BadArgument({myMessage: string}) + +let myTest = () => { + raise(BadArgument({myMessage: "Oops!"})) +} +``` +```js +var Caml_exceptions = require("./stdlib/caml_exceptions.js"); + +var BadArgument = Caml_exceptions.create("Playground.BadArgument"); + +function myTest() { + throw { + RE_EXN_ID: BadArgument, + myMessage: "Oops!", + Error: new Error() + }; +} +``` + + + +Then, in your JS: + +```js +// after importing `myTest`... +try { + myTest() +} catch (e) { + console.log(e.myMessage) // "Oops!" + console.log(e.Error.stack) // the stack trace +} +``` + +> Note: `RE_EXN_ID` is an internal field for bookkeeping purposes. Don't use it on the JS side. Use the other fields. + +The above `BadArgument` exception takes an inline record type. We special-case compile the exception as `{RE_EXN_ID, myMessage, Error}` for good ergonomics. If the exception instead took ordinary positional arguments, l like the standard library's `Invalid_argument("Oops!")`, which takes a single argument, the argument is compiled to JS as the field `_1` instead. A second positional argument would compile to `_2`, etc. + +## Tips & Tricks + +When you have ordinary variants, you often don't **need** exceptions. For example, instead of throwing when `item` can't be found in a collection, try to return an `option` (`None` in this case) instead. + +### Catch Both ReScript and JS Exceptions in the Same `catch` Clause + +```res +try { + someOtherJSFunctionThatThrows() +} catch { +| Not_found => ... // catch a ReScript exception +| Invalid_argument(_) => ... // catch a second ReScript exception +| Exn.Error(obj) => ... // catch the JS exception +} +``` + +This technically works, but hopefully you don't ever have to work with such code... diff --git a/pages/docs/manual/v12.0.0/extensible-variant.mdx b/pages/docs/manual/v12.0.0/extensible-variant.mdx new file mode 100644 index 000000000..51b834fd3 --- /dev/null +++ b/pages/docs/manual/v12.0.0/extensible-variant.mdx @@ -0,0 +1,75 @@ +--- +title: "Extensible Variant" +description: "Extensible Variants in ReScript" +canonical: "/docs/manual/v12.0.0/extensible-variant" +--- + +# Extensible Variant + +Variant types are usually constrained to a fixed set of constructors. There may be very rare cases where you still want to be able to add constructors to a variant type even after its initial type declaration. For this, we offer extensible variant types. + +## Definition and Usage + + + +```res example +type t = .. + +type t += Other + +type t += + | Point(float, float) + | Line(float, float, float, float) +``` +```js +var Caml_exceptions = require("./stdlib/caml_exceptions.js"); + +var Other = Caml_exceptions.create("Playground.Other"); + +var Point = Caml_exceptions.create("Playground.Point"); + +var Line = Caml_exceptions.create("Playground.Line"); +``` + + + +The `..` in the type declaration above defines an extensible variant `type t`. The `+=` operator is then used to add constructors to the given type. + +**Note:** Don't forget the leading `type` keyword when using the `+=` operator! + +## Pattern Matching Caveats + +Extensible variants are open-ended, so the compiler will not be able to exhaustively pattern match all available cases. You will always need to provide a default `_` case for every `switch` expression. + + + + + +```res +let print = v => + switch v { + | Point(x, y) => Console.log2("Point", (x, y)) + | Line(ax, ay, bx, by) => Console.log2("Line", (ax, ay, bx, by)) + | Other + | _ => Console.log("Other") + } +``` +```js +function print(v) { + if (v.RE_EXN_ID === Point) { + console.log("Point", [v._1, v._2]); + } else if (v.RE_EXN_ID === Line) { + console.log("Line", [v._1, v._2, v._3, v._4]); + } else { + console.log("Other"); + } +} +``` + + + +## Tips & Tricks + +**Fun fact:** In ReScript, [exceptions](./exception) are actually extensible variants under the hood, so `exception UserError(string)` is equivalent to `type exn += UserError(string)`. It's one of the very few use-case where extensible variants make sense. + +We usually recommend sticking with common [variants](./variant) as much as possible to reap the benefits of exhaustive pattern matching. \ No newline at end of file diff --git a/pages/docs/manual/v12.0.0/external.mdx b/pages/docs/manual/v12.0.0/external.mdx new file mode 100644 index 000000000..fd91010dd --- /dev/null +++ b/pages/docs/manual/v12.0.0/external.mdx @@ -0,0 +1,91 @@ +--- +title: "External (Bind to Any JS Library)" +description: "The external keyword" +canonical: "/docs/manual/v12.0.0/external" +--- + +# External (Bind to Any JS Library) + +`external` is the primary ReScript features for bringing in and using JavaScript values. + +`external` is like a let binding, but: +- The right side of `=` isn't a value; it's the name of the JS value you're referring to. +- The type for the binding is mandatory, since we need to know what the type of that JS value is. +- Can only exist at the top level of a file or module. + + + +```res example +@val external setTimeout: (unit => unit, int) => float = "setTimeout" +``` +```js +// Empty output +``` + + + +There are several kinds of `external`s, differentiated and/or augmented through the [attribute](attribute.md) they carry. This page deals with the general, shared mechanism behind most `external`s. The different `external`s are documented in their respective pages later. A few notable ones: + +- `@val`, `@scope`: [bind to global JS values](bind-to-global-js-values). +- `@module`: [bind to JS imported/exported values](import-from-export-to-js). +- `@send`: [bind to JS methods](bind-to-js-function). + +You can also use our [Syntax Lookup](/syntax-lookup) tool to find them. + +Related: see also our [list of external decorators](interop-cheatsheet#list-of-decorators). + +## Usage + +Once declared, you can use an `external` as a normal value, just like a let binding. + +## Tips & Tricks + +`external` + ReScript objects are a wonderful combination for quick prototyping. Check the JS output tab: + + + +```res example +// The type of document is just some random type 'a +// that we won't bother to specify +@val external document: 'a = "document" + +// call a method +document["addEventListener"]("mouseup", _event => { + Console.log("clicked!") +}) + +// get a property +let loc = document["location"] + +// set a property +document["location"]["href"] = "rescript-lang.org" +``` +```js +document.addEventListener("mouseup", function(_event) { + console.log("clicked!"); +}); + +var loc = document.location; + +document.location.href = "rescript-lang.org"; +``` + + + +We've specified `document`'s type as `'a`, aka a placeholder type that's polymorphic. Any value can be passed there, so you're not getting much type safety (except the inferences at various call sites). However, this is excellent for quickly getting started using a JavaScript library in ReScript **without needing the equivalent of a repository of typed bindings** like TypeScript's `DefinitelyTyped` repo. + +However, if you want to more rigidly bind to the JavaScript library you want, keep reading the next few interop pages. + +## Performance & Output Readability + +`external`s declarations are inlined into their callers during compilation, **and completely disappear from the JS output**. This means any time you use one, you can be sure that you're not incurring extra JavaScript \<-> ReScript conversion cost. + +Additionally, no extra ReScript-specific runtime is better for output readability. + +> **Note:** do also use `external`s and the `@blabla` attributes in the interface files. Otherwise the inlining won't happen. + +## Design Decisions + +ReScript takes interoperating with existing code very seriously. Our type system has very strong guarantees. However, such strong feature also means that, without a great interop system, it'd be very hard to gradually convert a codebase over to ReScript. Fortunately, our interop are comprehensive and cooperate very well with most existing JavaScript code. + +The combination of a sound type system + great interop means that we get the benefits of a traditional gradual type system regarding incremental codebase coverage & conversion, without the downside of such gradual type system: complex features to support existing patterns, slow analysis, diminishing return in terms of type coverage, etc. diff --git a/pages/docs/manual/v12.0.0/faq.mdx b/pages/docs/manual/v12.0.0/faq.mdx new file mode 100644 index 000000000..60f7f39c6 --- /dev/null +++ b/pages/docs/manual/v12.0.0/faq.mdx @@ -0,0 +1,63 @@ +--- +title: "FAQ" +description: "Frequently asked questions about ReScript and its ecosystem" +canonical: "/docs/manual/v12.0.0/faq" +--- + +# Frequently Asked Questions + +**What's the goal of this project?** + +We aim to provide the best typed language experience for the JavaScript platform. + +**What’s the relationship with BuckleScript?** + +BuckleScript is ReScript's old branding, with a sharper focus on proper JS support and familiarity which we previously couldn't achieve to the degree we wanted, due to us needing to cater to various different crowds. + +**What’s ReScript's relationship with OCaml?** + +We reuse and adjust the excellent type system and lots of other high quality components from OCaml for JS experience. +Additionally, ReScript provides its own syntax, build system, IDE, backend, JS interop, extra language features, etc. + +The ReScript toolchain is developed using OCaml, however, the version of ReScript is decoupled against the version of OCaml, +ReScript compiler should build against any reasonable modern version of OCaml compiler. + +For the majority of ReScript users, they don't need to learn OCaml or use OCaml toolchain to be productive in ReScript. + +**What’s the relationship with Reason?** + +See [here](/blog/bucklescript-is-rebranding). Reason is a syntax layer for OCaml that BuckleScript also adopted. The current ReScript compiler also supports the old Reason syntax v3.6 for backward compatibility. We will support it for a long time to make sure existing users do not get breaking changes. + +**I come from Reason/OCaml. Will ReScript keep supporting X?** + +Please see our [blog post](/blog/a-note-on-bucklescripts-future-commitments) on this matter. + +**Where can I see the docs in old Reason/OCaml syntax?** + +Switch the doc version to `v8.0.0` in the sidebar on the left! + +**Will ReScript support native compilation eventually?** + +Our focus is a solid JS story right now. In the future, if there’s strong demand, we might consider it. + +**What’s the current state of ReScript?** + +Currently, we're actively working on the editor support. + +**When will we get the `async/await` keywords?** + +async/await has arrived in ReScript 10.1! + +**Why create a new syntax?** + +The existing Reason syntax is owned by a different team with a different vision. Reason aims to be 100% compatible with OCaml syntax and to support all versions of OCaml. In the last few years, we've drawn the conclusion that it’s very hard to deliver such goal without sacrificing user experience. The other reason is that we feel it’s better to have the same vision as a team so that we can make more coherent decisions. + +**Who is behind the project?** + +The ReScript team (Hongbo, Cheng, Cristiano, Maxim, Patrick, Ricky). + +**We have a new forum; will we also have our own Discord?** + +Not now. We've found that too much important information get casually passed in Discord then lost within the noise. We prefer folks to communicate on the [forum](https://forum.rescript-lang.org). This is nicer to the less active members. + +The team doesn't use the old Discord anymore. We encourage you to move your questions to the forum instead. diff --git a/pages/docs/manual/v12.0.0/function.mdx b/pages/docs/manual/v12.0.0/function.mdx new file mode 100644 index 000000000..73a56051e --- /dev/null +++ b/pages/docs/manual/v12.0.0/function.mdx @@ -0,0 +1,620 @@ +--- +title: "Function" +description: "Function syntax in ReScript" +canonical: "/docs/manual/v12.0.0/function" +--- + +# Function + +_Cheat sheet for the full function syntax at the end_. + +ReScript functions are declared with an arrow and return an expression, just like JS functions. They compile to clean JS functions too. + + + +```res prelude +let greet = (name) => "Hello " ++ name +``` +```js +function greet(name) { + return "Hello " + name; +} +``` + + + +This declares a function and assigns to it the name `greet`, which you can call like so: + + + +```res example +greet("world!") // "Hello world!" +``` +```js +greet("world!"); +``` + + + +Multi-arguments functions have arguments separated by comma: + + + +```res example +let add = (x, y, z) => x + y + z +add(1, 2, 3) // 6 +``` +```js +function add(x, y, z) { + return (x + y | 0) + z | 0; +} +``` + + + +For longer functions, you'd surround the body with a block: + + + +```res example +let greetMore = (name) => { + let part1 = "Hello" + part1 ++ " " ++ name +} +``` +```js +function greetMore(name) { + return "Hello " + name; +} +``` + + + +If your function has no argument, just write `let greetMore = () => {...}`. + +## Labeled Arguments + +Multi-arguments functions, especially those whose arguments are of the same type, can be confusing to call. + + + +```res +let addCoordinates = (x, y) => { + // use x and y here +} +// ... +addCoordinates(5, 6) // which is x, which is y? +``` +```js +function addCoordinates(x, y) { + // use x and y here +} + +addCoordinates(5, 6); +``` + + + +You can attach labels to an argument by prefixing the name with the `~` symbol: + + + +```res +let addCoordinates = (~x, ~y) => { + // use x and y here +} +// ... +addCoordinates(~x=5, ~y=6) +``` +```js +function addCoordinates(x, y) { + // use x and y here +} + +addCoordinates(5, 6); +``` + + + +You can provide the arguments in **any order**: + + + +```res +addCoordinates(~y=6, ~x=5) +``` +```js +addCoordinates(5, 6); +``` + + + +The `~x` part in the declaration means the function accepts an argument labeled `x` and can refer to it in the function body by the same name. You can also refer to the arguments inside the function body by a different name for conciseness: + + + +```res +let drawCircle = (~radius as r, ~color as c) => { + setColor(c) + startAt(r, r) + // ... +} + +drawCircle(~radius=10, ~color="red") +``` +```js +function drawCircle(r, c) { + setColor(c); + return startAt(r, r); +} + +drawCircle(10, "red"); +``` + + + +As a matter of fact, `(~radius)` is just a shorthand for `(~radius as radius)`. + +Here's the syntax for typing the arguments: + + + +```res +let drawCircle = (~radius as r: int, ~color as c: string) => { + // code here +} +``` +```js +function drawCircle(r, c) { + // code here +} +``` + + + +## Optional Labeled Arguments + +Labeled function arguments can be made optional during declaration. You can then omit them when calling the function. + + + +```res +// radius can be omitted +let drawCircle = (~color, ~radius=?) => { + setColor(color) + switch radius { + | None => startAt(1, 1) + | Some(r_) => startAt(r_, r_) + } +} +``` +```js +var Caml_option = require("./stdlib/caml_option.js"); + +function drawCircle(color, radius) { + setColor(color); + if (radius === undefined) { + return startAt(1, 1); + } + var r_ = Caml_option.valFromOption(radius); + return startAt(r_, r_); +} +``` + + + +When given in this syntax, `radius` is **wrapped** in the standard library's `option` type, defaulting to `None`. If provided, it'll be wrapped with a `Some`. So `radius`'s type value is `None | Some(int)` here. + +More on `option` type [here](null-undefined-option.md). + +### Signatures and Type Annotations + +Functions with optional labeled arguments can be confusing when it comes to signature and type annotations. Indeed, the type of an optional labeled argument looks different depending on whether you're calling the function, or working inside the function body. Outside the function, a raw value is either passed in (`int`, for example), or left off entirely. Inside the function, the parameter is always there, but its value is an option (`option`). This means that the type signature is different, depending on whether you're writing out the function type, or the parameter type annotation. The first being a raw value, and the second being an option. + +If we get back to our previous example and both add a signature and type annotations to its argument, we get this: + + + +```res +let drawCircle: (~color: color, ~radius: int=?) => unit = + (~color: color, ~radius: option=?) => { + setColor(color) + switch radius { + | None => startAt(1, 1) + | Some(r_) => startAt(r_, r_) + } + } +``` +```js +function drawCircle(color, radius) { + setColor(color); + if (radius !== undefined) { + return startAt(radius, radius); + } else { + return startAt(1, 1); + } +} +``` + + + +The first line is the function's signature, we would define it like that in an interface file (see [Signatures](module.md#signatures)). The function's signature describes the types that the **outside world** interacts with, hence the type `int` for `radius` because it indeed expects an `int` when called. + +In the second line, we annotate the arguments to help us remember the types of the arguments when we use them **inside** the function's body, here indeed `radius` will be an `option` inside the function. + +So if you happen to struggle when writing the signature of a function with optional labeled arguments, try to remember this! + +### Explicitly Passed Optional + +Sometimes, you might want to forward a value to a function without knowing whether the value is `None` or `Some(a)`. Naively, you'd do: + + + +```res +let result = + switch payloadRadius { + | None => drawCircle(~color) + | Some(r) => drawCircle(~color, ~radius=r) + } +``` +```js +var r = payloadRadius; + +var result = r !== undefined + ? drawCircle(color, Caml_option.valFromOption(r)) + : drawCircle(color); +``` + + + +This quickly gets tedious. We provide a shortcut: + + + +```res +let result = drawCircle(~color, ~radius=?payloadRadius) +``` +```js +var result = drawCircle(1, undefined); +``` + + + +This means "I understand `radius` is optional, and that when I pass it a value it needs to be an `int`, but I don't know whether the value I'm passing is `None` or `Some(val)`, so I'll pass you the whole `option` wrapper". + +### Optional with Default Value + +Optional labeled arguments can also be provided a default value. In this case, they aren't wrapped in an `option` type. + + + +```res +let drawCircle = (~radius=1, ~color) => { + setColor(color) + startAt(radius, radius) +} +``` +```js +function drawCircle(radiusOpt, color) { + var radius = radiusOpt !== undefined ? radiusOpt : 1; + setColor(color); + return startAt(radius, radius); +} +``` + + + +## Recursive Functions + +ReScript chooses the sane default of preventing a function to be called recursively within itself. To make a function recursive, add the `rec` keyword after the `let`: + + + +```res example +let rec neverTerminate = () => neverTerminate() +``` +```js +function neverTerminate(_param) { + while(true) { + _param = undefined; + continue ; + }; +} +``` + + + +A simple recursive function may look like this: + + + +```res example +// Recursively check every item on the list until one equals the `item` +// argument. If a match is found, return `true`, otherwise return `false` +let rec listHas = (list, item) => + switch list { + | list{} => false + | list{a, ...rest} => a === item || listHas(rest, item) + } +``` +```js +function listHas(_list, item) { + while(true) { + var list = _list; + if (!list) { + return false; + } + if (list.hd === item) { + return true; + } + _list = list.tl; + continue ; + }; +} +``` + + + +Recursively calling a function is bad for performance and the call stack. However, ReScript intelligently compiles [tail recursion](https://stackoverflow.com/questions/33923/what-is-tail-recursion) into a fast JavaScript loop. Try checking the JS output of the above code! + +### Mutually Recursive Functions + +Mutually recursive functions start like a single recursive function using the +`rec` keyword, and then are chained together with `and`: + + + +```res example +let rec callSecond = () => callFirst() +and callFirst = () => callSecond() +``` +```js +function callSecond(_param) { + while(true) { + _param = undefined; + continue ; + }; +} + +function callFirst(_param) { + while(true) { + _param = undefined; + continue ; + }; +} +``` + + + +## Partial Application + +**Since 11.0** + +To partially apply a function, use the explicit `...` syntax. + + +```res +let add = (a, b) => a + b +let addFive = add(5, ...) +``` + +```js +function add(a, b) { + return a + b | 0; +} + +function addFive(extra) { + return 5 + extra | 0; +} +``` + + +## Async/Await + +Just as in JS, an async function can be declared by adding `async` before the definition, and `await` can be used in the body of such functions. +The output looks like idiomatic JS: + + + +```res example +let getUserName = async (userId) => userId + +let greetUser = async (userId) => { + let name = await getUserName(userId) + "Hello " ++ name ++ "!" +} +``` +```js +async function greetUser(userId) { + var name = await getUserName(userId); + return "Hello " + name + "!"; +} +``` + + +The return type of `getUser` is inferred to be `promise`. +Similarly, `await getUserName(userId)` returns a `string` when the function returns `promise`. +Using `await` outside of an `async` function (including in a non-async callback to an async function) is an error. + +### Ergonomic error handling + +Error handling is done by simply using `try`/`catch`, or a switch with an `exception` case, just as in functions that are not async. +Both JS exceptions and exceptions defined in ReScript can be caught. The compiler takes care of packaging JS exceptions into the builtin `JsError` exception: + + + +```res example +exception SomeReScriptException + +let somethingThatMightThrow = async () => raise(SomeReScriptException) + +let someAsyncFn = async () => { + switch await somethingThatMightThrow() { + | data => Some(data) + | exception JsError(_) => None + | exception SomeReScriptException => None + } +} +``` +```js +var SomeReScriptException = /* @__PURE__ */Caml_exceptions.create("Example.SomeReScriptException"); + +async function someAsyncFn(param) { + var data; + try { + data = await somethingThatMightThrow(undefined); + } + catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "JsError") { + return ; + } + if (exn.RE_EXN_ID === SomeReScriptException) { + return ; + } + throw exn; + } + return data; +} +``` + + + + +## The ignore() Function + +Occasionally you may want to ignore the return value of a function. ReScript provides an `ignore()` function that discards the value of its argument and returns `()`: + + + +```res +mySideEffect()->Promise.catch(handleError)->ignore + +setTimeout(myFunc, 1000)->ignore +``` + +```js +$$Promise.$$catch(mySideEffect(), function (prim) { + return handleError(prim); +}); + +setTimeout(function (prim) { + myFunc(); +}, 1000); +``` + + + +## Tips & Tricks + +Cheat sheet for the function syntaxes: + +### Declaration + +```res +// anonymous function +(x, y) => 1 +// bind to a name +let add = (x, y) => 1 + +// labeled +let add = (~first as x, ~second as y) => x + y +// with punning sugar +let add = (~first, ~second) => first + second + +// labeled with default value +let add = (~first as x=1, ~second as y=2) => x + y +// with punning +let add = (~first=1, ~second=2) => first + second + +// optional +let add = (~first as x=?, ~second as y=?) => switch x {...} +// with punning +let add = (~first=?, ~second=?) => switch first {...} +``` + +#### With Type Annotation + +```res +// anonymous function +(x: int, y: int): int => 1 +// bind to a name +let add = (x: int, y: int): int => 1 + +// labeled +let add = (~first as x: int, ~second as y: int) : int => x + y +// with punning sugar +let add = (~first: int, ~second: int) : int => first + second + +// labeled with default value +let add = (~first as x: int=1, ~second as y: int=2) : int => x + y +// with punning sugar +let add = (~first: int=1, ~second: int=2) : int => first + second + +// optional +let add = (~first as x: option=?, ~second as y: option=?) : int => switch x {...} +// with punning sugar +// note that the caller would pass an `int`, not `option` +// Inside the function, `first` and `second` are `option`. +let add = (~first: option=?, ~second: option=?) : int => switch first {...} +``` + +### Application + +```res +add(x, y) + +// labeled +add(~first=1, ~second=2) +// with punning sugar +add(~first, ~second) + +// application with default value. Same as normal application +add(~first=1, ~second=2) + +// explicit optional application +add(~first=?Some(1), ~second=?Some(2)) +// with punning +add(~first?, ~second?) +``` + +#### With Type Annotation + +```res +// labeled +add(~first=1: int, ~second=2: int) +// with punning sugar +add(~first: int, ~second: int) + +// application with default value. Same as normal application +add(~first=1: int, ~second=2: int) + +// explicit optional application +add(~first=?Some(1): option, ~second=?Some(2): option) +// no punning sugar when you want to type annotate +``` + +### Standalone Type Signature + +```res +// first arg type, second arg type, return type +type add = (int, int) => int + +// labeled +type add = (~first: int, ~second: int) => int + +// labeled +type add = (~first: int=?, ~second: int=?, unit) => int +``` + +#### In Interface Files + +To annotate a function from the implementation file (`.res`) in your interface file (`.resi`): + +```res sig +let add: (int, int) => int +``` + +The type annotation part is the same as the previous section on With Type Annotation. + +**Don't** confuse `let add: myType` with `type add = myType`. When used in `.resi` interface files, the former exports the binding `add` while annotating it as type `myType`. The latter exports the type `add`, whose value is the type `myType`. diff --git a/pages/docs/manual/v12.0.0/generate-converters-accessors.mdx b/pages/docs/manual/v12.0.0/generate-converters-accessors.mdx new file mode 100644 index 000000000..a066c4421 --- /dev/null +++ b/pages/docs/manual/v12.0.0/generate-converters-accessors.mdx @@ -0,0 +1,114 @@ +--- +title: "Generate Converters & Helpers" +description: "All about the @deriving decorator, and how to generate code from types" +canonical: "/docs/manual/v12.0.0/generate-converters-accessors" +--- + +# Generate Converters & Helpers + +**Note**: if you're looking for: +- `@deriving(jsConverter)` for records +- `@deriving({jsConverter: newType})` for records +- `@deriving(abstract)` for records +- `@deriving(jsConverter)` for plain and polymorphic variants + +These particular ones are no longer needed. Select a doc version lower than `9.0` in the sidebar to see their old docs. + + + +When using ReScript, you will sometimes come into situations where you want to + +- Automatically generate functions that convert between ReScript's internal and JS runtime values (e.g. variants). +- Convert a record type into an abstract type with generated creation, accessor and method functions. +- Generate some other helper functions, such as functions from record attribute names. + +You can use the `@deriving` decorator for different code generation scenarios. All different options and configurations will be discussed on this page. + +**Note:** Please be aware that extensive use of code generation might make it harder to understand your programs (since the code being generated is not visible in the source code, and you just need to know what kind of functions / values a decorator generates). + +## Generate Functions & Plain Values for Variants + +Use `@deriving(accessors)` on a variant type to create accessor functions for its constructors. + + + +```res +@deriving(accessors) +type action = + | Click + | Submit(string) + | Cancel; +``` + +```js +function submit(param_0) { + return /* Submit */[param_0]; +} + +var click = /* Click */0; + +var cancel = /* Cancel */1; + +exports.click = click; +exports.submit = submit; +exports.cancel = cancel; +``` + + + +Variants constructors with payloads generate functions, payload-less constructors generate plain integers (the internal representation of variants). + +**Note**: +- The generated accessors are lower-cased. +- You can now use these helpers on the JavaScript side! But don't rely on their actual values please. + +### Usage + +```res +let s = submit("hello"); /* gives Submit("hello") */ +``` + +This is useful: + +- When you're passing the accessor function as a higher-order function (which plain variant constructors aren't). +- When you'd like the JS side to use these values & functions opaquely and pass you back a variant constructor (since JS has no such thing). + +Please note that in case you just want to _pipe a payload into a constructor_, you don't need to generate functions for that. Use the `->` syntax instead, e.g. `"test"->Submit`. + +## Generate Field Accessors for Records + +Use `@deriving(accessors)` on a record type to create accessors for its record field names. + + + + +```res +@deriving(accessors) +type pet = {name: string} + +let pets = [{name: "bob"}, {name: "bob2"}] + +pets + ->Array.map(name) + ->Array.joinWith("&") + ->Console.log +``` + +```js +function name(param) { + return param.name; +} + +var pets = [ + { + name: "bob" + }, + { + name: "bob2" + } +]; + +console.log(Belt_Array.map(pets, name).join("&")); +``` + + diff --git a/pages/docs/manual/v12.0.0/import-export.mdx b/pages/docs/manual/v12.0.0/import-export.mdx new file mode 100644 index 000000000..213d779e0 --- /dev/null +++ b/pages/docs/manual/v12.0.0/import-export.mdx @@ -0,0 +1,38 @@ +--- +title: "Import & Export" +description: "Importing / exporting in ReScript modules" +canonical: "/docs/manual/v12.0.0/import-export" +--- + +# Import & Export + +## Import a Module/File + +Unlike JavaScript, ReScript doesn't have or need import statements: + + + +```res +// Inside School.res +let studentMessage = Student.message +``` +```js +var Student = require("./Student.res.js"); +var studentMessage = Student.message +``` + + + +The above code refers to the `message` binding in the file `Student.res`. Every ReScript file is also a module, so accessing another file's content is the same as accessing another module's content! + +A ReScript project's file names need to be unique. + +## Export Stuff + +By default, every file's type declaration, binding and module is exported, aka publicly usable by another file. **This also means those values, once compiled into JS, are immediately usable by your JS code**. + +To only export a few selected things, use a `.resi` [interface file](module.md#signatures). + +## Work with JavaScript Import & Export + +To see how to import JS modules and export stuff for JS consumption, see the JavaScript Interop section's [Import from/Export to JS](import-from-export-to-js.md). diff --git a/pages/docs/manual/v12.0.0/import-from-export-to-js.mdx b/pages/docs/manual/v12.0.0/import-from-export-to-js.mdx new file mode 100644 index 000000000..520ab5f0e --- /dev/null +++ b/pages/docs/manual/v12.0.0/import-from-export-to-js.mdx @@ -0,0 +1,244 @@ +--- +title: "Import from / Export to JS" +description: "Importing / exporting JS module content in ReScript" +canonical: "/docs/manual/v12.0.0/import-from-export-to-js" +--- + +# Import from/Export to JS + +You've seen how ReScript's idiomatic [Import & Export](import-export.md) works. This section describes how we work with importing stuff from JavaScript and exporting stuff for JavaScript consumption. + +If you're looking for react-specific interop guidance, check out the [React JS Interop guide](../../react/latest/import-export-reactjs.mdx). + +**Note**: due to JS ecosystem's module compatibility issues, our advice of keeping your ReScript file's compiled JS output open in a tab applies here **more than ever**, as you don't want to subtly output the wrong JS module import/export code, on top of having to deal with Babel/Webpack/Jest/Node's CommonJS \<-> JavaScript module compatibility shims. + +In short: **make sure your bindings below output what you'd have manually written in JS**. + +## Output Format + +We support 2 JavaScript import/export formats: + +- JavaScript module: `import * from 'MyReScriptFile'` and `export let ...`. +- CommonJS: `require('myFile')` and `module.exports = ...`. + +The format is [configurable in via `rescript.json`](build-configuration.md#package-specs). + +## Import From JavaScript + +### Import a JavaScript Module's Named Export + +Use the `module` [external](external.md): + + + +```res example +// Import nodejs' path.dirname +@module("path") external dirname: string => string = "dirname" +let root = dirname("/User/github") // returns "User" +``` +```js +import * as Path from "path"; +var root = Path.dirname("/User/github"); +``` +```js +var Path = require("path"); +var root = Path.dirname("/User/github"); +``` + + + +Here's what the `external` does: + +- `@module("path")`: pass the name of the JS module; in this case, `"path"`. The string can be anything: `"./src/myJsFile"`, `"@myNpmNamespace/myLib"`, etc. +- `external`: the general keyword for declaring a value that exists on the JS side. +- `dirname`: the binding name you'll use on the ReScript side. +- `string => string`: the type signature of `dirname`. Mandatory for `external`s. +- `= "dirname"`: the name of the variable inside the `path` JS module. There's repetition in writing the first and second `dirname`, because sometime the binding name you want to use on the ReScript side is different than the variable name the JS module exported. + +### Import a JavaScript Module As a Single Value + +By omitting the string argument to `module`, you bind to the whole JS module: + + + +```res example +@module external leftPad: (string, int) => string = "./leftPad" +let paddedResult = leftPad("hi", 5) +``` +```js +import * as LeftPad from "./leftPad"; +var paddedResult = LeftPad("hi", 5); +``` +```js +var LeftPad = require("./leftPad"); +var paddedResult = LeftPad("hi", 5); +``` + + + +Depending on whether you're compiling ReScript to JavaScript module or CommonJS, **this feature will generate subtly different code**. Please check both output tabs to see the difference. The JavaScript module output here would be wrong! + +### Import an `default` Export + +Use the value `default` on the right hand side: + + + +```res example +@module("./student") external studentName: string = "default" +Console.log(studentName) +``` +```js +import Student from "./student"; +var studentName = Student; +``` + + + +### Use Import Attributes + +**Since 11.1** + +[Import attributes](https://github.com/tc39/proposal-import-attributes) can be used in ReScript, as long as ReScript is configured to output JavaScript module. You do that by passing configuration to the `@module` attribute: + + +```rescript +@module({from: "./myJson.json", with: {type_: "json", \"some-exotic-identifier": "someValue"}}) +external myJson: JSON.t = "default" + +Console.log(myJson) +``` + +```javascript +import MyJsonJson from "./myJson.json" with {"type": "json", "some-exotic-identifier": "someValue"}; + +var myJson = MyJsonJson; + +console.log(myJson); +``` + + +This above imports the local `./myJson.json` file, adding import attributes. + +This is how it works: +1. Instead of passing a string or tuple to `@module`, pass a record. +2. This record should have a `from` key. The value of that is where you want the module to be imported from (just like the regular string to `@module` is). +3. It should also have a `with` key, with another record where you put all the import attributes you want emitted. + +Notice `\"some-exotic-identifier"` - you'll need to escape any key that's not a valid ReScript record key. +Also notice `type_`. Since `type` is a reserved keyword in ReScript, you can use `type_` instead. It will be output as `type` in the JavaScript code. + +## Dynamic Import +Leveraging JavaScript's [dynamic `import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) to reduce bundle size and lazy load code as needed is easy in ReScript. It's also a little bit more convenient than in regular JavaScript because you don't need to keep track of file paths manually with ReScript's module system. + +### Dynamically Importing Parts of a Module +Use the `import` function to dynamically import a specific part of a module. Put whatever `let` binding you want to import in there, and you'll get a `promise` back resolving to that specific binding. + +Let's look at an example. Imagine the following file `MathUtils.res`: + +```rescript +let add = (a, b) => a + b +let sub = (a, b) => a - b +``` + +Now let's dynamically import the add function in another module, e.g. `App.res`: + + +```rescript +// App.res +let main = async () => { + let add = await import(MathUtils.add) + let onePlusOne = add(1, 1) + + Console.log(onePlusOne) +} +``` +```javascript +async function main() { + var add = await import("./MathUtils.mjs").then(function(m) { + return m.add; + }); + + var onePlusOne = add(1, 1); + console.log(onePlusOne); +} +``` + + +### Dynamically Importing an Entire Module +The syntax for importing a whole module looks a little different, since we are operating on the module syntax level; instead of using `import`, you may simply `await` the module itself: + +```rescript +// App.res +let main = async () => { + module Utils = await MathUtils + + let twoPlusTwo = Utils.add(2, 2) + Console.log(twoPlusTwo) +} +``` +```javascript +async function main() { + var Utils = await import("./MathUtils.mjs"); + + var twoPlusTwo = Utils.add(2, 2); + console.log(twoPlusTwo); +} +``` + + +## Export To JavaScript + +### Export a Named Value + +As mentioned in ReScript's idiomatic [Import & Export](import-export.md), every let binding and module is exported by default to other ReScript modules (unless you use a `.resi` [interface file](module#signatures)). If you open up the compiled JS file, you'll see that these values can also directly be used by a _JavaScript_ file too. + +### Export a `default` Value + +If your JS project uses JavaScript module, you're likely exporting & importing some default values: + +```js +// student.js +export default name = "Al"; +``` + +```js +// teacher.js +import studentName from 'student.js'; +``` + +A JavaScript default export is really just syntax sugar for a named export implicitly called `default` (now you know!). So to export a default value from ReScript, you can just do: + + + +```res example +// ReScriptStudent.res +let default = "Bob" +``` +```js +var $$default = "Bob"; + +exports.$$default = $$default; +exports.default = $$default; +// informal transpiler-compatible marker of a default export compiled from JavaScript module +exports.__esModule = true; +``` +```js +var $$default = "Bob"; + +export { + $$default, + $$default as default, +} +``` + + + +You can then import this default export as usual on the JS side: + +```js +// teacher2.js +import studentName from 'ReScriptStudent.js'; +``` + +If your JavaScript's default import is transpiled by Babel/Webpack/Jest into CommonJS `require`s, we've taken care of that too! See the CommonJS output tab for `__esModule`. diff --git a/pages/docs/manual/v12.0.0/inlining-constants.mdx b/pages/docs/manual/v12.0.0/inlining-constants.mdx new file mode 100644 index 000000000..c9e9dea31 --- /dev/null +++ b/pages/docs/manual/v12.0.0/inlining-constants.mdx @@ -0,0 +1,78 @@ +--- +title: "Inlining Constants" +description: "Inlining constants" +canonical: "/docs/manual/v12.0.0/inlining-constants" +--- + +# Inlining Constants + +Sometimes, in the JavaScript output, you might want a certain value to be forcefully inlined. For example: + +```js +if (process.env.mode === 'development') { + console.log("Dev-only code here!") +} +``` + +The reason is that your JavaScript bundler (e.g. Webpack) might turn that into: + +```js +if ('production' === 'development') { + console.log("Dev-only code here!") +} +``` + +Then your subsequent Uglifyjs optimization would remove that entire `if` block. This is how projects like ReactJS provide a development mode code with plenty of dev warnings, while ensuring that the uglified (minified) production code is free of those expensive blocks. + +So, in ReScript, producing that example `if (process.env.mode === 'development')` output is important. This first try doesn't work: + + + +```res example +@val external process: 'a = "process" + +let mode = "development" + +if (process["env"]["mode"] === mode) { + Console.log("Dev-only code here!") +} +``` +```js +var mode = "development"; + +if (process.env.mode === mode) { + console.log("Dev-only code here!"); +} +``` + + + +The JS output shows `if (process.env.mode === mode)`, which isn't what we wanted. To inline `mode`'s value, use `@inline`: + + + +```res example +@val external process: 'a = "process" + +@inline +let mode = "development" + +if (process["env"]["mode"] === mode) { + Console.log("Dev-only code here!") +} +``` +```js +if (process.env.mode === "development") { + console.log("Dev-only code here!"); +} +``` + + + +Now your resulting JS code can pass through Webpack and Uglifyjs like the rest of your JavaScript code, and that whole `console.log` can be removed. + +The inlining currently only works for **string, float and boolean**. + +## Tips & Tricks + +This is **not** an optimization. This is an edge-case feature for folks who absolutely need particular values inlined for a JavaScript post-processing step, like conditional compilation. Beside the difference in code that the conditional compilation might end up outputting, there's no performance difference between inlining and not inlining simple values in the eyes of a JavaScript engine. diff --git a/pages/docs/manual/v12.0.0/installation.mdx b/pages/docs/manual/v12.0.0/installation.mdx new file mode 100644 index 000000000..f737c17c9 --- /dev/null +++ b/pages/docs/manual/v12.0.0/installation.mdx @@ -0,0 +1,153 @@ +--- +title: "Installation" +description: "ReScript installation and setup instructions" +canonical: "/docs/manual/v12.0.0/installation" +--- + +# Installation + +## Notes + +With the instructions below, our new standard library [ReScript Core](https://github.com/rescript-association/rescript-core) will be included by default. (In ReScript 11, it comes as a separate npm package `@rescript/core`. In future versions, it will be included in the `rescript` npm package itself.) + +## Prerequisites + +- [Node.js](https://nodejs.org/) version >= 14 +- One of the following package managers: + - [npm](https://docs.npmjs.com/cli/) (comes with Node.js) + - [yarn](https://yarnpkg.com/) (yarn versions >1 need to set `nodeLinker: node-modules` in `.yarnrc.yml`) + - [pnpm](https://pnpm.io/) + - [bun](https://bun.sh/) + +## New Project + +The fastest and easiest way to spin up a new ReScript project is with the [create-rescript-app](https://github.com/rescript-lang/create-rescript-app) project generator. You can start it with any of the aforementioned package managers or `npx`. + + + +```sh example +npm create rescript-app@latest +``` +```sh +npx create-rescript-app +``` +```sh +yarn create rescript-app +``` +```sh +pnpm create rescript-app +``` +```sh +bun create rescript-app +``` + + + +- Follow the steps of the setup. +- Trigger a ReScript build: + ```sh + npm run res:build + ``` +- If you selected the "basic" template, simply run it with: + ```sh + node src/Demo.res.js + ``` + +That compiles your ReScript into JavaScript, then uses Node.js to run said JavaScript. + +**When taking your first steps with ReScript, we recommend you use our unique workflow of keeping a tab open for the generated JS file** (`.res.js`/`.res.mjs`), so that you can learn how ReScript transforms into JavaScript. Not many languages output clean JavaScript code you can inspect and learn from! With our [VS Code extension](https://marketplace.visualstudio.com/items?itemName=chenglou92.rescript-vscode), use the command "ReScript: Open the compiled JS file for this implementation file" to open the generated JS file for the currently active ReScript source file. + +During development, instead of running `npm run res:build` each time to compile, use `npm run res:dev` to start a watcher that recompiles automatically after file changes. + +## Integrate Into an Existing JS Project + +If you already have a JavaScript project into which you'd like to add ReScript you can do that in the following ways: + +### Quick Setup + +In the root directory of your project, execute: + + +```sh +npm create rescript-app@latest +``` +```sh +npx create-rescript-app +``` +```sh +yarn create rescript-app +``` +```sh +pnpm create rescript-app +``` +```sh +bun create rescript-app +``` + + + +`create-rescript-app` will tell you that a `package.json` file has been detected and ask you if it should install ReScript into your project. Just follow the steps accordingly. + +### Manual Setup +- Install ReScript locally: + + + ```sh + npm install rescript @rescript/core + ``` + ```sh + yarn add rescript @rescript/core + ``` + ```sh + pnpm install rescript @rescript/core + ``` + ```sh + bun install rescript @rescript/core + ``` + + +- Create a ReScript build configuration file (called `rescript.json`) at the root: + ```json + { + "name": "your-project-name", + "sources": [ + { + "dir": "src", // update this to wherever you're putting ReScript files + "subdirs": true + } + ], + "package-specs": [ + { + "module": "esmodule", + "in-source": true + } + ], + "suffix": ".res.js", + "bs-dependencies": [ + "@rescript/core" + ], + "bsc-flags": [ + "-open RescriptCore" + ] + } + ``` + See [Build Configuration](build-configuration) for more details on `rescript.json`. +- Add convenience `npm` scripts to `package.json`: + ```json + "scripts": { + "res:build": "rescript", + "res:dev": "rescript -w" + } + ``` + +Since ReScript compiles to clean readable JS files, the rest of your existing toolchain (e.g. Babel and Webpack) should just work! + +Helpful guides: + +- [Converting from JS](converting-from-js). +- [Shared Data Types](shared-data-types). +- [Import from/Export to JS](import-from-export-to-js). + +### Integrate with a ReactJS Project + +To start a [rescript-react](/docs/react/latest/introduction) app, or to integrate ReScript into an existing ReactJS app, follow the instructions [here](/docs/react/latest/installation). diff --git a/pages/docs/manual/v12.0.0/interop-cheatsheet.mdx b/pages/docs/manual/v12.0.0/interop-cheatsheet.mdx new file mode 100644 index 000000000..2a17a8023 --- /dev/null +++ b/pages/docs/manual/v12.0.0/interop-cheatsheet.mdx @@ -0,0 +1,274 @@ +--- +title: "Interop Cheatsheet" +description: "Cheatsheet for various interop scenarios in ReScript" +canonical: "/docs/manual/v12.0.0/interop-cheatsheet" +--- + +# Interop Cheatsheet + +This is a glossary with examples. All the features are described by later pages. + +## List of Decorators + +> **Note:** In ReScript < 8.3, all our attributes started with the `bs.` prefix. This is no longer needed and our formatter automatically removes them in newer ReScript versions. + + + +### Attributes + +- `@as`: [here](attribute#usage), [here](bind-to-js-function#fixed-arguments), [here](bind-to-js-function#constrain-arguments-better) and [here](generate-converters-accessors#usage-3) +- [`@deriving`](generate-converters-accessors#generate-functions--plain-values-for-variants) +- [`@get`](bind-to-js-object#bind-using-special-bs-getters--setters) +- [`@get_index`](bind-to-js-object#bind-using-special-bs-getters--setters) + +- [`@inline`](inlining-constants) +- [`@int`](bind-to-js-function#constrain-arguments-better) + +- [`@module`](import-from-export-to-js#import-a-javascript-modules-content) +- [`@new`](bind-to-js-object#bind-to-a-js-object-thats-a-class) +- [`@optional`](generate-converters-accessors#optional-labels) +- [`@return`](bind-to-js-function#function-nullable-return-value-wrapping) +- `@send`: [here](bind-to-js-function#object-method) and [here](pipe#js-method-chaining) +- [`@scope`](bind-to-global-js-values#global-modules) +- [`@set`](bind-to-js-object#bind-using-special-bs-getters--setters) +- [`@set_index`](bind-to-js-object#bind-using-special-bs-getters--setters) +- [`@variadic`](bind-to-js-function#variadic-function-arguments) +- [`@string`](bind-to-js-function#constrain-arguments-better) +- [`@this`](bind-to-js-function#modeling-this-based-callbacks) +- [`@uncurry`](bind-to-js-function#extra-solution) +- [`@unwrap`](bind-to-js-function#trick-2-polymorphic-variant--bsunwrap) +- [`@val`](bind-to-global-js-values#global-modules) +- [`@taggedTemplate`](bind-to-js-function#tagged_template-functions) + +- [`@deprecated`](attribute#usage) +- [`genType`](https://github.com/reason-association/genType) +- [`@JSX`](jsx) +- `@react.component`: [here](/docs/react/latest/introduction) and [here](https://github.com/reasonml/reason-react) +- [`@warning`](attribute#usage) +- [`@unboxed`](variant#untagged-variants) + +### Extension Points + +- [`%debugger`](embed-raw-javascript#debugger) +- [`%external`](bind-to-global-js-values#special-global-values) +- [`%raw`](embed-raw-javascript#paste-raw-js-code) +- [`%re`](primitive-types#regular-expression) +- [`%todo`](/syntax-lookup#todo) + +## Raw JS + + + +```res example +let add = %raw("(a, b) => a + b") +%%raw("const a = 1") +``` +```js +var add = ((a, b) => a + b); +const a = 1 +``` + + + +## Global Value + + + +```res example +@val external setTimeout: (unit => unit, int) => float = "setTimeout" +``` +```js +// Empty output +``` + + + +## Global Module's Value + + + +```res example +@val @scope("Math") +external random: unit => float = "random" + +let someNumber = random() + +@val @scope(("window", "location", "ancestorOrigins")) +external length: int = "length" +``` +```js +var someNumber = Math.random(); +``` + + + +## Nullable + + + +```res example +let a = Some(5) // compiles to 5 +let b = None // compiles to undefined +``` +```js +var a = 5; +var b; +``` + + + +Handling a value that can be `undefined` and `null`, by ditching the `option` type and using `Nullable.t`: + + + +```res example +let jsNull = Nullable.null +let jsUndefined = Nullable.undefined +let result1: Nullable.t = Nullable.make("hello") +let result2: Nullable.t = Nullable.fromOption(Some(10)) +let result3: option = Nullable.toOption(Nullable.make(10)) +``` +```js +import * as Caml_option from "./stdlib/caml_option.js"; +import * as Core__Nullable from "./stdlib/core__Nullable.js"; + +var result2 = Core__Nullable.fromOption(10); + +var jsNull = null; + +var jsUndefined; + +var result1 = "hello"; + +var result3 = Caml_option.nullable_to_opt(10); +``` + + + +## JS Object + +- [Bind to a JS object as a ReScript record](bind-to-js-object#bind-to-record-like-js-objects). +- [Bind to a JS object that acts like a hash map](bind-to-js-object#bind-to-hash-map-like-js-object). +- [Bind to a JS object that's a class](bind-to-js-object#bind-to-a-js-object-thats-a-class). + +## Function + +### Object Method & Chaining + + + +```res example +@send external map: (array<'a>, 'a => 'b) => array<'b> = "map" +@send external filter: (array<'a>, 'a => 'b) => array<'b> = "filter" +[1, 2, 3] + ->map(a => a + 1) + ->filter(a => mod(a, 2) == 0) + ->Console.log +``` +```js +console.log( + [1, 2, 3] + .map(function (a) { + return (a + 1) | 0; + }) + .filter(function (a) { + return a % 2 === 0; + }) +); +``` + + + +### Variadic Arguments + + + +```res example +@module("path") @variadic +external join: array => string = "join" +``` +```js +// Empty output +``` + + + +### Tagged template functions + + + +```res example +// see https://bun.sh/docs/runtime/shell +type result = {exitCode: int} +@module("bun") @taggedTemplate +external sh: (array, array) => promise = "$" + +let filename = "index.res" +let result = await sh`ls ${filename}` +``` + +```js +import * as $$Bun from "bun"; +var filename = "index.res"; +var result = await $$Bun.$`ls ${filename}`; +``` + + + +### Polymorphic Function + + + +```res example +@module("Drawing") external drawCat: unit => unit = "draw" +@module("Drawing") external drawDog: (~giveName: string) => unit = "draw" +``` +```js +// Empty output +``` + + + + + +```res example +@val +external padLeft: ( + string, + @unwrap [ + | #Str(string) + | #Int(int) + ]) + => string = "padLeft" + +padLeft("Hello World", #Int(4)) +padLeft("Hello World", #Str("Message from ReScript: ")) +``` +```js +padLeft("Hello World", 4); +padLeft("Hello World", "Message from ReScript: "); +``` + + + +## JS Module Interop + +[See here](import-from-export-to-js.md) + +## Dangerous Type Cast + +Final escape hatch converter. Do not abuse. + + + +```res example +external convertToFloat: int => float = "%identity" +let age = 10 +let gpa = 2.1 +. convertToFloat(age) +``` +```js +var age = 10; +var gpa = 2.1 + 10; +``` + + diff --git a/pages/docs/manual/v12.0.0/interop-with-js-build-systems.mdx b/pages/docs/manual/v12.0.0/interop-with-js-build-systems.mdx new file mode 100644 index 000000000..e9a968a16 --- /dev/null +++ b/pages/docs/manual/v12.0.0/interop-with-js-build-systems.mdx @@ -0,0 +1,57 @@ +--- +title: "Interop with JS Build Systems" +description: "Documentation on how to interact with existing JS build systems" +canonical: "/docs/manual/v12.0.0/interop-with-js-build-systems" +--- + +# Interop with JS Build Systems + +If you come from JS, chances are that you already have a build system in your existing project. Here's an overview of the role `rescript` would play in your build pipeline, if you want to introduce some ReScript code. + +> **Please** try not to wrap `rescript` into your own incremental build framework. ReScript's compilation is very hard to get right, and you'll inevitably run into stale or badly performing builds (therefore erasing much of our value proposition) if you create your own meta layer on top. + +## Popular JS Build Systems + +The JS ecosystem uses a few build systems: [browserify](http://browserify.org/), [rollup](https://github.com/rollup/rollup), [webpack](https://webpack.js.org/), etc. The latter's probably the most popular of the three (as of 2019 =P). These build systems do both the compilation and the linking (aka, bundling many files into one or few files). + +`rescript` only takes care of the compilation step; it maps one `.res`/`.resi` file into one JS output file. As such, in theory, no build system integration is needed from our side. From e.g. the webpack watcher's perspective, the JS files ReScript generates are almost equivalent to your hand-written JS files. We also recommend **that you initially check in those ReScript-generated JS files**, as this workflow means: + +- You can introduce ReScript silently into your codebase without disturbing existing infra. +- You have a **visual** diff of the performance & correctness of your JS file when you update the `.res` files and the JS artifacts change. +- You can let teammates hot-patch the JS files in emergency situations, without needing to first start learning ReScript. +- You can remove ReScript completely from your codebase and things will still work (in case your company decides to stop using us for whatever reason). + +For what it's worth, you can also turn `rescript` into an automated step in your build pipeline, e.g. into a Webpack loader; but such approach is error-prone and therefore discouraged. + +### Tips & Tricks + +You can make ReScript JS files look even more idiomatic through the in-source + bs suffix config in `rescript.json`: + +```json +{ + "package-specs": { + "module": "commonjs", // or whatever module system your project uses + "in-source": true + }, + "suffix": ".res.js" +} +``` + +This will: + +- Generate the JS files alongside your ReScript source files. +- Use the file extension `.res.js`, so that you can require these files on the JS side through `require('./MyFile.res.js')`, without needing a loader. + +## Use Loaders on ReScript Side + +"What if my build system uses a CSS/png/whatever loader and I'd like to use it in ReScript?" + +Loaders are indeed troublesome; in the meantime, please use e.g. `%raw("require('./myStyles.css')")` at the top of your file. This just uses [`raw`](embed-raw-javascript.md) to compile the snippet into an actual JS require. + +## Getting Project's Dependencies + +`rescript` generates one `MyFile.d` file per `MyFile` source file; you'll find them in `lib/bs`. These are human readable, machine-friendly list of the dependencies of said `MyFile`. You can read into them for your purpose (though mind the IO overhead). Use these files instead of creating your own dependency graph; we did the hard work of tracking the dependencies as best as possible (including inner modules, `open`s, module names overlap, etc). + +## Run Script Per File Built + +See [js-post-build](build-configuration#js-post-build). Though please use it sparingly; if you hook up a node.js script after each file built, you'll incur the node startup time per file! diff --git a/pages/docs/manual/v12.0.0/introduction.mdx b/pages/docs/manual/v12.0.0/introduction.mdx new file mode 100644 index 000000000..ebe49d01a --- /dev/null +++ b/pages/docs/manual/v12.0.0/introduction.mdx @@ -0,0 +1,80 @@ +--- +title: "Introduction" +description: "The hows and whys of ReScript" +canonical: "/docs/manual/v12.0.0/introduction" +--- + +# ReScript + +Ever wanted a language like JavaScript, but without the warts, with a great type system, and with a lean build toolchain that doesn't waste your time? + +ReScript looks like JS, acts like JS, and compiles to the highest quality of clean, readable and performant JS, directly runnable in browsers and Node. + +**This means you can pick up ReScript and access the vast JavaScript ecosystem and tooling as if you've known ReScript for a long time!** + +**ReScript is the language for folks who don't necessarily love JavaScript, but who still acknowledge its importance**. + +## Difference vs TypeScript + +We respect TypeScript very much and think that it's a positive force in the JavaScript ecosystem. ReScript shares some of the same goals as TypeScript, but is different enough regarding some important nuances: + +- TypeScript's (admittedly noble) goal is to cover the entire JavaScript feature set and more. **ReScript covers only a curated subset of JavaScript**. For example, we emphasize plain data + functions over classes, clean [pattern matching](pattern-matching-destructuring.md) over fragile `if`s and virtual dispatches, [proper data modeling](variant.md) over string abuse, etc. JavaScript supersets will only grow larger over time; ReScript doesn't. \* + +- Consequently, TypeScript's type system is necessarily complex, pitfalls-ridden, potentially requires tweaking, sometimes slow, and requires quite a bit of noisy annotations that often feel like manual bookkeeping rather than clear documentation. In contrast, ReScript's type system: + + - Is deliberately curated to be a simple subset most folks will have an easier time to use. + - Has **no** pitfalls, aka the type system is "sound" (the types will always be correct). E.g. If a type isn't marked as nullable, its value will never lie and let through some `undefined` value silently. **ReScript code has no null/undefined errors**. + - Is the same for everyone. No knobs, no bikeshedding opportunity. + - Runs extremely fast precisely thanks to its simplicity and curation. It's one of the fastest compiler & build system toolchains for JavaScript development. + - **Doesn't need type annotations**. Annotate as much or as little as you'd like. The types are inferred by the language (and, again, are guaranteed correct). + +- Migrating to TypeScript is done "breadth-first," whereas migrating to ReScript is done "depth-first." You can convert your codebase to TypeScript by "turning it on" for all files and annotate here and there; but how much type safety did you gain? How do you measure it? Type errors can still slip in and out of the converted pieces. For ReScript, our interop features draw clear boundaries: there's pure ReScript code, and there's JS interop code. Every piece of converted ReScript code is 100% clean. You'd convert file by file and each conversion increases your safety monotonically. + +\* When you absolutely need to write or interoperate with free-for-all JavaScript, we expose enough escape hatches for you. + +## Other Highlights + +Aside from the aforementioned simple, robust and fast type system, ReScript presents a few more advantages. + +### Faster than JavaScript + +JavaScript's been aggressively optimized by talented engineers over a long span. Unfortunately, even for seasoned JS devs, it can be hard to know how to properly leverage JS's performance. ReScript's type system and compiler naturally guides you toward writing code that's very often performant by default, with good leverage of various Just-In-Time optimizations (hidden classes, inline caching, avoiding deopts, etc). + +A widespread adage to write fast JavaScript code is to write as if there's a type system (in order to trigger JS engines' good optimization heuristics); ReScript gives you a real one and generates code that's friendly to optimizations by default. + +### High Quality Dead Code Elimination + +The JavaScript ecosystem is very reliant on dependencies. Shipping the final product inevitably drags in a huge amount of code, lots of which the project doesn't actually use. These regions of dead code impact loading, parsing and interpretation speed. ReScript provides powerful dead code elimination at all levels: + +- Function- and module-level code elimination is facilitated by the well-engineered type system and purity analysis. +- At the global level, ReScript generates code that is naturally friendly to dead code elimination done by bundling tools such as [Rollup](https://github.com/rollup/rollup) and [Closure Compiler](https://developers.google.com/closure/compiler/), after its own sophisticated elimination pass. +- The same applies for ReScript's own tiny runtime (which is written in ReScript itself). + +### Tiny JS Output + +A `Hello world` ReScript program generates **20 bytes** of JS code. Additionally, the standard library pieces you require in are only included when needed. + +### Fast Iteration Loop + +ReScript's build time is **one or two orders of magnitude** faster than alternatives. In its watcher mode, the build system usually finishes before you switch screen from the editor to the terminal tab (two digits of milliseconds). A fast iteration cycle reduces the need of keeping one's mental state around longer; this in turn allows one to stay in the flow longer and more often. + +### Readable Output & Great Interop + +Unreadable JavaScript code generated from other compiled-to-js languages makes it so that it could be, practically speaking: + +- Hard to debug (cryptic stack trace, mangled variable names) +- Hard to learn from (non-straightforward mapping of concepts from one language to another) +- Hard to profile for performance (unclear what runtime performance cost there is) +- Hard to integrate with existing hand-written JS code + +ReScript's JS output is very readable. This is especially important while learning, where users might want to understand how the code's compiled, and to audit for bugs. + +This characteristic, combined with a fully-featured JS interop system, allows ReScript code to be inserted into an existing JavaScript codebase almost unnoticed. + +### Preservation of Code Structure + +ReScript maps one source file to one JavaScript output file. This eases the integration of existing tools such as bundlers and test runners. You can even start writing a single file without much change to your build setup. Each file's code structure is approximately preserved, too. + +## Conclusion + +We hope the above gave you enough of an idea of ReScript and its differentiators. Feel free to [try it online](/try) to get a feel! diff --git a/pages/docs/manual/v12.0.0/json.mdx b/pages/docs/manual/v12.0.0/json.mdx new file mode 100644 index 000000000..7b500b560 --- /dev/null +++ b/pages/docs/manual/v12.0.0/json.mdx @@ -0,0 +1,82 @@ +--- +title: "JSON" +description: "Interacting with JSON in ReScript" +canonical: "/docs/manual/v12.0.0/json" +--- + +# JSON + +## Parse + +Bind to JavaScript's `JSON.parse` and type the return value as the type you're expecting: + + + +```res example +// declare the shape of the json you're binding to +type data = {names: array} + +// bind to JS' JSON.parse +@scope("JSON") @val +external parseIntoMyData: string => data = "parse" + +let result = parseIntoMyData(`{"names": ["Luke", "Christine"]}`) +let name1 = result.names[0] +``` +```js +var result = JSON.parse("{\"names\": [\"Luke\", \"Christine\"]}"); +var name1 = result.names[0]; +``` + + + +Where `data` can be any type you assume the JSON is. As you can see, this compiles to a straightforward `JSON.parse` call. As with regular JS, this is convenient, but has no guarantee that e.g. the data is correctly shaped, or even syntactically valid. Slightly dangerous. + +## Stringify + +Use [`JSON.stringify`](api/core/json#value-stringify) if your data is of type `JSON.t` or [`JSON.stringifyAny`](api/core/json#value-stringifyAny) if it is not. + + + +```res example +Console.log(JSON.stringifyAny(["Amy", "Joe"])) +``` +```js +console.log(JSON.stringify([ + "Amy", + "Joe" +])); +``` + + + +## Import a JSON file + +Use the `@module` attribute to import JSON files directly. + + + +```res example +@module external studentNames: JSON.t = "./students.json" +Console.log(studentNames) +``` +```js +import * as StudentsJson from "./students.json"; + +var studentNames = StudentsJson; + +console.log(studentNames); +``` +```js +var StudentsJson = require("./students.json"); + +var studentNames = StudentsJson; + +console.log(studentNames); +``` + + + +## Advanced + +Thanks to untagged variants, JSON can be encoded and decoded idiomatically. Check it out on [the variants page](variant#decoding-and-encoding-json-idiomatically). diff --git a/pages/docs/manual/v12.0.0/jsx.mdx b/pages/docs/manual/v12.0.0/jsx.mdx new file mode 100644 index 000000000..eefc78691 --- /dev/null +++ b/pages/docs/manual/v12.0.0/jsx.mdx @@ -0,0 +1,383 @@ +--- +title: "JSX" +description: "JSX syntax in ReScript and React" +canonical: "/docs/manual/v12.0.0/jsx" +--- + +# JSX + +Would you like some HTML syntax in your ReScript? If not, quickly skip over this section and pretend you didn't see anything! + +ReScript supports the JSX syntax, with some slight differences compared to the one in [ReactJS](https://facebook.github.io/react/docs/introducing-jsx.html). ReScript JSX isn't tied to ReactJS; they translate to normal function calls: + +**Note** for [ReScriptReact](https://rescript-lang.org/docs/react/latest/introduction) readers: this isn't what ReScriptReact turns JSX into, in the end. See Usage section for more info. + +## Capitalized + + + +```res + +``` +```js +React.createElement(MyComponent, { + name: "ReScript", +}); +``` + + + +becomes + + + +```res +MyComponent.createElement(~name="ReScript", ~children=list{}, ()) +``` +```js +React.createElement(MyComponent, { + name: "ReScript", +}); +``` + + + +## Uncapitalized + + + +```res +
    child1 child2
    +``` +```js +React.createElement("div", { + onClick: handler +}, child1, child2); +``` + +
    + +becomes + + + +```res +div(~onClick=handler, ~children=list{child1, child2}, ()) +``` +```js +React.createElement("div", { + onClick: handler +}, child1, child2); +``` + + + +## Fragment + + + +```res +<> child1 child2 +``` +```js +React.createElement(React.Fragment, undefined, child1, child2); +``` + + + +becomes + + + +```res +list{child1, child2} +``` +```js +React.createElement(React.Fragment, undefined, child1, child2); +``` + + + +### Children + + + +```res + child1 child2 +``` +```js +React.createElement(MyComponent, { children: null }, child1, child2); +``` + + + +This is the syntax for passing a list of two items, `child1` and `child2`, to the children position. It transforms to a list containing `child1` and `child2`: + + + +```res +MyComponent.createElement(~children=list{child1, child2}, ()) +``` +```js +React.createElement(MyComponent.make, MyComponent.makeProps(null, undefined), child1, child2); +``` + + + +**Note** again that this isn't the transform for ReScriptReact; ReScriptReact turns the final list into an array. But the idea still applies. + +So naturally, ` myChild ` is transformed to `MyComponent.createElement(~children=list{myChild}, ())`. I.e. whatever you do, the arguments passed to the children position will be wrapped in a list. + +## Usage + +See [ReScriptReact Elements & JSX](https://rescript-lang.org/docs/react/latest/elements-and-jsx) for an example application of JSX, which transforms the above calls into a ReScriptReact-specific call. + +Here's a JSX tag that shows most of the features. + + + +```res + +
    {React.string("hello")}
    +
    +``` +```js +React.createElement(MyComponent, { + children: React.createElement("div", undefined, "hello"), + booleanAttribute: true, + stringAttribute: "string", + intAttribute: 1, + forcedOptional: "hello", + onClick: handleClick +}); +``` + +
    + +## Departures From JS JSX + +- Attributes and children don't mandate `{}`, but we show them anyway for ease of learning. Once you format your file, some of them go away and some turn into parentheses. +- Props spread is supported, but there are some restrictions (see below). +- Punning! +- Props and tag names have to follow ReScript's restrictions on identifiers at the exception of hyphens for lowercase tags ([see below](#hyphens-in-tag-names)). + +### Spread Props + +**Since 10.1** + +JSX props spread is supported now, but in a stricter way than in JS. + + + +```res + +``` +```js +React.createElement(Comp, { + a: "a", + b: "b" +}); +``` + + + +Multiple spreads are not allowed: + + + +```res + +``` + + + +The spread must be at the first position, followed by other props: + + + +```res + +``` + + + +### Punning + +"Punning" refers to the syntax shorthand for when a label and a value are the same. For example, in JavaScript, instead of doing `return {name: name}`, you can do `return {name}`. + +JSX supports punning. `` is just a shorthand for ``. The formatter will help you format to the punned syntax whenever possible. This is convenient in the cases where there are lots of props to pass down: + + + +```res + +``` +```js +React.createElement(MyComponent, { + isLoading: true, + text: text, + onClick: onClick +}); +``` + + + +Consequently, a JSX component can cram in a few more props before reaching for extra libraries solutions that avoids props passing. + +**Note** that this is a departure from ReactJS JSX, which does **not** have punning. ReactJS' `` desugars to ``, in order to conform to DOM's idioms and for backward compatibility. + +### Hyphens in tag names + +**Since 11.1** + +JSX now supports lowercase tags with hyphens in their name. This allows to bind +to web components. + +Note though that props names can't have hyphens, you should use `@as` to bind to +such props in your custom `JsxDOM.domProps` type ([see generic JSX transform](#generic-jsx-transform-jsx-beyond-react-experimental)). + + + +```res + +``` +```js +React.createElement("model-viewer", { + "touch-actions": "pan-y", + src: src +}); +``` + + + +## Generic JSX transform: JSX beyond React (experimental) + +**Since 11.1** + +While ReScript comes with first class support for JSX in React, it's also possible to have ReScript delegate JSX to other frameworks. You do that by configuring a _generic JSX transform_. + +This is what you need to do to use a generic JSX transform: +1. Make sure you have a ReScript module that [implements the functions and types necessary for the JSX transform](#implementing-a-generic-jsx-transform-module). +2. Configure `rescript.json` to delegated JSX to that module. + +That's it really. We'll expand on each point below. + +### Configuration +You configure a generic JSX transform by putting any module name in the `module` config of JSX in `rescript.json`. This can be _any valid module name_. Example part from `rescript.json`: + +```json +"jsx": { + "module": "Preact" + }, +``` + +This will now put the `Preact` module in control of the generated JSX calls. The `Preact` module can be defined by anyone - locally in your project, or by a package. As long a it's available in the global scope. The JSX transform will delegate any JSX related code to `Preact`. + +#### What about `@react.component` for components? + +`@react.component` will still be available, and so is a generic `@jsx.component` notation. Both work the same way. + +### Usage Example +Here's a quick usage example (the actual definition of `Preact.res` comes below): + +First, configure `rescript.json`: +```json +"jsx": { + "module": "Preact" + }, +``` + +Now you can build Preact components: +```rescript +// Name.res +@jsx.component // or @react.component if you want +let make = (~name) => Preact.string(`Hello ${name}!`) +``` + +And you can use them just like normal with JSX: +```rescript +let name = +``` + +#### File level configuration +You can configure what JSX transform is used at the file level via `@@jsxConfig`, just like before. Like: +```rescript +@@jsxConfig({module_: "Preact"}) +``` + +This can be convenient if you're mixing different JSX frameworks in the same project. + +### Implementing a generic JSX transform module +Below is a full list of everything you need in a generic JSX transform module, including code comments to clarify. It's an example implementation of a `Preact` transform, so when doing this for other frameworks you'd of course adapt what you import from, and so on. + +> You can easily copy-paste-and-adapt this to your needs if you're creating bindings to a JSX framework. Most often, all you'll need to change is what the `@module("") external` points to, so the runtime calls point to the correct JS module. + +```rescript +// Preact.res +/* Below is a number of aliases to the common `Jsx` module */ +type element = Jsx.element + +type component<'props> = Jsx.component<'props> + +type componentLike<'props, 'return> = Jsx.componentLike<'props, 'return> + +@module("preact") +external jsx: (component<'props>, 'props) => element = "jsx" + +@module("preact") +external jsxKeyed: (component<'props>, 'props, ~key: string=?, @ignore unit) => element = "jsx" + +@module("preact") +external jsxs: (component<'props>, 'props) => element = "jsxs" + +@module("preact") +external jsxsKeyed: (component<'props>, 'props, ~key: string=?, @ignore unit) => element = "jsxs" + +/* These identity functions and static values below are optional, but lets +you move things easily to the `element` type. The only required thing to +define though is `array`, which the JSX transform will output. */ +external array: array => element = "%identity" +@val external null: element = "null" + +external float: float => element = "%identity" +external int: int => element = "%identity" +external string: string => element = "%identity" + +/* These are needed for Fragment (<> ) support */ +type fragmentProps = {children?: element} + +@module("preact") external jsxFragment: component = "Fragment" + +/* The Elements module is the equivalent to the ReactDOM module in React. This holds things relevant to _lowercase_ JSX elements. */ +module Elements = { + /* Here you can control what props lowercase JSX elements should have. + A base that the React JSX transform uses is provided via JsxDOM.domProps, + but you can make this anything. The editor tooling will support + autocompletion etc for your specific type. */ + type props = JsxDOM.domProps + + @module("preact") + external jsx: (string, props) => Jsx.element = "jsx" + + @module("preact") + external div: (string, props) => Jsx.element = "jsx" + + @module("preact") + external jsxKeyed: (string, props, ~key: string=?, @ignore unit) => Jsx.element = "jsx" + + @module("preact") + external jsxs: (string, props) => Jsx.element = "jsxs" + + @module("preact") + external jsxsKeyed: (string, props, ~key: string=?, @ignore unit) => Jsx.element = "jsxs" + + external someElement: element => option = "%identity" +} +``` + +As you can see, most of the things you'll want to implement will be copy paste from the above. But do note that **everything needs to be there unless explicitly noted** or the transform will fail at compile time. \ No newline at end of file diff --git a/pages/docs/manual/v12.0.0/lazy-values.mdx b/pages/docs/manual/v12.0.0/lazy-values.mdx new file mode 100644 index 000000000..6d45dfafa --- /dev/null +++ b/pages/docs/manual/v12.0.0/lazy-values.mdx @@ -0,0 +1,126 @@ +--- +title: "Lazy Value" +description: "Data type for deferred computation in ReScript" +canonical: "/docs/manual/v12.0.0/lazy-values" +--- + +# Lazy Value + +If you have some expensive computations you'd like to **defer and cache** subsequently, you can wrap it with `lazy`: + + + +```res prelude +@module("node:fs") +external readdirSync: string => array = "readdirSync" + +// Read the directory, only once +let expensiveFilesRead = lazy({ + Console.log("Reading dir") + readdirSync("./pages") +}) +``` +```js +var Fs = require("fs"); + +var expensiveFilesRead = { + LAZY_DONE: false, + VAL: (function () { + console.log("Reading dir"); + return Fs.readdirSync("./pages"); + }) +}; +``` + + + +Check the JS Output tab: that `expensiveFilesRead`'s code isn't executed yet, even though you declared it! You can carry it around without fearing that it'll run the directory read. + +**Note**: a lazy value is **not** a [shared data type](shared-data-types.md). Don't rely on its runtime representation in your JavaScript code. + +## Execute The Lazy Computation + +To actually run the lazy value's computation, use `Lazy.force` from the globally available `Lazy` module: + + + +```res example +// First call. The computation happens +Console.log(Lazy.force(expensiveFilesRead)) // logs "Reading dir" and the directory content + +// Second call. Will just return the already calculated result +Console.log(Lazy.force(expensiveFilesRead)) // logs the directory content +``` +```js +console.log(CamlinternalLazy.force(expensiveFilesRead)); + +console.log(CamlinternalLazy.force(expensiveFilesRead)); +``` + + + +The first time `Lazy.force` is called, the expensive computation happens and the result is **cached**. The second time, the cached value is directly used. + +**You can't re-trigger the computation after the first `force` call**. Make sure you only use a lazy value with computations whose results don't change (e.g. an expensive server request whose response is always the same). + +Instead of using `Lazy.force`, you can also use [pattern matching](pattern-matching-destructuring.md) to trigger the computation: + + + +```res example +switch expensiveFilesRead { +| lazy(result) => Console.log(result) +} +``` +```js +var result = CamlinternalLazy.force(expensiveFilesRead); +``` + + + +Since pattern matching also works on a `let` binding, you can also do: + + + +```res example +let lazy(result) = expensiveFilesRead +Console.log(result) +``` +```js +var result = CamlinternalLazy.force(expensiveFilesRead); +console.log(result); +``` + + + +## Exception Handling + +For completeness' sake, our files read example might raise an exception because of `readdirSync`. Here's how you'd handle it: + + + +```res example +let result = try { + Lazy.force(expensiveFilesRead) +} catch { +| Not_found => [] // empty array of files +} +``` +```js +var result; + +try { + result = CamlinternalLazy.force(expensiveFilesRead); +} catch (raw_exn) { + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Not_found") { + result = []; + } else { + throw exn; + } +} +``` + + + +Though you should probably handle the exception inside the lazy computation itself. diff --git a/pages/docs/manual/v12.0.0/let-binding.mdx b/pages/docs/manual/v12.0.0/let-binding.mdx new file mode 100644 index 000000000..64d9377f0 --- /dev/null +++ b/pages/docs/manual/v12.0.0/let-binding.mdx @@ -0,0 +1,185 @@ +--- +title: "Let Binding" +description: "Let binding syntax for binding to values in ReScript" +canonical: "/docs/manual/v12.0.0/let-binding" +--- + +# Let Binding + +A "let binding", in other languages, might be called a "variable declaration". `let` _binds_ values to names. They can be seen and referenced by code that comes _after_ them. + + + +```res example +let greeting = "hello!" +let score = 10 +let newScore = 10 + score +``` +```js +var greeting = "hello!"; +var score = 10; +var newScore = 20; +``` + + + +## Block Scope + +Bindings can be scoped through `{}`. + + + +```res example +let message = { + let part1 = "hello" + let part2 = "world" + part1 ++ " " ++ part2 +} +// `part1` and `part2` not accessible here! +``` +```js +var message = "hello world"; +``` + + + +The value of the last line of a scope is implicitly returned. + +### Design Decisions + +ReScript's `if`, `while` and functions all use the same block scoping mechanism. The code below works **not** because of some special "if scope"; but simply because it's the same scope syntax and feature you just saw: + + + +```res +if displayGreeting { + let message = "Enjoying the docs so far?" + Console.log(message) +} +// `message` not accessible here! +``` +```js +if (displayGreeting) { + console.log("Enjoying the docs so far?"); +} +``` + + + +## Bindings Are Immutable + +Let bindings are "immutable", aka "cannot change". This helps our type system deduce and optimize much more than other languages (and in turn, help you more). + +## Binding Shadowing + +The above restriction might sound unpractical at first. How would you change a value then? Usually, 2 ways: + +The first is to realize that many times, what you want isn't to mutate a variable's value. For example, this JavaScript pattern: + +```js +var result = 0; +result = calculate(result); +result = calculateSomeMore(result); +``` + +...is really just to comment on intermediate steps. You didn't need to mutate `result` at all! You could have just written this JS: + +```js +var result1 = 0; +var result2 = calculate(result1); +var result3 = calculateSomeMore(result2); +``` + +In ReScript, this obviously works too: + + + +```res +let result1 = 0 +let result2 = calculate(result1) +let result3 = calculateSomeMore(result2) +``` +```js +var result1 = 0; +var result2 = calculate(0); +var result3 = calculateSomeMore(result2); +``` + + + +Additionally, reusing the same let binding name overshadows the previous bindings with the same name. So you can write this too: + + + +```res +let result = 0 +let result = calculate(result) +let result = calculateSomeMore(result) +``` +```js +var result = calculate(0); +var result$1 = calculateSomeMore(result); +``` + + + +(Though for the sake of clarity, we don't recommend this). + +As a matter of fact, even this is valid code: + + + +```res example +let result = "hello" +Console.log(result) // prints "hello" +let result = 1 +Console.log(result) // prints 1 +``` +```js +var result = 1; +console.log("hello"); +console.log(1); +``` + + + +The binding you refer to is whatever's the closest upward. No mutation here! +If you need _real_ mutation, e.g. passing a value around, have it modified by many pieces of code, we provide a slightly heavier [mutation feature](mutation.md). + +## Private let bindings + +Private let bindings are introduced in the release [7.2](https://rescript-lang.org/blog/bucklescript-release-7-2). + +In the module system, everything is public by default, +the only way to hide some values is by providing a separate signature to +list public fields and their types: + +```res +module A: { + let b: int +} = { + let a = 3 + let b = 4 +} +``` +`%%private` gives you an option to mark private fields directly + +```res +module A = { + %%private(let a = 3) + let b = 4 +} +``` + +`%%private` also applies to file level modules, so in some cases, +users do not need to provide a separate interface file just to hide some particular values. + +Note interface files are still recommended as a general best practice since they give you better +separate compilation units and also they're better for documentation. + +Still, `%%private` is useful in the following scenarios: + +- **Code generators.** Some code generators want to hide some values but it is sometimes very hard or time consuming for code generators to synthesize the types for public fields. + +- **Quick prototyping.** During prototyping, we still want to hide some values, but the interface file is not stable yet. `%%private` provides you such convenience. + diff --git a/pages/docs/manual/v12.0.0/libraries.mdx b/pages/docs/manual/v12.0.0/libraries.mdx new file mode 100644 index 000000000..54f3ce735 --- /dev/null +++ b/pages/docs/manual/v12.0.0/libraries.mdx @@ -0,0 +1,27 @@ +--- +title: "Libraries & Publishing" +description: "Install & publish ReScript packages" +canonical: "/docs/manual/v12.0.0/libraries" +--- + +# Libraries & Publishing + +ReScript libraries are just like JavaScript libraries: published & hosted on [NPM](http://npmjs.com). You can reuse your `npm`, `yarn` and `package.json`-related tools to manage them! + +## Tips & Tricks + +### Publish + +We recommend you to check in your compiled JavaScript output, for its [various benefits](interop-with-js-build-systems.md#popular-js-build-systems). If not, then at least consider publishing the JavaScript output by un-ignoring them in your [npmignore](https://docs.npmjs.com/cli/v7/using-npm/developers#keeping-files-out-of-your-package). This way, your published ReScript package comes with plain JavaScript files that JS users can consume. If your project's good, JS users might not even realize that they've installed a library written in ReScript! + +In case your library is only consumed by JS users, you may want to check out our [external stdlib](./build-external-stdlib) configuration as well. + +### Find Libraries + +Search `rescript`-related packages on NPM, or use our [Package Index](/packages). + +If you can't find what you're looking for, remember that **you don't need a wrapper** to use a JS library: + +- Most JS data types, such as array and objects, [map over cleanly to ReScript and vice-versa](shared-data-types.md). +- You also have access to the familiar [Core API](api/core). +- You can use a JavaScript library without needing to install dedicated binding libraries. Check the [`external`](external) page. diff --git a/pages/docs/manual/v12.0.0/migrate-to-v11.mdx b/pages/docs/manual/v12.0.0/migrate-to-v11.mdx new file mode 100644 index 000000000..b1977a59a --- /dev/null +++ b/pages/docs/manual/v12.0.0/migrate-to-v11.mdx @@ -0,0 +1,131 @@ +--- +title: "Migrate to v11" +description: "Instructions on upgrading to ReScript 11" +canonical: "/docs/manual/v12.0.0/migrate-to-v11" +--- + +# Migrate to ReScript 11 + +## Foreword + +The ReScript community is proud to introduce ReScript V11 which comes with a ton of new features but also removes a lot of bulk. +A migration to it can be very straightforward, but it can also take some time, depending on your code style or what dependencies you use. + +Please have a look at the full [set of breaking changes](#list-of-all-breaking-changes) below to be able to decide whether this is a task you want to undertake. There is also the possibilty to [opt-out of uncurried mode](#minimal-migration) for now, which is probably the most fundamental change of this release. That and other new and notable features are discussed in the following blogposts: + +- [Better interop with customizable variants](/blog/improving-interop) +- [Enhanced Ergonomics for Record Types](/blog/enhanced-ergonomics-for-record-types) +- [First-class Dynamic Import Support](/blog/first-class-dynamic-import-support) +- [Uncurried Mode](/blog/uncurried-mode) + +## Recommended Migration + +### Uncurried Mode + +For uncurried mode to take effect in ReScript 11 there is nothing to configure, it is activated by default. + +### Adapt suffix + +ReScript 11 now allows having arbitrary suffixes in the generated JavaScript files. However, it is still recommended to stick to using `.res.js`, `.res.mjs` or `.res.cjs`. For more information, read the Build System Configuration about [suffixes](/docs/manual/next/build-configuration#suffix). + +### rescript.json + +The old configuration filename `bsconfig.json` is deprecated. Rename `bsconfig.json` to `rescript.json` to get rid of the deprecation warning. + +### ReScript Core standard library + +[ReScript Core](https://github.com/rescript-association/rescript-core) is ReScript's new standard library. It replaces the complete `Js` module as well as some of the more frequently used modules from `Belt` and is recommended to use with uncurried mode. + +It will be integrated into the compiler in a future version. In ReScript 11, it still needs to be installed manually: + +```console +$ npm install @rescript/core +``` + +Then add `@rescript/core` to your `rescript.json`'s dependencies: + +```diff + { + "bs-dependencies": [ ++ "@rescript/core" + ] + } +``` + +Open it so it's available in the global scope. + +```diff + { + "bsc-flags": [ ++ "-open RescriptCore", + ] + } +``` + +One major change to be aware of is that array access now returns an `option`. + +```res +let firstItem = myArray[0] // Some("hello") +``` + +If you would like to not use an `option`, you can use [`Array.getUnsafe`](api/core/array#value-getUnsafe). + +For a detailed explanation on migration to ReScript Core, please refer to its [migration guide](https://github.com/rescript-association/rescript-core#migration). A semi-automated script is available as well. + +See ReScript Core API docs [here](api/core). + +### Removed bindings + +Many Node bindings have been removed from the compiler. Please use [rescript-nodejs](https://github.com/TheSpyder/rescript-nodejs) instead or write your own local bindings. + +## Minimal Migration + +This guide describes the things to do at least to migrate to ReScript 11. + +### Disable uncurried mode + +If you use currying extensively and don't want to bother with adapting your code, or have dependencies that just don't work with uncurried mode yet, just set it to false in your `rescript.json`. + +```json +{ + "uncurried": false +} +``` + +For more information, read the Build System Configuration about [uncurried](/docs/manual/next/build-configuration#uncurried). + +## List of all breaking changes + +Below is an excerpt from the compiler changelog about all the breaking changes of ReScript 11. + +### Language and Compiler + +- Add smart printer for pipe chains. https://github.com/rescript-lang/rescript-compiler/pull/6411 (the formatter will reformat existing code in certain cases) +- Parse `assert` as a regular function. `assert` is no longer a unary expression. Example: before `assert 1 == 2` is parsed as `(assert 1) == 2`, now it is parsed as `assert(1 == 2)`. https://github.com/rescript-lang/rescript-compiler/pull/6180 +- Remove support for the legacy Reason syntax. Existing Reason code can be converted to ReScript syntax using ReScript 9 as follows: + - `npx rescript@9 convert ` +- Curried after uncurried is not fused anymore: `(. x) => y => 3` is not equivalent to `(. x, y) => 3` anymore. It's instead equivalent to `(. x) => { y => 3 }`. + Also, `(. int) => string => bool` is not equivalen to `(. int, string) => bool` anymore. + These are only breaking changes for unformatted code. +- Exponentiation operator `**` is now right-associative. `2. ** 3. ** 2.` now compile to `Math.pow(2, Math.pow(3, 2))` and not anymore `Math.pow(Math.pow(2, 3), 2)`. Parentheses can be used to change precedence. +- Stop mangling object field names. If you had objects with field names containing "\__" or leading "_", they won't be mangled in the compiled JavaScript and represented as it is without changes. https://github.com/rescript-lang/rescript-compiler/pull/6354 +- `$$default` is no longer exported from the generated JavaScript when using default exports. https://github.com/rescript-lang/rescript-compiler/pull/6328 +- `-bs-super-errors` flag has been deprecated along with Super_errors. https://github.com/rescript-lang/rescript-compiler/pull/6243 +- Remove unsafe `` j`$(a)$(b)` `` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068 +- `@deriving(jsConverter)` not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088 +- New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript-compiler/pull/6088 + +### Compiler Libraries + +- Fixed name collision between the newly defined Js.Json.t and the variant constructor in the existing Js.Json.kind type. To address this, the usage of the existing Js.Json.kind type can be updated to Js.Json.Kind.t. https://github.com/rescript-lang/rescript-compiler/pull/6317 +- Remove rudimentary node bindings and undocumented `%node` extension. https://github.com/rescript-lang/rescript-compiler/pull/6285 +- `@rescript/react` >= 0.12.0-alpha.2 is now required because of the React.fragment's children type fix. https://github.com/rescript-lang/rescript-compiler/pull/6238 +- Remove deprecated module `Printexc` + +### Build System and Tools + +- Update watcher rules to recompile only on config and `*.res`/`*.resi`/`*.ml`/`.mli` file changes. Solves the issue of unnecessary recompiles on `.css`, `.ts`, and other unrelated file changes. https://github.com/rescript-lang/rescript-compiler/pull/6420 +- Made pinned dependencies transitive: if _a_ is a pinned dependency of _b_ and _b_ is a pinned dependency of _c_, then _a_ is implicitly a pinned dependency of _c_. This change is only breaking if your build process assumes non-transitivity. +- Remove obsolete built-in project templates and the "rescript init" functionality. This is replaced by [create-rescript-app](https://github.com/rescript-lang/create-rescript-app) which is maintained separately. +- Do not attempt to build ReScript from source on npm postinstall for platforms without prebuilt binaries anymore. +- GenType: removed support for `@genType.as` for records and variants which has become unnecessary. Use the language's `@as` instead to channge the runtime representation without requiring any runtime conversion during FFI. https://github.com/rescript-lang/rescript-compiler/pull/6099 https://github.com/rescript-lang/rescript-compiler/pull/6101 diff --git a/pages/docs/manual/v12.0.0/module.mdx b/pages/docs/manual/v12.0.0/module.mdx new file mode 100644 index 000000000..a32561bbe --- /dev/null +++ b/pages/docs/manual/v12.0.0/module.mdx @@ -0,0 +1,569 @@ +--- +title: "Module" +description: "ReScript modules, module signatures and interface files" +canonical: "/docs/manual/v12.0.0/module" +--- + +# Module + +## Basics + +**Modules are like mini files**! They can contain type definitions, `let` +bindings, nested modules, etc. + +### Creation + +To create a module, use the `module` keyword. The module name must start with a +**capital letter**. Whatever you could place in a `.res` file, you may place +inside a module definition's `{}` block. + + + +```res example +module School = { + type profession = Teacher | Director + + let person1 = Teacher + let getProfession = (person) => + switch person { + | Teacher => "A teacher" + | Director => "A director" + } +} +``` +```js +function getProfession(person) { + if (person) { + return "A director"; + } else { + return "A teacher"; + } +} + +var School = { + person1: /* Teacher */0, + getProfession: getProfession +}; +``` + + + +A module's contents (including types!) can be accessed much like a record's, +using the `.` notation. This demonstrates modules' utility for namespacing. + + + +```res +let anotherPerson: School.profession = School.Teacher +Console.log(School.getProfession(anotherPerson)) /* "A teacher" */ +``` +```js +var anotherPerson = /* Teacher */0; +console.log("A teacher"); +``` + + + +Nested modules work too. + + + +```res example +module MyModule = { + module NestedModule = { + let message = "hello" + } +} + +let message = MyModule.NestedModule.message +``` +```js +var NestedModule = { + message: message +}; + +var MyModule = { + NestedModule: NestedModule +}; + +var message = MyModule.NestedModule.message; +``` + + + +### `open`ing a module + +Constantly referring to a value/type in a module can be tedious. Instead, we can "open" a module and refer to its contents without always prepending them with the +module's name. Instead of writing: + + + +```res +let p = School.getProfession(School.person1) +``` +```js +var p = School.getProfession(School.person1); +``` + + + +We can write: + + + +```res +open School +let p = getProfession(person1) +``` +```js +var p = School.getProfession(School.person1); +``` + + + +The content of `School` module are made visible (**not** copied into the file, but simply made visible!) in scope. `profession`, `getProfession` and `person1` will thus correctly be found. + +**Use `open` this sparingly, it's convenient, but makes it hard to know where some values come from**. You should usually use `open` in a local scope: + + + +```res +let p = { + open School + getProfession(person1) +} +/* School's content isn't visible here anymore */ +``` +```js +var p = School.getProfession(School.person1); +``` + + + +### Use `open!` to ignore shadow warnings + +There are situations where `open` will cause a warning due to existing identifiers (bindings, types) being redefined. Use `open!` to explicitly tell the compiler that this is desired behavior. + +```res +let map = (arr, value) => { + value +} + +// opening Array would shadow our previously defined `map` +// `open!` will explicitly turn off the automatic warning +open! Array +let arr = map([1,2,3], (a) => { a + 1}) +``` + +**Note:** Same as with `open`, don't overuse `open!` statements if not necessary. Use (sub)modules to prevent shadowing issues. + +### Destructuring modules + +**Since 9.0.2** + +As an alternative to `open`ing a module, you can also destructure a module's functions and values into separate let bindings (similarly on how we'd destructure an object in JavaScript). + + + +```res +module User = { + let user1 = "Anna" + let user2 = "Franz" +} + +// Destructure by name +let {user1, user2} = module(User) + +// Destructure with different alias +let {user1: anna, user2: franz} = module(User) +``` + +```js +var user1 = "Anna"; + +var user2 = "Franz"; + +var User = { + user1: user1, + user2: user2 +}; +``` + + + +**Note:** You can't extract types with module destructuring — use a type alias instead (`type user = User.myUserType`). + +### Extending modules + +Using `include` in a module statically "spreads" a module's content into a new one, thus often fulfill the role of "inheritance" or "mixin". + +**Note**: this is equivalent to a compiler-level copy paste. **We heavily discourage `include`**. Use it as last resort! + + + +```res example +module BaseComponent = { + let defaultGreeting = "Hello" + let getAudience = (~excited) => excited ? "world!" : "world" +} + +module ActualComponent = { + /* the content is copied over */ + include BaseComponent + /* overrides BaseComponent.defaultGreeting */ + let defaultGreeting = "Hey" + let render = () => defaultGreeting ++ " " ++ getAudience(~excited=true) +} +``` +```js +function getAudience(excited) { + if (excited) { + return "world!"; + } else { + return "world"; + } +} + +var BaseComponent = { + defaultGreeting: "Hello", + getAudience: getAudience +}; + +var defaultGreeting = "Hey"; + +function render(param) { + return "Hey world!"; +} + +var ActualComponent = { + getAudience: getAudience, + defaultGreeting: defaultGreeting, + render: render +}; +``` + + + +**Note**: `open` and `include` are very different! The former brings a module's content into your current scope, so that you don't have to refer to a value by prefixing it with the module's name every time. The latter **copies over** the definition of a module statically, then also do an `open`. + +### Every `.res` file is a module + +Every ReScript file is itself compiled to a module of the same name as the file name, capitalized. The file `React.res` implicitly forms a module `React`, which can be seen by other source files. + +**Note**: ReScript file names should, by convention, be capitalized so that their casing matches their module name. Uncapitalized file names are not invalid, but will be implicitly transformed into a capitalized module name. I.e. `file.res` will be compiled into the module `File`. To simplify and minimize the disconnect here, the convention is therefore to capitalize file names. + +## Signatures + +A module's type is called a "signature", and can be written explicitly. If a +module is like a `.res` (implementation) file, then a module's signature is like +a `.resi` (interface) file. + +### Creation + +To create a signature, use the `module type` keyword. The signature name must start with a +**capital letter**. Whatever you could place in a `.resi` file, you may place +inside a signature definition's `{}` block. + + + +```res example +/* Picking up previous section's example */ +module type EstablishmentType = { + type profession + let getProfession: profession => string +} +``` +```js +// Empty output +``` + + + +A signature defines the list of requirements that a module must satisfy in order +for that module to match the signature. Those requirements are of the form: + +- `let x: int` requires a `let` binding named `x`, of type `int`. +- `type t = someType` requires a type field `t` to be equal to `someType`. +- `type t` requires a type field `t`, but without imposing any requirements on the actual, concrete type of `t`. We'd use `t` in other entries in the signature to describe relationships, e.g. `let makePair: t => (t, t)` but we cannot, for example, assume that `t` is an `int`. This gives us great, enforced abstraction abilities. + +To illustrate the various kinds of type entries, consider the above signature +`EstablishmentType` which requires that a module: + +- Declare a type named `profession`. +- Must include a function that takes in a value of the type `profession` and returns a string. + +**Note**: + +Modules of the type `EstablishmentType` can contain more fields than the +signature declares, just like the module `School` in the previous section (if we +choose to assign it the type `EstablishmentType`. Otherwise, `School` exposes +every field). This effectively makes the `person1` field an enforced +implementation detail! Outsiders can't access it, since it's not present in the +signature; the signature **constrained** what others can access. + +The type `EstablishmentType.profession` is **abstract**: it doesn't have a +concrete type; it's saying "I don't care what the actual type is, but it's used +as input to `getProfession`". This is useful to fit many modules under the same +interface: + + + +```res +module Company: EstablishmentType = { + type profession = CEO | Designer | Engineer | ... + + let getProfession = (person) => ... + let person1 = ... + let person2 = ... +} +``` +```js +function getProfession(person) { + ... +} + +var person1 = ... + +var person2 = ... + +var Company = { + getProfession: getProfession, + person1: person1, + person2: person2 +}; +``` + + + +It's also useful to hide the underlying type as an implementation detail others +can't rely on. If you ask what the type of `Company.profession` is, instead of +exposing the variant, it'll only tell you "it's `Company.profession`". + +### Extending module signatures + +Like modules themselves, module signatures can also be extended by other module signatures using `include`. Again, **heavily discouraged**: + + + +```res example +module type BaseComponent = { + let defaultGreeting: string + let getAudience: (~excited: bool) => string +} + +module type ActualComponent = { + /* the BaseComponent signature is copied over */ + include BaseComponent + let render: unit => string +} +``` +```js +// Empty output +``` + + + +**Note**: `BaseComponent` is a module **type**, not an actual module itself! + +If you do not have a defined module type, you can extract it from an actual module +using `include (module type of ActualModuleName)`. For example, we can extend the +`List` module from the standard library, which does not define a module +type. + + + +```res example +module type MyList = { + include (module type of List) + let myListFun: list<'a> => list<'a> +} +``` +```js +// Empty output +``` + + + +### Every `.resi` file is a signature + +Similar to how a `React.res` file implicitly defines a module `React`, a file +`React.resi` implicitly defines a signature for `React`. If `React.resi` isn't +provided, the signature of `React.res` defaults to exposing all the fields of the +module. Because they don't contain implementation files, `.resi` files are used +in the ecosystem to also document the public API of their corresponding modules. + + + +```res example +/* file React.res (implementation. Compiles to module React) */ +type state = int +let render = (str) => str +``` +```js +function render(str) { + return str; +} +``` + + + +```res sig +/* file React.resi (interface. Compiles to the signature of React.res) */ +type state = int +let render: string => string +``` + +## Module Functions (functors) + +Modules can be passed to functions! It would be the equivalent of passing a file +as a first-class item. However, modules are at a different "layer" of the +language than other common concepts, so we can't pass them to *regular* +functions. Instead, we pass them to special functions called "functors". + +The syntax for defining and using functors is very much like the syntax +for defining and using regular functions. The primary differences are: + +- Functors use the `module` keyword instead of `let`. +- Functors take modules as arguments and return a module. +- Functors *require* annotating arguments. +- Functors must start with a capital letter (just like modules/signatures). + +Here's an example `MakeSet` functor, that takes in a module of the type +`Comparable` and returns a new set that can contain such comparable items. + + + +```res prelude +module type Comparable = { + type t + let equal: (t, t) => bool +} + +module MakeSet = (Item: Comparable) => { + // let's use a list as our naive backing data structure + type backingType = list + let empty = list{} + let add = (currentSet: backingType, newItem: Item.t): backingType => + // if item exists + if currentSet->List.some(x => Item.equal(x, newItem)) { + currentSet // return the same (immutable) set (a list really) + } else { + list{ + newItem, + ...currentSet // prepend to the set and return it + } + } +} +``` +```js +var List = require("./stdlib/list.js"); + +function MakeSet(Item) { + var add = function(currentSet, newItem) { + if ( + List.exists(function(x) { + return Item.equal(x, newItem); + }, currentSet) + ) { + return currentSet; + } else { + return { + hd: newItem, + tl: currentSet, + }; + } + }; + return { + empty: /* [] */ 0, + add: add, + }; +} +``` + + + +Functors can be applied using function application syntax. In this case, we're +creating a set, whose items are pairs of integers. + + + +```res example +module IntPair = { + type t = (int, int) + let equal = ((x1: int, y1: int), (x2, y2)) => x1 == x2 && y1 == y2 + let create = (x, y) => (x, y) +} + +/* IntPair abides by the Comparable signature required by MakeSet */ +module SetOfIntPairs = MakeSet(IntPair) +``` +```js +function equal(param, param$1) { + if (param[0] === param$1[0]) { + return param[1] === param$1[1]; + } else { + return false; + } +} + +function create(x, y) { + return [x, y]; +} + +var IntPair = { + equal: equal, + create: create, +}; + +var SetOfIntPairs = { + empty: /* [] */ 0, + add: add, +}; +``` + + + +### Module functions types + +Like with module types, functor types also act to constrain and hide what we may +assume about functors. The syntax for functor types are consistent with those +for function types, but with types capitalized to represent the signatures of +modules the functor accepts as arguments and return values. In the +previous example, we're exposing the backing type of a set; by giving `MakeSet` +a functor signature, we can hide the underlying data structure! + + + +```res +module type Comparable = ... + +module type MakeSetType = (Item: Comparable) => { + type backingType + let empty: backingType + let add: (backingType, Item.t) => backingType +} + +module MakeSet: MakeSetType = (Item: Comparable) => { + ... +} +``` +```js +// Empty output +``` + + + +## Exotic Module Filenames + +**Since 8.3** + +It is possible to use non-conventional characters in your filenames (which is sometimes needed for specific JS frameworks). Here are some examples: + +- `src/Button.ios.res` +- `pages/[id].res` + +Please note that modules with an exotic filename will not be accessible from other ReScript modules. + +## Tips & Tricks + +Modules and functors are at a different "layer" of language than the rest (functions, let bindings, data structures, etc.). For example, you can't easily pass them into a tuple or record. Use them judiciously, if ever! Lots of times, just a record or a function is enough. diff --git a/pages/docs/manual/v12.0.0/mutation.mdx b/pages/docs/manual/v12.0.0/mutation.mdx new file mode 100644 index 000000000..8162d8ec0 --- /dev/null +++ b/pages/docs/manual/v12.0.0/mutation.mdx @@ -0,0 +1,75 @@ +--- +title: "Mutation" +description: "Imperative and mutative programming capabilities in ReScript" +canonical: "/docs/manual/v12.0.0/mutation" +--- + +# Mutation + +ReScript has great traditional imperative & mutative programming capabilities. You should use these features sparingly, but sometimes they allow your code to be more performant and written in a more familiar pattern. + +## Mutate Let-binding + +Let-bindings are immutable, but you can wrap it with a `ref`, exposed as a record with a single mutable field in the standard library: + + + +```res prelude +let myValue = ref(5) +``` +```js +var myValue = { + contents: 5 +}; +``` + + + +## Usage + +You can get the actual value of a `ref` box through accessing its `contents` field: + + + +```res example +let five = myValue.contents // 5 +``` +```js +var five = myValue.contents; +``` + + + +Assign a new value to `myValue` like so: + + + +```res example +myValue.contents = 6 +``` +```js +myValue.contents = 6; +``` + + + +We provide a syntax sugar for this: + + + +```res example +myValue := 6 +``` +```js +myValue.contents = 6; +``` + + + +Note that the previous binding `five` stays `5`, since it got the underlying item on the `ref` box, not the `ref` itself. + +**Note**: you might see in the JS output tabs above that `ref` allocates an object. Worry not; local, non-exported `ref`s allocations are optimized away. + +## Tip & Tricks + +Before reaching for `ref`, know that you can achieve lightweight, local "mutations" through [overriding let bindings](let-binding.md#binding-shadowing). diff --git a/pages/docs/manual/v12.0.0/newcomer-examples.mdx b/pages/docs/manual/v12.0.0/newcomer-examples.mdx new file mode 100644 index 000000000..7ec9d05aa --- /dev/null +++ b/pages/docs/manual/v12.0.0/newcomer-examples.mdx @@ -0,0 +1,134 @@ +--- +title: "Newcomer Examples" +description: "Quick examples for users new to ReScript" +canonical: "/docs/manual/v12.0.0/newcomer-examples" +--- + +# Newcomer Examples + + + +An example is worth a thousand words. + +This section is dedicated to newcomers trying to figure out general idioms & conventions. If you're a beginner who's got a good idea for an example, please suggest an edit! + +## Use the [`option` type](null-undefined-option.md) + + + +```res example +let possiblyNullValue1 = None +let possiblyNullValue2 = Some("Hello") + +switch possiblyNullValue2 { +| None => Console.log("Nothing to see here.") +| Some(message) => Console.log(message) +} +``` +```js +var possiblyNullValue1; +var possiblyNullValue2 = "Hello"; + +if (possiblyNullValue2 !== undefined) { + console.log(possiblyNullValue2); +} else { + console.log("Nothing to see here."); +} + +``` + + + +## Create a Parametrized Type + + + +```res example +type universityStudent = {gpa: float} + +type response<'studentType> = { + status: int, + student: 'studentType, +} +``` +```js +// Empty output +``` + + + +## Creating a JS Object + + + +```res example +let student1 = { + "name": "John", + "age": 30, +} +``` +```js +var student1 = { + name: "John", + age: 30, +}; +``` + + + +Or using [record](record.md): + + + +```res example +type payload = { + name: string, + age: int, +} + +let student1 = { + name: "John", + age: 30, +} +``` +```js +var student1 = { + name: "John", + age: 30, +}; +``` + + + +## Modeling a JS Module with Default Export + +See [here](import-from-export-to-js.md#import-a-javascript-module-itself-es6-module-format). + +## Checking for JS nullable types using the `option` type + +For a function whose argument is passed a JavaScript value that's potentially `null` or `undefined`, it's idiomatic to convert it to an `option`. The conversion is done through the helper functions in ReScript's [`Nullable`](api/core/nullable#value-toOption) module. In this case, `toOption`: + + + +```res example +let greetByName = (possiblyNullName) => { + let optionName = Nullable.toOption(possiblyNullName) + switch optionName { + | None => "Hi" + | Some(name) => "Hello " ++ name + } +} +``` +```js +function greetByName(possiblyNullName) { + if (possiblyNullName == null) { + return "Hi"; + } else { + return "Hello " + possiblyNullName; + } +} +``` + + + +This check compiles to `possiblyNullName == null` in JS, so checks for the presence of `null` or `undefined`. diff --git a/pages/docs/manual/v12.0.0/null-undefined-option.mdx b/pages/docs/manual/v12.0.0/null-undefined-option.mdx new file mode 100644 index 000000000..9113030f9 --- /dev/null +++ b/pages/docs/manual/v12.0.0/null-undefined-option.mdx @@ -0,0 +1,203 @@ +--- +title: "Null, Undefined and Option" +description: "JS interop with nullable and optional values in ReScript" +canonical: "/docs/manual/v12.0.0/null-undefined-option" +--- + +# Null, Undefined and Option + +ReScript itself doesn't have the notion of `null` or `undefined`. This is a _great_ thing, as it wipes out an entire category of bugs. No more `undefined is not a function`, and `cannot access someAttribute of undefined`! + +However, the **concept** of a potentially nonexistent value is still useful, and safely exists in our language. + +We represent the existence and nonexistence of a value by wrapping it with the `option` type. Here's its definition from the standard library: + + + +```res example +type option<'a> = None | Some('a) +``` +```js +// Empty output +``` + + + +It means "a value of type option is either None (representing nothing) or that actual value wrapped in a Some". + +**Note** how the `option` type is just a regular [variant](variant.md). + +## Example + +Here's a normal value: + + + +```res example +let licenseNumber = 5 +``` +```js +var licenseNumber = 5; +``` + + + +To represent the concept of "maybe null", you'd turn this into an `option` type by wrapping it. For the sake of a more illustrative example, we'll put a condition around it: + + + +```res +let licenseNumber = + if personHasACar { + Some(5) + } else { + None + } +``` +```js +var licenseNumber = personHasACar ? 5 : undefined; +``` + + + +Later on, when another piece of code receives such value, it'd be forced to handle both cases through [pattern matching](pattern-matching-destructuring.md): + + + +```res +switch licenseNumber { +| None => + Console.log("The person doesn't have a car") +| Some(number) => + Console.log("The person's license number is " ++ Int.toString(number)) +} +``` +```js +var number = licenseNumber; + +if (number !== undefined) { + console.log("The person's license number is " + number.toString()); +} else { + console.log("The person doesn't have a car"); +} +``` + + + +By turning your ordinary number into an `option` type, and by forcing you to handle the `None` case, the language effectively removed the possibility for you to mishandle, or forget to handle, a conceptual `null` value! **A pure ReScript program doesn't have null errors**. + +## Interoperate with JavaScript `undefined` and `null` + +The `option` type is common enough that we special-case it when compiling to JavaScript: + + + +```res example +let x = Some(5) +``` +```js +var x = 5; +``` + + + +simply compiles down to `5`, and + + + +```res example +let x = None +``` +```js +var x; +``` + + + +compiles to `undefined`! If you've got e.g. a string in JavaScript that you know might be `undefined`, type it as `option` and you're done! Likewise, you can send a `Some(5)` or `None` to the JS side and expect it to be interpreted correctly =) + +### Caveat 1 + +The option-to-undefined translation isn't perfect, because on our side, `option` values can be composed: + + + +```res example +let x = Some(Some(Some(5))) +``` +```js +var x = 5; +``` + + + +This still compiles to `5`, but this gets troublesome: + + + +```res example +let x = Some(None) +``` +```js +var Caml_option = require("./stdlib/caml_option.js"); + +var x = Caml_option.some(undefined); +``` + +(See output tab). + + + +What's this `Caml_option.some` thing? Why can't this compile to `undefined`? Long story short, when dealing with a polymorphic `option` type (aka `option<'a>`, for any `'a`), many operations become tricky if we don't mark the value with some special annotation. If this doesn't make sense, don't worry; just remember the following rule: + +- **Never, EVER, pass a nested `option` value (e.g. `Some(Some(Some(5)))`) into the JS side.** +- **Never, EVER, annotate a value coming from JS as `option<'a>`. Always give the concrete, non-polymorphic type.** + +### Caveat 2 + +Unfortunately, lots of times, your JavaScript value might be _both_ `null` or `undefined`. In that case, you unfortunately can't type such value as e.g. `option`, since our `option` type only checks for `undefined` and not `null` when dealing with a `None`. + +#### Solution: More Sophisticated `undefined` & `null` Interop + +To solve this, we provide access to more elaborate `null` and `undefined` helpers through the [`Nullable`](api/core/nullable) module. This somewhat works like an `option` type, but is different from it. + +#### Examples + +To create a JS `null`, use the value `Nullable.null`. To create a JS `undefined`, use `Nullable.undefined` (you can naturally use `None` too, but that's not the point here; the `Nullable.*` helpers wouldn't work with it). + +If you're receiving, for example, a JS string that can be `null` and `undefined`, type it as: + + + +```res example +@module("MyConstant") external myId: Nullable.t = "myId" +``` +```js +// Empty output +``` + + + +To create such a nullable string from our side (presumably to pass it to the JS side, for interop purpose), do: + + + +```res example +@module("MyIdValidator") external validate: Nullable.t => bool = "validate" +let personId: Nullable.t = Nullable.make("abc123") + +let result = validate(personId) +``` +```js +var MyIdValidator = require("MyIdValidator"); +var personId = "abc123"; +var result = MyIdValidator.validate(personId); +``` + + + +The `return` part "wraps" a string into a nullable string, to make the type system understand and track the fact that, as you pass this value around, it's not just a string, but a string that can be `null` or `undefined`. + +#### Convert to/from `option` + +`Nullable.fromOption` converts from a `option` to `Nullable.t`. `Nullable.toOption` does the opposite. diff --git a/pages/docs/manual/v12.0.0/object.mdx b/pages/docs/manual/v12.0.0/object.mdx new file mode 100644 index 000000000..abb2011d9 --- /dev/null +++ b/pages/docs/manual/v12.0.0/object.mdx @@ -0,0 +1,195 @@ +--- +title: "Object" +description: "Interoping with JS objects in ReScript" +canonical: "/docs/manual/v12.0.0/object" +--- + +# Object + +ReScript objects are like [records](record.md), but: + +- No type declaration needed. +- Structural and more polymorphic, [unlike records](record.md#record-types-are-found-by-field-name). +- Doesn't support updates unless the object comes from the JS side. +- Doesn't support [pattern matching](pattern-matching-destructuring). + + + +Although ReScript records compile to clean JavaScript objects, ReScript objects are a better candidate for emulating/binding to JS objects, as you'll see. + +## Type Declaration + +**Optional**, unlike for records. The type of an object is inferred from the value, so you never really need to write down its type definition. Nevertheless, here's its type declaration syntax: + + + +```res prelude +type person = { + "age": int, + "name": string +}; +``` +```js +// Empty output +``` + + + +Visually similar to record type's syntax, with the field names quoted. + + + +## Creation + +To create a new object: + + + +```res example +let me = { + "age": 5, + "name": "Big ReScript" +} +``` +```js +var me = { + "age": 5, + "name": "Big ReScript" +}; +``` + + + +**Note**: as said above, unlike for record, this `me` value does **not** try to find a conforming type declaration with the field `"age"` and `"name"`; rather, the type of `me` is inferred as `{"age": int, "name": string}`. This is convenient, but also means this code passes type checking without errors: + + + +```res +type person = { + "age": int +}; + +let me = { + "age": "hello!" // age is a string. No error. +} +``` +```js +var me = { + "age": "hello!" +}; +``` + + + +Since the type checker doesn't try to match `me` with the type `person`. If you ever want to force an object value to be of a predeclared object type, just annotate the value: + +```res +let me: person = { + "age": "hello!" +} +``` + +Now the type system will error properly. + +## Access + + + +```res +let age = me["age"] +``` +```js +var age = me["age"]; +``` + + + +## Update + +Disallowed unless the object is a binding that comes from the JavaScript side. In that case, use `=` + + + +```res example +type student = { + @set "age": int, + @set "name": string, +} +@module("MyJSFile") external student1: student = "student1" + +student1["name"] = "Mary" +``` +```js +var MyJSFile = require("MyJSFile"); +MyJSFile.student1.name = "Mary"; +``` + + + +## Combine Types + +You can spread one object type definition into another using `...`: + + + +```res example +type point2d = { + "x": float, + "y": float, +} +type point3d = { + ...point2d, + "z": float, +} + +let myPoint: point3d = { + "x": 1.0, + "y": 2.0, + "z": 3.0, +} +``` +```js +var myPoint = { + x: 1.0, + y: 2.0, + z: 3.0 +}; +``` + + + +This only works with object types, not object values! + +## Tips & Tricks + +Since objects don't require type declarations, and since ReScript infers all the types for you, you get to very quickly and easily (and dangerously) bind to any JavaScript API. Check the JS output tab: + + + +```res example +// The type of document is just some random type 'a +// that we won't bother to specify +@val external document: 'a = "document" + +// call a method +document["addEventListener"]("mouseup", _event => { + Console.log("clicked!") +}) + +// get a property +let loc = document["location"] + +// set a property +document["location"]["href"] = "rescript-lang.org" +``` +```js +document.addEventListener("mouseup", function(_event) { + console.log("clicked!"); +}); +var loc = document.location; +document.location.href = "rescript-lang.org"; +``` + + + +The `external` feature and the usage of this trick are also documented in the [external](external#tips--tricks) section later. It's an excellent way to start writing some ReScript code without worrying about whether bindings to a particular library exists. diff --git a/pages/docs/manual/v12.0.0/overview.mdx b/pages/docs/manual/v12.0.0/overview.mdx new file mode 100644 index 000000000..8530981cb --- /dev/null +++ b/pages/docs/manual/v12.0.0/overview.mdx @@ -0,0 +1,255 @@ +--- +title: "Overview" +metaTitle: "Language Features Overview" +description: "A quick overview on ReScript's syntax" +canonical: "/docs/manual/v12.0.0/overview" +--- + +# Overview + +## Comparison to JS + +### Semicolon + +| JavaScript | ReScript | +| ---------------------------------- | -------------------- | +| Rules enforced by linter/formatter | No semicolon needed! | + +### Comments + +| JavaScript | ReScript | +| -------------------- | -------------------------------- | +| `// Line comment` | Same | +| `/* Comment */` | Same | +| `/** Doc Comment */` | `/** Before Types/Values */` | +| | `/*** Standalone Doc Comment */` | + +### Variable + +| JavaScript | ReScript | +| ----------------------- | ------------------------------------- | +| `const x = 5;` | `let x = 5` | +| `var x = y;` | No equivalent (thankfully) | +| `let x = 5; x = x + 1;` | `let x = ref(5); x := x.contents + 1` | + +### String & Character + +| JavaScript | ReScript | +| ---------------------------- | --------------------- | +| `"Hello world!"` | Same | +| `'Hello world!'` | Strings must use `"` | +| `"hello " + "world"` | `"hello " ++ "world"` | +| `` `hello ${message}` `` | Same | +| `` sql`select ${fnName};` `` | Same | + +### Boolean + +| JavaScript | ReScript | +| ----------------------------------------------------- | ---------------------------------------------- | +| `true`, `false` | Same | +| `!true` | Same | +| ||, `&&`, `<=`, `>=`, `<`, `>` | Same | +| `a === b`, `a !== b` | Same | +| No deep equality (recursive compare) | `a == b`, `a != b` | +| `a == b` | No equality with implicit casting (thankfully) | + +### Number + +| JavaScript | ReScript | +| ----------- | ------------ | +| `3` | Same \* | +| `3.1415` | Same | +| `3 + 4` | Same | +| `3.0 + 4.5` | `3.0 +. 4.5` | +| `5 % 3` | `mod(5, 3)` | + +\* JS has no distinction between integer and float. + +### Object/Record + +| JavaScript | ReScript | +| ------------------- | --------------------------------------- | +| no types | `type point = {x: int, mutable y: int}` | +| `{x: 30, y: 20}` | Same | +| `point.x` | Same | +| `point.y = 30;` | Same | +| `{...point, x: 30}` | Same | + +### Array + +| JavaScript | ReScript | +| ------------------ | --------------------- | +| `[1, 2, 3]` | Same | +| `myArray[1] = 10` | Same | +| `[1, "Bob", true]` | `(1, "Bob", true)` \* | + +\* ReScript does not have heterogenous arrays. Use tuples or [Untagged Variants](variant#untagged-variants) instead. + +### Null + +| JavaScript | ReScript | +| ------------------- | --------- | +| `null`, `undefined` | `None` \* | + +\* Again, only a spiritual equivalent; we don't have nulls, nor null bugs! But we do have an `option` type for when you actually need nullability. + +### Function + +| JavaScript | ReScript | +| ------------------------------- | ---------------------------- | +| `arg => retVal` | Same | +| `function named(arg) {...}` | `let named = (arg) => {...}` | +| `const f = function(arg) {...}` | `let f = (arg) => {...}` | +| `add(4, add(5, 6))` | Same | + +### Async Function / Await + +| JavaScript | ReScript | +| --------------------------------------- | ----------------------------------------------------- | +| `async (arg) => {...}` | Same | +| `async function named(arg) {...}` | `let named = async (arg) => {...}` | +| `await somePromise` | Same | +| `async (arg): Promise => {...}` | `async (arg): string => {...}` (note the return type) | + +### Blocks + + + + + + + + + + + + + + +
    JavaScriptReScript
    + ``` + const myFun = (x, y) => { + const doubleX = x + x; + const doubleY = y + y; + return doubleX + doubleY; + }; + ``` + + ``` + let myFun = (x, y) => { + let doubleX = x + x + let doubleY = y + y + doubleX + doubleY + } + ``` +
    + +### If-else + +| JavaScript | ReScript | +| --------------------- | --------------------------------------------------------------------------------- | +| `if (a) {b} else {c}` | `if a {b} else {c}` \* | +| `a ? b : c` | Same | +| `switch` | `switch` but [super-powered pattern matching!](pattern-matching-destructuring.md) | + +\* Our conditionals are always expressions! You can write `let result = if a {"hello"} else {"bye"}` + +### Destructuring + +| JavaScript | ReScript | +| ----------------------------- | --------------------------- | +| `const {a, b} = data` | `let {a, b} = data` | +| `const [a, b] = data` | `let [a, b] = data` \* | +| `const {a: aa, b: bb} = data` | `let {a: aa, b: bb} = data` | + +\* Gives good compiler warning that `data` might not be of length 2. + +### Loop + +| JavaScript | ReScript | +| ------------------------------------- | ---------------------------- | +| `for (let i = 0; i <= 10; i++) {...}` | `for i in 0 to 10 {...}` | +| `for (let i = 10; i >= 0; i--) {...}` | `for i in 10 downto 0 {...}` | +| `while (true) {...}` | `while true {...}` | + +### JSX + +| JavaScript | ReScript | +| ----------------------------------------- | -------------------------- | +| `` | Same | +| `` | `` \* | +| `` | `` | +| No children spread | `...children` | + +\* Argument punning! + +### Exception + +| JavaScript | ReScript | +| ----------------------------------------- | -------------------------------------------- | +| `throw new SomeError(...)` | `raise(SomeError(...))` | +| `try {a} catch (err) {...} finally {...}` | `try a catch { \| SomeError(err) => ...}` \* | + +\* No finally. + +### Blocks + +The last expression of a block delimited by `{}` implicitly returns (including function body). In JavaScript, this can only be simulated via an immediately-invoked function expression (since function bodies have their own local scope). + + + + + + + + + + + + + + +
    JavaScriptReScript
    + ``` + let result = (function() { + const x = 23; + const y = 34; + return x + y; + })(); + ``` + + ``` + let result = { + let x = 23 + let y = 34 + x + y + } + ``` +
    + +## Common Features' JS Output + +| Feature | Example | JavaScript Output | +| ------------------------------- | ------------------------------------ | ------------------------------------------ | +| String | `"Hello"` | `"Hello"` | +| String Interpolation | `` `Hello ${message}` `` | `"Hello " + message` | +| Character (disrecommended) | `'x'` | `120` (char code) | +| Integer | `23`, `-23` | `23`, `-23` | +| Float | `23.0`, `-23.0` | `23.0`, `-23.0` | +| Integer Addition | `23 + 1` | `23 + 1` | +| Float Addition | `23.0 +. 1.0` | `23.0 + 1.0` | +| Integer Division/Multiplication | `2 / 23 * 1` | `2 / 23 * 1` | +| Float Division/Multiplication | `2.0 /. 23.0 *. 1.0` | `2.0 / 23.0 * 1.0` | +| Float Exponentiation | `2.0 ** 3.0` | `Math.pow(2.0, 3.0)` | +| String Concatenation | `"Hello " ++ "World"` | `"Hello " + "World"` | +| Comparison | `>`, `<`, `>=`, `<=` | `>`, `<`, `>=`, `<=` | +| Boolean operation | `!`, `&&`, || | `!`, `&&`, || | +| Shallow and deep Equality | `===`, `==` | `===`, `==` | +| List (disrecommended) | `list{1, 2, 3}` | `{hd: 1, tl: {hd: 2, tl: {hd: 3, tl: 0}}}` | +| List Prepend | `list{a1, a2, ...oldList}` | `{hd: a1, tl: {hd: a2, tl: theRest}}` | +| Array | `[1, 2, 3]` | `[1, 2, 3]` | +| Record | `type t = {b: int}; let a = {b: 10}` | `var a = {b: 10}` | +| Multiline Comment | `/* Comment here */` | Not in output | +| Single line Comment | `// Comment here` | Not in output | + +_Note that this is a cleaned-up comparison table; a few examples' JavaScript output are slightly different in reality._ diff --git a/pages/docs/manual/v12.0.0/pattern-matching-destructuring.mdx b/pages/docs/manual/v12.0.0/pattern-matching-destructuring.mdx new file mode 100644 index 000000000..b6b0ed587 --- /dev/null +++ b/pages/docs/manual/v12.0.0/pattern-matching-destructuring.mdx @@ -0,0 +1,864 @@ +--- +title: "Pattern Matching / Destructuring" +description: "Pattern matching and destructuring complex data structures in ReScript" +canonical: "/docs/manual/v12.0.0/pattern-matching-destructuring" +--- + +# Pattern Matching / Destructuring + +One of ReScript's **best** feature is our pattern matching. Pattern matching combines 3 brilliant features into one: + +- Destructuring. +- `switch` based on shape of data. +- Exhaustiveness check. + +We'll dive into each aspect below. + +## Destructuring + +Even JavaScript has destructuring, which is "opening up" a data structure to extract the parts we want and assign variable names to them: + + + +```res example +let coordinates = (10, 20, 30) +let (x, _, _) = coordinates +Console.log(x) // 10 +``` +```js +var coordinates = [10, 20, 30]; +var x = 10; +console.log(10); +``` + + + +Destructuring works with most built-in data structures: + + + +```res +// Record +type student = {name: string, age: int} +let student1 = {name: "John", age: 10} +let {name} = student1 // "John" assigned to `name` + +// Variant +type result = + | Success(string) +let myResult = Success("You did it!") +let Success(message) = myResult // "You did it!" assigned to `message` +``` +```js +var student1 = { + name: "John", + age: 10 +}; +var name = "John"; + +var myResult = /* Success */{ + _0: "You did it!" +}; +var message = "You did it!" + +var myArray = [1, 2, 3]; +if (myArray.length !== 2) { + throw { + RE_EXN_ID: "Match_failure", + _1: [ + "playground.res", + 14, + 4 + ], + Error: new Error() + }; +} +var item1 = myArray[0]; +var item2 = myArray[1]; + +var myList = { + hd: 1, + tl: { + hd: 2, + tl: { + hd: 3, + tl: /* [] */0 + } + } +}; +// ... +``` + + + +You can also use destructuring anywhere you'd usually put a binding: + + + +```res example +type result = + | Success(string) +let displayMessage = (Success(m)) => { + // we've directly extracted the success message + // string by destructuring the parameter + Console.log(m) +} +displayMessage(Success("You did it!")) +``` +```js +function displayMessage(m) { + console.log(m._0); +} + +displayMessage(/* Success */{ + _0: "You did it!" +}); +``` + + + +For a record, you can rename the field while destructuring: + + + +```res +let {name: n} = student1 // "John" assigned to `n` +``` +```js +var n = "John"; +``` + + + +You _can_ in theory destructure array and list at the top level too: + +```res +let myArray = [1, 2, 3] +let [item1, item2, _] = myArray +// 1 assigned to `item1`, 2 assigned to `item2`, 3rd item ignored + +let myList = list{1, 2, 3} +let list{head, ...tail} = myList +// 1 assigned to `head`, `list{2, 3}` assigned to tail +``` + +But the array example is **highly disrecommended** (use tuple instead) and the list example will error on you. They're only there for completeness' sake. As you'll see below, the proper way of using destructuring array and list is using `switch`. + +## `switch` Based on Shape of Data + +While the destructuring aspect of pattern matching is nice, it doesn't really change the way you think about structuring your code. One paradigm-changing way of thinking about your code is to execute some code based on the shape of the data. + +Consider a variant: + + + +```res prelude +type payload = + | BadResult(int) + | GoodResult(string) + | NoResult +``` +```js +// Empty output +``` + + + +We'd like to handle each of the 3 cases differently. For example, print a success message if the value is `GoodResult(...)`, do something else when the value is `NoResult`, etc. + +In other languages, you'd end up with a series of if-elses that are hard to read and error-prone. In ReScript, you can instead use the supercharged `switch` pattern matching facility to destructure the value while calling the right code based on what you destructured: + + + +```res example +let data = GoodResult("Product shipped!") +switch data { +| GoodResult(theMessage) => + Console.log("Success! " ++ theMessage) +| BadResult(errorCode) => + Console.log("Something's wrong. The error code is: " ++ Int.toString(errorCode)) +| NoResult => + Console.log("Bah.") +} +``` +```js +var data = { + TAG: "GoodResult", + _0: "Product shipped!" +}; + +if (typeof data !== "object") { + console.log("Bah."); +} else if (data.TAG === "BadResult") { + console.log("Something's wrong. The error code is: " + "Product shipped!".toString()); +} else { + console.log("Success! Product shipped!"); +} +``` + + + +In this case, `message` will have the value `"Success! Product shipped!"`. + +Suddenly, your if-elses that messily checks some structure of the value got turned into a clean, compiler-verified, linear list of code to execute based on exactly the shape of the value. + +### Complex Examples + +Here's a real-world scenario that'd be a headache to code in other languages. Given this data structure: + + + +```res prelude +type status = Vacations(int) | Sabbatical(int) | Sick | Present +type reportCard = {passing: bool, gpa: float} +type student = {name: string, status: status, reportCard: reportCard} +type person = + | Teacher({name: string, age: int}) + | Student(student) +``` +```js +// Empty output +``` + + + +Imagine this requirement: + +- Informally greet a person who's a teacher and if his name is Mary or Joe. +- Greet other teachers formally. +- If the person's a student, congratulate him/her score if they passed the semester. +- If the student has a gpa of 0 and is on vacations or sabbatical, display a different message. +- A catch-all message for a student. + +ReScript can do this easily! + + + +```res prelude +let person1 = Teacher({name: "Jane", age: 35}) + +let message = switch person1 { +| Teacher({name: "Mary" | "Joe"}) => + `Hey, still going to the party on Saturday?` +| Teacher({name}) => + // this is matched only if `name` isn't "Mary" or "Joe" + `Hello ${name}.` +| Student({name, reportCard: {passing: true, gpa}}) => + `Congrats ${name}, nice GPA of ${Float.toString(gpa)} you got there!` +| Student({ + reportCard: {gpa: 0.0}, + status: Vacations(daysLeft) | Sabbatical(daysLeft) + }) => + `Come back in ${Int.toString(daysLeft)} days!` +| Student({status: Sick}) => + `How are you feeling?` +| Student({name}) => + `Good luck next semester ${name}!` +} +``` +```js +var person1 = { + TAG: "Teacher", + name: "Jane", + age: 35 +}; + +var message; + +if (person1.TAG === "Teacher") { + message = "Hello Jane."; +} else { + var match = "Jane"; + var match$1 = match.status; + var name = match.name; + var match$2 = match.reportCard; + if (match$2.passing) { + message = "Congrats " + name + ", nice GPA of " + match$2.gpa.toString() + " you got there!"; + } else { + var exit = 0; + if (typeof match$1 !== "object") { + message = match$1 === "Sick" ? "How are you feeling?" : "Good luck next semester " + name + "!"; + } else { + exit = 1; + } + if (exit === 1) { + message = match.reportCard.gpa !== 0.0 ? "Good luck next semester " + name + "!" : "Come back in " + match$1._0.toString() + " days!"; + } + + } +} +``` + + + +**Note** how we've: +- drilled deep down into the value concisely +- using a **nested pattern check** `"Mary" | "Joe"` and `Vacations | Sabbatical` +- while extracting the `daysLeft` number from the latter case +- and assigned the greeting to the binding `message`. + +Here's another example of pattern matching, this time on an inline tuple. + + + +```res +type animal = Dog | Cat | Bird +let categoryId = switch (isBig, myAnimal) { +| (true, Dog) => 1 +| (true, Cat) => 2 +| (true, Bird) => 3 +| (false, Dog | Cat) => 4 +| (false, Bird) => 5 +} +``` +```js +var categoryId = isBig ? (myAnimal + 1) | 0 : myAnimal >= 2 ? 5 : 4; +``` + + + +**Note** how pattern matching on a tuple is equivalent to a 2D table: + +isBig \ myAnimal | Dog | Cat | Bird +-----------------|-----|-----|------ +true | 1 | 2 | 3 +false | 4 | 4 | 5 + +### Fall-Through Patterns + +The nested pattern check, demonstrated in the earlier `person` example, also works at the top level of a `switch`: + + + +```res prelude +let myStatus = Vacations(10) + +switch myStatus { +| Vacations(days) +| Sabbatical(days) => Console.log(`Come back in ${Int.toString(days)} days!`) +| Sick +| Present => Console.log("Hey! How are you?") +} +``` +```js +var myStatus = { + TAG: /* Vacations */0, + _0: 10 +}; + +if (typeof myStatus === "number") { + console.log("Hey! How are you?"); +} else { + console.log("Come back in " + (10).toString() + " days!"); +} +``` + + + +Having multiple cases fall into the same handling can clean up certain types of logic. + +### Ignore Part of a Value + +If you have a value like `Teacher(payload)` where you just want to pattern match on the `Teacher` part and ignore the `payload` completely, you can use the `_` wildcard like this: + + + +```res example +switch person1 { +| Teacher(_) => Console.log("Hi teacher") +| Student(_) => Console.log("Hey student") +} +``` +```js +if (person1.TAG === "Teacher") { + console.log("Hi teacher"); +} else { + console.log("Hey student"); +} +``` + + + +`_` also works at the top level of the `switch`, serving as a catch-all condition: + + + +```res example +switch myStatus { +| Vacations(_) => Console.log("Have fun!") +| _ => Console.log("Ok.") +} +``` +```js +if (typeof myStatus !== "object" || myStatus.TAG !== "Vacations") { + console.log("Ok."); +} else { + console.log("Have fun!"); +} +``` + + + +**Do not** abuse a top-level catch-all condition. Instead, prefer writing out all the cases: + + + +```res example +switch myStatus { +| Vacations(_) => Console.log("Have fun!") +| Sabbatical(_) | Sick | Present => Console.log("Ok.") +} +``` +```js +if (typeof myStatus !== "object" || myStatus.TAG !== "Vacations") { + console.log("Ok."); +} else { + console.log("Have fun!"); +} +``` + + + +Slightly more verbose, but a one-time writing effort. This helps when you add a new variant case e.g. `Quarantined` to the `status` type and need to update the places that pattern match on it. A top-level wildcard here would have accidentally and silently continued working, potentially causing bugs. + +### If Clause + +Sometime, you want to check more than the shape of a value. You want to also run some arbitrary check on it. You might be tempted to write this: + + + +```res example +switch person1 { +| Teacher(_) => () // do nothing +| Student({reportCard: {gpa}}) => + if gpa < 0.5 { + Console.log("What's happening") + } else { + Console.log("Heyo") + } +} +``` +```js +if (person1.TAG !== "Teacher") { + if ("Jane".reportCard.gpa < 0.5) { + console.log("What's happening"); + } else { + console.log("Heyo"); + } +} +``` + + + +`switch` patterns support a shortcut for the arbitrary `if` check, to keep your pattern linear-looking: + + + +```res example +switch person1 { +| Teacher(_) => () // do nothing +| Student({reportCard: {gpa}}) if gpa < 0.5 => + Console.log("What's happening") +| Student(_) => + // fall-through, catch-all case + Console.log("Heyo") +} +``` +```js +if (person1.TAG) { + if (person1.reportCard.gpa < 0.5) { + console.log("What's happening"); + } else { + console.log("Heyo"); + } +} +``` + + + +**Note:** Rescript versions < 9.0 had a `when` clause, not an `if` clause.  Rescript 9.0 changed `when` to `if`.  (`when` may still work, but is deprecated.) + +### Match on Exceptions + +If the function throws an exception (covered later), you can also match on _that_, in addition to the function's normally returned values. + + + +```res +switch List.find(i => i === theItem, myItems) { +| item => Console.log(item) +| exception Not_found => Console.log("No such item found!") +} +``` +```js +var exit = 0; + +var item; + +try { + item = List.find(function(i) { + return i === theItem; + }, myItems); + exit = 1; +} +catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Not_found") { + console.log("No such item found!"); + } else { + throw exn; + } +} + +if (exit === 1) { + console.log(item); +} +``` + + + +### Match on Array + + + +```res example +let students = ["Jane", "Harvey", "Patrick"] +switch students { +| [] => Console.log("There are no students") +| [student1] => + Console.log("There's a single student here: " ++ student1) +| manyStudents => + // display the array of names + Console.log2("The students are: ", manyStudents) +} +``` +```js +var students = ["Jane", "Harvey", "Patrick"]; + +var len = students.length; + +if (len !== 1) { + if (len !== 0) { + console.log("The students are: ", students); + } else { + console.log("There are no students"); + } +} else { + var student1 = students[0]; + console.log("There's a single student here: " + student1); +} +``` + + + +### Match on List + +Pattern matching on list is similar to array, but with the extra feature of extracting the tail of a list (all elements except the first one): + + + +```res example +let rec printStudents = (students) => { + switch students { + | list{} => () // done + | list{student} => Console.log("Last student: " ++ student) + | list{student1, ...otherStudents} => + Console.log(student1) + printStudents(otherStudents) + } +} +printStudents(list{"Jane", "Harvey", "Patrick"}) +``` +```js +function printStudents(_students) { + while(true) { + var students = _students; + if (!students) { + return; + } + var otherStudents = students.tl; + var student = students.hd; + if (otherStudents) { + console.log(student); + _students = otherStudents; + continue; + } + console.log("Last student: " + student); + return; + }; +} + +printStudents({ + hd: "Jane", + tl: { + hd: "Harvey", + tl: { + hd: "Patrick", + tl: /* [] */0 + } + } +}); +``` + + + + +### Small Pitfall + +**Note**: you can only pass literals (i.e. concrete values) as a pattern, not let-binding names or other things. The following doesn't work as expected: + + + +```res example +let coordinates = (10, 20, 30) +let centerY = 20 +switch coordinates { +| (x, _centerY, _) => Console.log(x) +} +``` +```js +var coordinates = [10, 20, 30]; +var centerY = 20; + +console.log(10); +``` + + + +A first time ReScript user might accidentally write that code, assuming that it's matching on `coordinates` when the second value is of the same value as `centerY`. In reality, this is interpreted as matching on coordinates and assigning the second value of the tuple to the name `centerY`, which isn't what's intended. + +## Exhaustiveness Check + +As if the above features aren't enough, ReScript also provides arguably the most important pattern matching feature: **compile-time check of missing patterns**. + +Let's revisit one of the above examples: + + + +```res +let message = switch person1 { +| Teacher({name: "Mary" | "Joe"}) => + `Hey, still going to the party on Saturday?` +| Student({name, reportCard: {passing: true, gpa}}) => + `Congrats ${name}, nice GPA of ${Float.toString(gpa)} you got there!` +| Student({ + reportCard: {gpa: 0.0}, + status: Vacations(daysLeft) | Sabbatical(daysLeft) + }) => + `Come back in ${Int.toString(daysLeft)} days!` +| Student({status: Sick}) => + `How are you feeling?` +| Student({name}) => + `Good luck next semester ${name}!` +} +``` +```js +if (person1.TAG) { + var match$1 = person1.status; + var name = person1.name; + var match$2 = person1.reportCard; + if (match$2.passing) { + "Congrats " + name + ", nice GPA of " + match$2.gpa.toString() + " you got there!"; + } else if (typeof match$1 === "number") { + if (match$1 !== 0) { + "Good luck next semester " + name + "!"; + } else { + "How are you feeling?"; + } + } else if (person1.reportCard.gpa !== 0.0) { + "Good luck next semester " + name + "!"; + } else { + "Come back in " + match$1._0.toString() + " days!"; + } +} else { + switch (person1.name) { + case "Joe": + case "Mary": + break; + default: + throw { + RE_EXN_ID: "Match_failure", + _1: [ + "playground.res", + 13, + 0 + ], + Error: new Error() + }; + } +} +``` + + + +Did you see what we removed? This time, we've omitted the handling of the case where `person1` is `Teacher({name})` when `name` isn't Mary or Joe. + +Failing to handle every scenario of a value likely constitutes the majority of program bugs out there. This happens very often when you refactor a piece of code someone else wrote. Fortunately for ReScript, the compiler will tell you so: + +``` +Warning 8: this pattern-matching is not exhaustive. +Here is an example of a value that is not matched: +Some({name: ""}) +``` + +**BAM**! You've just erased an entire category of important bugs before you even ran the code. In fact, this is how most of nullable values is handled: + + + +```res example +let myNullableValue = Some(5) + +switch myNullableValue { +| Some(_v) => Console.log("value is present") +| None => Console.log("value is absent") +} +``` +```js +var myNullableValue = 5; + +if (myNullableValue !== undefined) { + console.log("value is present"); +} else { + console.log("value is absent"); +} +``` + + + +If you don't handle the `None` case, the compiler warns. No more `undefined` bugs in your code! + +## Conclusion & Tips & Tricks + +Hopefully you can see how pattern matching is a game changer for writing correct code, through the concise destructuring syntax, the proper conditions handling of `switch`, and the static exhaustiveness check. + +Below is some advice: + +Avoid using the wildcard `_` unnecessarily. Using the wildcard `_` will bypass the compiler's exhaustiveness check. Consequently, the compiler will not be able to notify you of probable errors when you add a new case to a variant. Try only using `_` against infinite possibilities, e.g. string, int, etc. + +Use the `if` clause sparingly. + +**Flatten your pattern-match whenever you can**. This is a real bug remover. Here's a series of examples, from worst to best: + + + +```res example +let optionBoolToBool = opt => { + if opt == None { + false + } else if opt === Some(true) { + true + } else { + false + } +} +``` +```js +function optionBoolToBool(opt) { + if (opt === undefined) { + return false; + } else { + return opt === true; + } +} +``` + + + +Now that's just silly =). Let's turn it into pattern-matching: + + + +```res example +let optionBoolToBool = opt => { + switch opt { + | None => false + | Some(a) => a ? true : false + } +} +``` +```js +function optionBoolToBool(opt) { + if (opt !== undefined && opt) { + return true; + } else { + return false; + } +} +``` + + + +Slightly better, but still nested. Pattern-matching allows you to do this: + + + +```res example +let optionBoolToBool = opt => { + switch opt { + | None => false + | Some(true) => true + | Some(false) => false + } +} +``` +```js +function optionBoolToBool(opt) { + if (opt !== undefined && opt) { + return true; + } else { + return false; + } +} +``` + + + +Much more linear-looking! Now, you might be tempted to do this: + + + +```res example +let optionBoolToBool = opt => { + switch opt { + | Some(true) => true + | _ => false + } +} +``` +```js +function optionBoolToBool(opt) { + if (opt !== undefined && opt) { + return true; + } else { + return false; + } +} +``` + + + +Which is much more concise, but kills the exhaustiveness check mentioned above; refrain from using that. This is the best: + + + +```res example +let optionBoolToBool = opt => { + switch opt { + | Some(trueOrFalse) => trueOrFalse + | None => false + } +} +``` +```js +function optionBoolToBool(opt) { + if (opt !== undefined) { + return opt; + } else { + return false; + } +} +``` + + + +Pretty darn hard to make a mistake in this code at this point! Whenever you'd like to use an if-else with many branches, prefer pattern matching instead. It's more concise and [performant](variant#design-decisions) too. diff --git a/pages/docs/manual/v12.0.0/pipe.mdx b/pages/docs/manual/v12.0.0/pipe.mdx new file mode 100644 index 000000000..c78d33e5b --- /dev/null +++ b/pages/docs/manual/v12.0.0/pipe.mdx @@ -0,0 +1,244 @@ +--- +title: "Pipe" +description: "The Pipe operator (->)" +canonical: "/docs/manual/v12.0.0/pipe" +--- + +# Pipe + +ReScript provides a tiny but surprisingly useful operator `->`, called the "pipe", that allows you to "flip" your code inside-out. `a(b)` becomes `b->a`. It's a simple piece of syntax that doesn't have any runtime cost. + +Why would you use it? Imagine you have the following: + + + +```res +validateAge(getAge(parseData(person))) +``` +```js +validateAge(getAge(parseData(person))); +``` + + + +This is slightly hard to read, since you need to read the code from the innermost part, to the outer parts. Use pipe to streamline it: + + + +```res +person + ->parseData + ->getAge + ->validateAge +``` +```js +validateAge(getAge(parseData(person))); +``` + + + +Basically, `parseData(person)` is transformed into `person->parseData`, and `getAge(person->parseData)` is transformed into `person->parseData->getAge`, etc. + +**This works when the function takes more than one argument too**. + + + +```res +a(one, two, three) +``` +```js +a(one, two, three); +``` + + + +is the same as + + + +```res +one->a(two, three) +``` +```js +a(one, two, three); +``` + + + +This also works with labeled arguments. + +Pipes are used to emulate object-oriented programming. For example, `myStudent.getName` in other languages like Java would be `myStudent->getName` in ReScript (equivalent to `getName(myStudent)`). This allows us to have the readability of OOP without the downside of dragging in a huge class system just to call a function on a piece of data. + +## Tips & Tricks + +Do **not** abuse pipes; they're a means to an end. Inexperienced engineers sometimes shape a library's API to take advantage of the pipe. This is backwards. + +## JS Method Chaining + +_This section requires understanding of [our binding API](bind-to-js-function.md#object-method)_. + +JavaScript's APIs are often attached to objects, and are often chainable, like so: + +```js +const result = [1, 2, 3].map(a => a + 1).filter(a => a % 2 === 0); + +asyncRequest() + .setWaitDuration(4000) + .send(); +``` + +Assuming we don't need the chaining behavior above, we'd bind to each case of this using [`@send`](/syntax-lookup#send-decorator) from the aforementioned binding API page: + + + +```res prelude +type request +@val external asyncRequest: unit => request = "asyncRequest" +@send external setWaitDuration: (request, int) => request = "setWaitDuration" +@send external send: request => unit = "send" +``` +```js +// Empty output +``` + + + +You'd use them like this: + + + +```res example +let result = Array.filter( + Array.map([1, 2, 3], a => a + 1), + a => mod(a, 2) == 0 +) + +send(setWaitDuration(asyncRequest(), 4000)) +``` +```js +var result = [1, 2, 3].map(function(a) { + return a + 1 | 0; +}).filter(function(a) { + return a % 2 === 0; +}); + +asyncRequest().setWaitDuration(4000).send(); +``` + + + +This looks much worse than the JS counterpart! Clean it up visually with pipe: + + + +```res example +let result = [1, 2, 3] + ->Array.map(a => a + 1) + ->Array.filter(a => mod(a, 2) == 0) + +asyncRequest()->setWaitDuration(4000)->send +``` +```js +var result = [1, 2, 3].map(function(a) { + return a + 1 | 0; +}).filter(function(a) { + return a % 2 === 0; +}); + +asyncRequest().setWaitDuration(4000).send(); +``` + + + +## Pipe Into Variants + +You can pipe into a variant's constructor as if it was a function: + + + +```res +let result = name->preprocess->Some +``` +```js +var result = preprocess(name); +``` + + + +We turn this into: + + + +```res +let result = Some(preprocess(name)) +``` +```js +var result = preprocess(name); +``` + + + +**Note** that using a variant constructor as a function wouldn't work anywhere else beside here. + +## Pipe Placeholders + +A placeholder is written as an underscore and it tells ReScript that you want to fill in an argument of a function later. These two have equivalent meaning: + +```res +let addTo7 = (x) => add3(3, x, 4) +let addTo7 = add3(3, _, 4) +``` + +Sometimes you don't want to pipe the value you have into the first position. In these cases you can mark a placeholder value to show which argument you would like to pipe into. + +Let's say you have a function `namePerson`, which takes a `person` then a `name` argument. If you are transforming a person then pipe will work as-is: + + + +```res +makePerson(~age=47) + ->namePerson("Jane") +``` +```js +namePerson(makePerson(47), "Jane"); +``` + + + +If you have a name that you want to apply to a person object, you can use a placeholder: + + + +```res +getName(input) + ->namePerson(personDetails, _) +``` +```js +var __x = getName(input); +namePerson(personDetails, __x); +``` + + + +This allows you to pipe into any positional argument. It also works for named arguments: + + + +```res +getName(input) + ->namePerson(~person=personDetails, ~name=_) +``` +```js +var __x = getName(input); +namePerson(personDetails, __x); +``` + + + +## Triangle Pipe (Deprecated) + +You might see usages of another pipe, `|>`, in some codebases. These are deprecated. + +Unlike `->` pipe, the `|>` pipe puts the subject as the last (not first) argument of the function. `a |> f(b)` turns into `f(b, a)`. + +For a more thorough discussion on the rationale and differences between the two operators, please refer to the [Data-first and Data-last comparison by Javier Chávarri](https://www.javierchavarri.com/data-first-and-data-last-a-comparison/) diff --git a/pages/docs/manual/v10.0.0/covariance-and-contravariance.mdx b/pages/docs/manual/v12.0.0/polymorphic-variant.mdx similarity index 93% rename from pages/docs/manual/v10.0.0/covariance-and-contravariance.mdx rename to pages/docs/manual/v12.0.0/polymorphic-variant.mdx index 72020bf42..f2f2167b5 100644 --- a/pages/docs/manual/v10.0.0/covariance-and-contravariance.mdx +++ b/pages/docs/manual/v12.0.0/polymorphic-variant.mdx @@ -1,12 +1,9 @@ --- -title: "Covariance and Contravariance" -description: "Covariance and Contravariance in ReScript" -canonical: "/docs/manual/latest/covariance-and-contravariance" +title: "Polymorphic Variant" +description: "The Polymorphic Variant data structure in ReScript" +canonical: "/docs/manual/v12.0.0/polymorphic-variant" --- -Links: -- https://blog.janestreet.com/a-and-a/ - # Polymorphic Variant Polymorphic variants (or poly variant) are a cousin of [variant](variant). With these differences: @@ -24,7 +21,9 @@ We provide 3 syntaxes for a poly variant's constructor: ```res -type t<+'a> +let myColor = #red +let myLabel = #"aria-hidden" +let myNumber = #7 ``` ```js @@ -55,9 +54,9 @@ These types can also be inlined, unlike for regular variant: ```res let render = (myColor: [#red | #green | #blue]) => { switch myColor { - | #blue => Js.log("Hello blue!") + | #blue => Console.log("Hello blue!") | #red - | #green => Js.log("Hello other colors") + | #green => Console.log("Hello other colors") } } ``` @@ -83,10 +82,10 @@ type color = [#red | #green | #blue] let render = myColor => { switch myColor { - | #blue => Js.log("Hello blue!") - | #green => Js.log("Hello green!") + | #blue => Console.log("Hello blue!") + | #green => Console.log("Hello green!") // works! - | #yellow => Js.log("Hello yellow!") + | #yellow => Console.log("Hello yellow!") } } ``` @@ -172,9 +171,9 @@ There's also some special [pattern matching](./pattern-matching-destructuring) s // Continuing the previous example above... switch myColor { -| #...blue => Js.log("This blue-ish") -| #...red => Js.log("This red-ish") -| other => Js.log2("Other color than red and blue: ", other) +| #...blue => Console.log("This blue-ish") +| #...red => Console.log("This red-ish") +| other => Console.log2("Other color than red and blue: ", other) } ``` @@ -196,9 +195,9 @@ This is a shorter version of: ```res switch myColor { -| #Sapphire | #Neon | #Navy => Js.log("This is blue-ish") -| #Ruby | #Redwood | #Rust => Js.log("This is red-ish") -| other => Js.log2("Other color than red and blue: ", other) +| #Sapphire | #Neon | #Navy => Console.log("This is blue-ish") +| #Ruby | #Redwood | #Rust => Console.log("This is red-ish") +| other => Console.log2("Other color than red and blue: ", other) } ``` @@ -222,7 +221,7 @@ let displayColor = v => { } } -Js.log(displayColor(myColor)) +Console.log(displayColor(myColor)) ``` ```js @@ -425,8 +424,8 @@ One might think that polymorphic variants are superior to regular [variants](./v let myColor = #red switch myColor { - | #red => Js.log("Hello red!") - | #blue => Js.log("Hello blue!") + | #red => Console.log("Hello red!") + | #blue => Console.log("Hello blue!") } ``` Because there's no poly variant definition, it's hard to know whether the `#blue` case can be safely removed. diff --git a/pages/docs/manual/v12.0.0/primitive-types.mdx b/pages/docs/manual/v12.0.0/primitive-types.mdx new file mode 100644 index 000000000..15d72c1d7 --- /dev/null +++ b/pages/docs/manual/v12.0.0/primitive-types.mdx @@ -0,0 +1,272 @@ +--- +title: "Primitive Types" +description: "Primitive Data Types in ReScript" +canonical: "/docs/manual/v12.0.0/primitive-types" +--- + +# Primitive Types + +ReScript comes with the familiar primitive types like `string`, `int`, `float`, etc. + + + +## String + +ReScript `string`s are delimited using **double** quotes (single quotes are reserved for the character type below). + + + +```res example +let greeting = "Hello world!" +let multilineGreeting = "Hello + world!" +``` +```js +var greeting = "Hello world!"; +var multilineGreeting = "Hello\n world!"; +``` + + + +To concatenate strings, use `++`: + + + +```res example +let greetings = "Hello " ++ "world!" +``` +```js +var greetings = "Hello world!"; +``` + + + +### String Interpolation + +There's a special syntax for string that allows + +- multiline string just like before +- no special character escaping +- Interpolation + + + +```res example +let name = "Joe" + +let greeting = `Hello +World +👋 +${name} +` +``` +```js +var name = "Joe"; + +var greeting = "Hello\nWorld\n👋\n" + name + "\n"; +``` + + + +This is just like JavaScript's backtick string interpolation, except without needing to escape special characters. + +### Usage + +See the familiar `String` API in the [API docs](api/core/string). Since a ReScript string maps to a JavaScript string, you can mix & match the string operations in all standard libraries. + +### Tips & Tricks + +**You have a good type system now!** In an untyped language, you'd often overload the meaning of string by using it as: + +- a unique id: `var BLUE_COLOR = "blue"` +- an identifier into a data structure: `var BLUE = "blue" var RED = "red" var colors = [BLUE, RED]` +- the name of an object field: `person["age"] = 24` +- an enum: `if (audio.canPlayType() === 'probably') {...}` [(ಠ_ಠ)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType#Return_value) +- other crazy patterns you'll soon find horrible, after getting used to ReScript's alternatives. + +The more you overload the poor string type, the less the type system (or a teammate) can help you! ReScript provides concise, fast and maintainable types & data structures alternatives to the use-cases above (e.g. variants, in a later section). + +## Char + +ReScript has a type for a string with a single letter: + + + +```res example +let firstLetterOfAlphabet = 'a' +``` +```js +var firstLetterOfAlphabet = /* "a" */97; +``` + + + +**Note**: Char doesn't support Unicode or UTF-8 and is therefore not recommended. + +To convert a String to a Char, use `String.get("a", 0)`. To convert a Char to a String, use `String.make(1, 'a')`. + +## Regular Expression + +ReScript regular expressions compile cleanly to their JavaScript counterpart: + + + +```res example +let r = %re("/b/g") +``` +```js +var r = /b/g; +``` + + + +A regular expression like the above has the type `Re.t`. The [RegExp](api/core/regexp) module contains the regular expression helpers you have seen in JS. + +## Boolean + +A ReScript boolean has the type `bool` and can be either `true` or `false`. Common operations: + +- `&&`: logical and. +- `||`: logical or. +- `!`: logical not. +- `<=`, `>=`, `<`, `>` +- `==`: structural equal, compares data structures deeply. `(1, 2) == (1, 2)` is `true`. Convenient, but use with caution. +- `===`: referential equal, compares shallowly. `(1, 2) === (1, 2)` is `false`. `let myTuple = (1, 2); myTuple === myTuple` is `true`. +- `!=`: structural unequal. +- `!==`: referential unequal. + +ReScript's `true/false` compiles into a JavaScript `true/false`. + +## Integers + +32-bits, truncated when necessary. We provide the usual operations on them: `+`, `-`, `*`, `/`, etc. See [Int](api/core/int) for helper functions. + +**Be careful when you bind to JavaScript numbers!** Since ReScript integers have a much smaller range than JavaScript numbers, data might get lost when dealing with large numbers. In those cases it’s much safer to bind the numbers as **float**. Be extra mindful of this when binding to JavaScript Dates and their epoch time. + +To improve readability, you may place underscores in the middle of numeric literals such as `1_000_000`. Note that underscores can be placed anywhere within a number, not just every three digits. + +## Floats + +Float requires other operators: `+.`, `-.`, `*.`, `/.`, etc. Like `0.5 +. 0.6`. See [Float](api/core/float) for helper functions. + +As with integers, you may use underscores within literals to improve readability. + +### Int-to-Float Coercion + +`int` values can be coerced to `float` with the `:>` (type coercion) operator. + + + +```res example +let result = (1 :> float) +. 2. +``` +```js +var result = 1 + 2; +``` + + + +## Big Integers (experimental) + +**Since 11.1** + +For values which are too large to be represented by Int or Float, there is the `bigint` primitive type. +We provide the usual operations on them: `+`, `-`, `*`, `/`, etc. See [BigInt](api/core/bigint) for helper functions. + +A `bigint` number is denoted by a trailing `n` like so: `42n`. + +As `bigint` is a different data type than `int`, it's necessary to open the corresponding module to overload the operators. + + + +```res example +open! BigInt + +let a = 9007199254740991n + 9007199254740991n +let b = 2n ** 2n +``` +```js +var a = 9007199254740991n + 9007199254740991n; + +var p = 2n ** 2n; +``` + + + +It also supports all the bitwise operations, except unsigned shift right (`>>>`), which is not supported by JS itself for `bigint`s. + + + +```res example +open! BigInt + +let a = land(1n, 1n) +let b = lor(1n, 1n) +let c = lxor(1n, 1n) +let d = lnot(1n) +let e = lsl(1n, 1n) +let f = asr(1n, 1n) +``` +```js +var Js_bigint = require("./stdlib/js_bigint.js"); + +var a = 1n & 1n; + +var b = 1n | 1n; + +var c = 1n ^ 1n; + +var d = Js_bigint.lnot(1n); + +var e = (1n << 1n); + +var f = (1n >> 1n); +``` + + + +It can also be pattern-matched. + + + +```res example +let bigintValue = 1n + +switch bigintValue { +| 1n => Console.log("Small bigint") +| 100n => Console.log("Larger bigint") +| _ => Console.log("Other bigint") +} +``` +```js +if (1n !== 1n) { + if (1n !== 100n) { + console.log("Other bigint"); + } else { + console.log("Larger bigint"); + } +} else { + console.log("Small bigint"); +} + +var bigintValue = 1n; +``` + + + + +## Unit + +The `unit` type indicates the absence of a specific value. It has only a single value, `()`, which acts as a placeholder when no other value exists or is needed. It compiles to JavaScript's `undefined` and resembles the `void` type in languages such as C++. What's the point of such a type? + +Consider the `Math.random` function. Its type signature is `unit => float`, which means it receives a `unit` as input and calculates a random `float` as output. You use the function like this - `let x = Math.random()`. Notice `()` as the first and only function argument. + +Imagine a simplified `Console.log` function that prints a message. Its type signature is `string => unit` and you'd use it like this `Console.log("Hello!")`. It takes a string as input, prints it, and then returns nothing useful. When `unit` is the output of a function it means the function performs some kind of side-effect. + +## Unknown + +The `unknown` type represents values with contents that are a mystery or are not 100% guaranteed to be what you think they are. It provides type-safety when interacting with data received from an untrusted source. For example, suppose an external function is supposed to return a `string`. It might. But if the documentation is not accurate or the code has bugs, the function could return `null`, an `array`, or something else you weren't expecting. + +The ReScript type system helps you avoid run-time crashes and unpredicatable behavior by preventing you from using `unknown` in places that expect a `string` or `int` or some other type. The ReScript core libraries also provide utility functions to help you inspect `unknown` values and access their contents. In some cases you may need a JSON parsing library to convert `unknown` values to types you can safely use. + +Consider using `unknown` when receiving data from [external JavaScript functions](/docs/manual/next/bind-to-js-function) diff --git a/pages/docs/manual/v12.0.0/project-structure.mdx b/pages/docs/manual/v12.0.0/project-structure.mdx new file mode 100644 index 000000000..82235ef99 --- /dev/null +++ b/pages/docs/manual/v12.0.0/project-structure.mdx @@ -0,0 +1,57 @@ +--- +title: "Project Structure" +description: "Notes on project structure and other rough ReScript guidelines" +canonical: "/docs/manual/v12.0.0/project-structure" +--- + +# Project Structure + +These are the existing, non-codified community practices that are currently propagated through informal agreement. We might remove some of them at one point, and enforce some others. Right now, they're just recommendations for ease of newcomers. + +## File Casing + +Capitalized file names (aka first letter upper-cased). + +**Justification**: Module names can only be capitalized. Newcomers often ask how a file maps to a module, and why `draw.res` maps to the module `Draw`, and sometimes try to refer to a module through uncapitalized identifiers. Using `Draw.res` makes this mapping more straightforward. It also helps certain file names that'd be awkward in uncapitalized form: `uRI.res`. + +## Ignore `.merlin` File + +This is generated by the build system and you should not have to manually edit it. Don't check it into the repo. + +**Justification**: `.merlin` is for editor tooling. The file contains absolute paths, which are also not cross-platform (e.g. Windows paths are different). + +## Folders + +Try not to have too many nested folders. Keep your project flat, and have fewer files (reminder: you can use nested modules). + +**Justification**: The file system is a _tree_, but your code's dependencies are a _graph_. Because of that, any file & folder organization is usually imperfect. While it's still valuable to group related files together in a folder, the time wasted debating & getting decision paralysis over these far outweight their benefits. We'll always recommend you to Get Work Done instead of debating about these issues. + +## Third-party Dependencies + +Keep them to a minimum. + +**Justification**: A compiled, statically typed language cannot model its dependencies easily by muddling along like in a dynamic language, especially when we're still piggy-backing on NPM/Yarn (to reduce learning overhead in the medium-term). Keeping dependencies simple & lean helps reduce possibility of conflicts (e.g. two diamond dependencies, or clashing interfaces). + +## Documentation + +Have them. Spend more effort making them great (examples, pitfalls) and professional rather than _just_ fancy-looking. Do use examples, and avoid using names such as `foo` and `bar`. There's always more concrete names (it's an example, no need to be abstract/generalized just yet. The API docs will do this plentily). For blog posts, don't repeat the docs themselves, describe the _transition_ from old to new, and why (e.g. "it was a component, now it's a function, because ..."). + +**Justification**: It's hard for newcomers to distinguish between a simple/decent library and one that's fancy-looking. For the sake of the community, don't try too hard to one-up each other's libraries. Do spread the words, but use your judgement too. + +## PPX & Other Meta-tools + +Keep them to a minimum. PPX, unless used in renown cases (printer, accessors and serializer/deserializer generation), can cause big learning churn for newcomers; on top of the syntax, semantics, types, build tool & FFI that they already have to learn, learning per-library custom transformations of the code is an extra step. More invasive macros makes the code itself less semantically meaningful too, since the essence would be hiding somewhere else. + +## Paradigm + +Don't abuse overly fancy features. Do leave some breathing room for future APIs but don't over-architect things. + +**Justification**: Simple code helps newcomers understand and potentially contribute to your code. Contributing is the best way for them to learn. The extra help you receive might also surpass the gain of using a slightly more clever language trick. But do try new language tricks in some of more casual projects! You might discover new ways of architecting code. + +## Publishing + +If it's a wrapper for a JS library, don't publish the JS artifacts. If it's a legit library, publish the artifacts in lib/js if you think JS consumers might use it. This is especially the case when you gradually convert a JS lib to ReScript while not breaking existing JS consumers. + +Do put the keywords `"rescript"` in your package.json `keywords` field. This allows us to find the library much more easily for future purposes. + +**Justification**: Be nice to JS consumers of your library. They're your future ReScripters. diff --git a/pages/docs/manual/v12.0.0/promise.mdx b/pages/docs/manual/v12.0.0/promise.mdx new file mode 100644 index 000000000..0c8bc2032 --- /dev/null +++ b/pages/docs/manual/v12.0.0/promise.mdx @@ -0,0 +1,182 @@ +--- +title: "Promises" +description: "JS Promise handling in ReScript" +canonical: "/docs/manual/v12.0.0/promise" +--- + +# Promise + +> **Note:** Starting from ReScript 10.1 and above, we recommend using [async / await](./async-await) when interacting with Promises. + +## `promise` type + +**Since 10.1** + +In ReScript, every JS promise is represented with the globally available `promise<'a>` type. For ReScript versions < 10.1, use its original alias `Js.Promise.t<'a>` instead. + +Here's a usage example in a function signature: + +```resi +// User.resi file + +type user = {name: string} + +let fetchUser: string => promise +``` + +To work with promise values (instead of using `async` / `await`) you may want to use the built-in `Promise` module. + +## Promise + +A builtin module to create, chain and manipulate promises. + +### Creating a promise + +```res +let p1 = Promise.make((resolve, reject) => { + // We use uncurried functions for resolve / reject + // for cleaner JS output without unintended curry calls + resolve("hello world") +}) + +let p2 = Promise.resolve("some value") + +// You can only reject `exn` values for streamlined catch handling +exception MyOwnError(string) +let p3 = Promise.reject(MyOwnError("some rejection")) +``` + +### Access the contents and transform a promise + +```res +let logAsyncMessage = () => { + open Promise + Promise.resolve("hello world") + ->then(msg => { + // then callbacks require the result to be resolved explicitly + resolve("Message: " ++ msg) + }) + ->then(msg => { + Console.log(msg) + + // Even if there is no result, we need to use resolve() to return a promise + resolve() + }) + ->ignore // Requires ignoring due to unhandled return value +} +``` + +For comparison, the `async` / `await` version of the same code would look like this: + +```res +let logAsyncMessage = async () => { + let msg = await Promise.resolve("hello world") + Console.log(`Message: ${msg}`) +} +``` + +Needless to say, the async / await version offers better ergonomics and less opportunities to run into type issues. + +### Handling Rejected Promises + +You can handle a rejected promise using the [`Promise.catch()`](./api/core/promise#value-catch) method, which allows you to catch and manage errors effectively. + +### Run multiple promises in parallel + +In case you want to launch multiple promises in parallel, use `Promise.all`: + + + + +```res +@val +external fetchMessage: string => promise = "global.fetchMessage" + +let logAsyncMessage = async () => { + let messages = await Promise.all([fetchMessage("message1"), fetchMessage("message2")]) + + Console.log(messages->Array.joinWith(", ")) +} +``` + +```js +async function logAsyncMessage(param) { + var messages = await Promise.all([ + global.fetchMessage("message1"), + global.fetchMessage("message2") + ]); + console.log(messages.join(", ")); +} + +export { + logAsyncMessage , +} +``` + + + +## Js.Promise module (legacy - do not use) + +> **Note:** The `Js.Promise` bindings are following the outdated data-last convention from a few years ago. We kept those APIs for backwards compatibility. Either use [`Promise`](api/core/promise) or a third-party promise binding instead. + +ReScript has built-in support for [JavaScript promises](api/js/promise). The 3 functions you generally need are: + +- `Js.Promise.resolve: 'a => Js.Promise.t<'a>` +- `Js.Promise.then_: ('a => Js.Promise.t<'b>, Js.Promise.t<'a>) => Js.Promise.t<'b>` +- `Js.Promise.catch: (Js.Promise.error => Js.Promise.t<'a>, Js.Promise.t<'a>) => Js.Promise.t<'a>` + +Additionally, here's the type signature for creating a promise on the ReScript side: + +```res +Js.Promise.make: ( + ( + ~resolve: (. 'a) => unit, + ~reject: (. exn) => unit + ) => unit +) => Js.Promise.t<'a> +``` + +This type signature means that `make` takes a callback that takes 2 named arguments, `resolve` and `reject`. Both arguments are themselves [uncurried callbacks]( +function.md#uncurried-function) (with a dot). `make` returns the created promise. + +### Usage + +Using the [pipe operator](pipe.md): + + + +```res example +let myPromise = Js.Promise.make((~resolve, ~reject) => resolve(. 2)) + +myPromise->Js.Promise.then_(value => { + Console.log(value) + Js.Promise.resolve(value + 2) +}, _)->Js.Promise.then_(value => { + Console.log(value) + Js.Promise.resolve(value + 3) +}, _)->Js.Promise.catch(err => { + Console.log2("Failure!!", err) + Js.Promise.resolve(-2) +}, _) +``` +```js +var myPromise = new Promise(function (resolve, reject) { + return resolve(2); +}); + +myPromise + .then(function (value) { + console.log(value); + return Promise.resolve((value + 2) | 0); + }) + .then(function (value) { + console.log(value); + return Promise.resolve((value + 3) | 0); + }) + .catch(function (err) { + console.log("Failure!!", err); + return Promise.resolve(-2); + }); +``` + + diff --git a/pages/docs/manual/v12.0.0/record.mdx b/pages/docs/manual/v12.0.0/record.mdx new file mode 100644 index 000000000..0fc821f6e --- /dev/null +++ b/pages/docs/manual/v12.0.0/record.mdx @@ -0,0 +1,557 @@ +--- +title: "Record" +description: "Record types in ReScript" +canonical: "/docs/manual/v12.0.0/record" +--- + +# Record + +Records are like JavaScript objects but: + +- are immutable by default +- have fixed fields (not extensible) + +## Type Declaration + +A record needs a mandatory type declaration: + + + +```res prelude +type person = { + age: int, + name: string, +} +``` +```js +// Empty output +``` + + + +## Creation + +To create a `person` record (declared above): + + + +```res prelude +let me = { + age: 5, + name: "Big ReScript" +} +``` +```js +var me = { + age: 5, + name: "Big ReScript" +}; +``` + + + +When you create a new record value, ReScript tries to find a record type declaration that conforms to the shape of the value. So the `me` value here is inferred as of type `person`. + +The type is found by looking above the `me` value. **Note**: if the type instead resides in another file or module, you need to explicitly indicate which file or module it is: + + + +```res example +// School.res +type person = {age: int, name: string} +``` +```js +// Empty output +``` + + + + + +```res +// Example.res + +let me: School.person = {age: 20, name: "Big ReScript"} +/* or */ +let me2 = {School.age: 20, name: "Big ReScript"} +``` +```js +var me = { + age: 20, + name: "Big ReScript" +}; +var me2 = { + age: 20, + name: "Big ReScript" +}; +``` + + + +In both `me` and `me2` the record definition from `School` is found. The first one, `me` with the regular type annotation, is preferred. + +## Access + +Use the familiar dot notation: + + + +```res example +let name = me.name +``` +```js +var name = "Big ReScript"; +``` + + + +## Immutable Update + +New records can be created from old records with the `...` spread operator. The original record isn't mutated. + + + +```res example +let meNextYear = {...me, age: me.age + 1} +``` +```js +var meNextYear = { + age: 21, + name: "Big ReScript" +}; +``` + + + +**Note**: spread cannot add new fields to the record value, as a record's shape is fixed by its type. + +## Mutable Update + +Record fields can optionally be mutable. This allows you to efficiently update those fields in-place with the `=` operator. + + + +```res example +type person = { + name: string, + mutable age: int +} + +let baby = {name: "Baby ReScript", age: 5} +baby.age = baby.age + 1 // `baby.age` is now 6. Happy birthday! +``` +```js +var baby = { + name: "Baby ReScript", + age: 5 +}; + +baby.age = baby.age + 1 | 0; +``` + + + +Fields not marked with `mutable` in the type declaration cannot be mutated. + +## JavaScript Output + +ReScript records compile to straightforward JavaScript objects; see the various JS output tabs above. + +## Optional Record Fields +ReScript [`v10`](/blog/release-10-0-0#experimental-optional-record-fields) introduced optional record fields. This means that you can define fields that can be omitted when creating the record. It looks like this: + + + +```res example +type person = { + age: int, + name?: string +} +``` +```js +// Empty output +``` + + + +Notice how `name` has a suffixed `?`. That means that the field itself is _optional_. + +### Creation +You can omit any optional fields when creating a record. Not setting an optional field will default the field's value to `None`: + + + +```res example +type person = { + age: int, + name?: string +} + +let me = { + age: 5, + name: "Big ReScript" +} + +let friend = { + age: 7 +} +``` +```js +var me = { + age: 5, + name: "Big ReScript" +}; + +var friend = { + age: 7 +}; +``` + + + +This has consequences for pattern matching, which we'll expand a bit on soon. + +## Immutable Update +Updating an optional field via an immutable update above lets you set that field value without needing to care whether it's optional or not. + + + +```res example +type person = { + age: int, + name?: string +} + +let me = { + age: 123, + name: "Hello" +} + +let withoutName = { + ...me, + name: "New Name" +} +``` +```js +import * as Caml_obj from "./stdlib/caml_obj.js"; + +var me = { + age: 123, + name: "Hello" +}; + +var newrecord = Caml_obj.obj_dup(me); + +newrecord.name = "New Name"; + +var withoutName = newrecord; +``` + + + + +However, if you want to set the field to an optional value, you prefix that value with `?`: + + + +```res example +type person = { + age: int, + name?: string +} + +let me = { + age: 123, + name: "Hello" +} + +let maybeName = Some("My Name") + +let withoutName = { + ...me, + name: ?maybeName +} +``` +```js +import * as Caml_obj from "./stdlib/caml_obj.js"; + +var me = { + age: 123, + name: "Hello" +}; + +var maybeName = "My Name"; + +var newrecord = Caml_obj.obj_dup(me); + +newrecord.name = maybeName; + +var withoutName = newrecord; +``` + + + +You can unset an optional field's value via that same mechanism by setting it to `?None`. + +### Pattern Matching on Optional Fields +[Pattern matching](pattern-matching-destructuring), one of ReScript's most important features, has two caveats when you deal with optional fields. + +When matching on the value directly, it's an `option`. Example: + + + +```res +type person = { + age: int, + name?: string, +} + +let me = { + age: 123, + name: "Hello", +} + +let isRescript = switch me.name { +| Some("ReScript") => true +| Some(_) | None => false +} +``` +```js +var isRescript; + +isRescript = "Hello" === "ReScript" ? true : false; + +var me = { + age: 123, + name: "Hello" +}; +``` + + + +But, when matching on the field as part of the general record structure, it's treated as the underlying, non-optional value: + + + +```res +type person = { + age: int, + name?: string, +} + +let me = { + age: 123, + name: "Hello", +} + +let isRescript = switch me { +| {name: "ReScript"} => true +| _ => false +} + +``` +```js +var isRescript; + +isRescript = "Hello" === "ReScript" ? true : false; + +var me = { + age: 123, + name: "Hello" +}; +``` + + + +Sometimes you _do_ want to know whether the field was set or not. You can tell the pattern matching engine about that by prefixing your option match with `?`, like this: + + + +```res +type person = { + age: int, + name?: string, +} + +let me = { + age: 123, + name: "Hello", +} + +let nameWasSet = switch me { +| {name: ?None} => false +| {name: ?Some(_)} => true +} +``` +```js +var nameWasSet = true; + +var me = { + age: 123, + name: "Hello" +}; +``` + + + +## Record Type Spread + +In ReScript v11, you can now spread one or more record types into a new record type. It looks like this: + +```rescript +type a = { + id: string, + name: string, +} + +type b = { + age: int +} + +type c = { + ...a, + ...b, + active: bool +} +``` + +`type c` will now be: + +```rescript +type c = { + id: string, + name: string, + age: int, + active: bool, +} +``` + +Record type spreads act as a 'copy-paste' mechanism for fields from one or more records into a new record. This operation inlines the fields from the spread records directly into the new record definition, while preserving their original properties, such as whether they are optional or mandatory. It's important to note that duplicate field names are not allowed across the records being spread, even if the fields have the same type. + +## Record Type Coercion + +Record type coercion gives us more flexibility when passing around records in our application code. In other words, we can now coerce a record `a` to be treated as a record `b` at the type level, as long as the original record `a` contains the same set of fields in `b`. Here's an example: + +```rescript +type a = { + name: string, + age: int, +} + +type b = { + name: string, + age: int, +} + +let nameFromB = (b: b) => b.name + +let a: a = { + name: "Name", + age: 35, +} + +let name = nameFromB(a :> b) +``` + +Notice how we _coerced_ the value `a` to type `b` using the coercion operator `:>`. This works because they have the same record fields. This is purely at the type level, and does not involve any runtime operations. + +Additionally, we can also coerce records from `a` to `b` whenever `a` is a super-set of `b` (i.e. `a` containing all the fields of `b`, and more). The same example as above, slightly altered: + +```rescript +type a = { + id: string, + name: string, + age: int, + active: bool, +} + +type b = { + name: string, + age: int, +} + +let nameFromB = (b: b) => b.name + +let a: a = { + id: "1", + name: "Name", + age: 35, + active: true, +} + +let name = nameFromB(a :> b) +``` + +Notice how `a` now has more fields than `b`, but we can still coerce `a` to `b` because `b` has a subset of the fields of `a`. + +In combination with [optional record fields](/docs/manual/next/record#optional-record-fields), one may coerce a mandatory field of an `option` type to an optional field: + +```rescript +type a = { + name: string, + + // mandatory, but explicitly typed as option + age: option, +} + +type b = { + name: string, + // optional field + age?: int, +} + +let nameFromB = (b: b) => b.name + +let a: a = { + name: "Name", + age: Some(35), +} + +let name = nameFromB(a :> b) +``` + +## Tips & Tricks + +### Record Types Are Found By Field Name +With records, you **cannot** say "I'd like this function to take any record type, as long as they have the field `age`". The following **won't work as intended**: + + + +```res +type person = {age: int, name: string} +type monster = {age: int, hasTentacles: bool} + +let getAge = (entity) => entity.age +``` +```js +function getAge(entity) { + return entity.age; +} +``` + + + +Instead, `getAge` will infer that the parameter `entity` must be of type `monster`, the closest record type with the field `age`. The following code's last line fails: + +```res +let kraken = {age: 9999, hasTentacles: true} +let me = {age: 5, name: "Baby ReScript"} + +getAge(kraken) +getAge(me) // type error! +``` + +The type system will complain that `me` is a `person`, and that `getAge` only works on `monster`. If you need such capability, use ReScript objects, described [here](object.md). + +### Optional Fields in Records Can Be Useful for Bindings +Many JavaScript APIs tend to have large configuration objects that can be a bit annoying to model as records, since you previously always needed to specify all record fields when creating a record. + +Optional record fields, introduced in [`v10`](/blog/release-10-0-0#experimental-optional-record-fields), is intended to help with this. Optional fields will let you avoid having to specify all fields, and let you just specify the one's you care about. A significant improvement in ergonomics for bindings and other APIs with for example large configuration objects. + +## Design Decisions + +After reading the constraints in the previous sections, and if you're coming from a dynamic language background, you might be wondering why one would bother with record in the first place instead of straight using object, since the former needs explicit typing and doesn't allow different records with the same field name to be passed to the same function, etc. + +1. The truth is that most of the times in your app, your data's shape is actually fixed, and if it's not, it can potentially be better represented as a combination of variant (introduced next) + record instead. +2. Since a record type is resolved through finding that single explicit type declaration (we call this "nominal typing"), the type error messages end up better than the counterpart ("structural typing", like for tuples). This makes refactoring easier; changing a record type's fields naturally allows the compiler to know that it's still the same record, just misused in some places. Otherwise, under structural typing, it might get hard to tell whether the definition site or the usage site is wrong. + diff --git a/pages/docs/manual/v12.0.0/reserved-keywords.mdx b/pages/docs/manual/v12.0.0/reserved-keywords.mdx new file mode 100644 index 000000000..3d5295cac --- /dev/null +++ b/pages/docs/manual/v12.0.0/reserved-keywords.mdx @@ -0,0 +1,80 @@ +--- +title: "Reserved Keywords" +description: "All reserved keywords in ReScript" +canonical: "/docs/manual/v12.0.0/reserved-keywords" +--- + +# Reserved Keywords + +> **Note**: Some of these words are reserved purely for backward compatibility. +> +> If you _need_ to use one of these names as binding and/or field name, see [Use Illegal Identifier Names](use-illegal-identifier-names.md). + +- `and` +- `as` +- `assert` + + + + + +- `constraint` + + + + +- `else` + + +- `exception` +- `external` + +* `false` +* `for` + + + + +- `if` +- `in` +- `include` + + + +* `lazy` +* `let` + +- `module` +- `mutable` + + + + + + +- `of` +- `open` + + + + + +- `rec` + + + + +- `switch` + + + +- `true` +- `try` +- `type` + + + + +- `when` +- `while` +- `with` diff --git a/pages/docs/manual/v12.0.0/scoped-polymorphic-types.mdx b/pages/docs/manual/v12.0.0/scoped-polymorphic-types.mdx new file mode 100644 index 000000000..e0076f9c6 --- /dev/null +++ b/pages/docs/manual/v12.0.0/scoped-polymorphic-types.mdx @@ -0,0 +1,100 @@ +--- +title: "Scoped Polymorphic Types" +description: "Scoped Polymorphic Types in ReScript" +canonical: "/docs/manual/v12.0.0/scoped-polymorphic-types" +--- + +# Scoped Polymorphic Types + +Scoped Polymorphic Types in ReScript are functions with the capability to handle arguments of any type within a specific scope. This feature is particularly valuable when working with JavaScript APIs, as it allows your functions to accommodate diverse data types while preserving ReScript's strong type checking. + +## Definition and Usage + +Scoped polymorphic types in ReScript offer a flexible and type-safe way to handle diverse data types within specific scopes. This documentation provides an example to illustrate their usage in a JavaScript context. + +### Example: Logging API + +Consider a logging example within a JavaScript context that processes various data types: + +```js +const logger = { + log: (data) => { + if (typeof data === "string") { + /* handle string */ + } else if (typeof data === "number") { + /* handle number */ + } else { + /* handle other types */ + } + }, +}; +``` + +In ReScript, we can bind to this function as a record with a scoped polymorphic function type: + +```res prelude +type logger = { log: 'a. 'a => unit } + +@module("jsAPI") external getLogger: unit => logger = "getLogger" +``` + +The `logger` type represents a record with a single field `log`, which is a scoped polymorphic function type `'a. 'a => unit`. The `'a` indicates a type variable that can be any type within the scope of the `log` function. + +Now, we can utilize the function obtained from `getLogger`: + + + +```res example +let myLogger = getLogger() + +myLogger.log("Hello, ReScript!") +myLogger.log(42) +``` + +```js +var myLogger = JsAPI.getLogger(); + +myLogger.log("Hello, ReScript!"); +myLogger.log(42); +``` + + + +In this example, we create an instance of the logger by calling `getLogger()`, and then we can use the `log` function on the `myLogger` object to handle different data types. + +## Limitations of Normal Polymorphic Types + +Let's consider the same logging example in ReScript, but this time using normal polymorphic types: + +```res +type logger<'a> = { log: 'a => unit} + +@module("jsAPI") external getLogger: unit => logger<'a> = "getLogger" +``` + +In this case, the `logger` type is a simple polymorphic function type `'a => unit`. However, when we attempt to use this type in the same way as before, we encounter an issue: + +```res +let myLogger = getLogger() + +myLogger.log("Hello, ReScript!") +myLogger.log(42) // Type error! +``` + +The problem arises because the type inference in ReScript assigns a concrete type to the `logger` function based on the first usage. In this example, after the first call to `myLogger`, the compiler infers the type `logger` for `myLogger`. Consequently, when we attempt to pass an argument of type `number` in the next line, a type error occurs because it conflicts with the inferred type `logger`. + +In contrast, scoped polymorphic types, such as `'a. 'a => unit`, overcome this limitation by allowing type variables within the scope of the function. They ensure that the type of the argument is preserved consistently within that scope, regardless of the specific value used in the first invocation. + +## Limitations of Scoped Polymorphic Types + +Scoped polymorphic types work only when they are directly applied to let-bindings or record fields (as demonstrated in the logger example above). They can neither be applied to function bodies, nor to separate type definitions: + +```res +exception Abort + +let testExn: 'a. unit => 'a = () => raise(Abort) // Works! + +let testExn2 = (): 'a. 'a = raise(Abort) // Syntax error! +type fn = 'a. 'a => unit // Syntax error! +``` + diff --git a/pages/docs/manual/v12.0.0/shared-data-types.mdx b/pages/docs/manual/v12.0.0/shared-data-types.mdx new file mode 100644 index 000000000..a97914157 --- /dev/null +++ b/pages/docs/manual/v12.0.0/shared-data-types.mdx @@ -0,0 +1,46 @@ +--- +title: "Shared Data Types" +description: "Data types that share runtime presentation between JS and ReScript" +canonical: "/docs/manual/v12.0.0/shared-data-types" +--- + +# Shared Data Types + +ReScript's built-in values of type `string`, `float`, `array` and a few others have a rather interesting property: they compile to the exact same value in JavaScript! + +This means that if you're passing e.g. a ReScript string to the JavaScript side, the JS side can directly use it as a native JS string. It also means that you can import a JS string and pretend it's a native ReScript string. + +Unlike most compiled-to-js languages, in ReScript, **you don't need to write data converters back and forth for most of our values**! + +**Shared, bidirectionally usable types**: + +- String. ReScript strings are JavaScript strings, vice-versa. (Caveat: only our backtick string `` `hello 👋 ${personName}` `` supports unicode and interpolation). +- Float. ReScript floats are JS numbers, vice-versa. +- Array. In addition to the [Array API](api/core/array), we provide our own [Belt.Array](api/belt/array#set) API too. +- Tuple. Compiles to a JS array. You can treat a fixed-sized, heterogenous JS array as ReScript tuple too. +- Boolean. +- Record. Record compiles to JS object. Therefore you can also treat JS objects as records. If they're too dynamic, consider modeling them on the ReScript side as a hashmap/dictionary [`Dict`](api/core/dict) or a ReScript object. +- Object. ReScript objects are JavaScript objects, vice-versa. +- Function. They compile to clean JS functions. +- Module. ReScript files are considered top-level modules, and are compiled to JS files 1 to 1. Nested modules are compiled to JavaScript objects. +- Polymorphic variants. +- Unit. The `unit` type, which has a single value `()`, compiles to `undefined` too. Likewise, you can treat an incoming JS `undefined` as `()` if that's the only value it'll ever be. + +**Types that are slightly different than JS, but that you can still use from JS**: + +- Int. **Ints are 32-bits**! Be careful, you can potentially treat them as JS numbers and vice-versa, but if the number's large, then you better treat JS numbers as floats. For example, we bind to `Date` using `float`s. +- Option. The `option` type's `None` value compiles into JS `undefined`. The `Some` value, e.g. `Some(5)`, compiles to `5`. Likewise, you can treat an incoming JS `undefined` as `None`. **JS `null` isn't handled here**. If your JS value can be `null`, use [Nullable](api/core/nullable) helpers. +- Exception. +- Variant. Check the compiled JavaScript output of variant to see its shape. We don't recommend exporting a ReScript variant for pure JS usage, since they're harder to read as plain JS code, but you can do it. +- List, which is just a regular variant. + +**Non-shared types (aka internal types)**: + +- Character. +- Int64. +- Lazy values. +- Everything else. + +Many of these are stable, which means that you can still serialize/deserialize them as-is without manual conversions. But we discourage actively peeking into their structure otherwise. + +These types require manual conversions if you want to export them for JS consumption. For a seamless JS/TypeScript integration experience, you might want to use [genType](https://github.com/cristianoc/gentype) instead of doing conversions by hand. diff --git a/pages/docs/manual/v12.0.0/tagged-templates.mdx b/pages/docs/manual/v12.0.0/tagged-templates.mdx new file mode 100644 index 000000000..1b569211c --- /dev/null +++ b/pages/docs/manual/v12.0.0/tagged-templates.mdx @@ -0,0 +1,124 @@ +--- +title: "Tagged templates" +description: "Using tagged templates in ReScript" +canonical: "/docs/manual/v12.0.0/tagged-templates" +--- + +# Tagged templates + +**Since 11.1** + +Tagged templates provide a special form of string interpolation, enabling the creation of template literals +where placeholders aren't restricted to strings. Moreover, the resulting output isn't confined solely to +strings either. You can take a look at the [JS documentation +about tagged templates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) +to learn more about them. + +## Define a tag function + +Tag functions in ReScript have the following signature: +```res +let myTagFunction : (array, array<'param>) => 'output +``` +As you can see, you can have any type you want both for the placeholder array and for the output. + +Given how string interpolation works, you'll always have the following invariant: +```res +Array.length(strings) == Array.length(placeholder) + 1 +``` + +Let's say you want to interpolate strings with all kind of builtin types and make it work inside React components, +you can define the following tag function: + + + +```res prelude +type params = + | I(int) + | F(float) + | S(string) + | Bool(bool) + +let s = (strings, parameters) => { + let text = Array.reduceWithIndex(parameters, Array.getUnsafe(strings, 0), ( + acc, + param, + i, + ) => { + let s = Array.getUnsafe(strings, i + 1) + let p = switch param { + | I(i) => Int.toString(i) + | F(f) => Float.toString(f) + | S(s) => s + | Bool(true) => "true" + | Bool(false) => "false" + } + acc ++ p ++ s + }) + React.string(text) +} +``` +```js +import * as Core__Array from "./stdlib/core__Array.js"; + +function s(strings, parameters) { + return Core__Array.reduceWithIndex(parameters, strings[0], (function (acc, param, i) { + var s = strings[i + 1 | 0]; + var p; + switch (param.TAG) { + case "I" : + case "F" : + p = param._0.toString(); + break; + case "S" : + p = param._0; + break; + case "Bool" : + p = param._0 ? "true" : "false"; + break; + + } + return acc + p + s; + })); +} +``` + + + +## Write tagged template literals + +Now that you have defined your tag function, you can use it this way: + + + +```res example +module Greetings = { + @react.component + let make = (~name, ~age) => { +
    {s`hello ${S(name)} you're ${I(age)} year old!`}
    + } +} +``` +```js +function Greetings(props) { + return React.createElement("div", undefined, s([ + "hello ", + " you're ", + " year old!" + ], [ + { + TAG: "S", + _0: props.name + }, + { + TAG: "I", + _0: props.age + } + ])); +} +``` + +
    + +Pretty neat, isn't it? As you can see, it looks like any regular template literal but it accepts placeholders that are not strings +and it outputs something that is not a string either, a `React.element` in this case. \ No newline at end of file diff --git a/pages/docs/manual/v12.0.0/try.mdx b/pages/docs/manual/v12.0.0/try.mdx new file mode 100644 index 000000000..e5d67824c --- /dev/null +++ b/pages/docs/manual/v12.0.0/try.mdx @@ -0,0 +1,9 @@ +--- +title: "Try" +description: "Try ReScript via Command Line" +canonical: "/docs/manual/v12.0.0/try" +--- + +## Try Online + +Our [Playground](/try) lets you try ReScript online, and comes with the [ReScript React bindings](/docs/react/latest/introduction) and the new [ReScript Core](https://github.com/rescript-association/rescript-core) standard library preinstalled. diff --git a/pages/docs/manual/v12.0.0/tuple.mdx b/pages/docs/manual/v12.0.0/tuple.mdx new file mode 100644 index 000000000..27fcc103e --- /dev/null +++ b/pages/docs/manual/v12.0.0/tuple.mdx @@ -0,0 +1,104 @@ +--- +title: "Tuple" +description: "Tuple types and values in ReScript" +canonical: "/docs/manual/v12.0.0/tuple" +--- + +# Tuple + +Tuples are a ReScript-specific data structure that don't exist in JavaScript. They are: + +- immutable +- ordered +- fix-sized at creation time +- heterogeneous (can contain different types of values) + + + +```res example +let ageAndName = (24, "Lil' ReScript") +let my3dCoordinates = (20.0, 30.5, 100.0) +``` +```js +var ageAndName = [24, "Lil' ReScript"]; +var my3dCoordinates = [20.0, 30.5, 100.0]; +``` + + + +Tuples' types can be used in type annotations as well. Tuple types visually resemble tuples values. + + + +```res prelude +let ageAndName: (int, string) = (24, "Lil' ReScript") +// a tuple type alias +type coord3d = (float, float, float) +let my3dCoordinates: coord3d = (20.0, 30.5, 100.0) +``` +```js +var ageAndName = [24, "Lil' ReScript"]; +var my3dCoordinates = [20.0, 30.5, 100.0]; +``` + + +**Note**: there's no tuple of size 1. You'd just use the value itself. + +## Usage + +To get a specific member of a tuple, destructure it: + + + +```res example +let (_, y, _) = my3dCoordinates // now you've retrieved y +``` +```js +var y = 30.5; +``` + + + +The `_` means you're ignoring the indicated members of the tuple. + +Tuples aren't meant to be updated mutatively. You'd create new ones by destructuring the old ones: + + + +```res example +let coordinates1 = (10, 20, 30) +let (c1x, _, _) = coordinates1 +let coordinates2 = (c1x + 50, 20, 30) +``` +```js +var coordinates1 = [10, 20, 30]; +var c1x = 10; +var coordinates2 = [60, 20, 30]; +``` + + + +## Tips & Tricks + +You'd use tuples in handy situations that pass around multiple values without too much ceremony. For example, to return many values: + + + +```res +let getCenterCoordinates = () => { + let x = doSomeOperationsHere() + let y = doSomeMoreOperationsHere() + (x, y) +} +``` +```js +function getCenterCoordinates(param) { + var x = doSomeOperationsHere(undefined); + var y = doSomeMoreOperationsHere(undefined); + return [x, y]; +} +``` + + + +Try to keep the usage of tuple **local**. For data structures that are long-living and passed around often, prefer a **record**, which has named fields. diff --git a/pages/docs/manual/v12.0.0/type.mdx b/pages/docs/manual/v12.0.0/type.mdx new file mode 100644 index 000000000..e0344acbc --- /dev/null +++ b/pages/docs/manual/v12.0.0/type.mdx @@ -0,0 +1,278 @@ +--- +title: "Type" +description: "Types and type definitions in ReScript" +canonical: "/docs/manual/v12.0.0/type" +--- + +# Type + +Types are the highlight of ReScript! They are: +- **Strong**. A type can't change into another type. In JavaScript, your variable's type might change when the code runs (aka at runtime). E.g. a `number` variable might change into a `string` sometimes. This is an anti-feature; it makes the code much harder to understand when reading or debugging. +- **Static**. ReScript types are erased after compilation and don't exist at runtime. Never worry about your types dragging down performance. You don't need type info during runtime; we report all the information (especially all the type errors) during compile time. Catch the bugs earlier! +- **Sound**. This is our biggest differentiator versus many other typed languages that compile to JavaScript. Our type system is guaranteed to **never** be wrong. Most type systems make a guess at the type of a value and show you a type in your editor that's sometime incorrect. We don't do that. We believe that a type system that is sometime incorrect can end up being dangerous due to expectation mismatches. +- **Fast**. Many developers underestimate how much of their project's build time goes into type checking. Our type checker is one of the fastest around. +- **Inferred**. You don't have to write down the types! ReScript can deduce them from their values. Yes, it might seem magical that we can deduce all of your program's types, without incorrectness, without your manual annotation, and do so quickly. Welcome to ReScript =). + +The following sections explore more of our type system. + +## Inference + +This let-binding doesn't contain any written type: + + + +```res example +let score = 10 +let add = (a, b) => a + b +``` +```js +var score = 10; +function add(a, b) { + return a + b | 0; +} +``` + + + +ReScript knows that `score` is an `int`, judging by the value `10`. This is called **inference**. Likewise, it also knows that the `add` function takes 2 `int`s and returns an `int`, judging from the `+` operator, which works on ints. + +## Type Annotation + +But you can also optionally write down the type, aka annotate your value: + + + +```res example +let score: int = 10 +``` +```js +var score = 10; +``` + + + +If the type annotation for `score` doesn't correspond to our inferred type for it, we'll show you an error during compilation time. We **won't** silently assume your type annotation is correct, unlike many other languages. + +You can also wrap any expression in parentheses and annotate it: + + + +```res +let myInt = 5 +let myInt: int = 5 +let myInt = (5: int) + (4: int) +let add = (x: int, y: int) : int => x + y +let drawCircle = (~radius as r: int): circleType => /* code here */ +``` +```js +var myInt = 9; +function add(x, y) { + return x + y | 0; +} +function drawCircle(r) { + /* code here */ +} +``` + + + +Note: in the last line, `(~radius as r: int)` is a labeled argument. More on this in the [function](function.md) page. + +## Type Alias + +You can refer to a type by a different name. They'll be equivalent: + + + +```res example +type scoreType = int +let x: scoreType = 10 +``` +```js +var x = 10; +``` + + + +## Type Parameter (Aka Generic) + +Types can accept parameters, akin to generics in other languages. The parameters' names **need** to start with `'`. + +The use-case of a parameterized type is to kill duplications. Before: + + + +```res example +// this is a tuple of 3 items, explained next +type intCoordinates = (int, int, int) +type floatCoordinates = (float, float, float) + +let a: intCoordinates = (10, 20, 20) +let b: floatCoordinates = (10.5, 20.5, 20.5) +``` +```js +var a = [10, 20, 20]; +var b = [10.5, 20.5, 20.5]; +``` + + + +After: + + + +```res example +type coordinates<'a> = ('a, 'a, 'a) + +let a: coordinates = (10, 20, 20) +let b: coordinates = (10.5, 20.5, 20.5) +``` +```js +var a = [10, 20, 20]; +var b = [10.5, 20.5, 20.5]; +``` + + + +Note that the above codes are just contrived examples for illustration purposes. Since the types are inferred, you could have just written: + + + +```res example +let buddy = (10, 20, 20) +``` +```js +var buddy = [10, 20, 20]; +``` + + + +The type system infers that it's a `(int, int, int)`. Nothing else needed to be written down. + +Type arguments appear in many places. Our `array<'a>` type is such a type that requires a type parameter. + + + +```res example +// inferred as `array` +let greetings = ["hello", "world", "how are you"] +``` +```js +// inferred as `array` +var greetings = ["hello", "world", "how are you"]; +``` + + + +If types didn't accept parameters, the standard library would need to define the types `arrayOfString`, `arrayOfInt`, `arrayOfTuplesOfInt`, etc. That'd be tedious. + +Types can receive many arguments, and be composable. + + + + + +```res example +type result<'a, 'b> = + | Ok('a) + | Error('b) + +type myPayload = {data: string} + +type myPayloadResults<'errorType> = array> + +let payloadResults: myPayloadResults = [ + Ok({data: "hi"}), + Ok({data: "bye"}), + Error("Something wrong happened!") +] +``` +```js +var payloadResults = [ + { + TAG: /* Ok */0, + _0: {data: "hi"} + }, + { + TAG: /* Ok */0, + _0: {data: "bye"} + }, + { + TAG: /* Error */1, + _0: "Something wrong happened!" + } +]; +``` + + + +## Recursive Types + +Just like a function, a type can reference itself within itself using `rec`: + + + +```res example +type rec person = { + name: string, + friends: array +} +``` +```js +// Empty output +``` + + + +## Mutually Recursive Types + +Types can also be _mutually_ recursive through `and`: + + + +```res example +type rec student = {taughtBy: teacher} +and teacher = {students: array} +``` +```js +// Empty output +``` + + + +## Type Escape Hatch + +ReScript's type system is robust and does not allow dangerous, unsafe stuff like implicit type casting, randomly guessing a value's type, etc. However, out of pragmatism, we expose a single escape hatch for you to "lie" to the type system: + + + +```res +external myShadyConversion: myType1 => myType2 = "%identity" +``` +```js +// Empty output +``` + + + +This declaration converts a `myType1` of your choice to `myType2` of your choice. You can use it like so: + + + +```res example +external convertToFloat : int => float = "%identity" +let age = 10 +let gpa = 2.1 +. convertToFloat(age) +``` +```js +var age = 10; +var gpa = 2.1 + 10; +``` + + + +Obviously, do **not** abuse this feature. Use it tastefully when you're working with existing, overly dynamic JS code, for example. + +More on externals [here](external.md). + +**Note**: this particular `external` is the only one that isn't preceded by a `@` [attribute](attribute.md). diff --git a/pages/docs/manual/v12.0.0/typescript-integration.mdx b/pages/docs/manual/v12.0.0/typescript-integration.mdx new file mode 100644 index 000000000..dc5e5489e --- /dev/null +++ b/pages/docs/manual/v12.0.0/typescript-integration.mdx @@ -0,0 +1,283 @@ +--- +title: "TypeScript" +description: "GenType - Interoperability between ReScript and TypeScript" +canonical: "/docs/manual/v12.0.0/typescript-integration" +--- + +# ReScript & TypeScript + +The ReScript compiler includes a code generation tool that lets you export ReScript values and types to use in TypeScript, and import TypeScript values and types into ReScript. It is called "genType". + +The implementation of genType performs a type-directed transformation of ReScript programs after compilation. The transformed programs operate on data types idiomatic to TypeScript. + +For example, a ReScript variant (which is represented as custom objects with tags at runtime): + +```res +@genType +type t = | A(int) | B(string) +``` + +is exported to a TypeScript type: + +```ts +type t = { TAG: "A"; _0: number } | { TAG: "B"; _0: string }; +``` + +## A Quick Example + +Let's assume we are working on a TypeScript codebase and we want to integrate a single ReScript function. + +We want to be able to import the function like any other one in our existing TypeScript code, but we also want to preserve all the ReScript types in the TypeScript type system. + +**That's exactly what genType was made for!** + +First we'll set up a function: + +```res +// src/Color.res + +@genType +type color = + | Red + | Blue + +@genType +let printColorMessage = (~color, ~message) => { + let prefix = switch color { + | Red => "\x1b[91m" + | Blue => "\x1b[94m" + } + let reset = "\x1b[0m" + + Console.log(prefix ++ message ++ reset) +} + +``` + +On a successful compile, `genType` will convert `src/Color.res` to a TypeScript file called `src/Color.gen.tsx` which will look something like this: + +```ts +// src/Color.gen.tsx + +/* TypeScript file generated from Color.res by genType. */ + +/* eslint-disable */ +/* tslint:disable */ + +import * as ColorJS from "./Color.res.js"; + +export type color = "Red" | "Blue"; + +export const printColorMessage: ( + color: color +) => void = ColorJS.printColorMessage as any; +``` + +genType automatically maps the `color` variant to TS via a string union type `"Red" | "Blue"`. + +Within our TypeScript application, we can now import and use the function in the following manner: + +```ts +// src/app.ts + +import { printColorMessage } from "./Color.gen.tsx"; + +printColorMessage("Red", "Hello, genType!"); +``` + +## Exporting an entire module + +_Since ReScript `11.0.0`_ modules can be annotated with `@genType` as well. In that case, all types and values of the module will be converted to TS types. Example: + + + +```res example +@genType +module Size = { + type t = + | Small + | Medium + | Large + + let getNum = (size: t) => + switch size { + | Small => 1. + | Medium => 5. + | Large => 10. + } +} +``` + +```ts +import * as MyCompBS__Es6Import from './MyComp.res'; +const MyCompBS: any = MyCompBS__Es6Import; + +export type Size_t = "Small" | "Medium" | "Large"; + +export const Size_getNum: (size:Size_t) => number = MyCompBS.Size.getNum; + +export const Size: { getNum: (size:Size_t) => number } = MyCompBS.Size +``` + + + +## Setup + +Add a `gentypeconfig` section to your `rescript.json` (See [Configuration](/docs/manual/next/build-configuration#gentypeconfig) for details). + +Every `genType` powered project requires a configuration item `"gentypeconfig"` at top level in the project's `rescript.json`. + +The minimal configuration of genType is following: + +```json +{ + "gentypeconfig": { + "module": "esmodule", + "moduleResolution": "node", + "generatedFileExtension": ".gen.tsx" + } +} +``` + +And don't forget to make sure `allowJs` is set to `true` in the project's `tsconfig.json`: + +```json +{ + "compilerOptions": { + "allowJs": true + } +} +``` + +### TypeScript Module Resolutions + +Make sure to set the same `moduleResolution` value in both `rescript.json` and `tsconfig.json`, so that the output of genType is done with the preferred module resolution. + +For example if the TypeScript project uses JavaScript modules with `Node16` / `NodeNext` module resolution: + +```json +// tsconfig.json +{ + "compilerOptions": { + "moduleResolution": "node16" + } +} +``` + +Then `moduleResolution` in `gentypeconfig` should be same value: + +```json +// rescript.json +{ + "gentypeconfig": { + "moduleResolution": "node16" + } +} +``` + +In case of the TypeScript project using `Bundler` module resolution, `allowImportingTsExtensions` should also be `true`: + +```json +// tsconfig.json +{ + "compilerOptions": { + "moduleResolution": "bundler", + "allowImportingTsExtensions": true + } +} +``` + +```json +// rescript.json +{ + "gentypeconfig": { + "moduleResolution": "bundler" + } +} +``` + +## Testing the Whole Setup + +Open any relevant `*.res` file and add `@genType` annotations to any bindings / values / functions to be used from JavaScript. If an annotated value uses a type, the type must be annotated too. See e.g. [Hooks.res](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/src/Hooks.res). + +Save the file and rebuild the project via `npm run res:build` or similar. You should now see a `*.gen.tsx` file with the same name (e.g. `MyComponent.res` -> `MyComponent.gen.tsx`). + +Any values exported from `MyComponent.res` can then be imported from TypeScript. For example: + +```js +import MyComponent from "./components/MyComponent.gen.tsx"; +``` + +## Experimental features + +These features are for experimentation only. They could be changed/removed any time, and not be considered breaking changes. + +- Export object and record types as interfaces. To activate, add `"exportInterfaces": true` to the configuration. The types are also renamed from `name` to `Iname`. + + +## Shims + +A shim is a TS file that provides user-provided definitions for library types. + +Required only if one needs to export certain basic ReScript data types to JS when one cannot modify the sources to add annotations (e.g. exporting ReScript lists), and if the types are not first-classed in genType. + - Example: `Array` with format: `"RescriptModule=JavaScriptModule"` + +Configure your shim files within `"gentypeconfig"` in your [`rescript.json`]: + +```json +{ + "gentypeconfig": { + "shims": { + "Js": "Js", + "ReactEvent": "ReactEvent", + "RescriptPervasives": "RescriptPervasives", + "ReasonReact": "ReactShim" + }, + }, +} +``` + +and add relevant `.shim.ts` files in a directory which is visible by ReScript e.g. + +``` +├── rescript.json +├── src +│ ├── shims +│ │ ├── Js.shim.ts +│ │ ├── ReactEvent.shim.ts +│ │ └── RescriptPervasives.shim.ts +``` + +Here are some examples: + +```ts +// Excerpt from https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/src/shims/Js.shim.ts +export type Json_t = unknown; +export type t = unknown; +``` + +```ts +// Excerpt from https://github.com/rescript-lang/rescript-compiler/tree/master/jscomp/gentype_tests/typescript-react-example/src/shims +export type inputFocusEvent = React.FocusEvent; +``` + +More complete example shims can be found [here](https://github.com/rescript-lang/rescript-compiler/blob/master/jscomp/gentype_tests/typescript-react-example/src/shims/). + +## Deprecated features + +Features related to generating runtimes were deprecated since v11 and should no longer be used. + +- **`@genType("alias")`** and **`@genType.as("alias")`** +- **`@genType.opaque`** +- **`@genType.import`** +- TypeScript Shims + +genType does not generate anything runtime-related, and in the near future it generates definition files (`*.d.ts`) directly (See the [roadmap](https://github.com/rescript-lang/rescript-compiler/issues/6196)). + +If any runtime code is required for interoperability with JavaScript / TypeScript projects, it can be written by hand, or request a relevant features (e.g. `@deriving`) to the compiler. + +## Limitations + +- **in-source = true**. Currently only supports ReScript projects with [in-source generation](/docs/manual/next/build-configuration#package-specs) and file suffixes that end on `.js`, like `.res.js` or `.bs.js`. + +- **Limited namespace support**. Currently there's limited [namespace](/docs/manual/next/build-configuration#name-namespace) support, and only `namespace:true` is possible, not e.g. `namespace:"custom"`. diff --git a/pages/docs/manual/v12.0.0/use-illegal-identifier-names.mdx b/pages/docs/manual/v12.0.0/use-illegal-identifier-names.mdx new file mode 100644 index 000000000..cfd0e0987 --- /dev/null +++ b/pages/docs/manual/v12.0.0/use-illegal-identifier-names.mdx @@ -0,0 +1,51 @@ +--- +title: "Use Illegal Identifier Names" +description: "Handling (JS) naming collisions in ReScript" +canonical: "/docs/manual/v12.0.0/use-illegal-identifier-names" +--- + +# Use Illegal Identifier Names + +Sometime, for e.g. a let binding or a record field, you might want to use: +- A capitalized name. +- A name that contains illegal characters (e.g. emojis, hyphen, space). +- A name that's one of ReScript's reserved keywords. + +We provide an escape hatch syntax for these cases: + + + +```res example +let \"my-🍎" = 10 + +type element = { + \"aria-label": string +} + +let myElement = { + \"aria-label": "close" +} + +let label = myElement.\"aria-label" + +let calculate = (~\"Props") => { + \"Props" + 1 +} +``` +```js +var my$$unknown$unknown$unknown$unknown = 10; + +var myElement = { + "aria-label": "close" +}; + +var label = myElement["aria-label"]; + +function calculate(Props) { + return Props + 1 | 0; +} +``` + + + +See the output. **Use them only when necessary**, for interop with JavaScript. This is a last-resort feature. If you abuse this, many of the compiler guarantees will go away. diff --git a/pages/docs/manual/v12.0.0/variant.mdx b/pages/docs/manual/v12.0.0/variant.mdx new file mode 100644 index 000000000..b4686173c --- /dev/null +++ b/pages/docs/manual/v12.0.0/variant.mdx @@ -0,0 +1,798 @@ +--- +title: "Variant" +description: "Variant data structures in ReScript" +canonical: "/docs/manual/v12.0.0/variant" +--- + +# Variant + +So far, most of ReScript's data structures might look familiar to you. This section introduces an extremely important, and perhaps unfamiliar, data structure: variant. + +Most data structures in most languages are about "this **and** that". A variant allows us to express "this **or** that". + + + +```res example +type myResponse = + | Yes + | No + | PrettyMuch + +let areYouCrushingIt = Yes +``` +```js +var areYouCrushingIt = "Yes"; +``` + + + +`myResponse` is a variant type with the cases `Yes`, `No` and `PrettyMuch`, which are called "variant constructors" (or "variant tag"). The `|` bar separates each constructor. + +**Note**: a variant's constructors need to be capitalized. + +## Variant Needs an Explicit Definition + +If the variant you're using is in a different file, bring it into scope like you'd do [for a record](record.md#record-needs-an-explicit-definition): + + + +```res example +// Zoo.res +type animal = Dog | Cat | Bird +``` +```js +// Empty output +``` + + + + + +```res +// Example.res +let pet: Zoo.animal = Dog // preferred +// or +let pet2 = Zoo.Dog +``` +```js +var pet = "Dog"; +var pet2 = "Dog"; +``` + + + +## Constructor Arguments + +A variant's constructors can hold extra data separated by comma. + + + +```res prelude +type account = + | None + | Instagram(string) + | Facebook(string, int) +``` +```js +// Empty output +``` + + + +Here, `Instagram` holds a `string`, and `Facebook` holds a `string` and an `int`. Usage: + + + +```res example +let myAccount = Facebook("Josh", 26) +let friendAccount = Instagram("Jenny") +``` +```js +var myAccount = { + TAG: "Facebook", + _0: "Josh", + _1: 26 +}; +var friendAccount = { + TAG: "Instagram", + _0: "Jenny" +}; +``` + + + +### Labeled Variant Payloads (Inline Record) + +If a variant payload has multiple fields, you can use a record-like syntax to label them for better readability: + + + +```res example +type user = + | Number(int) + | Id({name: string, password: string}) + +let me = Id({name: "Joe", password: "123"}) +``` +```js +var me = { + TAG: "Id", + name: "Joe", + password: "123" +}; +``` + + + +This is technically called an "inline record", and only allowed within a variant constructor. You cannot inline a record type declaration anywhere else in ReScript. + +Of course, you can just put a regular record type in a variant too: + + + +```res example +type u = {name: string, password: string} +type user = + | Number(int) + | Id(u) + +let me = Id({name: "Joe", password: "123"}) +``` +```js +var me = { + TAG: "Id", + _0: { + name: "Joe", + password: "123" + } +}; +``` + + + +The output is slightly uglier and less performant than the former. + +## Variant Type Spreads +Just like [with records](record#record-type-spread), it's possible to use type spreads to create new variants from other variants: + +```rescript +type a = One | Two | Three +type b = | ...a | Four | Five +``` + +Type `b` is now: +```rescript +type b = One | Two | Three | Four | Five +``` + +Type spreads act as a 'copy-paste', meaning all constructors are copied as-is from `a` to `b`. Here are the rules for spreads to work: +- You can't overwrite constructors, so the same constructor name can exist in only one place as you spread. This is true even if the constructors are identical. +- All variants and constructors must share the same runtime configuration - `@unboxed`, `@tag`, `@as` and so on. +- You can't spread types in recursive definitions. + +Note that you need a leading `|` if you want to use a spread in the first position of a variant definition. + +### Pattern Matching On Variant + +See the [Pattern Matching/Destructuring](pattern-matching-destructuring) section later. + +## JavaScript Output + +A variant value compiles to 3 possible JavaScript outputs depending on its type declaration: + +- If the variant value is a constructor with no payload, it compiles to a string of the constructor name. Example: `Yes` compiles to `"Yes"`. +- If it's a constructor with a payload, it compiles to an object with the field `TAG` and the field `_0` for the first payload, `_1` for the second payload, etc. The value of `TAG` is the constructor name as string by default, but note that the name of the `TAG` field as well as the string value used for each constructor name [can be customized](#tagged-variants). +- Labeled variant payloads (the inline record trick earlier) compile to an object with the label names instead of `_0`, `_1`, etc. The object will have the `TAG` field as per the previous rule. + +Check the output in these examples: + + + +```res example +type greeting = Hello | Goodbye +let g1 = Hello +let g2 = Goodbye + +type outcome = Good | Error(string) +let o1 = Good +let o2 = Error("oops!") + +type family = Child | Mom(int, string) | Dad (int) +let f1 = Child +let f2 = Mom(30, "Jane") +let f3 = Dad(32) + +type person = Teacher | Student({gpa: float}) +let p1 = Teacher +let p2 = Student({gpa: 99.5}) + +type s = {score: float} +type adventurer = Warrior(s) | Wizard(string) +let a1 = Warrior({score: 10.5}) +let a2 = Wizard("Joe") +``` +```js +var g1 = "Hello"; + +var g2 = "Goodbye"; + +var o1 = "Good"; + +var o2 = { + TAG: "Error", + _0: "oops!" +}; + +var f1 = "Child"; + +var f2 = { + TAG: "Mom", + _0: 30, + _1: "Jane" +}; + +var f3 = { + TAG: "Dad", + _0: 32 +}; + +var p1 = "Teacher"; + +var p2 = { + TAG: "Student", + gpa: 99.5 +}; + +var a1 = { + TAG: "Warrior", + _0: { + score: 10.5 + } +}; + +var a2 = { + TAG: "Wizard", + _0: "Joe" +}; +``` + + + +## Tagged variants + +- The `@tag` attribute lets you customize the discriminator (default: `TAG`). +- `@as` attributes control what each variant case is discriminated on (default: the variant case name as string). + +### Example: Binding to TypeScript enums + +```typescript +// direction.ts +/** Direction of the action. */ +enum Direction { + /** The direction is up. */ + Up = "UP", + + /** The direction is down. */ + Down = "DOWN", + + /** The direction is left. */ + Left = "LEFT", + + /** The direction is right. */ + Right = "RIGHT", +} + +export const myDirection = Direction.Up; +``` + +You can bind to the above enums like so: + +```rescript +/** Direction of the action. */ +type direction = + | /** The direction is up. */ + @as("UP") + Up + + | /** The direction is down. */ + @as("DOWN") + Down + + | /** The direction is left. */ + @as("LEFT") + Left + + | /** The direction is right. */ + @as("RIGHT") + Right + +@module("./direction.js") external myDirection: direction = "myDirection" +``` + +Now, this maps 100% to the TypeScript code, including letting us bring over the documentation strings so we get a nice editor experience. + +### String literals + +The same logic is easily applied to string literals from TypeScript, only here the benefit is even larger, because string literals have the same limitations in TypeScript that polymorphic variants have in ReScript: + +```typescript +// direction.ts +type direction = "UP" | "DOWN" | "LEFT" | "RIGHT"; +``` + +There's no way to attach documentation strings to string literals in TypeScript, and you only get the actual value to interact with. + +### Valid `@as` payloads +Here's a list of everything you can put in the `@as` tag of a variant constructor: +- A string literal: `@as("success")` +- An int: `@as(5)` +- A float: `@as(1.5)` +- True/false: `@as(true)` and `@as(false)` +- Null: `@as(null)` +- Undefined: `@as(undefined)` + +## Untagged variants + +With _untagged variants_ it is possible to mix types together that normally can't be mixed in the ReScript type system, as long as there's a way to discriminate them at runtime. For example, with untagged variants you can represent a heterogenous array: + +```rescript +@unboxed type listItemValue = String(string) | Boolean(bool) | Number(float) + +let myArray = [String("Hello"), Boolean(true), Boolean(false), Number(13.37)] +``` + +Here, each value will be _unboxed_ at runtime. That means that the variant payload will be all that's left, the variant case name wrapping the payload itself will be stripped out and the payload will be all that remains. + +It, therefore, compiles to this JS: + +```javascript +var myArray = ["hello", true, false, 13.37]; +``` + +In the above example, reaching back into the values is as simple as pattern matching on them. + +### Advanced: Unboxing rules +#### No overlap in constructors +A variant can be unboxed if no constructors have overlap in their runtime representation. + +For example, you can't have `String1(string) | String2(string)` in the same unboxed variant, because there's no way for ReScript to know at runtime which of `String1` or `String2` that `string` belongs to, as it could belong to both. +The same goes for two records - even if they have fully different shapes, they're still JavaScript `object` at runtime. + +Don't worry - the compiler will guide you and ensure there's no overlap. + +#### What you can unbox +Here's a list of all possible things you can unbox: +- `string`: `String(string)` +- `float`: `Float(float)`. Note you can only have one of `float` or `int` because JavaScript only has `number` (not actually `int` and `float` like in ReScript) so we can't disambiguate between `float` and `int` at runtime. +- `int`: `Int(int)`. See note above on `float`. +- `bigint`: `BigInt(int)`. **Since 11.1** This is a distinct type from JavaScript's `number` type so you can use it beside either `float` or `int`. +- `bool`: `Boolean(bool)` +- `array<'value>`: `List(array)` +- `('a, 'b, 'c)`: `Tuple((string, int, bool))`. Any size of tuples works, but you can have only one case of array or tuple in a variant. +- `promise<'value>`: `Promise(promise)` +- `Dict.t`: `Object(Dict.t)` +- `Date.t`: `Date(Date.t)`. A JavaScript date. +- `Blob.t`: `Blob(Blob.t)`. A JavaScript blob. +- `File.t`: `File(File.t)`. A JavaScript file. +- `RegExp.t`: `RegExp(RegExp.t)`. A JavaScript regexp instance. + +Again notice that the constructor names can be anything, what matters is what's in the payload. + +> **Under the hood**: Untagged variants uses a combination of JavaScript `typeof` and `instanceof` checks to discern between unboxed constructors at runtime. This means that we could add more things to the list above detailing what can be unboxed, if there are useful enough use cases. + +### Pattern matching on unboxed variants +Pattern matching works the same on unboxed variants as it does on regular variants. In fact, in the perspective of ReScript's type system there's no difference between untagged and tagged variants. You can do virtually the same things with both. That's the beauty of untagged variants - they're just variants to you as a developer. + +Here's an example of pattern matching on an unboxed nullable value that illustrates the above: + +```rescript +module Null = { + @unboxed type t<'a> = Present('a) | @as(null) Null +} + +type userAge = {ageNum: Null.t} + +type rec user = { + name: string, + age: Null.t, + bestFriend: Null.t, +} + +let getBestFriendsAge = user => + switch user.bestFriend { + | Present({age: Present({ageNum: Present(ageNum)})}) => Some(ageNum) + | _ => None + } +``` +No difference to how you'd do with a regular variant. But, the runtime representation is different to a regular variant. + +> Notice how `@as` allows us to say that an untagged variant case should map to a specific underlying _primitive_. `Present` has a type variable, so it can hold any type. And since it's an unboxed type, only the payloads `'a` or `null` will be kept at runtime. That's where the magic comes from. + +### Decoding and encoding JSON idiomatically + +With untagged variants, we have everything we need to define a native JSON type: + +```rescript +@unboxed +type rec json = + | @as(null) Null + | Boolean(bool) + | String(string) + | Number(float) + | Object(Dict.t) + | Array(array) + +let myValidJsonValue = Array([String("Hi"), Number(123.)]) +``` + +Here's an example of how you could write your own JSON decoders easily using the above, leveraging pattern matching: + +```rescript +@unboxed +type rec json = + | @as(null) Null + | Boolean(bool) + | String(string) + | Number(float) + | Object(Dict.t) + | Array(array) + +type rec user = { + name: string, + age: int, + bestFriend: option, +} + +let rec decodeUser = json => + switch json { + | Object(userDict) => + switch ( + userDict->Dict.get("name"), + userDict->Dict.get("age"), + userDict->Dict.get("bestFriend"), + ) { + | (Some(String(name)), Some(Number(age)), Some(maybeBestFriend)) => + Some({ + name, + age: age->Float.toInt, + bestFriend: maybeBestFriend->decodeUser, + }) + | _ => None + } + | _ => None + } + +let decodeUsers = json => + switch json { + | Array(array) => array->Array.map(decodeUser)->Array.keepSome + | _ => [] + } +``` + +Encoding that same structure back into JSON is also easy: + +```rescript +let rec userToJson = user => Object( + Dict.fromArray([ + ("name", String(user.name)), + ("age", Number(user.age->Int.toFloat)), + ( + "bestFriend", + switch user.bestFriend { + | None => Null + | Some(friend) => userToJson(friend) + }, + ), + ]), +) + +let usersToJson = users => Array(users->Array.map(userToJson)) +``` + +This can be extrapolated to many more cases. + +### Advanced: Catch-all Constructors +With untagged variants comes a rather interesting capability - catch-all cases are now possible to encode directly into a variant. + +Let's look at how it works. Imagine you're using a third party API that returns a list of available animals. You could of course model it as a regular `string`, but given that variants can be used as "typed strings", using a variant would give you much more benefit: + + +```rescript +type animal = Dog | Cat | Bird + +type apiResponse = { + animal: animal +} + +let greetAnimal = (animal: animal) => + switch animal { + | Dog => "Wof" + | Cat => "Meow" + | Bird => "Kashiiin" + } +``` +```javascript +``` + + + +This is all fine and good as long as the API returns `"Dog"`, `"Cat"` or `"Bird"` for `animal`. +However, what if the API changes before you have a chance to deploy new code, and can now return `"Turtle"` as well? Your code would break down because the variant `animal` doesn't cover `"Turtle"`. + +So, we'll need to go back to `string`, loosing all of the goodies of using a variant, and then do manual conversion into the `animal` variant from `string`, right? +Well, this used to be the case before, but not anymore! We can leverage untagged variants to bake in handling of unknown values into the variant itself. + +Let's update our type definition first: +```rescript +@unboxed +type animal = Dog | Cat | Bird | UnknownAnimal(string) +``` + +Notice we've added `@unboxed` and the constructor `UnknownAnimal(string)`. Remember how untagged variants work? You remove the constructors and just leave the payloads. This means that the variant above at runtime translates to this (made up) JavaScript type: +``` +type animal = "Dog" | "Cat" | "Bird" | string +``` +So, any string not mapping directly to one of the payloadless constructors will now map to the general `string` case. + +As soon as we've added this, the compiler complains that we now need to handle this additional case in our pattern match as well. Let's fix that: + + +```rescript +@unboxed +type animal = Dog | Cat | Bird | UnknownAnimal(string) + +type apiResponse = { + animal: animal +} + +let greetAnimal = (animal: animal) => + switch animal { + | Dog => "Wof" + | Cat => "Meow" + | Bird => "Kashiiin" + | UnknownAnimal(otherAnimal) => + `I don't know how to greet animal ${otherAnimal}` + } +``` +```javascript +function greetAnimal(animal) { + if (!(animal === "Cat" || animal === "Dog" || animal === "Bird")) { + return "I don't know how to greet animal " + animal; + } + switch (animal) { + case "Dog" : + return "Wof"; + case "Cat" : + return "Meow"; + case "Bird" : + return "Kashiiin"; + + } +} +``` + + +There! Now the external API can change as much as it wants, we'll be forced to write all code that interfaces with `animal` in a safe way that handles all possible cases. All of this baked into the variant definition itself, so no need for labor intensive manual conversion. + +This is useful in any scenario when you use something enum-style that's external and might change. Additionally, it's also useful when something external has a large number of possible values that are known, but where you only care about a subset of them. With a catch-all case you don't need to bind to all of them just because they can happen, you can safely just bind to the ones you care about and let the catch-all case handle the rest. + +## Coercion +In certain situations, variants can be coerced to other variants, or to and from primitives. Coercion is always zero cost. + +### Coercing Variants to Other Variants +You can coerce a variant to another variant if they're identical in runtime representation, and additionally if the variant you're coercing can be represented as the variant you're coercing to. + +Here's an example using [variant type spreads](#variant-type-spreads): +```rescript +type a = One | Two | Three +type b = | ...a | Four | Five + +let one: a = One +let four: b = Four + +// This works because type `b` can always represent type `a` since all of type `a`'s constructors are spread into type `b` +let oneAsTypeB = (one :> b) +``` + +### Coercing Variants to Primitives +Variants that are guaranteed to always be represented by a single primitive at runtime can be coerced to that primitive. + +It works with strings, the default runtime representation of payloadless constructors: +```rescript +// Constructors without payloads are represented as `string` by default +type a = One | Two | Three + +let one: a = One + +// All constructors are strings at runtime, so you can safely coerce it to a string +let oneAsString = (one :> string) +``` + +If you were to configure all of your construtors to be represented as `int` or `float`, you could coerce to those too: +```rescript +type asInt = | @as(1) One | @as(2) Two | @as(3) Three + +let oneInt: asInt = One +let toInt = (oneInt :> int) +``` + +### Advanced: Coercing `string` to Variant +In certain situtations it's possible to coerce a `string` to a variant. This is an advanced technique that you're unlikely to need much, but when you do it's really useful. + +You can coerce a `string` to a variant when: +- Your variant is `@unboxed` +- Your variant has a "catch-all" `string` case + +Let's look at an example: +```rescript +@unboxed +type myEnum = One | Two | Other(string) + +// Other("Other thing") +let asMyEnum = ("Other thing" :> myEnum) + +// One +let asMyEnum = ("One" :> myEnum) +``` + +This works because the variant is unboxed **and** has a catch-all case. So, if you throw a string at this variant that's not representable by the payloadless constructors, like `"One"` or `"Two"`, it'll _always_ end up in `Other(string)`, since that case can represent any `string`. + +## Tips & Tricks + +**Be careful** not to confuse a constructor carrying 2 arguments with a constructor carrying a single tuple argument: + + + +```res example +type account = + | Facebook(string, int) // 2 arguments +type account2 = + | Instagram((string, int)) // 1 argument - happens to be a 2-tuple +``` +```js +// Empty output +``` + + + +### Variants Must Have Constructors + +If you come from an untyped language, you might be tempted to try `type myType = int | string`. This isn't possible in ReScript; you'd have to give each branch a constructor: `type myType = Int(int) | String(string)`. The former looks nice, but causes lots of trouble down the line. + +### Interop with JavaScript + +_This section assumes knowledge about our JavaScript interop. Skip this if you haven't felt the itch to use variants for wrapping JS functions yet_. + +Quite a few JS libraries use functions that can accept many types of arguments. In these cases, it's very tempting to model them as variants. For example, suppose there's a `myLibrary.draw` JS function that takes in either a `number` or a `string`. You might be tempted to bind it like so: + + + +```res example +// reserved for internal usage +@module("myLibrary") external draw : 'a => unit = "draw" + +type animal = + | MyFloat(float) + | MyString(string) + +let betterDraw = (animal) => + switch animal { + | MyFloat(f) => draw(f) + | MyString(s) => draw(s) + } + +betterDraw(MyFloat(1.5)) +``` +```js +var MyLibrary = require("myLibrary"); + +function betterDraw(animal) { + MyLibrary.draw(animal._0); +} + +betterDraw({ + TAG: "MyFloat", + _0: 1.5 + }); +``` + + + +**Try not to do that**, as this generates extra noisy output. Instead, use the `@unboxed` attribute to guide ReScript to generate more efficient code: + + + + +```res example +// reserved for internal usage +@module("myLibrary") external draw : 'a => unit = "draw" + +@unboxed +type animal = + | MyFloat(float) + | MyString(string) + +let betterDraw = (animal) => + switch animal { + | MyFloat(f) => draw(f) + | MyString(s) => draw(s) + } + +betterDraw(MyFloat(1.5)) +``` +```js +var MyLibrary = require("myLibrary"); + +function betterDraw(animal) { + MyLibrary.draw(animal); +} + +MyLibrary.draw(1.5); +``` + + + +Alternatively, define two `external`s that both compile to the same JS call: + + + +```res example +@module("myLibrary") external drawFloat: float => unit = "draw" +@module("myLibrary") external drawString: string => unit = "draw" +``` +```js +// Empty output +``` + + + +ReScript also provides [a few other ways](bind-to-js-function.md#modeling-polymorphic-function) to do this. + +### Variant Types Are Found By Field Name + +Please refer to this [record section](record#tips--tricks). Variants are the same: a function can't accept an arbitrary constructor shared by two different variants. Again, such feature exists; it's called a polymorphic variant. We'll talk about this in the future =). + +## Design Decisions + +Variants, in their many forms (polymorphic variant, open variant, GADT, etc.), are likely _the_ feature of a type system such as ReScript's. The aforementioned `option` variant, for example, obliterates the need for nullable types, a major source of bugs in other languages. Philosophically speaking, a problem is composed of many possible branches/conditions. Mishandling these conditions is the majority of what we call bugs. **A type system doesn't magically eliminate bugs; it points out the unhandled conditions and asks you to cover them**\*. The ability to model "this or that" correctly is crucial. + +For example, some folks wonder how the type system can safely eliminate badly formatted JSON data from propagating into their program. They don't, not by themselves! But if the parser returns the `option` type `None | Some(actualData)`, then you'd have to handle the `None` case explicitly in later call sites. That's all there is. + +Performance-wise, a variant can potentially tremendously speed up your program's logic. Here's a piece of JavaScript: + +```js +let data = 'dog' +if (data === 'dog') { + ... +} else if (data === 'cat') { + ... +} else if (data === 'bird') { + ... +} +``` + +There's a linear amount of branch checking here (`O(n)`). Compare this to using a ReScript variant: + + + +```res example +type animal = Dog | Cat | Bird +let data = Dog +switch data { +| Dog => Console.log("Wof") +| Cat => Console.log("Meow") +| Bird => Console.log("Kashiiin") +} +``` +```js +console.log("Wof"); + +var data = "Dog"; +``` + + + +The compiler sees the variant, then + +1. conceptually turns them into `type animal = "Dog" | "Cat" | "Bird"` +2. compiles `switch` to a constant-time jump table (`O(1)`). diff --git a/pages/docs/manual/v12.0.0/warning-numbers.mdx b/pages/docs/manual/v12.0.0/warning-numbers.mdx new file mode 100644 index 000000000..1b5f37eaf --- /dev/null +++ b/pages/docs/manual/v12.0.0/warning-numbers.mdx @@ -0,0 +1,15 @@ +--- +title: "Warning Numbers" +description: "Available compiler warning numbers in ReScript" +canonical: "/docs/manual/v12.0.0/warning-numbers" +--- + +import { make as WarningTable } from "src/components/WarningTable.mjs"; + +# Warning Numbers + +You can configure which warnings the ReScript compiler generates +[in the build configuration](/docs/manual/next/build-configuration#warnings) or +using the [`@warning()`](/syntax-lookup#expression-warning-decorator) or the [`@@warning()`](/syntax-lookup#module-warning-decorator) decorator. + + diff --git a/pages/docs/latest.js b/pages/docs/v11.0.0.js similarity index 100% rename from pages/docs/latest.js rename to pages/docs/v11.0.0.js diff --git a/pages/docs/v12.0.0.js b/pages/docs/v12.0.0.js new file mode 100644 index 000000000..8762e51e7 --- /dev/null +++ b/pages/docs/v12.0.0.js @@ -0,0 +1,3 @@ +import make from "src/DocsOverview.mjs"; + +export default make; diff --git a/public/_redirects b/public/_redirects index b156785b6..e0e869325 100644 --- a/public/_redirects +++ b/public/_redirects @@ -8,3 +8,6 @@ /docs/gentype/latest/getting-started /docs/manual/latest/typescript-integration 308 /docs/gentype/latest/usage /docs/manual/latest/typescript-integration 308 /docs/gentype/latest/supported-types /docs/manual/latest/typescript-integration 308 + +/docs/manual/latest/:slug* /docs/manual/v11.0.0/:slug* 307 +/docs/manual/next/:slug* /docs/manual/v12.0.0/:slug* 307 diff --git a/scripts/extract-indices.mjs b/scripts/extract-indices.mjs index b70665c41..2b5372020 100644 --- a/scripts/extract-indices.mjs +++ b/scripts/extract-indices.mjs @@ -154,11 +154,8 @@ const extractApiIndex = version => { fs.writeFileSync(DOM_INDEX_FILE, JSON.stringify(domIndex), "utf8"); }; -// extractApiIndex("latest"); +// For versions > 10, please use gendocs.res extractApiIndex("v10.0.0"); extractApiIndex("v9.0.0"); extractApiIndex("v8.0.0"); - - -// v8.0.0 api stuff diff --git a/scripts/extract-tocs.mjs b/scripts/extract-tocs.mjs index c83a57bff..c8e81abc2 100644 --- a/scripts/extract-tocs.mjs +++ b/scripts/extract-tocs.mjs @@ -135,101 +135,18 @@ const createTOC = (result) => { }, {}); }; -const createLatestManualToc = () => { - const MD_DIR = path.join(__dirname, "../pages/docs/manual/latest"); - const SIDEBAR_JSON = path.join( - __dirname, - "../data/sidebar_manual_latest.json" - ); - const TARGET_FILE = path.join( - __dirname, - "../index_data/manual_latest_toc.json" - ); - - const sidebarJson = JSON.parse(fs.readFileSync(SIDEBAR_JSON)); +const createManualToc = (version) => { + const versionNoDot = version.replaceAll(".", ""); + const MD_DIR = path.join(__dirname, `../pages/docs/manual/${version}`); - const FILE_ORDER = Object.values(sidebarJson).reduce((acc, items) => { - return acc.concat(items); - }, []); - - const files = glob.sync(`${MD_DIR}/*.?(js|md?(x))`); - const ordered = orderFiles(files, FILE_ORDER); - - const result = ordered.map((filepath) => processFile(filepath, sidebarJson)); - const toc = createTOC(result); - - fs.writeFileSync(TARGET_FILE, JSON.stringify(toc), "utf8"); -}; - -const createV1000ManualToc = () => { - const MD_DIR = path.join(__dirname, "../pages/docs/manual/v10.0.0"); const SIDEBAR_JSON = path.join( __dirname, - "../data/sidebar_manual_v1000.json" - ); - const TARGET_FILE = path.join( - __dirname, - "../index_data/manual_v1000_toc.json" - ); - - const sidebarJson = JSON.parse(fs.readFileSync(SIDEBAR_JSON)); - - const FILE_ORDER = Object.values(sidebarJson).reduce((acc, items) => { - return acc.concat(items); - }, []); - - const files = glob.sync(`${MD_DIR}/*.?(js|md?(x))`); - const ordered = orderFiles(files, FILE_ORDER); - - const result = ordered.map((filepath) => processFile(filepath, sidebarJson)); - const toc = createTOC(result); - - fs.writeFileSync(TARGET_FILE, JSON.stringify(toc), "utf8"); -}; - -const createReasonCompilerToc = () => { - const MD_DIR = path.join(__dirname, "../pages/docs/reason-compiler/latest"); - const TARGET_FILE = path.join( - __dirname, - "../index_data/reason_compiler_toc.json" + `../data/sidebar_manual_${versionNoDot}.json` ); - const files = glob.sync(`${MD_DIR}/*.md?(x)`); - const result = files.map(processFile); - const toc = createTOC(result); - - fs.writeFileSync(TARGET_FILE, JSON.stringify(toc), "utf8"); -}; - -const createV900ManualToc = () => { - const MD_DIR = path.join(__dirname, "../pages/docs/manual/v9.0.0"); - const SIDEBAR_JSON = path.join(__dirname, "../data/sidebar_manual_v900.json"); const TARGET_FILE = path.join( __dirname, - "../index_data/manual_v900_toc.json" - ); - - const sidebarJson = JSON.parse(fs.readFileSync(SIDEBAR_JSON)); - - const FILE_ORDER = Object.values(sidebarJson).reduce((acc, items) => { - return acc.concat(items); - }, []); - - const files = glob.sync(`${MD_DIR}/*.?(js|md?(x))`); - const ordered = orderFiles(files, FILE_ORDER); - - const result = ordered.map((filepath) => processFile(filepath, sidebarJson)); - const toc = createTOC(result); - - fs.writeFileSync(TARGET_FILE, JSON.stringify(toc), "utf8"); -}; - -const createV800ManualToc = () => { - const MD_DIR = path.join(__dirname, "../pages/docs/manual/v8.0.0"); - const SIDEBAR_JSON = path.join(__dirname, "../data/sidebar_manual_v800.json"); - const TARGET_FILE = path.join( - __dirname, - "../index_data/manual_v800_toc.json" + `../index_data/manual_${versionNoDot}_toc.json` ); const sidebarJson = JSON.parse(fs.readFileSync(SIDEBAR_JSON)); @@ -294,11 +211,25 @@ const createCommunityToc = () => { fs.writeFileSync(TARGET_FILE, JSON.stringify(toc), "utf8"); }; +const createReasonCompilerToc = () => { + const MD_DIR = path.join(__dirname, "../pages/docs/reason-compiler/latest"); + const TARGET_FILE = path.join( + __dirname, + "../index_data/reason_compiler_toc.json" + ); + + const files = glob.sync(`${MD_DIR}/*.md?(x)`); + const result = files.map(processFile); + const toc = createTOC(result); + + fs.writeFileSync(TARGET_FILE, JSON.stringify(toc), "utf8"); +}; + /* const debugToc = () => { const MD_DIR = path.join(__dirname, "../pages/docs/manual/latest"); - const files = glob.sync(`${MD_DIR}/introduction.md?(x)`); + const files = glob.sync(`${MD_DIR}/introduction.md?(x)`); const result = files.map(processFile); const toc = createTOC(result); @@ -309,13 +240,10 @@ const debugToc = () => { debugToc(); */ -// main -createLatestManualToc(); -createV1000ManualToc(); -createV900ManualToc(); -createV800ManualToc(); -createReasonCompilerToc(); -createReactToc("latest"); -createReactToc("v0.10.0"); -createReactToc("v0.11.0"); +let manualVersions = ["v12.0.0", "v11.0.0", "v10.0.0", "v9.0.0", "v8.0.0"]; +let reactManualVersions = ["latest", "v0.10.0", "v0.11.0"]; + +manualVersions.forEach(createManualToc); +reactManualVersions.forEach(createReactToc); createCommunityToc(); +createReasonCompilerToc(); diff --git a/scripts/test-hrefs.mjs b/scripts/test-hrefs.mjs index 1e05fe350..999a0c6fa 100644 --- a/scripts/test-hrefs.mjs +++ b/scripts/test-hrefs.mjs @@ -9,6 +9,7 @@ import unified from "unified"; import markdown from "remark-parse"; import stringify from "remark-stringify"; +import {config} from "dotenv" import glob from "glob"; import path from "path"; import fs from "fs"; @@ -16,6 +17,11 @@ import urlModule from "url"; import { URL } from 'url'; import {getAllPosts, blogPathToSlug} from '../src/common/BlogApi.mjs' +config() + +let latestVersion = process.env.VERSION_LATEST +let nextVersion = process.env.VERSION_NEXT + const pathname = new URL('.', import.meta.url).pathname; const __dirname = process.platform !== 'win32' ? pathname : pathname.substring(1) @@ -120,18 +126,27 @@ const createApiIndexModules = version => { return acc.concat(paths); }, []); - return ["latest/api", ...paths]; + return [`${version}/api`, ...paths]; }; -const apiIndexModules = createApiIndexModules("latest") +const apiIndexModules = [...createApiIndexModules(latestVersion), ...createApiIndexModules(nextVersion)] const testFile = (pageMap, test) => { const filepath = test.filepath; - + // Used for storing failed / ok hrefs const results = []; test.links.forEach(link => { + // Simulate the redirect of "latest" and "next" version aliases. + if (link.url.includes("/manual/latest/")) { + link.url = link.url.replace("/latest/", `/${latestVersion}/`); + } + + if (link.url.includes("/manual/next/")) { + link.url = link.url.replace("/next/", `/${nextVersion}/`); + } + const parsed = urlModule.parse(link.url); // Drops .md / .mdx / .html file extension in pathname section, since UI ignores them @@ -177,7 +192,12 @@ const testFile = (pageMap, test) => { } } - if (resolved.startsWith("/pages/docs/manual/latest/api")) { + + + if ( + resolved.startsWith(`/pages/docs/manual/${latestVersion}/api`) || + resolved.startsWith(`/pages/docs/manual/${nextVersion}/api`) + ) { const pathToModule = resolved.replace("/pages/docs/manual/", ""); const pathExists = apiIndexModules.includes(pathToModule); @@ -259,9 +279,9 @@ const main = () => { const allFiles = pageMapFiles.concat(staticFiles); const pageMap = createPageIndex(allFiles); - + const processedFiles = files.map(processFile); - + const allTested = processedFiles.map(file => testFile(pageMap, file)); const failed = allTested.reduce((acc, test) => { diff --git a/src/ApiDocs.res b/src/ApiDocs.res index 0326e502e..a4140c057 100644 --- a/src/ApiDocs.res +++ b/src/ApiDocs.res @@ -91,10 +91,12 @@ module SidebarTree = { @react.component let make = (~isOpen: bool, ~toggle: unit => unit, ~node: node, ~items: array) => { let router = Next.Router.useRouter() + let url = router.route->Url.parse + let version = url->Url.getVersionString let moduleRoute = Webapi.URL.make("file://" ++ router.asPath).pathname - ->String.replace("/docs/manual/latest/api/", "") + ->String.replace(`/docs/manual/${version}/api/`, "") ->String.split("/") let summaryClassName = "truncate py-1 md:h-auto tracking-tight text-gray-60 font-medium text-14 rounded-sm hover:bg-gray-20 hover:-ml-2 hover:py-1 hover:pl-2 " @@ -164,7 +166,7 @@ module SidebarTree = {
    {React.string(node.name ++ " Module")} {switch url { - | Some({version}) => + | Some(url) => let onChange = evt => { open Url ReactEvent.Form.preventDefault(evt) @@ -177,15 +179,12 @@ module SidebarTree = { ("/" ++ (version ++ ("/" ++ Array.join(url.pagepath, "/"))))) router->Next.Router.push(targetUrl) } - let version = switch version { - | Latest | NoVersion => "latest" - | Version(version) => version - } + let version = url->Url.getVersionString let availableVersions = switch node.name { - | "Core" => [("latest", "v11.0")] + | "Core" => [("latest", "v11.0.0")] | _ => ApiLayout.allApiVersions } - + | None => React.null }}
    @@ -351,10 +350,7 @@ let default = (props: props) => { | _ => React.null } - let version = switch Url.parse(router.asPath).version { - | Latest | NoVersion => "latest" - | Version(v) => v - } + let version = Url.parse(router.asPath)->Url.getVersionString let sidebar = switch props { | Ok({toctree, module_: {items}}) => diff --git a/src/DocsOverview.res b/src/DocsOverview.res index fb83d8568..8a396af32 100644 --- a/src/DocsOverview.res +++ b/src/DocsOverview.res @@ -20,23 +20,14 @@ let default = (~showVersionSelect=true) => { let router = Next.Router.useRouter() let url = router.route->Url.parse - let version = switch url.version { - | Url.Latest => "latest" - | NoVersion => "latest" - | Version(version) => version - } + let version = url->Url.getVersionString - let languageManual = [ - ("Overview", `/docs/manual/${version}/introduction`), - ("Language Features", `/docs/manual/${version}/overview`), - ("JS Interop", `/docs/manual/${version}/embed-raw-javascript`), - ("Build System", `/docs/manual/${version}/build-overview`), - ] + let languageManual = Constants.languageManual(version) let ecosystem = [ ("Package Index", "/packages"), ("rescript-react", "/docs/react/latest/introduction"), - ("GenType", "/docs/manual/latest/typescript-integration"), + ("GenType", `/docs/manual/${version}/typescript-integration`), ("Reanalyze", "https://github.com/rescript-lang/reanalyze"), ] @@ -55,8 +46,14 @@ let default = (~showVersionSelect=true) => { ("/" ++ (version ++ ("/" ++ Array.join(url.pagepath, "/"))))) router->Next.Router.push(targetUrl) } +
    - +
    } else { React.null diff --git a/src/Playground.res b/src/Playground.res index e14932207..5749a1bbc 100644 --- a/src/Playground.res +++ b/src/Playground.res @@ -918,11 +918,11 @@ module Settings = {
    {React.string("ReScript Version")}
    { ReactEvent.Form.preventDefault(evt) let id: string = (evt->ReactEvent.Form.target)["value"] - switch id->CompilerManagerHook.Semver.parse { + switch id->Semver.parse { | Some(v) => onCompilerSelect(v) | None => () } @@ -946,12 +946,7 @@ module Settings = { | [] => React.null | experimentalVersions => let versionByOrder = experimentalVersions->Belt.SortArray.stableSortBy((a, b) => { - let cmp = ({ - CompilerManagerHook.Semver.major: major, - minor, - patch, - preRelease, - }) => { + let cmp = ({Semver.major: major, minor, patch, preRelease}) => { let preRelease = switch preRelease { | Some(preRelease) => switch preRelease { @@ -974,27 +969,23 @@ module Settings = { cmp(b) - cmp(a) }) <> - + {versionByOrder ->Array.map(version => { - let version = CompilerManagerHook.Semver.toString(version) + let version = Semver.toString(version) }) ->React.array} - + }} {switch stableVersions { | [] => React.null | stableVersions => Array.map(stableVersions, version => { - let version = CompilerManagerHook.Semver.toString(version) + let version = Semver.toString(version) @@ -1405,9 +1396,9 @@ let make = (~versions: array) => { let versions = versions - ->Array.filterMap(v => v->CompilerManagerHook.Semver.parse) + ->Array.filterMap(v => v->Semver.parse) ->Belt.SortArray.stableSortBy((a, b) => { - let cmp = ({CompilerManagerHook.Semver.major: major, minor, patch, _}) => { + let cmp = ({Semver.major: major, minor, patch, _}) => { [major, minor, patch] ->Array.map(v => v->Int.toString) ->Array.join("") @@ -1420,7 +1411,7 @@ let make = (~versions: array) => { let lastStableVersion = versions->Array.find(version => version.preRelease->Option.isNone) let initialVersion = switch Dict.get(router.query, "version") { - | Some(version) => version->CompilerManagerHook.Semver.parse + | Some(version) => version->Semver.parse | None => lastStableVersion } diff --git a/src/common/App.res b/src/common/App.res index 136b7fb0c..192736df1 100644 --- a/src/common/App.res +++ b/src/common/App.res @@ -54,18 +54,18 @@ let make = (props: props): React.element => { // landing page | {base: [], pagepath: []} => content // docs routes - | {base: ["docs", "manual"], pagepath, version} => + | {base: ["docs", "manual"], pagepath} => // check if it's an api route {switch pagepath[0] { | Some("api") => - switch version { - | Latest => + switch url->Url.getVersionString { + | ("v11.0.0" | "v12.0.0") as version => switch (Array.length(pagepath), pagepath[1]) { - | (1, _) => content + | (1, _) => content | _ => content } - | Version("v8.0.0") => + | "v8.0.0" => switch (Array.length(pagepath), pagepath[1]) { | (1, _) => content | (2, Some("js")) => content @@ -75,7 +75,7 @@ let make = (props: props): React.element => { | (_, Some("dom")) => content | _ => React.null } - | Version("v9.0.0") => + | "v9.0.0" => switch (Array.length(pagepath), pagepath[1]) { | (1, _) => content | (2, Some("js")) => content @@ -85,7 +85,7 @@ let make = (props: props): React.element => { | (_, Some("dom")) => content | _ => React.null } - | Version("v10.0.0") => + | "v10.0.0" => switch (Array.length(pagepath), pagepath[1]) { | (1, _) => content | (2, Some("js")) => content @@ -98,23 +98,27 @@ let make = (props: props): React.element => { | _ => content } | _ => - switch version { - | Latest => - frontmatter}> - content - - | Version("v8.0.0") => + switch url->Url.getVersionString { + | "v8.0.0" => frontmatter}> content - | Version("v9.0.0") => + | "v9.0.0" => frontmatter}> content - | Version("v10.0.0") => + | "v10.0.0" => frontmatter}> content + | "v11.0.0" => + frontmatter}> + content + + | "v12.0.0" => + frontmatter}> + content + | _ => React.null } }} diff --git a/src/common/CompilerManagerHook.res b/src/common/CompilerManagerHook.res index ddff4b789..2a68805fa 100644 --- a/src/common/CompilerManagerHook.res +++ b/src/common/CompilerManagerHook.res @@ -34,78 +34,6 @@ module LoadScript = { } } -module Semver = { - type preRelease = Alpha(int) | Beta(int) | Dev(int) | Rc(int) - - type t = {major: int, minor: int, patch: int, preRelease: option} - - /** - Takes a `version` string starting with a "v" and ending in major.minor.patch or - major.minor.patch-prerelease.identifier (e.g. "v10.1.0" or "v10.1.0-alpha.2") - */ - let parse = (versionStr: string) => { - let parsePreRelease = str => { - switch str->String.split("-") { - | [_, identifier] => - switch identifier->String.split(".") { - | [name, number] => - switch Int.fromString(number) { - | None => None - | Some(buildIdentifier) => - switch name { - | "dev" => buildIdentifier->Dev->Some - | "beta" => buildIdentifier->Beta->Some - | "alpha" => buildIdentifier->Alpha->Some - | "rc" => buildIdentifier->Rc->Some - | _ => None - } - } - | _ => None - } - | _ => None - } - } - - // Some version contain a suffix. Example: v11.0.0-alpha.5, v11.0.0-beta.1 - let isPrerelease = versionStr->String.search(%re("/-/")) != -1 - - // Get the first part i.e vX.Y.Z - let versionNumber = versionStr->String.split("-")->Array.get(0)->Option.getOr(versionStr) - - switch versionNumber->String.replace("v", "")->String.split(".") { - | [major, minor, patch] => - switch (major->Int.fromString, minor->Int.fromString, patch->Int.fromString) { - | (Some(major), Some(minor), Some(patch)) => - let preReleaseIdentifier = if isPrerelease { - parsePreRelease(versionStr) - } else { - None - } - Some({major, minor, patch, preRelease: preReleaseIdentifier}) - | _ => None - } - | _ => None - } - } - - let toString = ({major, minor, patch, preRelease}) => { - let mainVersion = `v${major->Int.toString}.${minor->Int.toString}.${patch->Int.toString}` - - switch preRelease { - | None => mainVersion - | Some(identifier) => - let identifier = switch identifier { - | Dev(number) => `dev.${number->Int.toString}` - | Alpha(number) => `alpha.${number->Int.toString}` - | Beta(number) => `beta.${number->Int.toString}` - | Rc(number) => `rc.${number->Int.toString}` - } - - `${mainVersion}-${identifier}` - } - } -} - module CdnMeta = { let getCompilerUrl = (version): string => `https://cdn.rescript-lang.org/${Semver.toString(version)}/compiler.js` diff --git a/src/common/CompilerManagerHook.resi b/src/common/CompilerManagerHook.resi index f2880d321..c8c3b4b3e 100644 --- a/src/common/CompilerManagerHook.resi +++ b/src/common/CompilerManagerHook.resi @@ -8,22 +8,6 @@ module FinalResult: { | Nothing } -module Semver: { - type preRelease = - | Alpha(int) - | Beta(int) - | Dev(int) - | Rc(int) - type t = { - major: int, - minor: int, - patch: int, - preRelease: option, - } - let parse: string => option - let toString: t => string -} - type selected = { id: Semver.t, // The id used for loading the compiler bundle (ideally should be the same as compilerVersion) apiVersion: Version.t, // The playground API version in use diff --git a/src/common/Constants.res b/src/common/Constants.res index dd9386857..dac630712 100644 --- a/src/common/Constants.res +++ b/src/common/Constants.res @@ -1,12 +1,33 @@ +type versionMapping = { + latest: string, + next: string, +} + +type versions = { + @as("VERSION_NEXT") next: string, + @as("VERSION_LATEST") latest: string, +} + +@scope("process") external versions: versions = "env" + // This is used for the version dropdown in the manual layouts let allManualVersions = [ - ("latest", "v11"), + (versions.latest, versions.latest->Semver.tryGetMajorString), ("v10.0.0", "v9.1 - v10.1"), ("v9.0.0", "v8.2 - v9.0"), ("v8.0.0", "v6.0 - v8.2"), ] + +let nextVersion = + versions.latest === versions.next + ? None + : Some(versions.next, versions.next->Semver.tryGetMajorString) + let allReactVersions = [("latest", "v0.12.0"), ("v0.11.0", "v0.11.0"), ("v0.10.0", "v0.10.0")] +let dropdownLabelNext = "--- Next ---" +let dropdownLabelReleased = "--- Released ---" + // Used for the DocsOverview and collapsible navigation let languageManual = version => { [ @@ -17,13 +38,6 @@ let languageManual = version => { ] } -let ecosystem = [ - ("Package Index", "/packages"), - ("rescript-react", "/docs/react/latest/introduction"), - ("GenType", "/docs/manual/latest/typescript-integration"), - ("Reanalyze", "https://github.com/rescript-lang/reanalyze"), -] - let tools = [("Syntax Lookup", "/syntax-lookup")] let githubHref = "https://github.com/rescript-lang/rescript" diff --git a/src/common/Semver.res b/src/common/Semver.res new file mode 100644 index 000000000..5c41c873e --- /dev/null +++ b/src/common/Semver.res @@ -0,0 +1,75 @@ +type preRelease = Alpha(int) | Beta(int) | Dev(int) | Rc(int) + +type t = {major: int, minor: int, patch: int, preRelease: option} + +/** + Takes a `version` string starting with a "v" and ending in major.minor.patch or + major.minor.patch-prerelease.identifier (e.g. "v10.1.0" or "v10.1.0-alpha.2") + */ +let parse = (versionStr: string) => { + let parsePreRelease = str => { + switch str->String.split("-") { + | [_, identifier] => + switch identifier->String.split(".") { + | [name, number] => + switch Int.fromString(number) { + | None => None + | Some(buildIdentifier) => + switch name { + | "dev" => buildIdentifier->Dev->Some + | "beta" => buildIdentifier->Beta->Some + | "alpha" => buildIdentifier->Alpha->Some + | "rc" => buildIdentifier->Rc->Some + | _ => None + } + } + | _ => None + } + | _ => None + } + } + + // Some version contain a suffix. Example: v11.0.0-alpha.5, v11.0.0-beta.1 + let isPrerelease = versionStr->String.search(%re("/-/")) != -1 + + // Get the first part i.e vX.Y.Z + let versionNumber = versionStr->String.split("-")->Array.get(0)->Option.getOr(versionStr) + + switch versionNumber->String.replace("v", "")->String.split(".") { + | [major, minor, patch] => + switch (major->Int.fromString, minor->Int.fromString, patch->Int.fromString) { + | (Some(major), Some(minor), Some(patch)) => + let preReleaseIdentifier = if isPrerelease { + parsePreRelease(versionStr) + } else { + None + } + Some({major, minor, patch, preRelease: preReleaseIdentifier}) + | _ => None + } + | _ => None + } +} + +let toString = ({major, minor, patch, preRelease}) => { + let mainVersion = `v${major->Int.toString}.${minor->Int.toString}.${patch->Int.toString}` + + switch preRelease { + | None => mainVersion + | Some(identifier) => + let identifier = switch identifier { + | Dev(number) => `dev.${number->Int.toString}` + | Alpha(number) => `alpha.${number->Int.toString}` + | Beta(number) => `beta.${number->Int.toString}` + | Rc(number) => `rc.${number->Int.toString}` + } + + `${mainVersion}-${identifier}` + } +} + +let tryGetMajorString = (versionStr: string) => + switch versionStr->parse { + | None => versionStr // fallback to given version if it cannot be parsed + | Some({major}) => "v" ++ major->Int.toString + } diff --git a/src/common/Semver.resi b/src/common/Semver.resi new file mode 100644 index 000000000..f49e4c0b6 --- /dev/null +++ b/src/common/Semver.resi @@ -0,0 +1,18 @@ +type preRelease = + | Alpha(int) + | Beta(int) + | Dev(int) + | Rc(int) + +type t = { + major: int, + minor: int, + patch: int, + preRelease: option, +} + +let parse: string => option + +let toString: t => string + +let tryGetMajorString: string => string diff --git a/src/common/Url.res b/src/common/Url.res index dfa46b0ed..1ae8f177b 100644 --- a/src/common/Url.res +++ b/src/common/Url.res @@ -1,5 +1,6 @@ type version = | Latest + | Next | NoVersion | Version(string) @@ -57,14 +58,15 @@ let prettyString = (str: string) => { let parse = (route: string): t => { let fullpath = route->String.split("/")->Array.filter(s => s !== "") let foundVersionIndex = Array.findIndex(fullpath, chunk => { - Re.test(%re(`/latest|v\d+(\.\d+)?(\.\d+)?/`), chunk) + Re.test(%re(`/latest|next|v\d+(\.\d+)?(\.\d+)?/`), chunk) }) let (version, base, pagepath) = if foundVersionIndex == -1 { (NoVersion, fullpath, []) } else { let version = switch fullpath[foundVersionIndex] { - | Some("latest") => Latest + | Some(version) if version === Constants.versions.next => Next + | Some(version) if version === Constants.versions.latest => Latest | Some(v) => Version(v) | None => NoVersion } @@ -77,3 +79,10 @@ let parse = (route: string): t => { {fullpath, base, version, pagepath} } + +let getVersionString = url => + switch url.version { + | Next => Constants.versions.next + | Latest | NoVersion => Constants.versions.latest + | Version(version) => version + } diff --git a/src/common/Url.resi b/src/common/Url.resi index 91343406b..57d1de25e 100644 --- a/src/common/Url.resi +++ b/src/common/Url.resi @@ -1,5 +1,6 @@ type version = | Latest + | Next | NoVersion | Version(string) @@ -19,3 +20,5 @@ type breadcrumb = { let parse: string => t let prettyString: string => string + +let getVersionString: t => string diff --git a/src/components/Navigation.res b/src/components/Navigation.res index e3ac14a0a..56bb11362 100644 --- a/src/components/Navigation.res +++ b/src/components/Navigation.res @@ -148,15 +148,10 @@ module DocsSection = { let router = Next.Router.useRouter() let url = router.route->Url.parse - let (version, setVersion) = React.useState(_ => - switch url.version { - | Url.Latest => "latest" - | NoVersion => "latest" - | Version(version) => version - } - ) + let (version, setVersion) = React.useState(_ => url->Url.getVersionString) let languageManual = Constants.languageManual(version) + let documentation = [ { imgSrc: "/static/ic_manual@2x.png", @@ -186,7 +181,7 @@ module DocsSection = { imgSrc: "/static/ic_gentype@2x.png", title: "GenType", description: "Seamless TypeScript integration", - href: "/docs/manual/latest/typescript-integration", + href: `/docs/manual/${version}/typescript-integration`, isActive: url => { switch url.fullpath { | ["docs", "manual", _, "typescript-integration"] => true @@ -334,14 +329,21 @@ module DocsSection = {
    - {switch version { - | "latest" => + {if version === Constants.versions.next { + + {React.string("This docs version is work in progress!")} + + } else if version === Constants.versions.latest { {React.string("This is the latest docs version")} - | _ => React.null + } else { + React.null }}
    @@ -418,11 +420,13 @@ let make = (~fixed=true, ~isOverlayOpen: bool, ~setOverlayOpen: (bool => bool) = let minWidth = "20rem" let router = Next.Router.useRouter() let route = router.route + let url = router.route->Url.parse + let version = url->Url.getVersionString let (collapsibles, setCollapsibles) = React.useState(_ => [ { title: "Docs", - href: "/docs/manual/latest/api", + href: `/docs/manual/${version}/api`, isActiveRoute: route => { let url = Url.parse(route) switch url { @@ -533,7 +537,7 @@ let make = (~fixed=true, ~isOverlayOpen: bool, ~setOverlayOpen: (bool => bool) = className="flex ml-10 space-x-5 w-full max-w-320" style={ReactDOMStyle.make(~maxWidth="26rem", ())}> {collapsibleElements->React.array} - + {React.string("API")} { let (state, setState) = React.useState(_ => Inactive) let router = Next.Router.useRouter() - let version = switch Url.parse(router.route).version { - | Version(v) => v - | _ => "latest" - } + let version = Url.parse(router.route)->Url.getVersionString let handleCloseModal = () => { let () = switch ReactDOM.querySelector(".DocSearch-Modal") { diff --git a/src/components/VersionSelect.res b/src/components/VersionSelect.res index a10c20bec..696f064a9 100644 --- a/src/components/VersionSelect.res +++ b/src/components/VersionSelect.res @@ -1,7 +1,17 @@ +module SectionHeader = { + @react.component + let make = (~value) => + +} + @react.component -let make = (~onChange, ~version: string, ~availableVersions: array<(string, string)>) => { +let make = ( + ~onChange, + ~version: string, + ~nextVersion: option<(string, string)>=?, + ~availableVersions: array<(string, string)>, +) => { // array<(version, label)> - let children = Array.map(availableVersions, ((ver, label)) => { }) @@ -10,6 +20,15 @@ let make = (~onChange, ~version: string, ~availableVersions: array<(string, stri name="versionSelection" value=version onChange> + {switch nextVersion { + | None => React.null + | Some((value, label)) => + <> + + + + + }} {React.array(children)} } diff --git a/src/components/VersionSelect.resi b/src/components/VersionSelect.resi index dddf92b43..f6a4b0728 100644 --- a/src/components/VersionSelect.resi +++ b/src/components/VersionSelect.resi @@ -1,6 +1,12 @@ +module SectionHeader: { + @react.component + let make: (~value: string) => React.element +} + @react.component let make: ( ~onChange: ReactEvent.Form.t => unit, ~version: string, + ~nextVersion: (string, string)=?, ~availableVersions: array<(string, string)>, ) => React.element diff --git a/src/layouts/ApiLayout.res b/src/layouts/ApiLayout.res index ecbda46da..add865201 100644 --- a/src/layouts/ApiLayout.res +++ b/src/layouts/ApiLayout.res @@ -113,7 +113,9 @@ let make = ( ("/" ++ (version ++ ("/" ++ Array.join(url.pagepath, "/"))))) router->Next.Router.push(targetUrl) } - + | None => React.null }}
  • diff --git a/src/layouts/ApiOverviewLayout.res b/src/layouts/ApiOverviewLayout.res index a14dd21c7..df5a626f6 100644 --- a/src/layouts/ApiOverviewLayout.res +++ b/src/layouts/ApiOverviewLayout.res @@ -1,45 +1,34 @@ module Sidebar = SidebarLayout.Sidebar -let categories: array = [ +let makeCategories: string => array = version => [ { name: "Introduction", - items: [{name: "Overview", href: "/docs/manual/latest/api"}], + items: [{name: "Overview", href: `/docs/manual/${version}/api`}], }, { name: "Standard Library", - items: [{name: "Core", href: "/docs/manual/latest/api/core"}], + items: [{name: "Core", href: `/docs/manual/${version}/api/core`}], }, { name: "Additional Libraries", items: [ - {name: "Belt", href: "/docs/manual/latest/api/belt"}, - {name: "Dom", href: "/docs/manual/latest/api/dom"}, + {name: "Belt", href: `/docs/manual/${version}/api/belt`}, + {name: "Dom", href: `/docs/manual/${version}/api/dom`}, ], }, { name: "Legacy Modules", - items: [{name: "Js", href: "/docs/manual/latest/api/js"}], + items: [{name: "Js", href: `/docs/manual/${version}/api/js`}], }, ] /* Used for API docs (structured data) */ module Docs = { @react.component - let make = (~components=ApiMarkdown.default, ~children) => { + let make = (~version, ~components=ApiMarkdown.default, ~children) => { let title = "API" - let version = "latest" + let categories = makeCategories(version) children } } - -/* - This layout is used for structured prose text with proper H2 headings. - We cannot really use the same layout as with the Docs module, since they - have different semantic styling and do things such as hiding the text - of H2 nodes. - */ -/* module Prose = { */ -/* @react.component */ -/* let make = (~children) => children */ -/* } */ diff --git a/src/layouts/ApiOverviewLayout.resi b/src/layouts/ApiOverviewLayout.resi index 44164d31e..d1c469d45 100644 --- a/src/layouts/ApiOverviewLayout.resi +++ b/src/layouts/ApiOverviewLayout.resi @@ -1,4 +1,8 @@ module Docs: { @react.component - let make: (~components: MarkdownComponents.t=?, ~children: React.element) => React.element + let make: ( + ~version: string, + ~components: MarkdownComponents.t=?, + ~children: React.element, + ) => React.element } diff --git a/src/layouts/BeltDocsLayout10_0_0.res b/src/layouts/BeltDocsLayout10_0_0.res index ab1301fa9..1a3e94d6a 100644 --- a/src/layouts/BeltDocsLayout10_0_0.res +++ b/src/layouts/BeltDocsLayout10_0_0.res @@ -122,11 +122,7 @@ module Docs = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = { open Url diff --git a/src/layouts/BeltDocsLayout8_0_0.res b/src/layouts/BeltDocsLayout8_0_0.res index 32a53b5a7..614adad86 100644 --- a/src/layouts/BeltDocsLayout8_0_0.res +++ b/src/layouts/BeltDocsLayout8_0_0.res @@ -149,11 +149,7 @@ module Docs = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = { open Url diff --git a/src/layouts/BeltDocsLayout9_0_0.res b/src/layouts/BeltDocsLayout9_0_0.res index 71df69ca1..c40eb5a4c 100644 --- a/src/layouts/BeltDocsLayout9_0_0.res +++ b/src/layouts/BeltDocsLayout9_0_0.res @@ -122,11 +122,7 @@ module Docs = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = { open Url diff --git a/src/layouts/DocsLayout.res b/src/layouts/DocsLayout.res index d66ddc43c..ffdd2b501 100644 --- a/src/layouts/DocsLayout.res +++ b/src/layouts/DocsLayout.res @@ -54,6 +54,7 @@ let make = ( ~frontmatter=?, ~version: option=?, ~availableVersions: option>=?, + ~nextVersion: option<(string, string)>=?, ~activeToc: option=?, ~categories: array, ~components=MarkdownComponents.default, @@ -102,7 +103,7 @@ let make = ( ("/" ++ (version ++ ("/" ++ Array.join(url.pagepath, "/"))))) router->Next.Router.push(targetUrl) } - + | None => {React.string(version)} } | None => React.null @@ -215,9 +216,7 @@ module Make = (Content: StaticContent) => { Array.push(arr, next)->ignore acc->Dict.set(category, arr) } - | None => - Console.log2("has NO category", next) - () + | None => Console.log2("has NO category", next) } acc }) @@ -240,6 +239,7 @@ module Make = (Content: StaticContent) => { ?frontmatter, ?version, ?availableVersions, + nextVersion: ?Constants.nextVersion, ?activeToc, categories, ?components, diff --git a/src/layouts/DocsLayout.resi b/src/layouts/DocsLayout.resi index f02706e2a..626611a22 100644 --- a/src/layouts/DocsLayout.resi +++ b/src/layouts/DocsLayout.resi @@ -9,6 +9,7 @@ let make: ( ~frontmatter: JSON.t=?, ~version: string=?, ~availableVersions: array<(string, string)>=?, + ~nextVersion: (string, string)=?, ~activeToc: SidebarLayout.Toc.t=?, ~categories: array, ~components: MarkdownComponents.t=?, diff --git a/src/layouts/DomDocsLayout10_0_0.res b/src/layouts/DomDocsLayout10_0_0.res index a6bd3743b..73bd5a4c0 100644 --- a/src/layouts/DomDocsLayout10_0_0.res +++ b/src/layouts/DomDocsLayout10_0_0.res @@ -58,11 +58,7 @@ module Docs = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = { open Url diff --git a/src/layouts/DomDocsLayout8_0_0.res b/src/layouts/DomDocsLayout8_0_0.res index c0155d85f..259dcbb88 100644 --- a/src/layouts/DomDocsLayout8_0_0.res +++ b/src/layouts/DomDocsLayout8_0_0.res @@ -58,11 +58,7 @@ module Docs = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = { open Url diff --git a/src/layouts/DomDocsLayout9_0_0.res b/src/layouts/DomDocsLayout9_0_0.res index 75baff1f8..79827dc7d 100644 --- a/src/layouts/DomDocsLayout9_0_0.res +++ b/src/layouts/DomDocsLayout9_0_0.res @@ -58,11 +58,7 @@ module Docs = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = { open Url diff --git a/src/layouts/JsDocsLayout10_0_0.res b/src/layouts/JsDocsLayout10_0_0.res index 5ac403eed..d44dbf21c 100644 --- a/src/layouts/JsDocsLayout10_0_0.res +++ b/src/layouts/JsDocsLayout10_0_0.res @@ -166,11 +166,7 @@ module Docs = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = { open Url diff --git a/src/layouts/JsDocsLayout8_0_0.res b/src/layouts/JsDocsLayout8_0_0.res index 33521843c..31681f9bc 100644 --- a/src/layouts/JsDocsLayout8_0_0.res +++ b/src/layouts/JsDocsLayout8_0_0.res @@ -172,11 +172,7 @@ module Docs = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = { open Url diff --git a/src/layouts/JsDocsLayout9_0_0.res b/src/layouts/JsDocsLayout9_0_0.res index aa95c1ce1..cb766f6e9 100644 --- a/src/layouts/JsDocsLayout9_0_0.res +++ b/src/layouts/JsDocsLayout9_0_0.res @@ -172,11 +172,7 @@ module Docs = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = { open Url diff --git a/src/layouts/ManualDocsLayout.res b/src/layouts/ManualDocsLayout.res index fcdeaf6be..9912f4bfe 100644 --- a/src/layouts/ManualDocsLayout.res +++ b/src/layouts/ManualDocsLayout.res @@ -1,8 +1,3 @@ -module LatestLayout = DocsLayout.Make({ - // Structure defined by `scripts/extract-tocs.js` - @module("index_data/manual_latest_toc.json") external tocData: SidebarLayout.Toc.raw = "default" -}) - module V800Layout = DocsLayout.Make({ // Structure defined by `scripts/extract-tocs.js` @module("index_data/manual_v800_toc.json") external tocData: SidebarLayout.Toc.raw = "default" @@ -18,38 +13,76 @@ module V1000Layout = DocsLayout.Make({ @module("index_data/manual_v1000_toc.json") external tocData: SidebarLayout.Toc.raw = "default" }) -module Latest = { +module V1100Layout = DocsLayout.Make({ + // Structure defined by `scripts/extract-tocs.js` + @module("index_data/manual_v1100_toc.json") external tocData: SidebarLayout.Toc.raw = "default" +}) + +module V1200Layout = DocsLayout.Make({ + // Structure defined by `scripts/extract-tocs.js` + @module("index_data/manual_v1200_toc.json") external tocData: SidebarLayout.Toc.raw = "default" +}) + +module V1200 = { @react.component let make = (~frontmatter=?, ~components=MarkdownComponents.default, ~children) => { + let title = "Language Manual" let router = Next.Router.useRouter() - let route = router.route + let url = router.route->Url.parse + let version = url->Url.getVersionString - let url = route->Url.parse - - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" + let breadcrumbs = list{ + {Url.name: "Docs", href: "/docs/" ++ version}, + {Url.name: "Language Manual", href: "/docs/manual/" ++ (version ++ "/introduction")}, } - let breadcrumbs = list{ - { - open Url - {name: "Docs", href: "/docs/" ++ version} - }, - { - open Url - { - name: "Language Manual", - href: "/docs/manual/" ++ (version ++ "/introduction"), - } - }, + let warnBanner = { + open Markdown + + let v11Url = + "/" ++ (Array.join(url.base, "/") ++ ("/v11.0.0/" ++ Array.join(url.pagepath, "/"))) + +
    + +

    + {React.string( + "You are currently looking at the v12 docs, which are still a work in progress. If you miss anything, you may find it in the older v11 docs ", + )} + {React.string("here")} + {React.string(".")} +

    +
    +
    } + + {version === Constants.versions.next ? warnBanner : React.null} + children + + } +} + +module V1100 = { + @react.component + let make = (~frontmatter=?, ~components=MarkdownComponents.default, ~children) => { let title = "Language Manual" - let version = "latest" + let router = Next.Router.useRouter() + let version = router.route->Url.parse->Url.getVersionString + + let breadcrumbs = list{ + {Url.name: "Docs", href: "/docs/" ++ version}, + {Url.name: "Language Manual", href: "/docs/manual/" ++ (version ++ "/introduction")}, + } - children - + } } @@ -71,11 +104,7 @@ module V1000 = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let breadcrumbs = list{ { @@ -119,11 +148,7 @@ module V900 = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let breadcrumbs = list{ { @@ -163,11 +188,7 @@ module V800 = { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let breadcrumbs = list{ { diff --git a/src/layouts/ReactDocsLayout.res b/src/layouts/ReactDocsLayout.res index 3f8d3bdc1..7beb45d75 100644 --- a/src/layouts/ReactDocsLayout.res +++ b/src/layouts/ReactDocsLayout.res @@ -24,27 +24,12 @@ module Latest = { let make = (~frontmatter=?, ~components=MarkdownComponents.default, ~children) => { let router = Next.Router.useRouter() let route = router.route - let url = route->Url.parse - - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let breadcrumbs = list{ - { - open Url - {name: "Docs", href: "/docs/latest"} - }, - { - open Url - { - name: "rescript-react", - href: "/docs/react/" ++ (version ++ "/introduction"), - } - }, + {Url.name: "Docs", href: "/docs/latest"}, + {name: "rescript-react", href: "/docs/react/" ++ (version ++ "/introduction")}, } let title = "rescript-react" @@ -69,27 +54,12 @@ module V0110 = { let make = (~frontmatter=?, ~components=MarkdownComponents.default, ~children) => { let router = Next.Router.useRouter() let route = router.route - let url = route->Url.parse - - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let breadcrumbs = list{ - { - open Url - {name: "Docs", href: "/docs/latest"} - }, - { - open Url - { - name: "rescript-react", - href: "/docs/react/" ++ (version ++ "/introduction"), - } - }, + {Url.name: "Docs", href: "/docs/latest"}, + {name: "rescript-react", href: "/docs/react/" ++ (version ++ "/introduction")}, } let title = "rescript-react" @@ -113,27 +83,12 @@ module V0100 = { let make = (~frontmatter=?, ~components=MarkdownComponents.default, ~children) => { let router = Next.Router.useRouter() let route = router.route - let url = route->Url.parse - - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let breadcrumbs = list{ - { - open Url - {name: "Docs", href: "/docs/latest"} - }, - { - open Url - { - name: "rescript-react", - href: "/docs/react/" ++ (version ++ "/introduction"), - } - }, + {Url.name: "Docs", href: "/docs/latest"}, + {name: "rescript-react", href: "/docs/react/" ++ (version ++ "/introduction")}, } let title = "rescript-react" diff --git a/src/layouts/ReasonCompilerDocsLayout.res b/src/layouts/ReasonCompilerDocsLayout.res index b9883af68..bea7038fb 100644 --- a/src/layouts/ReasonCompilerDocsLayout.res +++ b/src/layouts/ReasonCompilerDocsLayout.res @@ -14,11 +14,8 @@ module Toc = SidebarLayout.Toc let interopNavs = [ { - open NavItem - { - name: "Overview", - href: "/docs/reason-compiler/latest/interop-overview", - } + NavItem.name: "Overview", + href: "/docs/reason-compiler/latest/interop-overview", }, { name: "Better Data Structures Printing (Debug Mode)", @@ -30,11 +27,8 @@ let interopNavs = [ let advancedNavs = [ { - open NavItem - { - name: "Conditional Compilation", - href: "/docs/reason-compiler/latest/conditional-compilation", - } + NavItem.name: "Conditional Compilation", + href: "/docs/reason-compiler/latest/conditional-compilation", }, { name: "Extended Compiler Options", @@ -51,10 +45,7 @@ let advancedNavs = [ ] let categories = [ - { - open Category - {name: "Interop", items: interopNavs} - }, + {Category.name: "Interop", items: interopNavs}, {name: "Advanced", items: advancedNavs}, ] @@ -77,24 +68,11 @@ let make = (~components=MarkdownComponents.default, ~children) => { let url = route->Url.parse - let version = switch url.version { - | Version(version) => version - | NoVersion => "latest" - | Latest => "latest" - } + let version = url->Url.getVersionString let prefix = list{ - { - open Url - {name: "Docs", href: "/docs/" ++ version} - }, - { - open Url - { - name: "Old Docs", - href: "/docs/reason-compiler/" ++ (version ++ "/interop-overview"), - } - }, + {Url.name: "Docs", href: "/docs/" ++ version}, + {name: "Old Docs", href: "/docs/reason-compiler/" ++ (version ++ "/interop-overview")}, } let breadcrumbs = List.concat( From 69e91b085820889205b84e8df559f6ad505348a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:55:29 +0100 Subject: [PATCH 053/124] Bump path-to-regexp and express (#950) Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together. Updates `path-to-regexp` from 0.1.10 to 0.1.12 - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v0.1.12) Updates `express` from 4.21.1 to 4.21.2 - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md) - [Commits](https://github.com/expressjs/express/compare/4.21.1...4.21.2) --- updated-dependencies: - dependency-name: path-to-regexp dependency-type: indirect - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 005a06992..cdcfac706 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4547,10 +4547,9 @@ } }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", - "license": "MIT", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -4571,7 +4570,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -4586,6 +4585,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { @@ -10253,9 +10256,9 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, "node_modules/path-type": { "version": "4.0.0", @@ -17527,9 +17530,9 @@ } }, "express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -17550,7 +17553,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -21244,9 +21247,9 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, "path-type": { "version": "4.0.0", From 93ac0198b14892a0f1f9d47c24d28feae4e6d107 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 21:08:48 +0100 Subject: [PATCH 054/124] Bump nanoid from 3.3.6 to 3.3.8 (#953) Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.6 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.3.6...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index cdcfac706..42d4e0e36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9351,9 +9351,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", @@ -20621,9 +20621,9 @@ } }, "nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==" + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==" }, "natural-compare": { "version": "1.4.0", From 763d86901b0e683b6b7a638971362d35506c940d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 21:18:52 +0100 Subject: [PATCH 055/124] Bump next from 14.2.10 to 14.2.15 (#955) Bumps [next](https://github.com/vercel/next.js) from 14.2.10 to 14.2.15. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v14.2.10...v14.2.15) --- updated-dependencies: - dependency-name: next dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 185 ++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 89 insertions(+), 98 deletions(-) diff --git a/package-lock.json b/package-lock.json index 42d4e0e36..0e7d2e195 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "highlight.js": "^11.9.0", "highlightjs-rescript": "^0.2.2", "lz-string": "^1.4.4", - "next": "^14.2.10", + "next": "^14.2.15", "next-mdx-remote": "^4.4.1", "prettier": "^1.18.2", "react": "^18.2.0", @@ -1607,9 +1607,9 @@ } }, "node_modules/@next/env": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.10.tgz", - "integrity": "sha512-dZIu93Bf5LUtluBXIv4woQw2cZVZ2DJTjax5/5DOs3lzEOeKLy7GxRSr4caK9/SCPdaW6bCgpye6+n4Dh9oJPw==" + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.15.tgz", + "integrity": "sha512-S1qaj25Wru2dUpcIZMjxeMVSwkt8BK4dmWHHiBuRstcIyOsMapqT4A4jSB6onvqeygkSSmOkyny9VVx8JIGamQ==" }, "node_modules/@next/eslint-plugin-next": { "version": "13.4.12", @@ -1639,13 +1639,12 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.10.tgz", - "integrity": "sha512-V3z10NV+cvMAfxQUMhKgfQnPbjw+Ew3cnr64b0lr8MDiBJs3eLnM6RpGC46nhfMZsiXgQngCJKWGTC/yDcgrDQ==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.15.tgz", + "integrity": "sha512-Rvh7KU9hOUBnZ9TJ28n2Oa7dD9cvDBKua9IKx7cfQQ0GoYUwg9ig31O2oMwH3wm+pE3IkAQ67ZobPfEgurPZIA==", "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "darwin" @@ -1655,13 +1654,12 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.10.tgz", - "integrity": "sha512-Y0TC+FXbFUQ2MQgimJ/7Ina2mXIKhE7F+GUe1SgnzRmwFY3hX2z8nyVCxE82I2RicspdkZnSWMn4oTjIKz4uzA==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.15.tgz", + "integrity": "sha512-5TGyjFcf8ampZP3e+FyCax5zFVHi+Oe7sZyaKOngsqyaNEpOgkKB3sqmymkZfowy3ufGA/tUgDPPxpQx931lHg==", "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "darwin" @@ -1671,13 +1669,12 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.10.tgz", - "integrity": "sha512-ZfQ7yOy5zyskSj9rFpa0Yd7gkrBnJTkYVSya95hX3zeBG9E55Z6OTNPn1j2BTFWvOVVj65C3T+qsjOyVI9DQpA==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.15.tgz", + "integrity": "sha512-3Bwv4oc08ONiQ3FiOLKT72Q+ndEMyLNsc/D3qnLMbtUYTQAmkx9E/JRu0DBpHxNddBmNT5hxz1mYBphJ3mfrrw==", "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1687,13 +1684,12 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.10.tgz", - "integrity": "sha512-n2i5o3y2jpBfXFRxDREr342BGIQCJbdAUi/K4q6Env3aSx8erM9VuKXHw5KNROK9ejFSPf0LhoSkU/ZiNdacpQ==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.15.tgz", + "integrity": "sha512-k5xf/tg1FBv/M4CMd8S+JL3uV9BnnRmoe7F+GWC3DxkTCD9aewFRH1s5rJ1zkzDa+Do4zyN8qD0N8c84Hu96FQ==", "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1703,13 +1699,12 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.10.tgz", - "integrity": "sha512-GXvajAWh2woTT0GKEDlkVhFNxhJS/XdDmrVHrPOA83pLzlGPQnixqxD8u3bBB9oATBKB//5e4vpACnx5Vaxdqg==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.15.tgz", + "integrity": "sha512-kE6q38hbrRbKEkkVn62reLXhThLRh6/TvgSP56GkFNhU22TbIrQDEMrO7j0IcQHcew2wfykq8lZyHFabz0oBrA==", "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1719,13 +1714,12 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.10.tgz", - "integrity": "sha512-opFFN5B0SnO+HTz4Wq4HaylXGFV+iHrVxd3YvREUX9K+xfc4ePbRrxqOuPOFjtSuiVouwe6uLeDtabjEIbkmDA==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.15.tgz", + "integrity": "sha512-PZ5YE9ouy/IdO7QVJeIcyLn/Rc4ml9M2G4y3kCM9MNf1YKvFY4heg3pVa/jQbMro+tP6yc4G2o9LjAz1zxD7tQ==", "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1735,13 +1729,12 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.10.tgz", - "integrity": "sha512-9NUzZuR8WiXTvv+EiU/MXdcQ1XUvFixbLIMNQiVHuzs7ZIFrJDLJDaOF1KaqttoTujpcxljM/RNAOmw1GhPPQQ==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.15.tgz", + "integrity": "sha512-2raR16703kBvYEQD9HNLyb0/394yfqzmIeyp2nDzcPV4yPjqNUG3ohX6jX00WryXz6s1FXpVhsCo3i+g4RUX+g==", "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "win32" @@ -1751,13 +1744,12 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.10.tgz", - "integrity": "sha512-fr3aEbSd1GeW3YUMBkWAu4hcdjZ6g4NBl1uku4gAn661tcxd1bHs1THWYzdsbTRLcCKLjrDZlNp6j2HTfrw+Bg==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.15.tgz", + "integrity": "sha512-fyTE8cklgkyR1p03kJa5zXEaZ9El+kDNM5A+66+8evQS5e/6v0Gk28LqA0Jet8gKSOyP+OTm/tJHzMlGdQerdQ==", "cpu": [ "ia32" ], - "license": "MIT", "optional": true, "os": [ "win32" @@ -1767,13 +1759,12 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.10.tgz", - "integrity": "sha512-UjeVoRGKNL2zfbcQ6fscmgjBAS/inHBh63mjIlfPg/NG8Yn2ztqylXt5qilYb6hoHIwaU2ogHknHWWmahJjgZQ==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.15.tgz", + "integrity": "sha512-SzqGbsLsP9OwKNUG9nekShTwhj6JSB9ZLMWQ8g1gG6hdE5gQLncbnbymrwy2yVmH9nikSLYRYxYMFu78Ggp7/g==", "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "win32" @@ -9387,11 +9378,11 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/next": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.10.tgz", - "integrity": "sha512-sDDExXnh33cY3RkS9JuFEKaS4HmlWmDKP1VJioucCG6z5KuA008DPsDZOzi8UfqEk3Ii+2NCQSJrfbEWtZZfww==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.15.tgz", + "integrity": "sha512-h9ctmOokpoDphRvMGnwOJAedT6zKhwqyZML9mDtspgf4Rh3Pn7UTYKqePNoDvhsWBAO5GoPNYshnAUGIazVGmw==", "dependencies": { - "@next/env": "14.2.10", + "@next/env": "14.2.15", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -9406,15 +9397,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.10", - "@next/swc-darwin-x64": "14.2.10", - "@next/swc-linux-arm64-gnu": "14.2.10", - "@next/swc-linux-arm64-musl": "14.2.10", - "@next/swc-linux-x64-gnu": "14.2.10", - "@next/swc-linux-x64-musl": "14.2.10", - "@next/swc-win32-arm64-msvc": "14.2.10", - "@next/swc-win32-ia32-msvc": "14.2.10", - "@next/swc-win32-x64-msvc": "14.2.10" + "@next/swc-darwin-arm64": "14.2.15", + "@next/swc-darwin-x64": "14.2.15", + "@next/swc-linux-arm64-gnu": "14.2.15", + "@next/swc-linux-arm64-musl": "14.2.15", + "@next/swc-linux-x64-gnu": "14.2.15", + "@next/swc-linux-x64-musl": "14.2.15", + "@next/swc-win32-arm64-msvc": "14.2.15", + "@next/swc-win32-ia32-msvc": "14.2.15", + "@next/swc-win32-x64-msvc": "14.2.15" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -15427,9 +15418,9 @@ } }, "@next/env": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.10.tgz", - "integrity": "sha512-dZIu93Bf5LUtluBXIv4woQw2cZVZ2DJTjax5/5DOs3lzEOeKLy7GxRSr4caK9/SCPdaW6bCgpye6+n4Dh9oJPw==" + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.15.tgz", + "integrity": "sha512-S1qaj25Wru2dUpcIZMjxeMVSwkt8BK4dmWHHiBuRstcIyOsMapqT4A4jSB6onvqeygkSSmOkyny9VVx8JIGamQ==" }, "@next/eslint-plugin-next": { "version": "13.4.12", @@ -15455,57 +15446,57 @@ } }, "@next/swc-darwin-arm64": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.10.tgz", - "integrity": "sha512-V3z10NV+cvMAfxQUMhKgfQnPbjw+Ew3cnr64b0lr8MDiBJs3eLnM6RpGC46nhfMZsiXgQngCJKWGTC/yDcgrDQ==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.15.tgz", + "integrity": "sha512-Rvh7KU9hOUBnZ9TJ28n2Oa7dD9cvDBKua9IKx7cfQQ0GoYUwg9ig31O2oMwH3wm+pE3IkAQ67ZobPfEgurPZIA==", "optional": true }, "@next/swc-darwin-x64": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.10.tgz", - "integrity": "sha512-Y0TC+FXbFUQ2MQgimJ/7Ina2mXIKhE7F+GUe1SgnzRmwFY3hX2z8nyVCxE82I2RicspdkZnSWMn4oTjIKz4uzA==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.15.tgz", + "integrity": "sha512-5TGyjFcf8ampZP3e+FyCax5zFVHi+Oe7sZyaKOngsqyaNEpOgkKB3sqmymkZfowy3ufGA/tUgDPPxpQx931lHg==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.10.tgz", - "integrity": "sha512-ZfQ7yOy5zyskSj9rFpa0Yd7gkrBnJTkYVSya95hX3zeBG9E55Z6OTNPn1j2BTFWvOVVj65C3T+qsjOyVI9DQpA==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.15.tgz", + "integrity": "sha512-3Bwv4oc08ONiQ3FiOLKT72Q+ndEMyLNsc/D3qnLMbtUYTQAmkx9E/JRu0DBpHxNddBmNT5hxz1mYBphJ3mfrrw==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.10.tgz", - "integrity": "sha512-n2i5o3y2jpBfXFRxDREr342BGIQCJbdAUi/K4q6Env3aSx8erM9VuKXHw5KNROK9ejFSPf0LhoSkU/ZiNdacpQ==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.15.tgz", + "integrity": "sha512-k5xf/tg1FBv/M4CMd8S+JL3uV9BnnRmoe7F+GWC3DxkTCD9aewFRH1s5rJ1zkzDa+Do4zyN8qD0N8c84Hu96FQ==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.10.tgz", - "integrity": "sha512-GXvajAWh2woTT0GKEDlkVhFNxhJS/XdDmrVHrPOA83pLzlGPQnixqxD8u3bBB9oATBKB//5e4vpACnx5Vaxdqg==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.15.tgz", + "integrity": "sha512-kE6q38hbrRbKEkkVn62reLXhThLRh6/TvgSP56GkFNhU22TbIrQDEMrO7j0IcQHcew2wfykq8lZyHFabz0oBrA==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.10.tgz", - "integrity": "sha512-opFFN5B0SnO+HTz4Wq4HaylXGFV+iHrVxd3YvREUX9K+xfc4ePbRrxqOuPOFjtSuiVouwe6uLeDtabjEIbkmDA==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.15.tgz", + "integrity": "sha512-PZ5YE9ouy/IdO7QVJeIcyLn/Rc4ml9M2G4y3kCM9MNf1YKvFY4heg3pVa/jQbMro+tP6yc4G2o9LjAz1zxD7tQ==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.10.tgz", - "integrity": "sha512-9NUzZuR8WiXTvv+EiU/MXdcQ1XUvFixbLIMNQiVHuzs7ZIFrJDLJDaOF1KaqttoTujpcxljM/RNAOmw1GhPPQQ==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.15.tgz", + "integrity": "sha512-2raR16703kBvYEQD9HNLyb0/394yfqzmIeyp2nDzcPV4yPjqNUG3ohX6jX00WryXz6s1FXpVhsCo3i+g4RUX+g==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.10.tgz", - "integrity": "sha512-fr3aEbSd1GeW3YUMBkWAu4hcdjZ6g4NBl1uku4gAn661tcxd1bHs1THWYzdsbTRLcCKLjrDZlNp6j2HTfrw+Bg==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.15.tgz", + "integrity": "sha512-fyTE8cklgkyR1p03kJa5zXEaZ9El+kDNM5A+66+8evQS5e/6v0Gk28LqA0Jet8gKSOyP+OTm/tJHzMlGdQerdQ==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.10.tgz", - "integrity": "sha512-UjeVoRGKNL2zfbcQ6fscmgjBAS/inHBh63mjIlfPg/NG8Yn2ztqylXt5qilYb6hoHIwaU2ogHknHWWmahJjgZQ==", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.15.tgz", + "integrity": "sha512-SzqGbsLsP9OwKNUG9nekShTwhj6JSB9ZLMWQ8g1gG6hdE5gQLncbnbymrwy2yVmH9nikSLYRYxYMFu78Ggp7/g==", "optional": true }, "@nodelib/fs.scandir": { @@ -20642,20 +20633,20 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "next": { - "version": "14.2.10", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.10.tgz", - "integrity": "sha512-sDDExXnh33cY3RkS9JuFEKaS4HmlWmDKP1VJioucCG6z5KuA008DPsDZOzi8UfqEk3Ii+2NCQSJrfbEWtZZfww==", - "requires": { - "@next/env": "14.2.10", - "@next/swc-darwin-arm64": "14.2.10", - "@next/swc-darwin-x64": "14.2.10", - "@next/swc-linux-arm64-gnu": "14.2.10", - "@next/swc-linux-arm64-musl": "14.2.10", - "@next/swc-linux-x64-gnu": "14.2.10", - "@next/swc-linux-x64-musl": "14.2.10", - "@next/swc-win32-arm64-msvc": "14.2.10", - "@next/swc-win32-ia32-msvc": "14.2.10", - "@next/swc-win32-x64-msvc": "14.2.10", + "version": "14.2.15", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.15.tgz", + "integrity": "sha512-h9ctmOokpoDphRvMGnwOJAedT6zKhwqyZML9mDtspgf4Rh3Pn7UTYKqePNoDvhsWBAO5GoPNYshnAUGIazVGmw==", + "requires": { + "@next/env": "14.2.15", + "@next/swc-darwin-arm64": "14.2.15", + "@next/swc-darwin-x64": "14.2.15", + "@next/swc-linux-arm64-gnu": "14.2.15", + "@next/swc-linux-arm64-musl": "14.2.15", + "@next/swc-linux-x64-gnu": "14.2.15", + "@next/swc-linux-x64-musl": "14.2.15", + "@next/swc-win32-arm64-msvc": "14.2.15", + "@next/swc-win32-ia32-msvc": "14.2.15", + "@next/swc-win32-x64-msvc": "14.2.15", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", diff --git a/package.json b/package.json index 962a156d2..2d4984b74 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "highlight.js": "^11.9.0", "highlightjs-rescript": "^0.2.2", "lz-string": "^1.4.4", - "next": "^14.2.10", + "next": "^14.2.15", "next-mdx-remote": "^4.4.1", "prettier": "^1.18.2", "react": "^18.2.0", From bcaab31471a51a74f0df906ac590921e996daecf Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Sat, 28 Dec 2024 21:32:49 +0100 Subject: [PATCH 056/124] Some react docs fixes (#956) --- src/common/Url.res | 1 + src/layouts/DocsLayout.res | 5 +++-- src/layouts/DocsLayout.resi | 1 + src/layouts/ManualDocsLayout.res | 5 +++++ src/layouts/ReactDocsLayout.res | 18 +++++++++++++++--- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/common/Url.res b/src/common/Url.res index 1ae8f177b..d152d78ef 100644 --- a/src/common/Url.res +++ b/src/common/Url.res @@ -67,6 +67,7 @@ let parse = (route: string): t => { let version = switch fullpath[foundVersionIndex] { | Some(version) if version === Constants.versions.next => Next | Some(version) if version === Constants.versions.latest => Latest + | Some("latest") => Latest // still used for React docs | Some(v) => Version(v) | None => NoVersion } diff --git a/src/layouts/DocsLayout.res b/src/layouts/DocsLayout.res index ffdd2b501..7f54300df 100644 --- a/src/layouts/DocsLayout.res +++ b/src/layouts/DocsLayout.res @@ -85,7 +85,7 @@ let make = ( }, []) let preludeSection = -
    +
    {React.string(title)} {switch version { | Some(version) => @@ -178,6 +178,7 @@ module Make = (Content: StaticContent) => { ~frontmatter=?, ~version: option=?, ~availableVersions: option>=?, + ~nextVersion: option<(string, string)>=?, /* ~activeToc: option=?, */ ~components: option=?, ~theme: option=?, @@ -239,7 +240,7 @@ module Make = (Content: StaticContent) => { ?frontmatter, ?version, ?availableVersions, - nextVersion: ?Constants.nextVersion, + ?nextVersion, ?activeToc, categories, ?components, diff --git a/src/layouts/DocsLayout.resi b/src/layouts/DocsLayout.resi index 626611a22..a237a71ab 100644 --- a/src/layouts/DocsLayout.resi +++ b/src/layouts/DocsLayout.resi @@ -32,6 +32,7 @@ module Make: (Content: StaticContent) => ~frontmatter: JSON.t=?, ~version: string=?, ~availableVersions: array<(string, string)>=?, + ~nextVersion: (string, string)=?, /* ~activeToc: option=?, */ ~components: MarkdownComponents.t=?, ~theme: ColorTheme.t=?, diff --git a/src/layouts/ManualDocsLayout.res b/src/layouts/ManualDocsLayout.res index 9912f4bfe..5c65f0fbd 100644 --- a/src/layouts/ManualDocsLayout.res +++ b/src/layouts/ManualDocsLayout.res @@ -62,6 +62,7 @@ module V1200 = { title metaTitleCategory="ReScript Language Manual" availableVersions=Constants.allManualVersions + nextVersion=?Constants.nextVersion ?frontmatter breadcrumbs> {version === Constants.versions.next ? warnBanner : React.null} @@ -89,6 +90,7 @@ module V1100 = { title metaTitleCategory="ReScript Language Manual" availableVersions=Constants.allManualVersions + nextVersion=?Constants.nextVersion ?frontmatter breadcrumbs> children @@ -129,6 +131,7 @@ module V1000 = { title metaTitleCategory="ReScript Language Manual" availableVersions=Constants.allManualVersions + nextVersion=?Constants.nextVersion ?frontmatter breadcrumbs> children @@ -173,6 +176,7 @@ module V900 = { title metaTitleCategory="ReScript Language Manual" availableVersions=Constants.allManualVersions + nextVersion=?Constants.nextVersion ?frontmatter breadcrumbs> children @@ -248,6 +252,7 @@ module V800 = { title metaTitleCategory="ReScript Language Manual" availableVersions=Constants.allManualVersions + nextVersion=?Constants.nextVersion ?frontmatter breadcrumbs> warnBanner diff --git a/src/layouts/ReactDocsLayout.res b/src/layouts/ReactDocsLayout.res index 7beb45d75..59ea6669c 100644 --- a/src/layouts/ReactDocsLayout.res +++ b/src/layouts/ReactDocsLayout.res @@ -25,7 +25,11 @@ module Latest = { let router = Next.Router.useRouter() let route = router.route let url = route->Url.parse - let version = url->Url.getVersionString + + let version = switch url.version { + | Version(version) => version + | _ => "latest" + } let breadcrumbs = list{ {Url.name: "Docs", href: "/docs/latest"}, @@ -55,7 +59,11 @@ module V0110 = { let router = Next.Router.useRouter() let route = router.route let url = route->Url.parse - let version = url->Url.getVersionString + + let version = switch url.version { + | Version(version) => version + | _ => "latest" + } let breadcrumbs = list{ {Url.name: "Docs", href: "/docs/latest"}, @@ -84,7 +92,11 @@ module V0100 = { let router = Next.Router.useRouter() let route = router.route let url = route->Url.parse - let version = url->Url.getVersionString + + let version = switch url.version { + | Version(version) => version + | _ => "latest" + } let breadcrumbs = list{ {Url.name: "Docs", href: "/docs/latest"}, From 667aaeaed3a9a2fff905099319fb7a1f83785569 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Mon, 30 Dec 2024 17:37:29 -0300 Subject: [PATCH 057/124] Fix docsearch version metatag (#957) The search doesn't work because the scraper can't find the url with `latest` anymore. This PR changes the meta tag, after merging I will update the crawler --- src/components/Meta.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Meta.res b/src/components/Meta.res index 661b31bc2..bb60f9d4b 100644 --- a/src/components/Meta.res +++ b/src/components/Meta.res @@ -74,7 +74,7 @@ let make = ( name="docsearch:version" content={switch version { | Some(Version(v)) => v - | _ => "latest" + | _ => Constants.versions.latest }} /> From d832f2941dcf02b98ddaa2035a2f595b269e3bcf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:09:02 +0100 Subject: [PATCH 058/124] Bump next from 14.2.15 to 14.2.21 (#961) Bumps [next](https://github.com/vercel/next.js) from 14.2.15 to 14.2.21. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](https://github.com/vercel/next.js/compare/v14.2.15...v14.2.21) --- updated-dependencies: - dependency-name: next dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 176 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0e7d2e195..0de239d96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "highlight.js": "^11.9.0", "highlightjs-rescript": "^0.2.2", "lz-string": "^1.4.4", - "next": "^14.2.15", + "next": "^14.2.21", "next-mdx-remote": "^4.4.1", "prettier": "^1.18.2", "react": "^18.2.0", @@ -1607,9 +1607,9 @@ } }, "node_modules/@next/env": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.15.tgz", - "integrity": "sha512-S1qaj25Wru2dUpcIZMjxeMVSwkt8BK4dmWHHiBuRstcIyOsMapqT4A4jSB6onvqeygkSSmOkyny9VVx8JIGamQ==" + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.21.tgz", + "integrity": "sha512-lXcwcJd5oR01tggjWJ6SrNNYFGuOOMB9c251wUNkjCpkoXOPkDeF/15c3mnVlBqrW4JJXb2kVxDFhC4GduJt2A==" }, "node_modules/@next/eslint-plugin-next": { "version": "13.4.12", @@ -1639,9 +1639,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.15.tgz", - "integrity": "sha512-Rvh7KU9hOUBnZ9TJ28n2Oa7dD9cvDBKua9IKx7cfQQ0GoYUwg9ig31O2oMwH3wm+pE3IkAQ67ZobPfEgurPZIA==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.21.tgz", + "integrity": "sha512-HwEjcKsXtvszXz5q5Z7wCtrHeTTDSTgAbocz45PHMUjU3fBYInfvhR+ZhavDRUYLonm53aHZbB09QtJVJj8T7g==", "cpu": [ "arm64" ], @@ -1654,9 +1654,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.15.tgz", - "integrity": "sha512-5TGyjFcf8ampZP3e+FyCax5zFVHi+Oe7sZyaKOngsqyaNEpOgkKB3sqmymkZfowy3ufGA/tUgDPPxpQx931lHg==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.21.tgz", + "integrity": "sha512-TSAA2ROgNzm4FhKbTbyJOBrsREOMVdDIltZ6aZiKvCi/v0UwFmwigBGeqXDA97TFMpR3LNNpw52CbVelkoQBxA==", "cpu": [ "x64" ], @@ -1669,9 +1669,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.15.tgz", - "integrity": "sha512-3Bwv4oc08ONiQ3FiOLKT72Q+ndEMyLNsc/D3qnLMbtUYTQAmkx9E/JRu0DBpHxNddBmNT5hxz1mYBphJ3mfrrw==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.21.tgz", + "integrity": "sha512-0Dqjn0pEUz3JG+AImpnMMW/m8hRtl1GQCNbO66V1yp6RswSTiKmnHf3pTX6xMdJYSemf3O4Q9ykiL0jymu0TuA==", "cpu": [ "arm64" ], @@ -1684,9 +1684,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.15.tgz", - "integrity": "sha512-k5xf/tg1FBv/M4CMd8S+JL3uV9BnnRmoe7F+GWC3DxkTCD9aewFRH1s5rJ1zkzDa+Do4zyN8qD0N8c84Hu96FQ==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.21.tgz", + "integrity": "sha512-Ggfw5qnMXldscVntwnjfaQs5GbBbjioV4B4loP+bjqNEb42fzZlAaK+ldL0jm2CTJga9LynBMhekNfV8W4+HBw==", "cpu": [ "arm64" ], @@ -1699,9 +1699,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.15.tgz", - "integrity": "sha512-kE6q38hbrRbKEkkVn62reLXhThLRh6/TvgSP56GkFNhU22TbIrQDEMrO7j0IcQHcew2wfykq8lZyHFabz0oBrA==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.21.tgz", + "integrity": "sha512-uokj0lubN1WoSa5KKdThVPRffGyiWlm/vCc/cMkWOQHw69Qt0X1o3b2PyLLx8ANqlefILZh1EdfLRz9gVpG6tg==", "cpu": [ "x64" ], @@ -1714,9 +1714,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.15.tgz", - "integrity": "sha512-PZ5YE9ouy/IdO7QVJeIcyLn/Rc4ml9M2G4y3kCM9MNf1YKvFY4heg3pVa/jQbMro+tP6yc4G2o9LjAz1zxD7tQ==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.21.tgz", + "integrity": "sha512-iAEBPzWNbciah4+0yI4s7Pce6BIoxTQ0AGCkxn/UBuzJFkYyJt71MadYQkjPqCQCJAFQ26sYh7MOKdU+VQFgPg==", "cpu": [ "x64" ], @@ -1729,9 +1729,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.15.tgz", - "integrity": "sha512-2raR16703kBvYEQD9HNLyb0/394yfqzmIeyp2nDzcPV4yPjqNUG3ohX6jX00WryXz6s1FXpVhsCo3i+g4RUX+g==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.21.tgz", + "integrity": "sha512-plykgB3vL2hB4Z32W3ktsfqyuyGAPxqwiyrAi2Mr8LlEUhNn9VgkiAl5hODSBpzIfWweX3er1f5uNpGDygfQVQ==", "cpu": [ "arm64" ], @@ -1744,9 +1744,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.15.tgz", - "integrity": "sha512-fyTE8cklgkyR1p03kJa5zXEaZ9El+kDNM5A+66+8evQS5e/6v0Gk28LqA0Jet8gKSOyP+OTm/tJHzMlGdQerdQ==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.21.tgz", + "integrity": "sha512-w5bacz4Vxqrh06BjWgua3Yf7EMDb8iMcVhNrNx8KnJXt8t+Uu0Zg4JHLDL/T7DkTCEEfKXO/Er1fcfWxn2xfPA==", "cpu": [ "ia32" ], @@ -1759,9 +1759,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.15.tgz", - "integrity": "sha512-SzqGbsLsP9OwKNUG9nekShTwhj6JSB9ZLMWQ8g1gG6hdE5gQLncbnbymrwy2yVmH9nikSLYRYxYMFu78Ggp7/g==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.21.tgz", + "integrity": "sha512-sT6+llIkzpsexGYZq8cjjthRyRGe5cJVhqh12FmlbxHqna6zsDDK8UNaV7g41T6atFHCJUPeLb3uyAwrBwy0NA==", "cpu": [ "x64" ], @@ -9378,11 +9378,11 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/next": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.15.tgz", - "integrity": "sha512-h9ctmOokpoDphRvMGnwOJAedT6zKhwqyZML9mDtspgf4Rh3Pn7UTYKqePNoDvhsWBAO5GoPNYshnAUGIazVGmw==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.21.tgz", + "integrity": "sha512-rZmLwucLHr3/zfDMYbJXbw0ZeoBpirxkXuvsJbk7UPorvPYZhP7vq7aHbKnU7dQNCYIimRrbB2pp3xmf+wsYUg==", "dependencies": { - "@next/env": "14.2.15", + "@next/env": "14.2.21", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -9397,15 +9397,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.15", - "@next/swc-darwin-x64": "14.2.15", - "@next/swc-linux-arm64-gnu": "14.2.15", - "@next/swc-linux-arm64-musl": "14.2.15", - "@next/swc-linux-x64-gnu": "14.2.15", - "@next/swc-linux-x64-musl": "14.2.15", - "@next/swc-win32-arm64-msvc": "14.2.15", - "@next/swc-win32-ia32-msvc": "14.2.15", - "@next/swc-win32-x64-msvc": "14.2.15" + "@next/swc-darwin-arm64": "14.2.21", + "@next/swc-darwin-x64": "14.2.21", + "@next/swc-linux-arm64-gnu": "14.2.21", + "@next/swc-linux-arm64-musl": "14.2.21", + "@next/swc-linux-x64-gnu": "14.2.21", + "@next/swc-linux-x64-musl": "14.2.21", + "@next/swc-win32-arm64-msvc": "14.2.21", + "@next/swc-win32-ia32-msvc": "14.2.21", + "@next/swc-win32-x64-msvc": "14.2.21" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -15418,9 +15418,9 @@ } }, "@next/env": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.15.tgz", - "integrity": "sha512-S1qaj25Wru2dUpcIZMjxeMVSwkt8BK4dmWHHiBuRstcIyOsMapqT4A4jSB6onvqeygkSSmOkyny9VVx8JIGamQ==" + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.21.tgz", + "integrity": "sha512-lXcwcJd5oR01tggjWJ6SrNNYFGuOOMB9c251wUNkjCpkoXOPkDeF/15c3mnVlBqrW4JJXb2kVxDFhC4GduJt2A==" }, "@next/eslint-plugin-next": { "version": "13.4.12", @@ -15446,57 +15446,57 @@ } }, "@next/swc-darwin-arm64": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.15.tgz", - "integrity": "sha512-Rvh7KU9hOUBnZ9TJ28n2Oa7dD9cvDBKua9IKx7cfQQ0GoYUwg9ig31O2oMwH3wm+pE3IkAQ67ZobPfEgurPZIA==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.21.tgz", + "integrity": "sha512-HwEjcKsXtvszXz5q5Z7wCtrHeTTDSTgAbocz45PHMUjU3fBYInfvhR+ZhavDRUYLonm53aHZbB09QtJVJj8T7g==", "optional": true }, "@next/swc-darwin-x64": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.15.tgz", - "integrity": "sha512-5TGyjFcf8ampZP3e+FyCax5zFVHi+Oe7sZyaKOngsqyaNEpOgkKB3sqmymkZfowy3ufGA/tUgDPPxpQx931lHg==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.21.tgz", + "integrity": "sha512-TSAA2ROgNzm4FhKbTbyJOBrsREOMVdDIltZ6aZiKvCi/v0UwFmwigBGeqXDA97TFMpR3LNNpw52CbVelkoQBxA==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.15.tgz", - "integrity": "sha512-3Bwv4oc08ONiQ3FiOLKT72Q+ndEMyLNsc/D3qnLMbtUYTQAmkx9E/JRu0DBpHxNddBmNT5hxz1mYBphJ3mfrrw==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.21.tgz", + "integrity": "sha512-0Dqjn0pEUz3JG+AImpnMMW/m8hRtl1GQCNbO66V1yp6RswSTiKmnHf3pTX6xMdJYSemf3O4Q9ykiL0jymu0TuA==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.15.tgz", - "integrity": "sha512-k5xf/tg1FBv/M4CMd8S+JL3uV9BnnRmoe7F+GWC3DxkTCD9aewFRH1s5rJ1zkzDa+Do4zyN8qD0N8c84Hu96FQ==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.21.tgz", + "integrity": "sha512-Ggfw5qnMXldscVntwnjfaQs5GbBbjioV4B4loP+bjqNEb42fzZlAaK+ldL0jm2CTJga9LynBMhekNfV8W4+HBw==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.15.tgz", - "integrity": "sha512-kE6q38hbrRbKEkkVn62reLXhThLRh6/TvgSP56GkFNhU22TbIrQDEMrO7j0IcQHcew2wfykq8lZyHFabz0oBrA==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.21.tgz", + "integrity": "sha512-uokj0lubN1WoSa5KKdThVPRffGyiWlm/vCc/cMkWOQHw69Qt0X1o3b2PyLLx8ANqlefILZh1EdfLRz9gVpG6tg==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.15.tgz", - "integrity": "sha512-PZ5YE9ouy/IdO7QVJeIcyLn/Rc4ml9M2G4y3kCM9MNf1YKvFY4heg3pVa/jQbMro+tP6yc4G2o9LjAz1zxD7tQ==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.21.tgz", + "integrity": "sha512-iAEBPzWNbciah4+0yI4s7Pce6BIoxTQ0AGCkxn/UBuzJFkYyJt71MadYQkjPqCQCJAFQ26sYh7MOKdU+VQFgPg==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.15.tgz", - "integrity": "sha512-2raR16703kBvYEQD9HNLyb0/394yfqzmIeyp2nDzcPV4yPjqNUG3ohX6jX00WryXz6s1FXpVhsCo3i+g4RUX+g==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.21.tgz", + "integrity": "sha512-plykgB3vL2hB4Z32W3ktsfqyuyGAPxqwiyrAi2Mr8LlEUhNn9VgkiAl5hODSBpzIfWweX3er1f5uNpGDygfQVQ==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.15.tgz", - "integrity": "sha512-fyTE8cklgkyR1p03kJa5zXEaZ9El+kDNM5A+66+8evQS5e/6v0Gk28LqA0Jet8gKSOyP+OTm/tJHzMlGdQerdQ==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.21.tgz", + "integrity": "sha512-w5bacz4Vxqrh06BjWgua3Yf7EMDb8iMcVhNrNx8KnJXt8t+Uu0Zg4JHLDL/T7DkTCEEfKXO/Er1fcfWxn2xfPA==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.15.tgz", - "integrity": "sha512-SzqGbsLsP9OwKNUG9nekShTwhj6JSB9ZLMWQ8g1gG6hdE5gQLncbnbymrwy2yVmH9nikSLYRYxYMFu78Ggp7/g==", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.21.tgz", + "integrity": "sha512-sT6+llIkzpsexGYZq8cjjthRyRGe5cJVhqh12FmlbxHqna6zsDDK8UNaV7g41T6atFHCJUPeLb3uyAwrBwy0NA==", "optional": true }, "@nodelib/fs.scandir": { @@ -20633,20 +20633,20 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "next": { - "version": "14.2.15", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.15.tgz", - "integrity": "sha512-h9ctmOokpoDphRvMGnwOJAedT6zKhwqyZML9mDtspgf4Rh3Pn7UTYKqePNoDvhsWBAO5GoPNYshnAUGIazVGmw==", - "requires": { - "@next/env": "14.2.15", - "@next/swc-darwin-arm64": "14.2.15", - "@next/swc-darwin-x64": "14.2.15", - "@next/swc-linux-arm64-gnu": "14.2.15", - "@next/swc-linux-arm64-musl": "14.2.15", - "@next/swc-linux-x64-gnu": "14.2.15", - "@next/swc-linux-x64-musl": "14.2.15", - "@next/swc-win32-arm64-msvc": "14.2.15", - "@next/swc-win32-ia32-msvc": "14.2.15", - "@next/swc-win32-x64-msvc": "14.2.15", + "version": "14.2.21", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.21.tgz", + "integrity": "sha512-rZmLwucLHr3/zfDMYbJXbw0ZeoBpirxkXuvsJbk7UPorvPYZhP7vq7aHbKnU7dQNCYIimRrbB2pp3xmf+wsYUg==", + "requires": { + "@next/env": "14.2.21", + "@next/swc-darwin-arm64": "14.2.21", + "@next/swc-darwin-x64": "14.2.21", + "@next/swc-linux-arm64-gnu": "14.2.21", + "@next/swc-linux-arm64-musl": "14.2.21", + "@next/swc-linux-x64-gnu": "14.2.21", + "@next/swc-linux-x64-musl": "14.2.21", + "@next/swc-win32-arm64-msvc": "14.2.21", + "@next/swc-win32-ia32-msvc": "14.2.21", + "@next/swc-win32-x64-msvc": "14.2.21", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", diff --git a/package.json b/package.json index 2d4984b74..b4b171f34 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "highlight.js": "^11.9.0", "highlightjs-rescript": "^0.2.2", "lz-string": "^1.4.4", - "next": "^14.2.15", + "next": "^14.2.21", "next-mdx-remote": "^4.4.1", "prettier": "^1.18.2", "react": "^18.2.0", From 27eedd34be4b502ad6838767c27ed5c149ad2fbc Mon Sep 17 00:00:00 2001 From: Lucas Guellis de Souza <74273532+lucasguellis@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:05:55 -0300 Subject: [PATCH 059/124] Provide entire docs in a single text file for LLMs. (#962) * feat: script for generating llm files * feat: adding mdx files on generating llm * feat: adding llms to sidebar + redirects to latest * fix: format * fix: changing to RegExp and String Rescript Core types * feat: adding redirect for `next` version --- .gitignore | 5 ++ data/sidebar_manual_v1100.json | 3 +- data/sidebar_manual_v1200.json | 3 +- data/sidebar_react_latest.json | 3 + data/sidebar_react_v0100.json | 3 + data/sidebar_react_v0110.json | 3 + next.config.mjs | 10 +++ package.json | 3 +- public/_redirects | 3 + public/llms/manual/template.mdx | 23 ++++++ public/llms/manual/template.txt | 19 +++++ public/llms/react/template.mdx | 23 ++++++ public/llms/react/template.txt | 19 +++++ scripts/generate_llms.res | 137 ++++++++++++++++++++++++++++++++ src/bindings/Node.res | 3 + 15 files changed, 257 insertions(+), 3 deletions(-) create mode 100644 public/llms/manual/template.mdx create mode 100644 public/llms/manual/template.txt create mode 100644 public/llms/react/template.mdx create mode 100644 public/llms/react/template.txt create mode 100644 scripts/generate_llms.res diff --git a/.gitignore b/.gitignore index 4b6ddf80c..d364e12a7 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,8 @@ lib/ src/**/*.mjs scripts/**/*.mjs + +# Generated via generate-llms script +public/llms/manual/**/llm*.txt +public/llms/react/**/llm*.txt +pages/docs/**/**/llms.mdx diff --git a/data/sidebar_manual_v1100.json b/data/sidebar_manual_v1100.json index 6e6c86255..a7672bb98 100644 --- a/data/sidebar_manual_v1100.json +++ b/data/sidebar_manual_v1100.json @@ -73,6 +73,7 @@ "Extra": [ "newcomer-examples", "project-structure", - "faq" + "faq", + "llms" ] } \ No newline at end of file diff --git a/data/sidebar_manual_v1200.json b/data/sidebar_manual_v1200.json index d783a4eb3..a68a5336c 100644 --- a/data/sidebar_manual_v1200.json +++ b/data/sidebar_manual_v1200.json @@ -72,6 +72,7 @@ "Extra": [ "newcomer-examples", "project-structure", - "faq" + "faq", + "llms" ] } \ No newline at end of file diff --git a/data/sidebar_react_latest.json b/data/sidebar_react_latest.json index 758517284..a2a47d615 100644 --- a/data/sidebar_react_latest.json +++ b/data/sidebar_react_latest.json @@ -31,5 +31,8 @@ "beyond-jsx", "forwarding-refs", "extensions-of-props" + ], + "Extra": [ + "llms" ] } \ No newline at end of file diff --git a/data/sidebar_react_v0100.json b/data/sidebar_react_v0100.json index b6bd3b260..43b20d93e 100644 --- a/data/sidebar_react_v0100.json +++ b/data/sidebar_react_v0100.json @@ -26,5 +26,8 @@ "Guides": [ "beyond-jsx", "forwarding-refs" + ], + "Extra": [ + "llms" ] } \ No newline at end of file diff --git a/data/sidebar_react_v0110.json b/data/sidebar_react_v0110.json index f7e96a22c..0876b0888 100644 --- a/data/sidebar_react_v0110.json +++ b/data/sidebar_react_v0110.json @@ -27,5 +27,8 @@ "beyond-jsx", "forwarding-refs", "extensions-of-props" + ], + "Extra": [ + "llms" ] } \ No newline at end of file diff --git a/next.config.mjs b/next.config.mjs index d8b12ed46..eb31e01f3 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -136,6 +136,16 @@ const config = { destination: `/docs/manual/${process.env.VERSION_NEXT}/:slug*`, permanent: false, }, + { + source: "/llms/manual/latest/:file*", + destination: `/llms/manual/${process.env.VERSION_LATEST}/:file*`, + permanent: false, + }, + { + source: "/llms/manual/next/:file*", + destination: `/llms/manual/${process.env.VERSION_NEXT}/:file*`, + permanent: false, + }, ]; }, }; diff --git a/package.json b/package.json index b4b171f34..271070c67 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,8 @@ "build": "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": "npm run generate-llms && node scripts/extract-indices.mjs && node scripts/extract-tocs.mjs && node scripts/extract-syntax.mjs && node scripts/generate_feed.mjs > public/blog/feed.xml", + "generate-llms": "node scripts/generate_llms.mjs" }, "devDependencies": { "@mdx-js/react": "^2.3.0", diff --git a/public/_redirects b/public/_redirects index e0e869325..9c18f7af1 100644 --- a/public/_redirects +++ b/public/_redirects @@ -11,3 +11,6 @@ /docs/manual/latest/:slug* /docs/manual/v11.0.0/:slug* 307 /docs/manual/next/:slug* /docs/manual/v12.0.0/:slug* 307 + +/llms/manual/latest/:file* /llms/manual/v11.0.0/:file* 307 +/llms/manual/next/:file* /llms/manual/v12.0.0/:file* 307 diff --git a/public/llms/manual/template.mdx b/public/llms/manual/template.mdx new file mode 100644 index 000000000..975c1a8c3 --- /dev/null +++ b/public/llms/manual/template.mdx @@ -0,0 +1,23 @@ +--- +title: "LLMs" +description: "Documentation for LLMs" +canonical: "/docs/manual//llms" +--- + +# Documentation for LLMs + +We adhere to the [llms.txt convention](https://llmstxt.org/) to make documentation accessible to large language models and their applications. + +Currently, we have the following files... + +- [/docs/manual/llms.txt](/llms/manual//llms.txt) — a list of the available files for ReScript language. +- [/docs/manual/llm-full.txt](/llms/manual//llm-full.txt) — complete documentation for ReScript language. +- [/docs/manual/llm-small.txt](/llms/manual//llm-small.txt) — compressed version of the former, without examples. + +...and package-level documentation: + +- [/docs/react/llms](/docs/react/latest/llms) — the LLms documentation for ReScript React. + +## Notes + +- The content is automatically generated from the same source as the official documentation for the specific version diff --git a/public/llms/manual/template.txt b/public/llms/manual/template.txt new file mode 100644 index 000000000..d4474f163 --- /dev/null +++ b/public/llms/manual/template.txt @@ -0,0 +1,19 @@ +# ReScript Documentation for LLMs + +> ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript. It comes with a lightning fast compiler toolchain that scales to any codebase size. + +## Documentation Sets + +- [Complete documentation](https://rescript-lang.org/llms/manual//llm-full.txt): The complete ReScript documentation including all examples and additional content +- [Abridged documentation](https://rescript-lang.org/llms/manual//llm-small.txt): A minimal version of the ReScript documentation, with the essential content for quick reference + +## Individual Package Documentation + +- [ReScript React documentation](https://rescript-lang.org/llms/react/latest/llms.txt): This is the developer documentation for ReScript React. + +## Notes + +- The abridged documentation excludes the detailed examples, and supplementary information +- The complete documentation includes all content from the official documentation +- Package-specific documentation files contain only the content relevant to that package +- The content is automatically generated from the same source as the official documentation for the specific version \ No newline at end of file diff --git a/public/llms/react/template.mdx b/public/llms/react/template.mdx new file mode 100644 index 000000000..580a23302 --- /dev/null +++ b/public/llms/react/template.mdx @@ -0,0 +1,23 @@ +--- +title: "LLMs" +description: "Documentation for LLMs" +canonical: "/docs/react//llms" +--- + +# Documentation for LLMs + +We adhere to the [llms.txt convention](https://llmstxt.org/) to make documentation accessible to large language models and their applications. + +Currently, we have the following files... + +- [/docs/react/llms.txt](/llms/react//llms.txt) — a list of the available files for ReScript React. +- [/docs/react/llms-full.txt](/llms/react//llm-full.txt) — complete documentation for ReScript React. +- [/docs/react/llms-small.txt](/llms/react//llm-small.txt) — compressed version of the former, without examples for ReScript React. + +...and the language documentation: + +- [/docs/manual/llms](/docs/manual/latest/llms) — the LLms documentation for ReScript. + +## Notes + +- The content is automatically generated from the same source as the official documentation for the specific version diff --git a/public/llms/react/template.txt b/public/llms/react/template.txt new file mode 100644 index 000000000..0023e410a --- /dev/null +++ b/public/llms/react/template.txt @@ -0,0 +1,19 @@ +# ReScript React Documentation for LLMs + +> ReScript React is a strongly typed interface for React, designed to integrate seamlessly with modern React (>= v18.0) while compiling to idiomatic JavaScript, enabling robust and scalable React applications. + +## ReScript React Documentation + +- [Complete documentation](https://rescript-lang.org/llms/react//llm-full.txt): The complete ReScript React documentation including all examples and additional content +- [Abridged documentation](https://rescript-lang.org/llms/react//llm-small.txt): A minimal version of the ReScript React documentation, with the essential content for quick reference + +## Language Documentation + +- [ReScript documentation](https://rescript-lang.org/llms/manual/latest/llms.txt): This is the developer documentation for ReScript. + +## Notes + +- The abridged documentation excludes the detailed examples, and supplementary information +- The complete documentation includes all content from the official documentation +- Package-specific documentation files contain only the content relevant to that package +- The content is automatically generated from the same source as the official documentation for the specific version \ No newline at end of file diff --git a/scripts/generate_llms.res b/scripts/generate_llms.res new file mode 100644 index 000000000..d86c5d9c0 --- /dev/null +++ b/scripts/generate_llms.res @@ -0,0 +1,137 @@ +let readMarkdownFile = (filePath: string): string => { + let fileContent = Node.Fs.readFileSync2(filePath, "utf8") + fileContent +} + +let rec collectFiles = (dirPath: string): array => { + let entries = Node.Fs.readdirSync(dirPath) + entries->Array.reduce([], (acc, entry) => { + let fullPath = Node.Path.join([dirPath, entry]) + let stats = Node.Fs.statSync(fullPath) + switch stats["isDirectory"]() { + | true => acc->Array.concat(collectFiles(fullPath)) + | false => { + acc->Array.push(fullPath) + acc + } + } + }) +} + +let clearFile = (filePath: string): unit => { + Node.Fs.writeFileSync(filePath, "") +} + +let createDirectoryIfNotExists = (dirPath: string): unit => { + if !Node.Fs.existsSync(dirPath) { + Node.Fs.mkdirSync(dirPath) + } +} + +let removeCodeTabTags = (content: string): string => { + let regex = RegExp.fromStringWithFlags("[\\s\\S]*?", ~flags="g") + String.replaceRegExp(content, regex, "") +} + +let removeCodeBlocks = (content: string): string => { + let regex = RegExp.fromStringWithFlags("```[a-zA-Z]+\\s*[\\s\\S]*?```", ~flags="g") + String.replaceRegExp(content, regex, "") +} + +let removeFileTitle = (content: string): string => { + let regex = RegExp.fromStringWithFlags("---\ntitle[\\s\\S]*?---", ~flags="g") + String.replaceRegExp(content, regex, "") +} + +let removeUnnecessaryBreaks = (content: string): string => { + let regex = RegExp.fromStringWithFlags("^\n{2,}", ~flags="g") + String.replaceRegExp(content, regex, "") +} + +let removeToDos = (content: string): string => { + let regex = RegExp.fromStringWithFlags("", ~flags="g") + String.replaceRegExp(content, regex, "") +} + +let fillContentWithVersion = (content: string, version: string): string => { + let regex = RegExp.fromStringWithFlags("", ~flags="g") + String.replaceRegExp(content, regex, version) +} + +let createFullFile = (content: string, filePath: string): unit => { + Node.Fs.appendFileSync(filePath, content ++ "\n", "utf8") +} + +let createSmallFile = (content: string, filePath: string): unit => { + let smallContent = + content + ->removeCodeTabTags + ->removeFileTitle + ->removeToDos + ->removeCodeBlocks + ->removeUnnecessaryBreaks + Node.Fs.appendFileSync(filePath, smallContent, "utf8") +} + +let createLlmsFiles = (version: string, docsDirectory: string, llmsDirectory: string): unit => { + let mdxFileTemplatePath = llmsDirectory->Node.Path.join2("template.mdx") + let mdxFilePath = docsDirectory->Node.Path.join2(version)->Node.Path.join2("llms.mdx") + let txtFileTemplatePath = llmsDirectory->Node.Path.join2("template.txt") + let txtFilePath = llmsDirectory->Node.Path.join2(version)->Node.Path.join2("llms.txt") + + Node.Fs.writeFileSync( + mdxFilePath, + readMarkdownFile(mdxFileTemplatePath)->fillContentWithVersion(version), + ) + + Node.Fs.writeFileSync( + txtFilePath, + readMarkdownFile(txtFileTemplatePath)->fillContentWithVersion(version), + ) +} + +let processVersions = ( + versions: array, + docsDirectory: string, + llmsDirectory: string, +): unit => { + let fullFileName = "llm-full.txt" + let smallFileName = "llm-small.txt" + + versions->Array.forEach(version => { + let versionDir = docsDirectory->Node.Path.join2(version) + let llmsDir = llmsDirectory->Node.Path.join2(version) + let fullFilePath = llmsDir->Node.Path.join2(fullFileName) + let smallFilePath = llmsDir->Node.Path.join2(smallFileName) + + createDirectoryIfNotExists(llmsDir) + clearFile(fullFilePath) + clearFile(smallFilePath) + + createLlmsFiles(version, docsDirectory, llmsDirectory) + + versionDir + ->collectFiles + ->Array.forEach(filePath => { + if String.endsWith(filePath, ".mdx") { + let content = readMarkdownFile(filePath) + + content->createFullFile(fullFilePath) + + content->createSmallFile(smallFilePath) + } + }) + }) +} + +let manualVersions = ["v12.0.0", "v11.0.0"] +let reactManualVersions = ["latest", "v0.10.0", "v0.11.0"] + +let manualDocsDirectory = "pages/docs/manual" +let reactDocsDirectory = "pages/docs/react" + +let manualLlmsDirectory = "public/llms/manual" +let reactLlmsDirectory = "public/llms/react" + +processVersions(manualVersions, manualDocsDirectory, manualLlmsDirectory) +processVersions(reactManualVersions, reactDocsDirectory, reactLlmsDirectory) diff --git a/src/bindings/Node.res b/src/bindings/Node.res index d688f7baa..44bcd522b 100644 --- a/src/bindings/Node.res +++ b/src/bindings/Node.res @@ -20,10 +20,13 @@ module Process = { module Fs = { @module("fs") external readFileSync: string => string = "readFileSync" + @module("fs") external readFileSync2: (string, string) => string = "readFileSync" @module("fs") external readdirSync: string => array = "readdirSync" @module("fs") external writeFileSync: (string, string) => unit = "writeFileSync" + @module("fs") external appendFileSync: (string, string, string) => unit = "appendFileSync" @module("fs") external existsSync: string => bool = "existsSync" @module("fs") external mkdirSync: string => unit = "mkdirSync" + @module("fs") external statSync: string => {.."isDirectory": unit => bool} = "statSync" } module Buffer = { From f1fa193096e71cb3d49069ec7768fda28d5d3833 Mon Sep 17 00:00:00 2001 From: Henrikh Kantuni Date: Mon, 27 Jan 2025 04:03:13 -0500 Subject: [PATCH 060/124] Fix typo (#963) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix typo "is the primary ReScript features" → "is the primary ReScript feature" * Fix typo (v8) * Fix typo (v9) * Fix typo (v10) * Fix typo (v11) --- pages/docs/manual/v10.0.0/external.mdx | 2 +- pages/docs/manual/v11.0.0/external.mdx | 2 +- pages/docs/manual/v12.0.0/external.mdx | 2 +- pages/docs/manual/v8.0.0/external.mdx | 2 +- pages/docs/manual/v9.0.0/external.mdx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/docs/manual/v10.0.0/external.mdx b/pages/docs/manual/v10.0.0/external.mdx index e5999cc22..f0845d582 100644 --- a/pages/docs/manual/v10.0.0/external.mdx +++ b/pages/docs/manual/v10.0.0/external.mdx @@ -6,7 +6,7 @@ canonical: "/docs/manual/latest/external" # External (Bind to Any JS Library) -`external` is the primary ReScript features for bringing in and using JavaScript values. +`external` is the primary ReScript feature for bringing in and using JavaScript values. `external` is like a let binding, but: - The right side of `=` isn't a value; it's the name of the JS value you're referring to. diff --git a/pages/docs/manual/v11.0.0/external.mdx b/pages/docs/manual/v11.0.0/external.mdx index b4d3a89f9..f3cfaaa32 100644 --- a/pages/docs/manual/v11.0.0/external.mdx +++ b/pages/docs/manual/v11.0.0/external.mdx @@ -6,7 +6,7 @@ canonical: "/docs/manual/v11.0.0/external" # External (Bind to Any JS Library) -`external` is the primary ReScript features for bringing in and using JavaScript values. +`external` is the primary ReScript feature for bringing in and using JavaScript values. `external` is like a let binding, but: - The right side of `=` isn't a value; it's the name of the JS value you're referring to. diff --git a/pages/docs/manual/v12.0.0/external.mdx b/pages/docs/manual/v12.0.0/external.mdx index fd91010dd..829da3879 100644 --- a/pages/docs/manual/v12.0.0/external.mdx +++ b/pages/docs/manual/v12.0.0/external.mdx @@ -6,7 +6,7 @@ canonical: "/docs/manual/v12.0.0/external" # External (Bind to Any JS Library) -`external` is the primary ReScript features for bringing in and using JavaScript values. +`external` is the primary ReScript feature for bringing in and using JavaScript values. `external` is like a let binding, but: - The right side of `=` isn't a value; it's the name of the JS value you're referring to. diff --git a/pages/docs/manual/v8.0.0/external.mdx b/pages/docs/manual/v8.0.0/external.mdx index 32aa1b2e6..dea30c09c 100644 --- a/pages/docs/manual/v8.0.0/external.mdx +++ b/pages/docs/manual/v8.0.0/external.mdx @@ -6,7 +6,7 @@ canonical: "/docs/manual/latest/external" # External (Bind to Any JS Library) -`external` is the primary ReScript features for bringing in and using JavaScript values. +`external` is the primary ReScript feature for bringing in and using JavaScript values. `external` is like a let binding, but: - The right side of `=` isn't a value; it's the name of the JS value you're referring to. diff --git a/pages/docs/manual/v9.0.0/external.mdx b/pages/docs/manual/v9.0.0/external.mdx index 11d9552c9..95cddbe3d 100644 --- a/pages/docs/manual/v9.0.0/external.mdx +++ b/pages/docs/manual/v9.0.0/external.mdx @@ -6,7 +6,7 @@ canonical: "/docs/manual/latest/external" # External (Bind to Any JS Library) -`external` is the primary ReScript features for bringing in and using JavaScript values. +`external` is the primary ReScript feature for bringing in and using JavaScript values. `external` is like a let binding, but: - The right side of `=` isn't a value; it's the name of the JS value you're referring to. From fc636afd01f686a031d03a752ff857358ed6f230 Mon Sep 17 00:00:00 2001 From: Henrikh Kantuni Date: Tue, 28 Jan 2025 05:03:06 -0500 Subject: [PATCH 061/124] Fix typo in the "Object Method" section (#965) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix typo "is the primary ReScript features" → "is the primary ReScript feature" * Fix typo (v8) * Fix typo (v9) * Fix typo (v10) * Fix typo (v11) * Fix typo in the "Object Method" section (v8) "to a JS objects" → "to JS objects" * Fix typo (v12) * Fix typo (v11) * Fix typo (v10) * Fix typo (v9) --- pages/docs/manual/v10.0.0/bind-to-js-function.mdx | 2 +- pages/docs/manual/v11.0.0/bind-to-js-function.mdx | 2 +- pages/docs/manual/v12.0.0/bind-to-js-function.mdx | 2 +- pages/docs/manual/v8.0.0/bind-to-js-function.mdx | 2 +- pages/docs/manual/v9.0.0/bind-to-js-function.mdx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/docs/manual/v10.0.0/bind-to-js-function.mdx b/pages/docs/manual/v10.0.0/bind-to-js-function.mdx index 90a2ab899..891042463 100644 --- a/pages/docs/manual/v10.0.0/bind-to-js-function.mdx +++ b/pages/docs/manual/v10.0.0/bind-to-js-function.mdx @@ -84,7 +84,7 @@ MyGame.draw(10, 20, undefined); ## Object Method -Functions attached to a JS objects (other than JS modules) require a special way of binding to them, using `send`: +Functions attached to JS objects (other than JS modules) require a special way of binding to them, using `send`: diff --git a/pages/docs/manual/v11.0.0/bind-to-js-function.mdx b/pages/docs/manual/v11.0.0/bind-to-js-function.mdx index f893d693b..f29c8abd8 100644 --- a/pages/docs/manual/v11.0.0/bind-to-js-function.mdx +++ b/pages/docs/manual/v11.0.0/bind-to-js-function.mdx @@ -82,7 +82,7 @@ MyGame.draw(10, 20, undefined); ## Object Method -Functions attached to a JS objects (other than JS modules) require a special way of binding to them, using `send`: +Functions attached to JS objects (other than JS modules) require a special way of binding to them, using `send`: diff --git a/pages/docs/manual/v12.0.0/bind-to-js-function.mdx b/pages/docs/manual/v12.0.0/bind-to-js-function.mdx index 360ed48a0..1f0fe26a7 100644 --- a/pages/docs/manual/v12.0.0/bind-to-js-function.mdx +++ b/pages/docs/manual/v12.0.0/bind-to-js-function.mdx @@ -82,7 +82,7 @@ MyGame.draw(10, 20, undefined); ## Object Method -Functions attached to a JS objects (other than JS modules) require a special way of binding to them, using `send`: +Functions attached to JS objects (other than JS modules) require a special way of binding to them, using `send`: diff --git a/pages/docs/manual/v8.0.0/bind-to-js-function.mdx b/pages/docs/manual/v8.0.0/bind-to-js-function.mdx index 7b67f769d..3aed460ca 100644 --- a/pages/docs/manual/v8.0.0/bind-to-js-function.mdx +++ b/pages/docs/manual/v8.0.0/bind-to-js-function.mdx @@ -103,7 +103,7 @@ MyGame.draw(10, 20, undefined); ## Object Method -Functions attached to a JS objects (other than JS modules) require a special way of binding to them, using `bs.send`: +Functions attached to JS objects (other than JS modules) require a special way of binding to them, using `bs.send`: diff --git a/pages/docs/manual/v9.0.0/bind-to-js-function.mdx b/pages/docs/manual/v9.0.0/bind-to-js-function.mdx index a1ab78b21..303781bdf 100644 --- a/pages/docs/manual/v9.0.0/bind-to-js-function.mdx +++ b/pages/docs/manual/v9.0.0/bind-to-js-function.mdx @@ -84,7 +84,7 @@ MyGame.draw(10, 20, undefined); ## Object Method -Functions attached to a JS objects (other than JS modules) require a special way of binding to them, using `send`: +Functions attached to JS objects (other than JS modules) require a special way of binding to them, using `send`: From a71ae31221e3045a9654bed300b01f97ed70e62d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Thu, 30 Jan 2025 20:51:12 +0100 Subject: [PATCH 062/124] load stdlib runtime in playground (#964) --- package.json | 1 + src/RenderPanel.res | 12 +++-- src/bindings/Babel.res | 84 ++++++++++++++++++++++------- src/bindings/Webapi.res | 3 ++ src/common/CompilerManagerHook.res | 3 ++ src/common/CompilerManagerHook.resi | 4 ++ src/common/EvalIFrame.res | 19 ++++--- 7 files changed, 99 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 271070c67..ef6303763 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ }, "scripts": { "dev": "next", + "res:watch": "rescript build -w", "build": "rescript && npm run update-index && next build", "test": "node scripts/test-examples.mjs && node scripts/test-hrefs.mjs", "reanalyze": "reanalyze -all-cmt .", diff --git a/src/RenderPanel.res b/src/RenderPanel.res index afd14106d..7fa692790 100644 --- a/src/RenderPanel.res +++ b/src/RenderPanel.res @@ -10,14 +10,20 @@ let make = (~compilerState: CompilerManagerHook.state, ~clearLogs, ~runOutput) = React.useEffect(() => { if runOutput { switch compilerState { - | CompilerManagerHook.Ready({result: Comp(Success({js_code}))}) => + | CompilerManagerHook.Ready({selected, result: Comp(Success({js_code}))}) => clearLogs() open Babel let ast = Parser.parse(js_code, {sourceType: "module"}) - let {entryPointExists, code} = PlaygroundValidator.validate(ast) + let {entryPointExists, code, imports} = PlaygroundValidator.validate(ast) + let imports = imports->Dict.mapValues(path => { + let filename = path->String.sliceToEnd(~start=9) // the part after "./stdlib/" + CompilerManagerHook.CdnMeta.getStdlibRuntimeUrl(selected.id, filename) + }) - entryPointExists ? code->wrapReactApp->EvalIFrame.sendOutput : EvalIFrame.sendOutput(code) + entryPointExists + ? code->wrapReactApp->EvalIFrame.sendOutput(imports) + : EvalIFrame.sendOutput(code, imports) setValidReact(_ => entryPointExists) | _ => () } diff --git a/src/bindings/Babel.res b/src/bindings/Babel.res index 2726555e4..93f120809 100644 --- a/src/bindings/Babel.res +++ b/src/bindings/Babel.res @@ -10,14 +10,48 @@ module Ast = { @tag("type") type expression = ObjectExpression({properties: array}) - type variableDeclarator = { - @as("type") type_: string, - id: lval, - init?: Null.t, + module VariableDeclarator = { + @tag("type") + type t = VariableDeclarator({id: lval, init?: Null.t}) } + module Specifier = { + @tag("type") + type t = + | ImportSpecifier({local: lval}) + | ImportDefaultSpecifier({local: lval}) + | ImportNamespaceSpecifier({local: lval}) + } + + module StringLiteral = { + @tag("type") + type t = StringLiteral({value: string}) + } + + module VariableDeclaration = { + @tag("type") + type t = VariableDeclaration({kind: string, declarations: array}) + } + + module ImportDeclaration = { + @tag("type") + type t = ImportDeclaration({specifiers: array, source: StringLiteral.t}) + } + + module Identifier = { + @tag("type") + type t = Identifier({mutable name: string}) + } + @tag("type") - type node = VariableDeclaration({kind: string, declarations: array}) - type nodePath = {node: node} + type node = + | ...StringLiteral.t + | ...Specifier.t + | ...VariableDeclarator.t + | ...VariableDeclaration.t + | ...ImportDeclaration.t + | ...Identifier.t + + type nodePath<'nodeType> = {node: 'nodeType} } module Parser = { @@ -30,7 +64,7 @@ module Traverse = { } module Generator = { - @send external remove: Ast.nodePath => unit = "remove" + @send external remove: Ast.nodePath<'nodeType> => unit = "remove" type t = {code: string} @module("@babel/generator") external generator: Ast.t => t = "default" @@ -40,26 +74,42 @@ module PlaygroundValidator = { type validator = { entryPointExists: bool, code: string, + imports: Dict.t, } let validate = ast => { let entryPoint = ref(false) + let imports = Dict.make() let remove = nodePath => Generator.remove(nodePath) Traverse.traverse( ast, { - "ImportDeclaration": remove, + "ImportDeclaration": ( + { + node: ImportDeclaration({specifiers, source: StringLiteral({value: source})}), + } as nodePath: Ast.nodePath, + ) => { + if source->String.startsWith("./stdlib") { + switch specifiers { + | [ImportNamespaceSpecifier({local: Identifier({name})})] => + imports->Dict.set(name, source) + | _ => () + } + } + remove(nodePath) + }, "ExportNamedDeclaration": remove, - "VariableDeclaration": (nodePath: Ast.nodePath) => { - switch nodePath.node { - | VariableDeclaration({declarations}) if Array.length(declarations) > 0 => + "VariableDeclaration": ( + {node: VariableDeclaration({declarations})}: Ast.nodePath, + ) => { + if Array.length(declarations) > 0 { let firstDeclaration = Array.getUnsafe(declarations, 0) - switch (firstDeclaration.id, firstDeclaration.init) { - | (Identifier({name}), Some(init)) if name === "App" => - switch init->Null.toOption { - | Some(ObjectExpression({properties})) => + switch firstDeclaration { + | VariableDeclarator({id: Identifier({name}), init}) if name === "App" => + switch init { + | Value(ObjectExpression({properties})) => let foundEntryPoint = properties->Array.find(property => { switch property { | ObjectProperty({ @@ -74,12 +124,10 @@ module PlaygroundValidator = { } | _ => () } - | _ => () } }, }, ) - - {entryPointExists: entryPoint.contents, code: Generator.generator(ast).code} + {entryPointExists: entryPoint.contents, imports, code: Generator.generator(ast).code} } } diff --git a/src/bindings/Webapi.res b/src/bindings/Webapi.res index c25856ec2..55d5eecc8 100644 --- a/src/bindings/Webapi.res +++ b/src/bindings/Webapi.res @@ -27,6 +27,9 @@ module Element = { @send external postMessage: (contentWindow, string, ~targetOrigin: string=?) => unit = "postMessage" + @send + external postMessageAny: (contentWindow, 'a, ~targetOrigin: string=?) => unit = "postMessage" + module Style = { @scope("style") @set external width: (Dom.element, string) => unit = "width" @scope("style") @set external height: (Dom.element, string) => unit = "height" diff --git a/src/common/CompilerManagerHook.res b/src/common/CompilerManagerHook.res index 2a68805fa..4236657ef 100644 --- a/src/common/CompilerManagerHook.res +++ b/src/common/CompilerManagerHook.res @@ -40,6 +40,9 @@ module CdnMeta = { let getLibraryCmijUrl = (version, libraryName: string): string => `https://cdn.rescript-lang.org/${Semver.toString(version)}/${libraryName}/cmij.js` + + let getStdlibRuntimeUrl = (version, filename) => + `https://cdn.rescript-lang.org/${Semver.toString(version)}/compiler-builtins/stdlib/${filename}` } module FinalResult = { diff --git a/src/common/CompilerManagerHook.resi b/src/common/CompilerManagerHook.resi index c8c3b4b3e..5e9f8a826 100644 --- a/src/common/CompilerManagerHook.resi +++ b/src/common/CompilerManagerHook.resi @@ -27,6 +27,10 @@ type ready = { result: FinalResult.t, } +module CdnMeta: { + let getStdlibRuntimeUrl: (Semver.t, string) => string +} + type state = | Init | SetupFailed(string) diff --git a/src/common/EvalIFrame.res b/src/common/EvalIFrame.res index 99e3e5bd4..5736363c3 100644 --- a/src/common/EvalIFrame.res +++ b/src/common/EvalIFrame.res @@ -18,7 +18,6 @@ let srcDoc = `