Skip to content

Update docs api #894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions data/api/latest/belt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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)"
},
Expand Down Expand Up @@ -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)"
},
Expand All @@ -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": [
{
Expand Down Expand Up @@ -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"
},
Expand All @@ -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"
},
Expand Down Expand Up @@ -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)"
},
Expand Down
195 changes: 0 additions & 195 deletions data/api/latest/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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<option<string>>"
},
{
"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<string>"
},
{
"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",
Expand Down Expand Up @@ -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<Result.t>"
},
{
"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",
Expand Down
Loading