From 303fdf895fb2854f5616c389f15886044a50f59b Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 23 Jul 2023 16:25:14 -0300 Subject: [PATCH 01/33] testing doc gen --- index_data/api/Arg.json | 238 + index_data/api/Array.json | 369 ++ index_data/api/ArrayLabels.json | 369 ++ index_data/api/Belt.json | 144 + index_data/api/Belt_Array.json | 697 +++ index_data/api/Belt_Float.json | 80 + index_data/api/Belt_HashMap.json | 238 + index_data/api/Belt_HashMapInt.json | 176 + index_data/api/Belt_HashMapString.json | 176 + index_data/api/Belt_HashSet.json | 163 + index_data/api/Belt_HashSetInt.json | 141 + index_data/api/Belt_HashSetString.json | 141 + index_data/api/Belt_Id.json | 242 + index_data/api/Belt_Int.json | 80 + index_data/api/Belt_List.json | 809 +++ index_data/api/Belt_Map.json | 522 ++ index_data/api/Belt_MapDict.json | 421 ++ index_data/api/Belt_MapInt.json | 423 ++ index_data/api/Belt_MapString.json | 423 ++ index_data/api/Belt_MutableMap.json | 369 ++ index_data/api/Belt_MutableMapInt.json | 352 ++ index_data/api/Belt_MutableMapString.json | 352 ++ index_data/api/Belt_MutableQueue.json | 198 + index_data/api/Belt_MutableSet.json | 406 ++ index_data/api/Belt_MutableSetInt.json | 340 ++ index_data/api/Belt_MutableSetString.json | 340 ++ index_data/api/Belt_MutableStack.json | 121 + index_data/api/Belt_Option.json | 188 + index_data/api/Belt_Range.json | 88 + index_data/api/Belt_Result.json | 148 + index_data/api/Belt_Set.json | 418 ++ index_data/api/Belt_SetDict.json | 367 ++ index_data/api/Belt_SetInt.json | 327 ++ index_data/api/Belt_SetString.json | 327 ++ index_data/api/Belt_SortArray.json | 148 + index_data/api/Belt_SortArrayInt.json | 83 + index_data/api/Belt_SortArrayString.json | 83 + index_data/api/Belt_internalAVLset.json | 399 ++ index_data/api/Belt_internalAVLtree.json | 500 ++ index_data/api/Belt_internalBuckets.json | 162 + index_data/api/Belt_internalBucketsType.json | 87 + index_data/api/Belt_internalMapInt.json | 171 + index_data/api/Belt_internalMapString.json | 171 + index_data/api/Belt_internalSetBuckets.json | 129 + index_data/api/Belt_internalSetInt.json | 108 + index_data/api/Belt_internalSetString.json | 108 + index_data/api/Belt_internals.json | 379 ++ index_data/api/Buffer.json | 195 + index_data/api/Bytes.json | 416 ++ index_data/api/BytesLabels.json | 412 ++ index_data/api/Callback.json | 24 + index_data/api/CamlinternalLazy.json | 27 + index_data/api/CamlinternalMod.json | 43 + index_data/api/Char.json | 103 + index_data/api/Complex.json | 192 + index_data/api/Digest.json | 87 + index_data/api/Dom.json | 1841 +++++++ index_data/api/Dom_storage.json | 97 + index_data/api/Dom_storage2.json | 69 + index_data/api/Filename.json | 159 + index_data/api/Genlex.json | 59 + index_data/api/Hashtbl.json | 539 ++ index_data/api/HashtblLabels.json | 518 ++ index_data/api/Int32.json | 312 ++ index_data/api/Int64.json | 330 ++ index_data/api/Js.json | 579 +++ index_data/api/Js_OO.json | 397 ++ index_data/api/Js_array.json | 444 ++ index_data/api/Js_array2.json | 528 ++ index_data/api/Js_bigint.json | 15 + index_data/api/Js_cast.json | 26 + index_data/api/Js_console.json | 167 + index_data/api/Js_date.json | 743 +++ index_data/api/Js_dict.json | 123 + index_data/api/Js_exn.json | 121 + index_data/api/Js_float.json | 116 + index_data/api/Js_global.json | 116 + index_data/api/Js_int.json | 90 + index_data/api/Js_json.json | 419 ++ index_data/api/Js_list.json | 164 + index_data/api/Js_map.json | 15 + index_data/api/Js_mapperRt.json | 29 + index_data/api/Js_math.json | 582 +++ index_data/api/Js_null.json | 123 + index_data/api/Js_null_undefined.json | 123 + index_data/api/Js_obj.json | 35 + index_data/api/Js_option.json | 97 + index_data/api/Js_promise.json | 120 + index_data/api/Js_promise2.json | 122 + index_data/api/Js_re.json | 179 + index_data/api/Js_result.json | 28 + index_data/api/Js_set.json | 15 + index_data/api/Js_string.json | 405 ++ index_data/api/Js_string2.json | 483 ++ index_data/api/Js_typed_array.json | 4663 ++++++++++++++++++ index_data/api/Js_typed_array2.json | 4248 ++++++++++++++++ index_data/api/Js_types.json | 193 + index_data/api/Js_undefined.json | 117 + index_data/api/Js_vector.json | 167 + index_data/api/Js_weakmap.json | 15 + index_data/api/Js_weakset.json | 15 + index_data/api/JsxC.json | 78 + index_data/api/JsxDOMC.json | 4289 ++++++++++++++++ index_data/api/JsxDOMStyle.json | 1738 +++++++ index_data/api/JsxDOMU.json | 4289 ++++++++++++++++ index_data/api/JsxEventC.json | 2733 ++++++++++ index_data/api/JsxEventU.json | 2733 ++++++++++ index_data/api/JsxPPXReactSupportC.json | 40 + index_data/api/JsxPPXReactSupportU.json | 40 + index_data/api/JsxU.json | 78 + index_data/api/Lazy.json | 87 + index_data/api/Lexing.json | 322 ++ index_data/api/List.json | 474 ++ index_data/api/ListLabels.json | 474 ++ index_data/api/Map.json | 338 ++ index_data/api/MapLabels.json | 696 +++ index_data/api/MoreLabels.json | 1040 ++++ index_data/api/Obj.json | 78 + index_data/api/Parsing.json | 223 + index_data/api/Pervasives.json | 1251 +++++ index_data/api/PervasivesU.json | 1253 +++++ index_data/api/Queue.json | 141 + index_data/api/Random.json | 195 + index_data/api/Set.json | 347 ++ index_data/api/SetLabels.json | 731 +++ index_data/api/Sort.json | 33 + index_data/api/Stack.json | 105 + index_data/api/StdLabels.json | 30 + index_data/api/Stream.json | 177 + index_data/api/String.json | 301 ++ index_data/api/StringLabels.json | 301 ++ index_data/api/Sys.json | 615 +++ index_data/api/Uchar.json | 164 + scripts/doc-gen.mjs | 48 + 134 files changed, 59408 insertions(+) create mode 100644 index_data/api/Arg.json create mode 100644 index_data/api/Array.json create mode 100644 index_data/api/ArrayLabels.json create mode 100644 index_data/api/Belt.json create mode 100644 index_data/api/Belt_Array.json create mode 100644 index_data/api/Belt_Float.json create mode 100644 index_data/api/Belt_HashMap.json create mode 100644 index_data/api/Belt_HashMapInt.json create mode 100644 index_data/api/Belt_HashMapString.json create mode 100644 index_data/api/Belt_HashSet.json create mode 100644 index_data/api/Belt_HashSetInt.json create mode 100644 index_data/api/Belt_HashSetString.json create mode 100644 index_data/api/Belt_Id.json create mode 100644 index_data/api/Belt_Int.json create mode 100644 index_data/api/Belt_List.json create mode 100644 index_data/api/Belt_Map.json create mode 100644 index_data/api/Belt_MapDict.json create mode 100644 index_data/api/Belt_MapInt.json create mode 100644 index_data/api/Belt_MapString.json create mode 100644 index_data/api/Belt_MutableMap.json create mode 100644 index_data/api/Belt_MutableMapInt.json create mode 100644 index_data/api/Belt_MutableMapString.json create mode 100644 index_data/api/Belt_MutableQueue.json create mode 100644 index_data/api/Belt_MutableSet.json create mode 100644 index_data/api/Belt_MutableSetInt.json create mode 100644 index_data/api/Belt_MutableSetString.json create mode 100644 index_data/api/Belt_MutableStack.json create mode 100644 index_data/api/Belt_Option.json create mode 100644 index_data/api/Belt_Range.json create mode 100644 index_data/api/Belt_Result.json create mode 100644 index_data/api/Belt_Set.json create mode 100644 index_data/api/Belt_SetDict.json create mode 100644 index_data/api/Belt_SetInt.json create mode 100644 index_data/api/Belt_SetString.json create mode 100644 index_data/api/Belt_SortArray.json create mode 100644 index_data/api/Belt_SortArrayInt.json create mode 100644 index_data/api/Belt_SortArrayString.json create mode 100644 index_data/api/Belt_internalAVLset.json create mode 100644 index_data/api/Belt_internalAVLtree.json create mode 100644 index_data/api/Belt_internalBuckets.json create mode 100644 index_data/api/Belt_internalBucketsType.json create mode 100644 index_data/api/Belt_internalMapInt.json create mode 100644 index_data/api/Belt_internalMapString.json create mode 100644 index_data/api/Belt_internalSetBuckets.json create mode 100644 index_data/api/Belt_internalSetInt.json create mode 100644 index_data/api/Belt_internalSetString.json create mode 100644 index_data/api/Belt_internals.json create mode 100644 index_data/api/Buffer.json create mode 100644 index_data/api/Bytes.json create mode 100644 index_data/api/BytesLabels.json create mode 100644 index_data/api/Callback.json create mode 100644 index_data/api/CamlinternalLazy.json create mode 100644 index_data/api/CamlinternalMod.json create mode 100644 index_data/api/Char.json create mode 100644 index_data/api/Complex.json create mode 100644 index_data/api/Digest.json create mode 100644 index_data/api/Dom.json create mode 100644 index_data/api/Dom_storage.json create mode 100644 index_data/api/Dom_storage2.json create mode 100644 index_data/api/Filename.json create mode 100644 index_data/api/Genlex.json create mode 100644 index_data/api/Hashtbl.json create mode 100644 index_data/api/HashtblLabels.json create mode 100644 index_data/api/Int32.json create mode 100644 index_data/api/Int64.json create mode 100644 index_data/api/Js.json create mode 100644 index_data/api/Js_OO.json create mode 100644 index_data/api/Js_array.json create mode 100644 index_data/api/Js_array2.json create mode 100644 index_data/api/Js_bigint.json create mode 100644 index_data/api/Js_cast.json create mode 100644 index_data/api/Js_console.json create mode 100644 index_data/api/Js_date.json create mode 100644 index_data/api/Js_dict.json create mode 100644 index_data/api/Js_exn.json create mode 100644 index_data/api/Js_float.json create mode 100644 index_data/api/Js_global.json create mode 100644 index_data/api/Js_int.json create mode 100644 index_data/api/Js_json.json create mode 100644 index_data/api/Js_list.json create mode 100644 index_data/api/Js_map.json create mode 100644 index_data/api/Js_mapperRt.json create mode 100644 index_data/api/Js_math.json create mode 100644 index_data/api/Js_null.json create mode 100644 index_data/api/Js_null_undefined.json create mode 100644 index_data/api/Js_obj.json create mode 100644 index_data/api/Js_option.json create mode 100644 index_data/api/Js_promise.json create mode 100644 index_data/api/Js_promise2.json create mode 100644 index_data/api/Js_re.json create mode 100644 index_data/api/Js_result.json create mode 100644 index_data/api/Js_set.json create mode 100644 index_data/api/Js_string.json create mode 100644 index_data/api/Js_string2.json create mode 100644 index_data/api/Js_typed_array.json create mode 100644 index_data/api/Js_typed_array2.json create mode 100644 index_data/api/Js_types.json create mode 100644 index_data/api/Js_undefined.json create mode 100644 index_data/api/Js_vector.json create mode 100644 index_data/api/Js_weakmap.json create mode 100644 index_data/api/Js_weakset.json create mode 100644 index_data/api/JsxC.json create mode 100644 index_data/api/JsxDOMC.json create mode 100644 index_data/api/JsxDOMStyle.json create mode 100644 index_data/api/JsxDOMU.json create mode 100644 index_data/api/JsxEventC.json create mode 100644 index_data/api/JsxEventU.json create mode 100644 index_data/api/JsxPPXReactSupportC.json create mode 100644 index_data/api/JsxPPXReactSupportU.json create mode 100644 index_data/api/JsxU.json create mode 100644 index_data/api/Lazy.json create mode 100644 index_data/api/Lexing.json create mode 100644 index_data/api/List.json create mode 100644 index_data/api/ListLabels.json create mode 100644 index_data/api/Map.json create mode 100644 index_data/api/MapLabels.json create mode 100644 index_data/api/MoreLabels.json create mode 100644 index_data/api/Obj.json create mode 100644 index_data/api/Parsing.json create mode 100644 index_data/api/Pervasives.json create mode 100644 index_data/api/PervasivesU.json create mode 100644 index_data/api/Queue.json create mode 100644 index_data/api/Random.json create mode 100644 index_data/api/Set.json create mode 100644 index_data/api/SetLabels.json create mode 100644 index_data/api/Sort.json create mode 100644 index_data/api/Stack.json create mode 100644 index_data/api/StdLabels.json create mode 100644 index_data/api/Stream.json create mode 100644 index_data/api/String.json create mode 100644 index_data/api/StringLabels.json create mode 100644 index_data/api/Sys.json create mode 100644 index_data/api/Uchar.json create mode 100644 scripts/doc-gen.mjs diff --git a/index_data/api/Arg.json b/index_data/api/Arg.json new file mode 100644 index 000000000..fc844626d --- /dev/null +++ b/index_data/api/Arg.json @@ -0,0 +1,238 @@ +{ + "name": "Arg", + "docstrings": [ + "Parsing of command line arguments.\n\n This module provides a general mechanism for extracting options and\n arguments from the command line to the program.\n\n Syntax of command lines:\n A keyword is a character string starting with a [-].\n An option is a keyword alone or followed by an argument.\n The types of keywords are: [Unit], [Bool], [Set], [Clear],\n [String], [Set_string], [Int], [Set_int], [Float], [Set_float],\n [Tuple], [Symbol], and [Rest].\n [Unit], [Set] and [Clear] keywords take no argument. A [Rest]\n keyword takes the remaining of the command line as arguments.\n Every other keyword takes the following word on the command line\n as argument. For compatibility with GNU getopt_long, [keyword=arg]\n is also allowed.\n Arguments not preceded by a keyword are called anonymous arguments.\n\n Examples ([cmd] is assumed to be the command name):\n- [cmd -flag ](a unit option)\n- [cmd -int 1 ](an int option with argument [1])\n- [cmd -string foobar ](a string option with argument [\\\"foobar\\\"])\n- [cmd -float 12.34 ](a float option with argument [12.34])\n- [cmd a b c ](three anonymous arguments: [\\\"a\\\"], [\\\"b\\\"], and [\\\"c\\\"])\n- [cmd a b -- c d ](two anonymous arguments and a rest option with\n two arguments)" + ], + "items": [ + { + "id": "Arg.spec", + "kind": "type", + "name": "spec", + "signature": "type spec =\\n | Unit(unit => unit)\\n | Bool(bool => unit)\\n | Set(ref)\\n | Clear(ref)\\n | String(string => unit)\\n | Set_string(ref)\\n | Int(int => unit)\\n | Set_int(ref)\\n | Float(float => unit)\\n | Set_float(ref)\\n | Tuple(list)\\n | Symbol(list, string => unit)\\n | Rest(string => unit)\\n | Expand(string => array)", + "docstrings": [ + "The concrete type describing the behavior associated\n with a keyword." + ], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Unit", + "docstrings": [ + "Call the function with unit argument" + ], + "signature": "Unit(unit => unit)" + }, + { + "constructorName": "Bool", + "docstrings": [ + "Call the function with a bool argument" + ], + "signature": "Bool(bool => unit)" + }, + { + "constructorName": "Set", + "docstrings": [ + "Set the reference to true" + ], + "signature": "Set(ref)" + }, + { + "constructorName": "Clear", + "docstrings": [ + "Set the reference to false" + ], + "signature": "Clear(ref)" + }, + { + "constructorName": "String", + "docstrings": [ + "Call the function with a string argument" + ], + "signature": "String(string => unit)" + }, + { + "constructorName": "Set_string", + "docstrings": [ + "Set the reference to the string argument" + ], + "signature": "Set_string(ref)" + }, + { + "constructorName": "Int", + "docstrings": [ + "Call the function with an int argument" + ], + "signature": "Int(int => unit)" + }, + { + "constructorName": "Set_int", + "docstrings": [ + "Set the reference to the int argument" + ], + "signature": "Set_int(ref)" + }, + { + "constructorName": "Float", + "docstrings": [ + "Call the function with a float argument" + ], + "signature": "Float(float => unit)" + }, + { + "constructorName": "Set_float", + "docstrings": [ + "Set the reference to the float argument" + ], + "signature": "Set_float(ref)" + }, + { + "constructorName": "Tuple", + "docstrings": [ + "Take several arguments according to the\n spec list" + ], + "signature": "Tuple(list)" + }, + { + "constructorName": "Symbol", + "docstrings": [ + "Take one of the symbols as argument and\n call the function with the symbol" + ], + "signature": "Symbol(list, string => unit)" + }, + { + "constructorName": "Rest", + "docstrings": [ + "Stop interpreting keywords and call the\n function with each remaining argument" + ], + "signature": "Rest(string => unit)" + }, + { + "constructorName": "Expand", + "docstrings": [ + "If the remaining arguments to process\n are of the form\n [[\\\"-foo\\\"; \\\"arg\\\"] @ rest] where \\\"foo\\\" is\n registered as [Expand f], then the\n arguments [f \\\"arg\\\" @ rest] are\n processed. Only allowed in\n [parse_and_expand_argv_dynamic]." + ], + "signature": "Expand(string => array)" + } + ] + } + }, + { + "id": "Arg.key", + "kind": "type", + "name": "key", + "signature": "type key = string", + "docstrings": [] + }, + { + "id": "Arg.doc", + "kind": "type", + "name": "doc", + "signature": "type doc = string", + "docstrings": [] + }, + { + "id": "Arg.usage_msg", + "kind": "type", + "name": "usage_msg", + "signature": "type usage_msg = string", + "docstrings": [] + }, + { + "id": "Arg.anon_fun", + "kind": "type", + "name": "anon_fun", + "signature": "type anon_fun = string => unit", + "docstrings": [] + }, + { + "id": "Arg.parse", + "kind": "value", + "name": "parse", + "signature": "let parse: (list<(key, spec, doc)>, anon_fun, usage_msg) => unit", + "docstrings": [ + "[Arg.parse speclist anon_fun usage_msg] parses the command line.\n [speclist] is a list of triples [(key, spec, doc)].\n [key] is the option keyword, it must start with a ['-'] character.\n [spec] gives the option type and the function to call when this option\n is found on the command line.\n [doc] is a one-line description of this option.\n [anon_fun] is called on anonymous arguments.\n The functions in [spec] and [anon_fun] are called in the same order\n as their arguments appear on the command line.\n\n If an error occurs, [Arg.parse] exits the program, after printing\n to standard error an error message as follows:\n- The reason for the error: unknown option, invalid or missing argument, etc.\n- [usage_msg]\n- The list of options, each followed by the corresponding [doc] string.\n Beware: options that have an empty [doc] string will not be included in the\n list.\n\n For the user to be able to specify anonymous arguments starting with a\n [-], include for example [(\\\"-\\\", String anon_fun, doc)] in [speclist].\n\n By default, [parse] recognizes two unit options, [-help] and [--help],\n which will print to standard output [usage_msg] and the list of\n options, and exit the program. You can override this behaviour\n by specifying your own [-help] and [--help] options in [speclist]." + ] + }, + { + "id": "Arg.parse_dynamic", + "kind": "value", + "name": "parse_dynamic", + "signature": "let parse_dynamic: (ref>, anon_fun, usage_msg) => unit", + "docstrings": [ + "Same as {!Arg.parse}, except that the [speclist] argument is a reference\n and may be updated during the parsing. A typical use for this feature\n is to parse command lines of the form:\n- command subcommand [options]\n where the list of options depends on the value of the subcommand argument.\n @since 4.01.0" + ] + }, + { + "id": "Arg.parse_argv", + "kind": "value", + "name": "parse_argv", + "signature": "let parse_argv: (\\n ~current: ref=?,\\n array,\\n list<(key, spec, doc)>,\\n anon_fun,\\n usage_msg,\\n) => unit", + "docstrings": [ + "[Arg.parse_argv ~current args speclist anon_fun usage_msg] parses\n the array [args] as if it were the command line. It uses and updates\n the value of [~current] (if given), or {!Arg.current}. You must set\n it before calling [parse_argv]. The initial value of [current]\n is the index of the program name (argument 0) in the array.\n If an error occurs, [Arg.parse_argv] raises {!Arg.Bad} with\n the error message as argument. If option [-help] or [--help] is\n given, [Arg.parse_argv] raises {!Arg.Help} with the help message\n as argument." + ] + }, + { + "id": "Arg.parse_argv_dynamic", + "kind": "value", + "name": "parse_argv_dynamic", + "signature": "let parse_argv_dynamic: (\\n ~current: ref=?,\\n array,\\n ref>,\\n anon_fun,\\n string,\\n) => unit", + "docstrings": [ + "Same as {!Arg.parse_argv}, except that the [speclist] argument is a\n reference and may be updated during the parsing.\n See {!Arg.parse_dynamic}.\n @since 4.01.0" + ] + }, + { + "id": "Arg.parse_and_expand_argv_dynamic", + "kind": "value", + "name": "parse_and_expand_argv_dynamic", + "signature": "let parse_and_expand_argv_dynamic: (\\n ref,\\n ref>,\\n ref>,\\n anon_fun,\\n string,\\n) => unit", + "docstrings": [ + "Same as {!Arg.parse_argv_dynamic}, except that the [argv] argument is a\n reference and may be updated during the parsing of [Expand] arguments.\n See {!Arg.parse_argv_dynamic}.\n @since 4.05.0" + ] + }, + { + "id": "Arg.parse_expand", + "kind": "value", + "name": "parse_expand", + "signature": "let parse_expand: (list<(key, spec, doc)>, anon_fun, usage_msg) => unit", + "docstrings": [ + "Same as {!Arg.parse}, except that the [Expand] arguments are allowed and\n the {!current} reference is not updated.\n @since 4.05.0" + ] + }, + { + "id": "Arg.usage", + "kind": "value", + "name": "usage", + "signature": "let usage: (list<(key, spec, doc)>, usage_msg) => unit", + "docstrings": [ + "[Arg.usage speclist usage_msg] prints to standard error\n an error message that includes the list of valid options. This is\n the same message that {!Arg.parse} prints in case of error.\n [speclist] and [usage_msg] are the same as for {!Arg.parse}." + ] + }, + { + "id": "Arg.usage_string", + "kind": "value", + "name": "usage_string", + "signature": "let usage_string: (list<(key, spec, doc)>, usage_msg) => string", + "docstrings": [ + "Returns the message that would have been printed by {!Arg.usage},\n if provided with the same parameters." + ] + }, + { + "id": "Arg.align", + "kind": "value", + "name": "align", + "signature": "let align: (~limit: int=?, list<(key, spec, doc)>) => list<(key, spec, doc)>", + "docstrings": [ + "Align the documentation strings by inserting spaces at the first alignment\n separator (tab or, if tab is not found, space), according to the length of\n the keyword. Use a alignment separator as the first character in a doc\n string if you want to align the whole string. The doc strings corresponding\n to [Symbol] arguments are aligned on the next line.\n @param limit options with keyword and message longer than [limit] will not\n be used to compute the alignment." + ] + }, + { + "id": "Arg.current", + "kind": "value", + "name": "current", + "signature": "let current: ref", + "docstrings": [ + "Position (in {!Sys.argv}) of the argument being processed. You can\n change this value, e.g. to force {!Arg.parse} to skip some arguments.\n {!Arg.parse} uses the initial value of {!Arg.current} as the index of\n argument 0 (the program name) and starts parsing arguments\n at the next element." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Array.json b/index_data/api/Array.json new file mode 100644 index 000000000..c6816b7c1 --- /dev/null +++ b/index_data/api/Array.json @@ -0,0 +1,369 @@ +{ + "name": "Array", + "docstrings": [], + "items": [ + { + "id": "Array.length", + "kind": "value", + "name": "length", + "signature": "let length: array<'a> => int", + "docstrings": [ + "Return the length (number of elements) of the given array." + ] + }, + { + "id": "Array.get", + "kind": "value", + "name": "get", + "signature": "let get: (array<'a>, int) => 'a", + "docstrings": [ + "[Array.get a n] returns the element number [n] of array [a].\n The first element has number 0.\n The last element has number [Array.length a - 1].\n You can also write [a.(n)] instead of [Array.get a n].\n\n Raise [Invalid_argument \"index out of bounds\"]\n if [n] is outside the range 0 to [(Array.length a - 1)]." + ] + }, + { + "id": "Array.set", + "kind": "value", + "name": "set", + "signature": "let set: (array<'a>, int, 'a) => unit", + "docstrings": [ + "[Array.set a n x] modifies array [a] in place, replacing\n element number [n] with [x].\n You can also write [a.(n) <- x] instead of [Array.set a n x].\n\n Raise [Invalid_argument \"index out of bounds\"]\n if [n] is outside the range 0 to [Array.length a - 1]." + ] + }, + { + "id": "Array.make", + "kind": "value", + "name": "make", + "signature": "let make: (int, 'a) => array<'a>", + "docstrings": [ + "[Array.make n x] returns a fresh array of length [n],\n initialized with [x].\n All the elements of this new array are initially\n physically equal to [x] (in the sense of the [==] predicate).\n Consequently, if [x] is mutable, it is shared among all elements\n of the array, and modifying [x] through one of the array entries\n will modify all other entries at the same time.\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the value of [x] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]." + ] + }, + { + "id": "Array.create", + "kind": "value", + "name": "create", + "signature": "let create: (int, 'a) => array<'a>", + "docstrings": [ + "@deprecated [Array.create] is an alias for {!Array.make}." + ] + }, + { + "id": "Array.create_float", + "kind": "value", + "name": "create_float", + "signature": "let create_float: int => array", + "docstrings": [ + "[Array.create_float n] returns a fresh float array of length [n],\n with uninitialized data.\n @since 4.03" + ] + }, + { + "id": "Array.make_float", + "kind": "value", + "name": "make_float", + "signature": "let make_float: int => array", + "docstrings": [ + "@deprecated [Array.make_float] is an alias for {!Array.create_float}." + ] + }, + { + "id": "Array.init", + "kind": "value", + "name": "init", + "signature": "let init: (int, int => 'a) => array<'a>", + "docstrings": [ + "[Array.init n f] returns a fresh array of length [n],\n with element number [i] initialized to the result of [f i].\n In other terms, [Array.init n f] tabulates the results of [f]\n applied to the integers [0] to [n-1].\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the return type of [f] is [float], then the maximum\n size is only [Sys.max_array_length / 2]." + ] + }, + { + "id": "Array.make_matrix", + "kind": "value", + "name": "make_matrix", + "signature": "let make_matrix: (int, int, 'a) => array>", + "docstrings": [ + "[Array.make_matrix dimx dimy e] returns a two-dimensional array\n (an array of arrays) with first dimension [dimx] and\n second dimension [dimy]. All the elements of this new matrix\n are initially physically equal to [e].\n The element ([x,y]) of a matrix [m] is accessed\n with the notation [m.(x).(y)].\n\n Raise [Invalid_argument] if [dimx] or [dimy] is negative or\n greater than {!Sys.max_array_length}.\n If the value of [e] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]." + ] + }, + { + "id": "Array.create_matrix", + "kind": "value", + "name": "create_matrix", + "signature": "let create_matrix: (int, int, 'a) => array>", + "docstrings": [ + "@deprecated [Array.create_matrix] is an alias for {!Array.make_matrix}." + ] + }, + { + "id": "Array.append", + "kind": "value", + "name": "append", + "signature": "let append: (array<'a>, array<'a>) => array<'a>", + "docstrings": [ + "[Array.append v1 v2] returns a fresh array containing the\n concatenation of the arrays [v1] and [v2]." + ] + }, + { + "id": "Array.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: list> => array<'a>", + "docstrings": [ + "Same as {!Array.append}, but concatenates a list of arrays." + ] + }, + { + "id": "Array.sub", + "kind": "value", + "name": "sub", + "signature": "let sub: (array<'a>, int, int) => array<'a>", + "docstrings": [ + "[Array.sub a start len] returns a fresh array of length [len],\n containing the elements number [start] to [start + len - 1]\n of array [a].\n\n Raise [Invalid_argument \"Array.sub\"] if [start] and [len] do not\n designate a valid subarray of [a]; that is, if\n [start < 0], or [len < 0], or [start + len > Array.length a]." + ] + }, + { + "id": "Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: array<'a> => array<'a>", + "docstrings": [ + "[Array.copy a] returns a copy of [a], that is, a fresh array\n containing the same elements as [a]." + ] + }, + { + "id": "Array.fill", + "kind": "value", + "name": "fill", + "signature": "let fill: (array<'a>, int, int, 'a) => unit", + "docstrings": [ + "[Array.fill a ofs len x] modifies the array [a] in place,\n storing [x] in elements number [ofs] to [ofs + len - 1].\n\n Raise [Invalid_argument \"Array.fill\"] if [ofs] and [len] do not\n designate a valid subarray of [a]." + ] + }, + { + "id": "Array.blit", + "kind": "value", + "name": "blit", + "signature": "let blit: (array<'a>, int, array<'a>, int, int) => unit", + "docstrings": [ + "[Array.blit v1 o1 v2 o2 len] copies [len] elements\n from array [v1], starting at element number [o1], to array [v2],\n starting at element number [o2]. It works correctly even if\n [v1] and [v2] are the same array, and the source and\n destination chunks overlap.\n\n Raise [Invalid_argument \"Array.blit\"] if [o1] and [len] do not\n designate a valid subarray of [v1], or if [o2] and [len] do not\n designate a valid subarray of [v2]." + ] + }, + { + "id": "Array.to_list", + "kind": "value", + "name": "to_list", + "signature": "let to_list: array<'a> => list<'a>", + "docstrings": [ + "[Array.to_list a] returns the list of all the elements of [a]." + ] + }, + { + "id": "Array.of_list", + "kind": "value", + "name": "of_list", + "signature": "let of_list: list<'a> => array<'a>", + "docstrings": [ + "[Array.of_list l] returns a fresh array containing the elements\n of [l]." + ] + }, + { + "id": "Array.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: ('a => unit, array<'a>) => unit", + "docstrings": [ + "[Array.iter f a] applies function [f] in turn to all\n the elements of [a]. It is equivalent to\n [f a.(0); f a.(1); ...; f a.(Array.length a - 1); ()]." + ] + }, + { + "id": "Array.iteri", + "kind": "value", + "name": "iteri", + "signature": "let iteri: ((int, 'a) => unit, array<'a>) => unit", + "docstrings": [ + "Same as {!Array.iter}, but the\n function is applied with the index of the element as first argument,\n and the element itself as second argument." + ] + }, + { + "id": "Array.map", + "kind": "value", + "name": "map", + "signature": "let map: ('a => 'b, array<'a>) => array<'b>", + "docstrings": [ + "[Array.map f a] applies function [f] to all the elements of [a],\n and builds an array with the results returned by [f]:\n [[| f a.(0); f a.(1); ...; f a.(Array.length a - 1) |]]." + ] + }, + { + "id": "Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((int, 'a) => 'b, array<'a>) => array<'b>", + "docstrings": [ + "Same as {!Array.map}, but the\n function is applied to the index of the element as first argument,\n and the element itself as second argument." + ] + }, + { + "id": "Array.fold_left", + "kind": "value", + "name": "fold_left", + "signature": "let fold_left: (('a, 'b) => 'a, 'a, array<'b>) => 'a", + "docstrings": [ + "[Array.fold_left f x a] computes\n [f (... (f (f x a.(0)) a.(1)) ...) a.(n-1)],\n where [n] is the length of the array [a]." + ] + }, + { + "id": "Array.fold_right", + "kind": "value", + "name": "fold_right", + "signature": "let fold_right: (('b, 'a) => 'a, array<'b>, 'a) => 'a", + "docstrings": [ + "[Array.fold_right f a x] computes\n [f a.(0) (f a.(1) ( ... (f a.(n-1) x) ...))],\n where [n] is the length of the array [a]." + ] + }, + { + "id": "Array.iter2", + "kind": "value", + "name": "iter2", + "signature": "let iter2: (('a, 'b) => unit, array<'a>, array<'b>) => unit", + "docstrings": [ + "[Array.iter2 f a b] applies function [f] to all the elements of [a]\n and [b].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.03.0" + ] + }, + { + "id": "Array.map2", + "kind": "value", + "name": "map2", + "signature": "let map2: (('a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", + "docstrings": [ + "[Array.map2 f a b] applies function [f] to all the elements of [a]\n and [b], and builds an array with the results returned by [f]:\n [[| f a.(0) b.(0); ...; f a.(Array.length a - 1) b.(Array.length b - 1)|]].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.03.0" + ] + }, + { + "id": "Array.for_all", + "kind": "value", + "name": "for_all", + "signature": "let for_all: ('a => bool, array<'a>) => bool", + "docstrings": [ + "[Array.for_all p [|a1; ...; an|]] checks if all elements of the array\n satisfy the predicate [p]. That is, it returns\n [(p a1) && (p a2) && ... && (p an)].\n @since 4.03.0" + ] + }, + { + "id": "Array.exists", + "kind": "value", + "name": "exists", + "signature": "let exists: ('a => bool, array<'a>) => bool", + "docstrings": [ + "[Array.exists p [|a1; ...; an|]] checks if at least one element of\n the array satisfies the predicate [p]. That is, it returns\n [(p a1) || (p a2) || ... || (p an)].\n @since 4.03.0" + ] + }, + { + "id": "Array.mem", + "kind": "value", + "name": "mem", + "signature": "let mem: ('a, array<'a>) => bool", + "docstrings": [ + "[mem a l] is true if and only if [a] is equal\n to an element of [l].\n @since 4.03.0" + ] + }, + { + "id": "Array.memq", + "kind": "value", + "name": "memq", + "signature": "let memq: ('a, array<'a>) => bool", + "docstrings": [ + "Same as {!Array.mem}, but uses physical equality instead of structural\n equality to compare array elements.\n @since 4.03.0" + ] + }, + { + "id": "Array.sort", + "kind": "value", + "name": "sort", + "signature": "let sort: (('a, 'a) => int, array<'a>) => unit", + "docstrings": [ + "Sort an array in increasing order according to a comparison\n function. The comparison function must return 0 if its arguments\n compare as equal, a positive integer if the first is greater,\n and a negative integer if the first is smaller (see below for a\n complete specification). For example, {!Pervasives.compare} is\n a suitable comparison function, provided there are no floating-point\n NaN values in the data. After calling [Array.sort], the\n array is sorted in place in increasing order.\n [Array.sort] is guaranteed to run in constant heap space\n and (at most) logarithmic stack space.\n\n The current implementation uses Heap Sort. It runs in constant\n stack space.\n\n Specification of the comparison function:\n Let [a] be the array and [cmp] the comparison function. The following\n must be true for all x, y, z in a :\n- [cmp x y] > 0 if and only if [cmp y x] < 0\n- if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0\n\n When [Array.sort] returns, [a] contains the same elements as before,\n reordered in such a way that for all i and j valid indices of [a] :\n- [cmp a.(i) a.(j)] >= 0 if and only if i >= j" + ] + }, + { + "id": "Array.stable_sort", + "kind": "value", + "name": "stable_sort", + "signature": "let stable_sort: (('a, 'a) => int, array<'a>) => unit", + "docstrings": [ + "Same as {!Array.sort}, but the sorting algorithm is stable (i.e.\n elements that compare equal are kept in their original order) and\n not guaranteed to run in constant heap space.\n\n The current implementation uses Merge Sort. It uses [n/2]\n words of heap space, where [n] is the length of the array.\n It is usually faster than the current implementation of {!Array.sort}." + ] + }, + { + "id": "Array.fast_sort", + "kind": "value", + "name": "fast_sort", + "signature": "let fast_sort: (('a, 'a) => int, array<'a>) => unit", + "docstrings": [ + "Same as {!Array.sort} or {!Array.stable_sort}, whichever is faster\n on typical input." + ] + }, + { + "id": "Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (array<'a>, int) => 'a", + "docstrings": [] + }, + { + "id": "Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (array<'a>, int, 'a) => unit", + "docstrings": [] + }, + { + "id": "Floatarray.Array", + "kind": "module", + "item": { + "name": "Floatarray", + "docstrings": [], + "items": [ + { + "id": "Array.Floatarray.create", + "kind": "value", + "name": "create", + "signature": "let create: int => floatarray", + "docstrings": [] + }, + { + "id": "Array.Floatarray.length", + "kind": "value", + "name": "length", + "signature": "let length: floatarray => int", + "docstrings": [] + }, + { + "id": "Array.Floatarray.get", + "kind": "value", + "name": "get", + "signature": "let get: (floatarray, int) => float", + "docstrings": [] + }, + { + "id": "Array.Floatarray.set", + "kind": "value", + "name": "set", + "signature": "let set: (floatarray, int, float) => unit", + "docstrings": [] + }, + { + "id": "Array.Floatarray.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (floatarray, int) => float", + "docstrings": [] + }, + { + "id": "Array.Floatarray.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (floatarray, int, float) => unit", + "docstrings": [] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/index_data/api/ArrayLabels.json b/index_data/api/ArrayLabels.json new file mode 100644 index 000000000..28ff577cf --- /dev/null +++ b/index_data/api/ArrayLabels.json @@ -0,0 +1,369 @@ +{ + "name": "ArrayLabels", + "docstrings": [], + "items": [ + { + "id": "ArrayLabels.length", + "kind": "value", + "name": "length", + "signature": "let length: array<'a> => int", + "docstrings": [ + "Return the length (number of elements) of the given array." + ] + }, + { + "id": "ArrayLabels.get", + "kind": "value", + "name": "get", + "signature": "let get: (array<'a>, int) => 'a", + "docstrings": [ + "[Array.get a n] returns the element number [n] of array [a].\n The first element has number 0.\n The last element has number [Array.length a - 1].\n You can also write [a.(n)] instead of [Array.get a n].\n\n Raise [Invalid_argument \"index out of bounds\"]\n if [n] is outside the range 0 to [(Array.length a - 1)]." + ] + }, + { + "id": "ArrayLabels.set", + "kind": "value", + "name": "set", + "signature": "let set: (array<'a>, int, 'a) => unit", + "docstrings": [ + "[Array.set a n x] modifies array [a] in place, replacing\n element number [n] with [x].\n You can also write [a.(n) <- x] instead of [Array.set a n x].\n\n Raise [Invalid_argument \"index out of bounds\"]\n if [n] is outside the range 0 to [Array.length a - 1]." + ] + }, + { + "id": "ArrayLabels.make", + "kind": "value", + "name": "make", + "signature": "let make: (int, 'a) => array<'a>", + "docstrings": [ + "[Array.make n x] returns a fresh array of length [n],\n initialized with [x].\n All the elements of this new array are initially\n physically equal to [x] (in the sense of the [==] predicate).\n Consequently, if [x] is mutable, it is shared among all elements\n of the array, and modifying [x] through one of the array entries\n will modify all other entries at the same time.\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the value of [x] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]." + ] + }, + { + "id": "ArrayLabels.create", + "kind": "value", + "name": "create", + "signature": "let create: (int, 'a) => array<'a>", + "docstrings": [ + "@deprecated [Array.create] is an alias for {!Array.make}." + ] + }, + { + "id": "ArrayLabels.init", + "kind": "value", + "name": "init", + "signature": "let init: (int, ~f: int => 'a) => array<'a>", + "docstrings": [ + "[Array.init n f] returns a fresh array of length [n],\n with element number [i] initialized to the result of [f i].\n In other terms, [Array.init n f] tabulates the results of [f]\n applied to the integers [0] to [n-1].\n\n Raise [Invalid_argument] if [n < 0] or [n > Sys.max_array_length].\n If the return type of [f] is [float], then the maximum\n size is only [Sys.max_array_length / 2]." + ] + }, + { + "id": "ArrayLabels.make_matrix", + "kind": "value", + "name": "make_matrix", + "signature": "let make_matrix: (~dimx: int, ~dimy: int, 'a) => array>", + "docstrings": [ + "[Array.make_matrix dimx dimy e] returns a two-dimensional array\n (an array of arrays) with first dimension [dimx] and\n second dimension [dimy]. All the elements of this new matrix\n are initially physically equal to [e].\n The element ([x,y]) of a matrix [m] is accessed\n with the notation [m.(x).(y)].\n\n Raise [Invalid_argument] if [dimx] or [dimy] is negative or\n greater than {!Sys.max_array_length}.\n If the value of [e] is a floating-point number, then the maximum\n size is only [Sys.max_array_length / 2]." + ] + }, + { + "id": "ArrayLabels.create_matrix", + "kind": "value", + "name": "create_matrix", + "signature": "let create_matrix: (~dimx: int, ~dimy: int, 'a) => array>", + "docstrings": [ + "@deprecated [Array.create_matrix] is an alias for\n {!Array.make_matrix}." + ] + }, + { + "id": "ArrayLabels.append", + "kind": "value", + "name": "append", + "signature": "let append: (array<'a>, array<'a>) => array<'a>", + "docstrings": [ + "[Array.append v1 v2] returns a fresh array containing the\n concatenation of the arrays [v1] and [v2]." + ] + }, + { + "id": "ArrayLabels.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: list> => array<'a>", + "docstrings": [ + "Same as {!Array.append}, but concatenates a list of arrays." + ] + }, + { + "id": "ArrayLabels.sub", + "kind": "value", + "name": "sub", + "signature": "let sub: (array<'a>, ~pos: int, ~len: int) => array<'a>", + "docstrings": [ + "[Array.sub a start len] returns a fresh array of length [len],\n containing the elements number [start] to [start + len - 1]\n of array [a].\n\n Raise [Invalid_argument \"Array.sub\"] if [start] and [len] do not\n designate a valid subarray of [a]; that is, if\n [start < 0], or [len < 0], or [start + len > Array.length a]." + ] + }, + { + "id": "ArrayLabels.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: array<'a> => array<'a>", + "docstrings": [ + "[Array.copy a] returns a copy of [a], that is, a fresh array\n containing the same elements as [a]." + ] + }, + { + "id": "ArrayLabels.fill", + "kind": "value", + "name": "fill", + "signature": "let fill: (array<'a>, ~pos: int, ~len: int, 'a) => unit", + "docstrings": [ + "[Array.fill a ofs len x] modifies the array [a] in place,\n storing [x] in elements number [ofs] to [ofs + len - 1].\n\n Raise [Invalid_argument \"Array.fill\"] if [ofs] and [len] do not\n designate a valid subarray of [a]." + ] + }, + { + "id": "ArrayLabels.blit", + "kind": "value", + "name": "blit", + "signature": "let blit: (~src: array<'a>, ~src_pos: int, ~dst: array<'a>, ~dst_pos: int, ~len: int) => unit", + "docstrings": [ + "[Array.blit v1 o1 v2 o2 len] copies [len] elements\n from array [v1], starting at element number [o1], to array [v2],\n starting at element number [o2]. It works correctly even if\n [v1] and [v2] are the same array, and the source and\n destination chunks overlap.\n\n Raise [Invalid_argument \"Array.blit\"] if [o1] and [len] do not\n designate a valid subarray of [v1], or if [o2] and [len] do not\n designate a valid subarray of [v2]." + ] + }, + { + "id": "ArrayLabels.to_list", + "kind": "value", + "name": "to_list", + "signature": "let to_list: array<'a> => list<'a>", + "docstrings": [ + "[Array.to_list a] returns the list of all the elements of [a]." + ] + }, + { + "id": "ArrayLabels.of_list", + "kind": "value", + "name": "of_list", + "signature": "let of_list: list<'a> => array<'a>", + "docstrings": [ + "[Array.of_list l] returns a fresh array containing the elements\n of [l]." + ] + }, + { + "id": "ArrayLabels.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (~f: 'a => unit, array<'a>) => unit", + "docstrings": [ + "[Array.iter f a] applies function [f] in turn to all\n the elements of [a]. It is equivalent to\n [f a.(0); f a.(1); ...; f a.(Array.length a - 1); ()]." + ] + }, + { + "id": "ArrayLabels.map", + "kind": "value", + "name": "map", + "signature": "let map: (~f: 'a => 'b, array<'a>) => array<'b>", + "docstrings": [ + "[Array.map f a] applies function [f] to all the elements of [a],\n and builds an array with the results returned by [f]:\n [[| f a.(0); f a.(1); ...; f a.(Array.length a - 1) |]]." + ] + }, + { + "id": "ArrayLabels.iteri", + "kind": "value", + "name": "iteri", + "signature": "let iteri: (~f: (int, 'a) => unit, array<'a>) => unit", + "docstrings": [ + "Same as {!Array.iter}, but the\n function is applied to the index of the element as first argument,\n and the element itself as second argument." + ] + }, + { + "id": "ArrayLabels.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (~f: (int, 'a) => 'b, array<'a>) => array<'b>", + "docstrings": [ + "Same as {!Array.map}, but the\n function is applied to the index of the element as first argument,\n and the element itself as second argument." + ] + }, + { + "id": "ArrayLabels.fold_left", + "kind": "value", + "name": "fold_left", + "signature": "let fold_left: (~f: ('a, 'b) => 'a, ~init: 'a, array<'b>) => 'a", + "docstrings": [ + "[Array.fold_left f x a] computes\n [f (... (f (f x a.(0)) a.(1)) ...) a.(n-1)],\n where [n] is the length of the array [a]." + ] + }, + { + "id": "ArrayLabels.fold_right", + "kind": "value", + "name": "fold_right", + "signature": "let fold_right: (~f: ('b, 'a) => 'a, array<'b>, ~init: 'a) => 'a", + "docstrings": [ + "[Array.fold_right f a x] computes\n [f a.(0) (f a.(1) ( ... (f a.(n-1) x) ...))],\n where [n] is the length of the array [a]." + ] + }, + { + "id": "ArrayLabels.iter2", + "kind": "value", + "name": "iter2", + "signature": "let iter2: (~f: ('a, 'b) => unit, array<'a>, array<'b>) => unit", + "docstrings": [ + "[Array.iter2 f a b] applies function [f] to all the elements of [a]\n and [b].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.05.0" + ] + }, + { + "id": "ArrayLabels.map2", + "kind": "value", + "name": "map2", + "signature": "let map2: (~f: ('a, 'b) => 'c, array<'a>, array<'b>) => array<'c>", + "docstrings": [ + "[Array.map2 f a b] applies function [f] to all the elements of [a]\n and [b], and builds an array with the results returned by [f]:\n [[| f a.(0) b.(0); ...; f a.(Array.length a - 1) b.(Array.length b - 1)|]].\n Raise [Invalid_argument] if the arrays are not the same size.\n @since 4.05.0" + ] + }, + { + "id": "ArrayLabels.exists", + "kind": "value", + "name": "exists", + "signature": "let exists: (~f: 'a => bool, array<'a>) => bool", + "docstrings": [ + "[Array.exists p [|a1; ...; an|]] checks if at least one element of\n the array satisfies the predicate [p]. That is, it returns\n [(p a1) || (p a2) || ... || (p an)].\n @since 4.03.0" + ] + }, + { + "id": "ArrayLabels.for_all", + "kind": "value", + "name": "for_all", + "signature": "let for_all: (~f: 'a => bool, array<'a>) => bool", + "docstrings": [ + "[Array.for_all p [|a1; ...; an|]] checks if all elements of the array\n satisfy the predicate [p]. That is, it returns\n [(p a1) && (p a2) && ... && (p an)].\n @since 4.03.0" + ] + }, + { + "id": "ArrayLabels.mem", + "kind": "value", + "name": "mem", + "signature": "let mem: ('a, ~set: array<'a>) => bool", + "docstrings": [ + "[mem x a] is true if and only if [x] is equal\n to an element of [a].\n @since 4.03.0" + ] + }, + { + "id": "ArrayLabels.memq", + "kind": "value", + "name": "memq", + "signature": "let memq: ('a, ~set: array<'a>) => bool", + "docstrings": [ + "Same as {!Array.mem}, but uses physical equality instead of structural\n equality to compare list elements.\n @since 4.03.0" + ] + }, + { + "id": "ArrayLabels.create_float", + "kind": "value", + "name": "create_float", + "signature": "let create_float: int => array", + "docstrings": [ + "[Array.create_float n] returns a fresh float array of length [n],\n with uninitialized data.\n @since 4.03" + ] + }, + { + "id": "ArrayLabels.make_float", + "kind": "value", + "name": "make_float", + "signature": "let make_float: int => array", + "docstrings": [ + "@deprecated [Array.make_float] is an alias for\n {!Array.create_float}." + ] + }, + { + "id": "ArrayLabels.sort", + "kind": "value", + "name": "sort", + "signature": "let sort: (~cmp: ('a, 'a) => int, array<'a>) => unit", + "docstrings": [ + "Sort an array in increasing order according to a comparison\n function. The comparison function must return 0 if its arguments\n compare as equal, a positive integer if the first is greater,\n and a negative integer if the first is smaller (see below for a\n complete specification). For example, {!Pervasives.compare} is\n a suitable comparison function, provided there are no floating-point\n NaN values in the data. After calling [Array.sort], the\n array is sorted in place in increasing order.\n [Array.sort] is guaranteed to run in constant heap space\n and (at most) logarithmic stack space.\n\n The current implementation uses Heap Sort. It runs in constant\n stack space.\n\n Specification of the comparison function:\n Let [a] be the array and [cmp] the comparison function. The following\n must be true for all x, y, z in a :\n- [cmp x y] > 0 if and only if [cmp y x] < 0\n- if [cmp x y] >= 0 and [cmp y z] >= 0 then [cmp x z] >= 0\n\n When [Array.sort] returns, [a] contains the same elements as before,\n reordered in such a way that for all i and j valid indices of [a] :\n- [cmp a.(i) a.(j)] >= 0 if and only if i >= j" + ] + }, + { + "id": "ArrayLabels.stable_sort", + "kind": "value", + "name": "stable_sort", + "signature": "let stable_sort: (~cmp: ('a, 'a) => int, array<'a>) => unit", + "docstrings": [ + "Same as {!Array.sort}, but the sorting algorithm is stable (i.e.\n elements that compare equal are kept in their original order) and\n not guaranteed to run in constant heap space.\n\n The current implementation uses Merge Sort. It uses [n/2]\n words of heap space, where [n] is the length of the array.\n It is usually faster than the current implementation of {!Array.sort}." + ] + }, + { + "id": "ArrayLabels.fast_sort", + "kind": "value", + "name": "fast_sort", + "signature": "let fast_sort: (~cmp: ('a, 'a) => int, array<'a>) => unit", + "docstrings": [ + "Same as {!Array.sort} or {!Array.stable_sort}, whichever is\n faster on typical input." + ] + }, + { + "id": "ArrayLabels.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (array<'a>, int) => 'a", + "docstrings": [] + }, + { + "id": "ArrayLabels.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (array<'a>, int, 'a) => unit", + "docstrings": [] + }, + { + "id": "Floatarray.ArrayLabels", + "kind": "module", + "item": { + "name": "Floatarray", + "docstrings": [], + "items": [ + { + "id": "ArrayLabels.Floatarray.create", + "kind": "value", + "name": "create", + "signature": "let create: int => floatarray", + "docstrings": [] + }, + { + "id": "ArrayLabels.Floatarray.length", + "kind": "value", + "name": "length", + "signature": "let length: floatarray => int", + "docstrings": [] + }, + { + "id": "ArrayLabels.Floatarray.get", + "kind": "value", + "name": "get", + "signature": "let get: (floatarray, int) => float", + "docstrings": [] + }, + { + "id": "ArrayLabels.Floatarray.set", + "kind": "value", + "name": "set", + "signature": "let set: (floatarray, int, float) => unit", + "docstrings": [] + }, + { + "id": "ArrayLabels.Floatarray.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (floatarray, int) => float", + "docstrings": [] + }, + { + "id": "ArrayLabels.Floatarray.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (floatarray, int, float) => unit", + "docstrings": [] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt.json b/index_data/api/Belt.json new file mode 100644 index 000000000..ae4fa7749 --- /dev/null +++ b/index_data/api/Belt.json @@ -0,0 +1,144 @@ +{ + "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```\nopen Belt\n```\n\nat the top of your source files. After opening Belt this way, `Array` will refer to `Belt.Array`, `List` will refer to `Belt.List` etc. in the subsequent code.\n\nIf you want to open Belt globally for all files in your project instead, you can put\n\n```json\n \"bsc-flags\": [\"-open Belt\"],\n```\n\ninto your `bsconfig.json`.\n\n**Note**: this is the **only** `open` we encourage.\n\nExample usage:\n\n```\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```\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```\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```\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```\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```res example\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```\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```\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": [ + { + "id": "Belt.Belt_Id", + "kind": "moduleAlias", + "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" + ], + "signature": "module Id = Belt_Id" + }, + { + "id": "Belt.Belt_Array", + "kind": "moduleAlias", + "docstrings": [ + "[`Belt.Array`]()\n\n **mutable array**: Utilities functions" + ], + "signature": "module Array = Belt_Array" + }, + { + "id": "Belt.Belt_SortArray", + "kind": "moduleAlias", + "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`]()" + ], + "signature": "module SortArray = Belt_SortArray" + }, + { + "id": "Belt.Belt_MutableQueue", + "kind": "moduleAlias", + "docstrings": [ + "[`Belt.MutableQueue`]()\n\n An FIFO(first in first out) queue data structure" + ], + "signature": "module MutableQueue = Belt_MutableQueue" + }, + { + "id": "Belt.Belt_MutableStack", + "kind": "moduleAlias", + "docstrings": [ + "[`Belt.MutableStack`]()\n\n An FILO(first in last out) stack data structure" + ], + "signature": "module MutableStack = Belt_MutableStack" + }, + { + "id": "Belt.Belt_List", + "kind": "moduleAlias", + "docstrings": [ + "[`Belt.List`]()\n\n Utilities for List data type" + ], + "signature": "module List = Belt_List" + }, + { + "id": "Belt.Belt_Range", + "kind": "moduleAlias", + "docstrings": [ + "[`Belt.Range`]()\n\n Utilities for a closed range `(from, start)`" + ], + "signature": "module Range = Belt_Range" + }, + { + "id": "Belt.Belt_Set", + "kind": "moduleAlias", + "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" + ], + "signature": "module Set = Belt_Set" + }, + { + "id": "Belt.Belt_Map", + "kind": "moduleAlias", + "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" + ], + "signature": "module Map = Belt_Map" + }, + { + "id": "Belt.Belt_MutableSet", + "kind": "moduleAlias", + "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`]()" + ], + "signature": "module MutableSet = Belt_MutableSet" + }, + { + "id": "Belt.Belt_MutableMap", + "kind": "moduleAlias", + "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`]()" + ], + "signature": "module MutableMap = Belt_MutableMap" + }, + { + "id": "Belt.Belt_HashSet", + "kind": "moduleAlias", + "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`]()" + ], + "signature": "module HashSet = Belt_HashSet" + }, + { + "id": "Belt.Belt_HashMap", + "kind": "moduleAlias", + "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`]()" + ], + "signature": "module HashMap = Belt_HashMap" + }, + { + "id": "Belt.Belt_Option", + "kind": "moduleAlias", + "docstrings": [ + "[`Belt.Option`]()\n\n Utilities for option data type." + ], + "signature": "module Option = Belt_Option" + }, + { + "id": "Belt.Belt_Result", + "kind": "moduleAlias", + "docstrings": [ + "[`Belt.Result`]()\n\n Utilities for result data type." + ], + "signature": "module Result = Belt_Result" + }, + { + "id": "Belt.Belt_Int", + "kind": "moduleAlias", + "docstrings": [ + "[`Belt.Int`]()\n\n Utilities for Int." + ], + "signature": "module Int = Belt_Int" + }, + { + "id": "Belt.Belt_Float", + "kind": "moduleAlias", + "docstrings": [ + "[`Belt.Float`]()\n\n Utilities for Float." + ], + "signature": "module Float = Belt_Float" + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_Array.json b/index_data/api/Belt_Array.json new file mode 100644 index 000000000..46e60849e --- /dev/null +++ b/index_data/api/Belt_Array.json @@ -0,0 +1,697 @@ +{ + "name": "Belt_Array", + "docstrings": [ + "Utililites for `Array` functions.\n\n### Note about index syntax\n\nCode like `arr[0]` does *not* compile to JavaScript `arr[0]`. Reason transforms the `[]` index syntax into a function: `Array.get(arr, 0)`. By default, this uses the default standard library's `Array.get` function, which may raise an exception if the index isn't found. If you `open Belt`, it will use the `Belt.Array.get` function which returns options instead of raising exceptions. [See this for more information](../belt.mdx#array-access-runtime-safety)." + ], + "items": [ + { + "id": "Belt_Array.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = array<'a>", + "docstrings": [] + }, + { + "id": "Belt_Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t<'a> => int", + "docstrings": [ + "return the size of the array\n\n```res example\n// Returns 1\nBelt.Array.length([\"test\"])\n```" + ] + }, + { + "id": "Belt_Array.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a> => int", + "docstrings": [ + "**See** [`length`]()" + ] + }, + { + "id": "Belt_Array.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a>, int) => option<'a>", + "docstrings": [ + "If `i <= 0 <= length(arr)` returns `Some(value)` where `value` is the item at index `i`.\n If `i` is out of range returns `None`.\n ```\n Belt.Array.get([\"a\", \"b\", \"c\"], 0) == Some(\"a\")\n Belt.Array.get([\"a\", \"b\", \"c\"], 3) == None\n Belt.Array.get([\"a\", \"b\", \"c\"], -1) == None\n ```" + ] + }, + { + "id": "Belt_Array.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'a>, int) => 'a", + "docstrings": [ + "Raise an exception if `i` is out of range.\n Otherwise return the value at index `i` in `arr`." + ] + }, + { + "id": "Belt_Array.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "signature": "let getUnsafe: (t<'a>, int) => 'a", + "docstrings": [ + "`getUnsafe(arr, i)`\n\n **Unsafe**\n\n no bounds checking; this would cause type error if `i` does not stay within range" + ] + }, + { + "id": "Belt_Array.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'a>, int) => Js.undefined<'a>", + "docstrings": [ + "`getUndefined(arr, i)`\n\n It does the samething in the runtime as [`getUnsafe`]();\n it is _type safe_ since the return type still track whether it is\n in range or not" + ] + }, + { + "id": "Belt_Array.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'a>, int, 'a) => bool", + "docstrings": [ + "`set(arr, n, x)` modifies `arr` in place; it replaces the nth element of `arr` with `x`.\n Returning `false` means not updated due to out of range." + ] + }, + { + "id": "Belt_Array.setExn", + "kind": "value", + "name": "setExn", + "signature": "let setExn: (t<'a>, int, 'a) => unit", + "docstrings": [ + "`setExn(arr, i, x)` raise an exception if `i` is out of range." + ] + }, + { + "id": "Belt_Array.setUnsafe", + "kind": "value", + "name": "setUnsafe", + "signature": "let setUnsafe: (t<'a>, int, 'a) => unit", + "docstrings": [] + }, + { + "id": "Belt_Array.shuffleInPlace", + "kind": "value", + "name": "shuffleInPlace", + "signature": "let shuffleInPlace: t<'a> => unit", + "docstrings": [ + "`shuffleInPlace(arr)` randomly re-orders the items in `arr`" + ] + }, + { + "id": "Belt_Array.shuffle", + "kind": "value", + "name": "shuffle", + "signature": "let shuffle: t<'a> => t<'a>", + "docstrings": [ + "Returns a fresh array with items in original array randomly shuffled." + ] + }, + { + "id": "Belt_Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t<'a> => unit", + "docstrings": [ + "`reverseInPlace(arr)` reverses items in `arr` in place.\n\n ```res example\n let arr = [10, 11, 12, 13, 14]\n\n let () = Belt.Array.reverseInPlace(arr)\n\n arr == [14, 13, 12, 11, 10]\n ```" + ] + }, + { + "id": "Belt_Array.reverse", + "kind": "value", + "name": "reverse", + "signature": "let reverse: t<'a> => t<'a>", + "docstrings": [ + "`reverse(arr)` returns a fresh array with items in arr in reverse order.\n\n ```res example\n Belt.Array.reverse([10, 11, 12, 13, 14]) == [14, 13, 12, 11, 10]\n ```" + ] + }, + { + "id": "Belt_Array.makeUninitialized", + "kind": "value", + "name": "makeUninitialized", + "signature": "let makeUninitialized: int => array>", + "docstrings": [ + "`makeUninitialized(n)` creates an array of length `n` filled with the undefined value. You must specify the type of data that will eventually fill the array.\n\n ```res example\n let arr: array> = Belt.Array.makeUninitialized(5)\n\n Belt.Array.getExn(arr, 0) == Js.undefined\n ```" + ] + }, + { + "id": "Belt_Array.makeUninitializedUnsafe", + "kind": "value", + "name": "makeUninitializedUnsafe", + "signature": "let makeUninitializedUnsafe: int => t<'a>", + "docstrings": [ + "**Unsafe**\n\n ```res example\n let arr = Belt.Array.makeUninitializedUnsafe(5)\n\n Js.log(Belt.Array.getExn(arr, 0)) // undefined\n\n Belt.Array.setExn(arr, 0, \"example\")\n\n Js.log(Belt.Array.getExn(arr, 0) == \"example\")\n ```" + ] + }, + { + "id": "Belt_Array.make", + "kind": "value", + "name": "make", + "signature": "let make: (int, 'a) => t<'a>", + "docstrings": [ + "`make(n, e)` return an array of size `n` filled with value `e`.\n Returns an empty array when `n` is negative." + ] + }, + { + "id": "Belt_Array.range", + "kind": "value", + "name": "range", + "signature": "let range: (int, int) => array", + "docstrings": [ + "`range(start, finish)` create an inclusive array.\n\n ```res example\n Belt.Array.range(0, 3) == [0, 1, 2, 3]\n\n Belt.Array.range(3, 0) == []\n\n Belt.Array.range(3, 3) == [3]\n ```" + ] + }, + { + "id": "Belt_Array.rangeBy", + "kind": "value", + "name": "rangeBy", + "signature": "let rangeBy: (int, int, ~step: int) => array", + "docstrings": [ + "`rangeBy(start, finish, ~step)`\n\n Returns empty array when step is 0 or negative. It also return an empty array when `start > finish`.\n\n ```res example\n Belt.Array.rangeBy(0, 10, ~step=3) == [0, 3, 6, 9]\n\n Belt.Array.rangeBy(0, 12, ~step=3) == [0, 3, 6, 9, 12]\n\n Belt.Array.rangeBy(33, 0, ~step=1) == []\n\n Belt.Array.rangeBy(33, 0, ~step=-1) == []\n\n Belt.Array.rangeBy(3, 12, ~step=-1) == []\n\n Belt.Array.rangeBy(3, 3, ~step=0) == []\n\n Belt.Array.rangeBy(3, 3, ~step=1) == [3]\n ```" + ] + }, + { + "id": "Belt_Array.makeByU", + "kind": "value", + "name": "makeByU", + "signature": "let makeByU: (int, (. int) => 'a) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_Array.makeBy", + "kind": "value", + "name": "makeBy", + "signature": "let makeBy: (int, int => 'a) => t<'a>", + "docstrings": [ + "`makeBy(n, f)`\n\n Return an empty array when n is negative return an array of size n populated by `f(i)` start from `0` to `n - 1`.\n\n ```res example\n Belt.Array.makeBy(5, (i) => i) == [0, 1, 2, 3, 4]\n\n Belt.Array.makeBy(5, (i) => i * i) == [0, 1, 4, 9, 16]\n ```" + ] + }, + { + "id": "Belt_Array.makeByAndShuffleU", + "kind": "value", + "name": "makeByAndShuffleU", + "signature": "let makeByAndShuffleU: (int, (. int) => 'a) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_Array.makeByAndShuffle", + "kind": "value", + "name": "makeByAndShuffle", + "signature": "let makeByAndShuffle: (int, int => 'a) => t<'a>", + "docstrings": [ + "Equivalent to `shuffle(makeBy(n, f))`" + ] + }, + { + "id": "Belt_Array.zip", + "kind": "value", + "name": "zip", + "signature": "let zip: (t<'a>, array<'b>) => array<('a, 'b)>", + "docstrings": [ + "`zip(a, b)`\n\n Create an array of pairs from corresponding elements of a and b. Stop with the shorter array.\n\n ```res example\n Belt.Array.zip([1, 2], [3, 4, 5]) == [(1, 3), (2, 4)]\n ```" + ] + }, + { + "id": "Belt_Array.zipByU", + "kind": "value", + "name": "zipByU", + "signature": "let zipByU: (t<'a>, array<'b>, (. 'a, 'b) => 'c) => array<'c>", + "docstrings": [] + }, + { + "id": "Belt_Array.zipBy", + "kind": "value", + "name": "zipBy", + "signature": "let zipBy: (t<'a>, array<'b>, ('a, 'b) => 'c) => array<'c>", + "docstrings": [ + "`zipBy(xs, ys, f)`\n\n Create an array by applying `f` to corresponding elements of `xs` and `ys`. Stops with shorter array.\n\n Equivalent to `map(zip(xs, ys), ((a, b)) => f(a, b))`\n\n ```res example\n Belt.Array.zipBy([1, 2, 3], [4, 5], (a, b) => 2 * a + b) == [6, 9]\n ```" + ] + }, + { + "id": "Belt_Array.unzip", + "kind": "value", + "name": "unzip", + "signature": "let unzip: array<('a, 'b)> => (t<'a>, array<'b>)", + "docstrings": [ + "`unzip(a)` takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.\n\n ```res example\n Belt.Array.unzip([(1, 2), (3, 4)]) == ([1, 3], [2, 4])\n\n Belt.Array.unzip([(1, 2), (3, 4), (5, 6), (7, 8)]) == ([1, 3, 5, 7], [2, 4, 6, 8])\n ```" + ] + }, + { + "id": "Belt_Array.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (t<'a>, t<'a>) => t<'a>", + "docstrings": [ + "`concat(xs, ys)`\n\n Returns a fresh array containing the concatenation of the arrays `v1` and `v2`;so even if `v1` or `v2` is empty; it can not be shared\n\n ```res example\n Belt.Array.concat([1, 2, 3], [4, 5]) == [1, 2, 3, 4, 5]\n\n Belt.Array.concat([], [\"a\", \"b\", \"c\"]) == [\"a\", \"b\", \"c\"]\n ```" + ] + }, + { + "id": "Belt_Array.concatMany", + "kind": "value", + "name": "concatMany", + "signature": "let concatMany: array> => t<'a>", + "docstrings": [ + "`concatMany(xss)`\n\n Returns a fresh array as the concatenation of `xss` (an array of arrays)\n\n ```res example\n Belt.Array.concatMany([[1, 2, 3], [4, 5, 6], [7, 8]]) == [1, 2, 3, 4, 5, 6, 7, 8]\n ```" + ] + }, + { + "id": "Belt_Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t<'a>, ~offset: int, ~len: int) => t<'a>", + "docstrings": [ + "`slice(xs, offset, len)` creates a new array with the len elements of `xs`\n starting at `offset` for `offset` can be negative;and is evaluated as\n `length(xs) - offset(slice, xs) - 1(1)` means get the last element as a\n singleton array `slice(xs, ~-len, len)` will return a copy of the array if the\n array does not have enough data; `slice` extracts through the end of sequence.\n\n if `len` is negative; returns the empty array.\n\n ```res example\n Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=2, ~len=3) == [12, 13, 14]\n\n Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=-4, ~len=3) == [13, 14, 15]\n\n Belt.Array.slice([10, 11, 12, 13, 14, 15, 16], ~offset=4, ~len=9) == [14, 15, 16]\n ```" + ] + }, + { + "id": "Belt_Array.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "signature": "let sliceToEnd: (t<'a>, int) => t<'a>", + "docstrings": [ + "`sliceToEnd(xs, offset)` creates a new array with the elements of `xs` starting at `offset`\n\n `offset` can be negative; and is evaluated as `length(xs) - offset(sliceToEnd, xs) - 1` means get the last element as a singleton array\n\n `sliceToEnd(xs, 0)` will return a copy of the array\n\n ```res example\n Belt.Array.sliceToEnd([10, 11, 12, 13, 14, 15, 16], 2) == [12, 13, 14, 15, 16]\n\n Belt.Array.sliceToEnd([10, 11, 12, 13, 14, 15, 16], -4) == [13, 14, 15, 16]\n ```" + ] + }, + { + "id": "Belt_Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [ + "`copy(a)`\n\n Returns a copy of a; that is; a fresh array containing the same elements as a." + ] + }, + { + "id": "Belt_Array.fill", + "kind": "value", + "name": "fill", + "signature": "let fill: (t<'a>, ~offset: int, ~len: int, 'a) => unit", + "docstrings": [ + "`fill(arr, ~offset, ~len, x)`\n\n Modifies `arr` in place, storing `x` in elements number `offset` to `offset + len - 1`.\n `offset` can be negative; and is evaluated as `length(arr - offset)`\n\n `fill(arr, ~offset=-1, ~len=1)` means fill the last element, if the array does not have enough data; `fill` will ignore it\n\n ```res example\n let arr = Belt.Array.makeBy(5, (i) => i)\n\n Belt.Array.fill(arr, ~offset=2, ~len=2, 9)\n\n arr == [0, 1, 9, 9, 4]\n\n Belt.Array.fill(arr, ~offset=7, ~len=2, 8)\n\n arr == [0, 1, 9, 9, 4]" + ] + }, + { + "id": "Belt_Array.blit", + "kind": "value", + "name": "blit", + "signature": "let blit: (~src: t<'a>, ~srcOffset: int, ~dst: t<'a>, ~dstOffset: int, ~len: int) => unit", + "docstrings": [ + "`blit(~src=v1, ~srcOffset=o1, ~dst=v2, ~dstOffset=o2, ~len)`\n\n copies `len` elements from array `v1`;starting at element number `o1`;to array `v2`, starting at element number `o2`.\n\n It works correctly even if `v1` and `v2` are the same array;and the source and destination chunks overlap.\n\n `offset` can be negative; `-1` means `len - 1`; if `len + offset` is still negative;it will be set as 0\n\n For each of the examples;presume that `v1 == [10, 11, 12, 13, 14, 15, 16, 17]` and `v2 == [20, 21, 22, 23, 24, 25, 26, 27]`. The result shown is the content of the destination array.\n\n ```res example\n let v1 = [10, 11, 12, 13, 14, 15, 16, 17]\n let v2 = [20, 21, 22, 23, 24, 25, 26, 27]\n\n Belt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v2, ~dstOffset=2, ~len=3)\n v2 == [20, 21, 14, 15, 16, 25, 26, 27]\n\n Belt.Array.blit(~src=v1, ~srcOffset=4, ~dst=v1, ~dstOffset=2, ~len=3)\n v1 == [10, 11, 14, 15, 16, 15, 16, 17]\n ```" + ] + }, + { + "id": "Belt_Array.blitUnsafe", + "kind": "value", + "name": "blitUnsafe", + "signature": "let blitUnsafe: (~src: t<'a>, ~srcOffset: int, ~dst: t<'a>, ~dstOffset: int, ~len: int) => unit", + "docstrings": [ + "Unsafe blit without bounds checking." + ] + }, + { + "id": "Belt_Array.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a>, (. 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a>, 'a => unit) => unit", + "docstrings": [ + "`forEach(xs, f)`\n\n Call `f` on each element of `xs` from the beginning to end. `f` returns `unit`;so no new array is created. Use `forEach` when you are primarily concerned with repetitively creating side effects.\n\n ```res example\n Belt.Array.forEach([\"a\", \"b\", \"c\"], x => Js.log(\"Item: \" ++ x))\n\n /*\n prints:\n Item: a\n Item: b\n Item: c\n */\n let total = ref(0)\n\n Belt.Array.forEach([1, 2, 3, 4], x => total := total.contents + x)\n\n total.contents == 1 + 2 + 3 + 4\n ```" + ] + }, + { + "id": "Belt_Array.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => array<'b>", + "docstrings": [] + }, + { + "id": "Belt_Array.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'a>, 'a => 'b) => array<'b>", + "docstrings": [ + "`map(xs, f)`\n\n Returns a new array by calling `f` for each element of `xs` from the beginning to end.\n\n ```res example\n Belt.Array.map([1, 2], (x) => x + 1) == [3, 4]\n ```" + ] + }, + { + "id": "Belt_Array.flatMapU", + "kind": "value", + "name": "flatMapU", + "signature": "let flatMapU: (t<'a>, (. 'a) => array<'b>) => array<'b>", + "docstrings": [] + }, + { + "id": "Belt_Array.flatMap", + "kind": "value", + "name": "flatMap", + "signature": "let flatMap: (t<'a>, 'a => array<'b>) => array<'b>", + "docstrings": [ + "`flatMap(xs, f)`\n\n **Returns** a new array by calling `f` for each element of `xs` from\n the beginning to end, concatenating the results.\n\n ```res example\n flatMap([1, 2], x => [x + 10, x + 20]) == [11, 21, 12, 22]\n ```" + ] + }, + { + "id": "Belt_Array.getByU", + "kind": "value", + "name": "getByU", + "signature": "let getByU: (t<'a>, (. 'a) => bool) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_Array.getBy", + "kind": "value", + "name": "getBy", + "signature": "let getBy: (t<'a>, 'a => bool) => option<'a>", + "docstrings": [ + "`getBy(xs, p)`\n\n Returns `Some(value)` for the first value in `xs` that satisifies the predicate function `p`; returns `None` if no element satisifies the function.\n\n ```res example\n Belt.Array.getBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(4)\n Belt.Array.getBy([15, 13, 11], (x) => mod(x, 2) == 0) == None\n ```" + ] + }, + { + "id": "Belt_Array.getIndexByU", + "kind": "value", + "name": "getIndexByU", + "signature": "let getIndexByU: (t<'a>, (. 'a) => bool) => option", + "docstrings": [] + }, + { + "id": "Belt_Array.getIndexBy", + "kind": "value", + "name": "getIndexBy", + "signature": "let getIndexBy: (t<'a>, 'a => bool) => option", + "docstrings": [ + "`getIndexBy(xs, p)` returns `Some(index)` for the first value in `xs` that satisifies the predicate function `p`;\n returns `None` if no element satisifies the function.\n\n ```res example\n Belt.Array.getIndexBy([1, 4, 3, 2], (x) => mod(x, 2) == 0) == Some(1)\n Belt.Array.getIndexBy([15, 13, 11], (x) => mod(x, 2) == 0) == None\n ```" + ] + }, + { + "id": "Belt_Array.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t<'a>, (. 'a) => bool) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_Array.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t<'a>, 'a => bool) => t<'a>", + "docstrings": [ + "`keep(xs, p)` returns a new array that keep all elements satisfy `p`." + ] + }, + { + "id": "Belt_Array.keepWithIndexU", + "kind": "value", + "name": "keepWithIndexU", + "signature": "let keepWithIndexU: (t<'a>, (. 'a, int) => bool) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_Array.keepWithIndex", + "kind": "value", + "name": "keepWithIndex", + "signature": "let keepWithIndex: (t<'a>, ('a, int) => bool) => t<'a>", + "docstrings": [ + "`keepWithIndex(xs, p)`\n\n Returns a new array that keep all elements satisfy `p`.\n\n ```res example\n Belt.Array.keepWithIndex([1, 2, 3], (_x, i) => i == 1) == [2]\n ```" + ] + }, + { + "id": "Belt_Array.keepMapU", + "kind": "value", + "name": "keepMapU", + "signature": "let keepMapU: (t<'a>, (. 'a) => option<'b>) => array<'b>", + "docstrings": [] + }, + { + "id": "Belt_Array.keepMap", + "kind": "value", + "name": "keepMap", + "signature": "let keepMap: (t<'a>, 'a => option<'b>) => array<'b>", + "docstrings": [ + "`keepMap(xs, p)`\n\n Returns a new array that keep all elements that return a non-None applied `p`.\n\n ```res example\n Belt.Array.keepMap([1, 2, 3], x =>\n if mod(x, 2) == 0 {\n Some(x)\n } else {\n None\n }\n )\n == [2]\n ```" + ] + }, + { + "id": "Belt_Array.forEachWithIndexU", + "kind": "value", + "name": "forEachWithIndexU", + "signature": "let forEachWithIndexU: (t<'a>, (. int, 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_Array.forEachWithIndex", + "kind": "value", + "name": "forEachWithIndex", + "signature": "let forEachWithIndex: (t<'a>, (int, 'a) => unit) => unit", + "docstrings": [ + "`forEachWithIndex(xs, f)`\n\n The same as `Belt.Array.forEach`;\n except that `f` is supplied two arguments: the index starting from 0 and the element from `xs`.\n\n ```res example\n Belt.Array.forEachWithIndex([\"a\", \"b\", \"c\"], (i, x) => Js.log(\"Item \" ++ Belt.Int.toString(i) ++ \" is \" ++ x))\n\n /*\n prints:\n Item 0 is a\n Item 1 is b\n Item 2 is cc\n */\n let total = ref(0)\n\n Belt.Array.forEachWithIndex([10, 11, 12, 13], (i, x) => total := total.contents + x + i)\n\n total.contents == 0 + 10 + 1 + 11 + 2 + 12 + 3 + 13\n ```" + ] + }, + { + "id": "Belt_Array.mapWithIndexU", + "kind": "value", + "name": "mapWithIndexU", + "signature": "let mapWithIndexU: (t<'a>, (. int, 'a) => 'b) => array<'b>", + "docstrings": [] + }, + { + "id": "Belt_Array.mapWithIndex", + "kind": "value", + "name": "mapWithIndex", + "signature": "let mapWithIndex: (t<'a>, (int, 'a) => 'b) => array<'b>", + "docstrings": [ + "`mapWithIndex(xs, f)`\n\n `mapWithIndex(xs, f)` applies `f` to each element of `xs`. Function `f` takes two arguments: the index starting from 0 and the element from `xs`.\n\n ```res example\n Belt.Array.mapWithIndex([1, 2, 3], (i, x) => i + x) == [0 + 1, 1 + 2, 2 + 3]\n ```" + ] + }, + { + "id": "Belt_Array.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t<'a>, (. 'a) => bool) => (t<'a>, t<'a>)", + "docstrings": [] + }, + { + "id": "Belt_Array.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t<'a>, 'a => bool) => (t<'a>, t<'a>)", + "docstrings": [ + "`partition(f, a)` split array into tuple of two arrays based on predicate `f`; first of tuple where predicate cause true, second where predicate cause false\n\n ```res example\n Belt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) == 0) == ([2, 4], [1, 3, 5])\n\n Belt.Array.partition([1, 2, 3, 4, 5], (x) => mod(x, 2) != 0) == ([1, 3, 5], [2, 4])\n ```" + ] + }, + { + "id": "Belt_Array.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (array<'b>, 'a, (. 'a, 'b) => 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (array<'b>, 'a, ('a, 'b) => 'a) => 'a", + "docstrings": [ + "`reduce(xs, init, f)`\n\n Applies `f` to each element of `xs` from beginning to end. Function `f` has two parameters: the item from the list and an “accumulator”; which starts with a value of `init`. `reduce` returns the final value of the accumulator.\n\n ```res example\n Belt.Array.reduce([2, 3, 4], 1, (a, b) => a + b) == 10\n\n Belt.Array.reduce([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"abcd\"\n ```" + ] + }, + { + "id": "Belt_Array.reduceReverseU", + "kind": "value", + "name": "reduceReverseU", + "signature": "let reduceReverseU: (array<'b>, 'a, (. 'a, 'b) => 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_Array.reduceReverse", + "kind": "value", + "name": "reduceReverse", + "signature": "let reduceReverse: (array<'b>, 'a, ('a, 'b) => 'a) => 'a", + "docstrings": [ + "`reduceReverse(xs, init, f)`\n\n Works like `Belt_Array.reduce`; except that function `f` is applied to each item of `xs` from the last back to the first.\n\n ```res example\n Belt.Array.reduceReverse([\"a\", \"b\", \"c\", \"d\"], \"\", (a, b) => a ++ b) == \"dcba\"\n ```" + ] + }, + { + "id": "Belt_Array.reduceReverse2U", + "kind": "value", + "name": "reduceReverse2U", + "signature": "let reduceReverse2U: (t<'a>, array<'b>, 'c, (. 'c, 'a, 'b) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_Array.reduceReverse2", + "kind": "value", + "name": "reduceReverse2", + "signature": "let reduceReverse2: (t<'a>, array<'b>, 'c, ('c, 'a, 'b) => 'c) => 'c", + "docstrings": [ + "`reduceReverse2(xs, ys, init, f)`\n\n Reduces two arrays xs and ys;taking items starting at `min(length(xs), length(ys))` down to and including zero.\n\n ```res example\n Belt.Array.reduceReverse2([1, 2, 3], [1, 2], 0, (acc, x, y) => acc + x + y) == 6\n ```" + ] + }, + { + "id": "Belt_Array.reduceWithIndexU", + "kind": "value", + "name": "reduceWithIndexU", + "signature": "let reduceWithIndexU: (t<'a>, 'b, (. 'b, 'a, int) => 'b) => 'b", + "docstrings": [] + }, + { + "id": "Belt_Array.reduceWithIndex", + "kind": "value", + "name": "reduceWithIndex", + "signature": "let reduceWithIndex: (t<'a>, 'b, ('b, 'a, int) => 'b) => 'b", + "docstrings": [ + "Applies `f` to each element of `xs` from beginning to end. Function `f` has three parameters: the item from the array and an “accumulator”, which starts with a value of `init` and the index of each element. `reduceWithIndex` returns the final value of the accumulator.\n\n ```res example\n Belt.Array.reduceWithIndex([1, 2, 3, 4], 0, (acc, x, i) => acc + x + i) == 16\n ```" + ] + }, + { + "id": "Belt_Array.joinWithU", + "kind": "value", + "name": "joinWithU", + "signature": "let joinWithU: (t<'a>, string, (. 'a) => string) => string", + "docstrings": [] + }, + { + "id": "Belt_Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t<'a>, string, 'a => string) => string", + "docstrings": [ + "`joinWith(xs, sep, toString)`\n\n Concatenates all the elements of `xs` converted to string with `toString`, each separated by `sep`, the string\n given as the second argument, into a single string.\n If the array has only one element, then that element will be returned\n without using the separator.\n If the array is empty, the empty string will be returned.\n\n ```res example\n joinWith([0, 1], \", \", string_of_int) == \"0, 1\"\n joinWith([], \" \", string_of_int) == \"\"\n joinWith([1], \" \", string_of_int) == \"1\"\n ```" + ] + }, + { + "id": "Belt_Array.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'a>, (. 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Array.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'a>, 'a => bool) => bool", + "docstrings": [ + "`some(xs, p)`\n\n Returns true if at least one of the elements in `xs` satifies `p`; where `p` is a predicate: a function taking an element and returning a `bool`.\n\n ```res example\n Belt.Array.some([2, 3, 4], (x) => mod(x, 2) == 1) == true\n\n Belt.Array.some([(-1), (-3), (-5)], (x) => x > 0) == false\n ```" + ] + }, + { + "id": "Belt_Array.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'a>, (. 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Array.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'a>, 'a => bool) => bool", + "docstrings": [ + "`every(xs, p)`\n\n Returns `true` if all elements satisfy `p`; where `p` is a predicate: a function taking an element and returning a `bool`.\n\n ```res example\n Belt.Array.every([1, 3, 5], (x) => mod(x, 2) == 1) == true\n\n Belt.Array.every([1, (-3), 5], (x) => x > 0) == false\n ```" + ] + }, + { + "id": "Belt_Array.every2U", + "kind": "value", + "name": "every2U", + "signature": "let every2U: (t<'a>, array<'b>, (. 'a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Array.every2", + "kind": "value", + "name": "every2", + "signature": "let every2: (t<'a>, array<'b>, ('a, 'b) => bool) => bool", + "docstrings": [ + "`every2(xs, ys, p)`\n\n returns true if `p(xi, yi)` is true for all pairs of elements up to the shorter length (i.e. `min(length(xs), length(ys))`)\n\n ```res example\n Belt.Array.every2([1, 2, 3], [0, 1], (a, b) => a > b) == true\n\n Belt.Array.every2([], [1], (x, y) => x > y) == true\n\n Belt.Array.every2([2, 3], [1], (x, y) => x > y) == true\n\n Belt.Array.every2([0, 1], [5, 0], (x, y) => x > y) == false\n ```" + ] + }, + { + "id": "Belt_Array.some2U", + "kind": "value", + "name": "some2U", + "signature": "let some2U: (t<'a>, array<'b>, (. 'a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Array.some2", + "kind": "value", + "name": "some2", + "signature": "let some2: (t<'a>, array<'b>, ('a, 'b) => bool) => bool", + "docstrings": [ + "`some2(xs, ys, p)`\n\n returns true if `p(xi, yi)` is true for any pair of elements up to the shorter length (i.e. `min(length(xs), length(ys))`)\n\n ```res example\n Belt.Array.some2([0, 2], [1, 0, 3], (a, b) => a > b) == true\n\n Belt.Array.some2([], [1], (x, y) => x > y) == false\n\n Belt.Array.some2([2, 3], [1, 4], (x, y) => x > y) == true\n ```" + ] + }, + { + "id": "Belt_Array.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_Array.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int", + "docstrings": [ + "`cmp(xs, ys, f)`\n\n Compared by length if `length(xs) != length(ys)`; returning -1 if `length(xs) < length(ys)` or 1 if `length(xs) > length(ys)`\n Otherwise compare one by one `f(x, y)`. `f` returns\n a negative number if `x` is “less than” `y`\n zero if `x` is “equal to” `y`\n a positive number if `x` is “greater than” `y`\n The comparison returns the first non-zero result of `f`;or zero if `f` returns zero for all `x` and `y`.\n\n ```res example\n Belt.Array.cmp([1, 3, 5], [1, 4, 2], (a, b) => compare(a, b)) == -1\n\n Belt.Array.cmp([1, 3, 5], [1, 2, 3], (a, b) => compare(a, b)) == 1\n\n Belt.Array.cmp([1, 3, 5], [1, 3, 5], (a, b) => compare(a, b)) == 0\n ```" + ] + }, + { + "id": "Belt_Array.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Array.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool", + "docstrings": [ + "`eq(xs, ys)`\n\n return false if length is not the same\n otherwise compare items one by one using `f(xi, yi)`; and return true if all results are truefalse otherwise\n\n ```res example\n Belt.Array.eq([1, 2, 3], [(-1), (-2), (-3)], (a, b) => abs(a) == abs(b)) == true\n ```" + ] + }, + { + "id": "Belt_Array.truncateToLengthUnsafe", + "kind": "value", + "name": "truncateToLengthUnsafe", + "signature": "let truncateToLengthUnsafe: (t<'a>, int) => unit", + "docstrings": [ + "Unsafe `truncateToLengthUnsafe(xs, n)` sets length of array `xs` to `n`.\n\n If `n` is greater than the length of `xs`; the extra elements are set to `Js.Null_undefined.null`.\n\n If `n` is less than zero; raises a `RangeError`.\n\n ```res example\n let arr = [\"ant\", \"bee\", \"cat\", \"dog\", \"elk\"]\n\n Belt.Array.truncateToLengthUnsafe(arr, 3)\n\n arr == [\"ant\", \"bee\", \"cat\"]\n ```" + ] + }, + { + "id": "Belt_Array.initU", + "kind": "value", + "name": "initU", + "signature": "let initU: (int, (. int) => 'a) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_Array.init", + "kind": "value", + "name": "init", + "signature": "let init: (int, int => 'a) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_Array.push", + "kind": "value", + "name": "push", + "signature": "let push: (t<'a>, 'a) => unit", + "docstrings": [ + "`arr->push(item)` pushes an element `item` into an array `arr`." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_Float.json b/index_data/api/Belt_Float.json new file mode 100644 index 000000000..ebd897391 --- /dev/null +++ b/index_data/api/Belt_Float.json @@ -0,0 +1,80 @@ +{ + "name": "Belt_Float", + "docstrings": [ + "This module includes convenience methods for handling `float` types." + ], + "items": [ + { + "id": "Belt_Float.toInt", + "kind": "value", + "name": "toInt", + "signature": "let toInt: float => int", + "docstrings": [ + "Converts a given `float` to an `int`.\n\n```res example\nJs.log(Belt.Float.toInt(1.0) === 1) /* true */\n```" + ] + }, + { + "id": "Belt_Float.fromInt", + "kind": "value", + "name": "fromInt", + "signature": "let fromInt: int => float", + "docstrings": [ + "Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Float.fromInt(1) === 1.0) /* true */\n ```" + ] + }, + { + "id": "Belt_Float.fromString", + "kind": "value", + "name": "fromString", + "signature": "let fromString: string => option", + "docstrings": [ + "Converts a given `string` to a `float`. Returns `Some(float)` when the input is a number, `None` otherwise.\n\n ```res example\n Js.log(Belt.Float.fromString(\"1.0\") === Some(1.0)) /* true */\n ```" + ] + }, + { + "id": "Belt_Float.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: float => string", + "docstrings": [ + "Converts a given `float` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Float.toString(1.0) === \"1.0\") /* true */\n ```" + ] + }, + { + "id": "Belt_Float.+", + "kind": "value", + "name": "+", + "signature": "let _: %rescript.typehole", + "docstrings": [ + "Addition of two `float` values.\n Can be opened in a module to avoid dot-notation (`+.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n ```res example\n open Belt.Float\n Js.log(2.0 + 2.0 === 4.0) /* true */\n ```" + ] + }, + { + "id": "Belt_Float.-", + "kind": "value", + "name": "-", + "signature": "let _: %rescript.typehole", + "docstrings": [ + "Subtraction of two `float` values.\n Can be opened in a module to avoid dot-notation (`-.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n ```res example\n open Belt.Float\n Js.log(2.0 - 1.0 === 1.0) /* true */\n ```" + ] + }, + { + "id": "Belt_Float.*", + "kind": "value", + "name": "*", + "signature": "let _: %rescript.typehole", + "docstrings": [ + "Multiplication of two `float` values.\n Can be opened in a module to avoid dot-notation (`*.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n ```res example\n open Belt.Float\n Js.log(2.0 * 2.0 === 4.0) /* true */\n ```" + ] + }, + { + "id": "Belt_Float./", + "kind": "value", + "name": "/", + "signature": "let _: %rescript.typehole", + "docstrings": [ + "Division of two `float` values.\n Can be opened in a module to avoid dot-notation (`/.`), however this yields a shadow warning (Warning number 44) in the default configuration.\n\n ```res example\n open Belt.Float\n Js.log(4.0 / 2.0 === 2.0) /* true */\n ```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_HashMap.json b/index_data/api/Belt_HashMap.json new file mode 100644 index 000000000..f06fff7c4 --- /dev/null +++ b/index_data/api/Belt_HashMap.json @@ -0,0 +1,238 @@ +{ + "name": "Belt_HashMap", + "docstrings": [ + "A **mutable** Hash map which allows customized [`hash`]() behavior.\n\n All data are parameterized by not its only type but also a unique identity in\n the time of initialization, so that two _HashMaps of ints_ initialized with different\n _hash_ functions will have different type.\n\n For example:\n\n ```\n type t = int\n module I0 = unpack(Belt.Id.hashableU(~hash=(. a: t) => \"&\"(a, 0xff_ff), ~eq=(. a, b) => a == b))\n let s0: t<_, string, _> = make(~hintSize=40, ~id=module(I0))\n\n module I1 = unpack(Belt.Id.hashableU(~hash=(. a: t) => \"&\"(a, 0xff), ~eq=(. a, b) => a == b))\n let s1: t<_, string, _> = make(~hintSize=40, ~id=module(I1))\n ```\n\n The invariant must be held: for two elements who are _equal_,\n their hashed value should be the same\n\n Here the compiler would infer `s0` and `s1` having different type so that\n it would not mix.\n\n ```\n let s0: t\n let s1: t\n ```\n\n We can add elements to the collection:\n\n ```\n let () = {\n add(s1, 0, \"3\")\n add(s1, 1, \"3\")\n }\n ```\n\n Since this is an mutable data strucure, `s1` will contain two pairs." + ], + "items": [ + { + "id": "Belt_HashMap.Belt_HashMapInt", + "kind": "moduleAlias", + "docstrings": [ + "Specalized when key type is `int`, more efficient\n than the generic type" + ], + "signature": "module Int = Belt_HashMapInt" + }, + { + "id": "Belt_HashMap.Belt_HashMapString", + "kind": "moduleAlias", + "docstrings": [ + "Specalized when key type is `string`, more efficient\n than the generic type" + ], + "signature": "module String = Belt_HashMapString" + }, + { + "id": "Belt_HashMap.t", + "kind": "type", + "name": "t", + "signature": "type t<'key, 'value, 'id>", + "docstrings": [ + "The type of hash tables from type `'key` to type `'value`." + ] + }, + { + "id": "Belt_HashMap.id", + "kind": "type", + "name": "id", + "signature": "type id<'a, 'id> = Belt_Id.hashable<'a, 'id>", + "docstrings": [ + "The identity needed for making an empty hash map." + ] + }, + { + "id": "Belt_HashMap.make", + "kind": "value", + "name": "make", + "signature": "let make: (~hintSize: int, ~id: id<'key, 'id>) => t<'key, 'value, 'id>", + "docstrings": [ + "`make(~hintSize=10, ~id)` creates a new map by taking in the comparator and `hintSize`.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n\n Belt.HashMap.set(hMap, 0, \"a\")\n ```" + ] + }, + { + "id": "Belt_HashMap.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'key, 'value, 'id> => unit", + "docstrings": [ + "Clears a hash table.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let hMap = Belt.HashMap.fromArray([(1, \"1\")], ~id=module(IntHash))\n Belt.HashMap.clear(hMap)\n Belt.HashMap.isEmpty(hMap) == true\n ```" + ] + }, + { + "id": "Belt_HashMap.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a, 'b, 'c> => bool", + "docstrings": [ + "`isEmpty(m)` checks whether a hash map is empty.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n Belt.HashMap.isEmpty(Belt.HashMap.fromArray([(1, \"1\")], ~id=module(IntHash))) == false\n ```" + ] + }, + { + "id": "Belt_HashMap.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'key, 'value, 'id>, 'key, 'value) => unit", + "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 ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntHash))\n\n Belt.HashMap.set(s0, 2, \"3\")\n\n Belt.HashMap.valuesToArray(s0) == [\"1\", \"3\", \"3\"]\n ```" + ] + }, + { + "id": "Belt_HashMap.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'key, 'value, 'id> => t<'key, 'value, 'id>", + "docstrings": [ + "Creates copy of a hash map.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntHash))\n let s1 = Belt.HashMap.copy(s0)\n\n Belt.HashMap.set(s0, 2, \"3\")\n\n Belt.HashMap.get(s0, 2) != Belt.HashMap.get(s1, 2)\n ```" + ] + }, + { + "id": "Belt_HashMap.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'key, 'value, 'id>, 'key) => option<'value>", + "docstrings": [ + "Returns value bound under specific key. If values not exist returns `None`.\n\n```res example\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```" + ] + }, + { + "id": "Belt_HashMap.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'key, 'value, 'id>, 'key) => bool", + "docstrings": [ + "Checks if `x` is bound in `tbl`.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n\n Belt.HashMap.has(s0, 1) == true\n Belt.HashMap.has(s0, 2) == false\n ```" + ] + }, + { + "id": "Belt_HashMap.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'key, 'value, 'id>, 'key) => unit", + "docstrings": [ + "If bound exists, removes it from the hash map.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.remove(s0, 1)\n Belt.HashMap.has(s0, 1) == false\n ```" + ] + }, + { + "id": "Belt_HashMap.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'key, 'value, 'id>, (. 'key, 'value) => unit) => unit", + "docstrings": [ + "Same as [forEach](#forEach) but takes uncurried function." + ] + }, + { + "id": "Belt_HashMap.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'key, 'value, 'id>, ('key, 'value) => unit) => unit", + "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 ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.forEach(s0, (key, value) => Js.log2(key, value))\n // prints (1, \"value1\")\n ```" + ] + }, + { + "id": "Belt_HashMap.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'key, 'value, 'id>, 'c, (. 'c, 'key, 'value) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashMap.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'key, 'value, 'id>, 'c, ('c, 'key, 'value) => 'c) => 'c", + "docstrings": [ + "`reduce(tbl, init, f)` computes `(f(kN, dN) ... (f(k1, d1, init))...)`, where `k1 ... kN` are the keys of all bindings in `tbl`, and `d1 ... dN` are the associated values. Each binding is presented exactly once to `f`.\n\n The order in which the bindings are passed to `f` is unspecified. However, if the table contains several bindings for the same key, they are passed to `f` in reverse order of introduction, that is, the most recent binding is passed first.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.reduce(s0, \"\", (acc, key, value) => acc ++ (\", \" ++ value)) == \"value1, value2\"\n ```" + ] + }, + { + "id": "Belt_HashMap.keepMapInPlaceU", + "kind": "value", + "name": "keepMapInPlaceU", + "signature": "let keepMapInPlaceU: (t<'key, 'value, 'id>, (. 'key, 'value) => option<'value>) => unit", + "docstrings": [ + "Same as [keepMapInPlace](#keepMapInPlace) but takes uncurried function." + ] + }, + { + "id": "Belt_HashMap.keepMapInPlace", + "kind": "value", + "name": "keepMapInPlace", + "signature": "let keepMapInPlace: (t<'key, 'value, 'id>, ('key, 'value) => option<'value>) => unit", + "docstrings": [ + "Filters out values for which function `f` returned `None`.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.keepMapInPlace(s0, (key, value) => key == 1 ? None : Some(value))\n ```" + ] + }, + { + "id": "Belt_HashMap.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a, 'b, 'c> => int", + "docstrings": [ + "`size(tbl)` returns the number of bindings in `tbl`. It takes constant time.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.size(s0) == 2\n ```" + ] + }, + { + "id": "Belt_HashMap.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'key, 'value, 'id> => array<('key, 'value)>", + "docstrings": [ + "Returns array of key value pairs.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.toArray(s0) == [(1, \"value1\"), (2, \"value2\")]\n ```" + ] + }, + { + "id": "Belt_HashMap.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'key, 'a, 'b> => array<'key>", + "docstrings": [ + "Returns array of keys.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.keysToArray(s0) == [1, 2]\n ```" + ] + }, + { + "id": "Belt_HashMap.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'a, 'value, 'b> => array<'value>", + "docstrings": [ + "Returns array of values.\n\n ```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n\n let s0 = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(s0, 1, \"value1\")\n Belt.HashMap.set(s0, 2, \"value2\")\n\n Belt.HashMap.valuesToArray(s0) == [\"value1\", \"value2\"]\n ```" + ] + }, + { + "id": "Belt_HashMap.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<('key, 'value)>, ~id: id<'key, 'id>) => t<'key, 'value, 'id>", + "docstrings": [ + "Creates new hash map from array of pairs.\n\nReturns array of values.\n\n```res example\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```" + ] + }, + { + "id": "Belt_HashMap.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'key, 'value, 'id>, array<('key, 'value)>) => unit", + "docstrings": [ + "```res example\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```" + ] + }, + { + "id": "Belt_HashMap.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "signature": "let getBucketHistogram: t<'a, 'b, 'c> => array", + "docstrings": [ + "```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n let hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(hMap, 1, \"1\")\n\n Belt.HashMap.getBucketHistogram(hMap)\n ```" + ] + }, + { + "id": "Belt_HashMap.logStats", + "kind": "value", + "name": "logStats", + "signature": "let logStats: t<'a, 'b, 'c> => unit", + "docstrings": [ + "```res example\n module IntHash = Belt.Id.MakeHashable({\n type t = int\n let hash = a => a\n let eq = (a, b) => a == b\n })\n let hMap = Belt.HashMap.make(~hintSize=10, ~id=module(IntHash))\n Belt.HashMap.set(hMap, 1, \"1\")\n\n Belt.HashMap.logStats(hMap)\n ```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_HashMapInt.json b/index_data/api/Belt_HashMapInt.json new file mode 100644 index 000000000..7054e7810 --- /dev/null +++ b/index_data/api/Belt_HashMapInt.json @@ -0,0 +1,176 @@ +{ + "name": "Belt_HashMapInt", + "docstrings": [], + "items": [ + { + "id": "Belt_HashMapInt.key", + "kind": "type", + "name": "key", + "signature": "type key = int", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.t", + "kind": "type", + "name": "t", + "signature": "type t<'b>", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.make", + "kind": "value", + "name": "make", + "signature": "let make: (~hintSize: int) => t<'b>", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'b> => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a> => bool", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'a>, key, 'a) => unit", + "docstrings": [ + "`setDone tbl k v` if `k` does not exist,\n add the binding `k,v`, otherwise, update the old value with the new\n `v`" + ] + }, + { + "id": "Belt_HashMapInt.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a>, key) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'b>, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a>, key) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'b>, (. key, 'b) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'b>, (key, 'b) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'b>, 'c, (. 'c, key, 'b) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'b>, 'c, ('c, key, 'b) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.keepMapInPlaceU", + "kind": "value", + "name": "keepMapInPlaceU", + "signature": "let keepMapInPlaceU: (t<'a>, (. key, 'a) => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.keepMapInPlace", + "kind": "value", + "name": "keepMapInPlace", + "signature": "let keepMapInPlace: (t<'a>, (key, 'a) => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a> => int", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a> => array<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'a> => array", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'a> => array<'a>", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<(key, 'a)> => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'a>, array<(key, 'a)>) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "signature": "let getBucketHistogram: t<'a> => array", + "docstrings": [] + }, + { + "id": "Belt_HashMapInt.logStats", + "kind": "value", + "name": "logStats", + "signature": "let logStats: t<'a> => unit", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_HashMapString.json b/index_data/api/Belt_HashMapString.json new file mode 100644 index 000000000..46024b49d --- /dev/null +++ b/index_data/api/Belt_HashMapString.json @@ -0,0 +1,176 @@ +{ + "name": "Belt_HashMapString", + "docstrings": [], + "items": [ + { + "id": "Belt_HashMapString.key", + "kind": "type", + "name": "key", + "signature": "type key = string", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.t", + "kind": "type", + "name": "t", + "signature": "type t<'b>", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.make", + "kind": "value", + "name": "make", + "signature": "let make: (~hintSize: int) => t<'b>", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'b> => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a> => bool", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'a>, key, 'a) => unit", + "docstrings": [ + "`setDone tbl k v` if `k` does not exist,\n add the binding `k,v`, otherwise, update the old value with the new\n `v`" + ] + }, + { + "id": "Belt_HashMapString.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a>, key) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'b>, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a>, key) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'b>, (. key, 'b) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'b>, (key, 'b) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'b>, 'c, (. 'c, key, 'b) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'b>, 'c, ('c, key, 'b) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.keepMapInPlaceU", + "kind": "value", + "name": "keepMapInPlaceU", + "signature": "let keepMapInPlaceU: (t<'a>, (. key, 'a) => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.keepMapInPlace", + "kind": "value", + "name": "keepMapInPlace", + "signature": "let keepMapInPlace: (t<'a>, (key, 'a) => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a> => int", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a> => array<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'a> => array", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'a> => array<'a>", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<(key, 'a)> => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'a>, array<(key, 'a)>) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "signature": "let getBucketHistogram: t<'a> => array", + "docstrings": [] + }, + { + "id": "Belt_HashMapString.logStats", + "kind": "value", + "name": "logStats", + "signature": "let logStats: t<'a> => unit", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_HashSet.json b/index_data/api/Belt_HashSet.json new file mode 100644 index 000000000..1be0433c6 --- /dev/null +++ b/index_data/api/Belt_HashSet.json @@ -0,0 +1,163 @@ +{ + "name": "Belt_HashSet", + "docstrings": [ + "A **mutable** Hash set which allows customized `hash` behavior.\n\n All data are parameterized by not its only type but also a unique identity in\n the time of initialization, so that two _HashSets of ints_ initialized with\n different _hash_ functions will have different type.\n\n For example:\n\n ```res prelude\n module I0 = unpack(\n Belt.Id.hashableU(\n ~hash=(. a: int) => land(a, 65535),\n ~eq=(. a, b) => a == b,\n )\n )\n\n let s0 = Belt.HashSet.make(~id=module(I0), ~hintSize=40)\n\n module I1 = unpack(\n Belt.Id.hashableU(\n ~hash=(. a: int) => land(a, 255),\n ~eq=(. a, b) => a == b,\n )\n )\n\n let s1 = Belt.HashSet.make(~id=module(I1), ~hintSize=40)\n\n Belt.HashSet.add(s1, 0)\n Belt.HashSet.add(s1, 1)\n ```\n\n The invariant must be held: for two elements who are equal, their hashed\n value should be the same.\n\n Here the compiler would infer `s0` and `s1` having different type so that it\n would not mix.\n\n ```res sig\n let s0: Belt.HashSet.t\n let s1: Belt.HashSet.t\n ```\n\n We can add elements to the collection (see last two lines in the example\n above). Since this is an mutable data structure, `s1` will contain two pairs." + ], + "items": [ + { + "id": "Belt_HashSet.Belt_HashSetInt", + "kind": "moduleAlias", + "docstrings": [ + "Specalized when key type is `int`, more efficient\n than the generic type" + ], + "signature": "module Int = Belt_HashSetInt" + }, + { + "id": "Belt_HashSet.Belt_HashSetString", + "kind": "moduleAlias", + "docstrings": [ + "Specalized when key type is `string`, more efficient\n than the generic type" + ], + "signature": "module String = Belt_HashSetString" + }, + { + "id": "Belt_HashSet.t", + "kind": "type", + "name": "t", + "signature": "type t<'a, 'id>", + "docstrings": [] + }, + { + "id": "Belt_HashSet.id", + "kind": "type", + "name": "id", + "signature": "type id<'a, 'id> = Belt_Id.hashable<'a, 'id>", + "docstrings": [ + "The type of hash tables from type `'a` to type `'b`." + ] + }, + { + "id": "Belt_HashSet.make", + "kind": "value", + "name": "make", + "signature": "let make: (~hintSize: int, ~id: id<'a, 'id>) => t<'a, 'id>", + "docstrings": [] + }, + { + "id": "Belt_HashSet.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a, 'id> => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSet.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a, 'b> => bool", + "docstrings": [] + }, + { + "id": "Belt_HashSet.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'a, 'id>, 'a) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSet.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a, 'id> => t<'a, 'id>", + "docstrings": [] + }, + { + "id": "Belt_HashSet.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'a, 'id>, 'a) => bool", + "docstrings": [] + }, + { + "id": "Belt_HashSet.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a, 'id>, 'a) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSet.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a, 'id>, (. 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSet.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a, 'id>, 'a => unit) => unit", + "docstrings": [ + "Order unspecified." + ] + }, + { + "id": "Belt_HashSet.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'a, 'id>, 'c, (. 'c, 'a) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashSet.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a, 'id>, 'c, ('c, 'a) => 'c) => 'c", + "docstrings": [ + "Order unspecified." + ] + }, + { + "id": "Belt_HashSet.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a, 'id> => int", + "docstrings": [] + }, + { + "id": "Belt_HashSet.logStats", + "kind": "value", + "name": "logStats", + "signature": "let logStats: t<'a, 'b> => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSet.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a, 'id> => array<'a>", + "docstrings": [] + }, + { + "id": "Belt_HashSet.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<'a>, ~id: id<'a, 'id>) => t<'a, 'id>", + "docstrings": [] + }, + { + "id": "Belt_HashSet.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'a, 'id>, array<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSet.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "signature": "let getBucketHistogram: t<'a, 'b> => array", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_HashSetInt.json b/index_data/api/Belt_HashSetInt.json new file mode 100644 index 000000000..1a4d3a61d --- /dev/null +++ b/index_data/api/Belt_HashSetInt.json @@ -0,0 +1,141 @@ +{ + "name": "Belt_HashSetInt", + "docstrings": [ + "This module is [`Belt.HashSet`]() specialized with key type to be a primitive type.\n\n It is more efficient in general, the API is the same with [`Belt.HashSet`]() except its key type is fixed,\n and identity is not needed(using the built-in one)\n\n **See** [`Belt.HashSet`]()" + ], + "items": [ + { + "id": "Belt_HashSetInt.key", + "kind": "type", + "name": "key", + "signature": "type key = int", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.make", + "kind": "value", + "name": "make", + "signature": "let make: (~hintSize: int) => t", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t => bool", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.add", + "kind": "value", + "name": "add", + "signature": "let add: (t, key) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.has", + "kind": "value", + "name": "has", + "signature": "let has: (t, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t, key) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t, (. key) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, key => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t, 'c, (. 'c, key) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, 'c, ('c, key) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.size", + "kind": "value", + "name": "size", + "signature": "let size: t => int", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.logStats", + "kind": "value", + "name": "logStats", + "signature": "let logStats: t => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t => array", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array => t", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetInt.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "signature": "let getBucketHistogram: t => array", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_HashSetString.json b/index_data/api/Belt_HashSetString.json new file mode 100644 index 000000000..457e033ac --- /dev/null +++ b/index_data/api/Belt_HashSetString.json @@ -0,0 +1,141 @@ +{ + "name": "Belt_HashSetString", + "docstrings": [ + "This module is [`Belt.HashSet`]() specialized with key type to be a primitive type.\n\n It is more efficient in general, the API is the same with [`Belt.HashSet`]() except its key type is fixed,\n and identity is not needed(using the built-in one)\n\n **See** [`Belt.HashSet`]()" + ], + "items": [ + { + "id": "Belt_HashSetString.key", + "kind": "type", + "name": "key", + "signature": "type key = string", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.make", + "kind": "value", + "name": "make", + "signature": "let make: (~hintSize: int) => t", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t => bool", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.add", + "kind": "value", + "name": "add", + "signature": "let add: (t, key) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.has", + "kind": "value", + "name": "has", + "signature": "let has: (t, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t, key) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t, (. key) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, key => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t, 'c, (. 'c, key) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, 'c, ('c, key) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.size", + "kind": "value", + "name": "size", + "signature": "let size: t => int", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.logStats", + "kind": "value", + "name": "logStats", + "signature": "let logStats: t => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t => array", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array => t", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Belt_HashSetString.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "signature": "let getBucketHistogram: t => array", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_Id.json b/index_data/api/Belt_Id.json new file mode 100644 index 000000000..4cc7f9a8f --- /dev/null +++ b/index_data/api/Belt_Id.json @@ -0,0 +1,242 @@ +{ + "name": "Belt_Id", + "docstrings": [ + "[`Belt.Id`]()\n\n Provide utiliites to create identified comparators or hashes for\n data structures used below.\n\n It create a unique identifer per module of functions so that different data structures with slightly different\n comparison functions won't mix." + ], + "items": [ + { + "id": "Belt_Id.hash", + "kind": "type", + "name": "hash", + "signature": "type hash<'a, 'id>", + "docstrings": [ + "`('a, 'id) hash`\n\n Its runtime represenation is a `hash` function, but signed with a\n type parameter, so that different hash functions type mismatch" + ] + }, + { + "id": "Belt_Id.eq", + "kind": "type", + "name": "eq", + "signature": "type eq<'a, 'id>", + "docstrings": [ + "`('a, 'id) eq`\n\n Its runtime represenation is an `eq` function, but signed with a\n type parameter, so that different hash functions type mismatch" + ] + }, + { + "id": "Belt_Id.cmp", + "kind": "type", + "name": "cmp", + "signature": "type cmp<'a, 'id>", + "docstrings": [ + "`('a,'id) cmp`\n\n Its runtime representation is a `cmp` function, but signed with a\n type parameter, so that different hash functions type mismatch" + ] + }, + { + "id": "Belt_Id.comparable", + "kind": "type", + "name": "comparable", + "signature": "type comparable<'key, 'id> = module(Comparable with type identity = 'id)\\ntype t = 'key", + "docstrings": [ + "`('key, 'id) cmparable` is a module of functions, here it only includes `cmp`.\n\n Unlike normal functions, when created, it comes with a unique identity (guaranteed\n by the type system).\n\n It can be created using function [`comparableU`]() or [`comparable`]().\n\n The idea of a unique identity when created is that it makes sure two sets would type\n mismatch if they use different comparison function" + ] + }, + { + "id": "MakeComparableU.Belt_Id", + "kind": "module", + "item": { + "name": "MakeComparableU", + "docstrings": [], + "items": [ + { + "id": "Belt_Id.MakeComparableU.identity", + "kind": "type", + "name": "identity", + "signature": "type identity", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeComparableU.t", + "kind": "type", + "name": "t", + "signature": "type t = M.t", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeComparableU.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: cmp", + "docstrings": [] + } + ] + } + }, + { + "id": "MakeComparable.Belt_Id", + "kind": "module", + "item": { + "name": "MakeComparable", + "docstrings": [], + "items": [ + { + "id": "Belt_Id.MakeComparable.identity", + "kind": "type", + "name": "identity", + "signature": "type identity", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeComparable.t", + "kind": "type", + "name": "t", + "signature": "type t = M.t", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeComparable.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: cmp", + "docstrings": [] + } + ] + } + }, + { + "id": "Belt_Id.comparableU", + "kind": "value", + "name": "comparableU", + "signature": "let comparableU: (~cmp: (. 'a, 'a) => int) => module(Comparable with type t = 'a)", + "docstrings": [] + }, + { + "id": "Belt_Id.comparable", + "kind": "value", + "name": "comparable", + "signature": "let comparable: (~cmp: ('a, 'a) => int) => module(Comparable with type t = 'a)", + "docstrings": [ + "```\n module C = (\n val Belt.Id.comparable ~cmp:(compare : int -> int -> int)\n )\n let m = Belt.Set.make(module C)\n ```\n\n Note that the name of C can not be ignored" + ] + }, + { + "id": "Belt_Id.hashable", + "kind": "type", + "name": "hashable", + "signature": "type hashable<'key, 'id> = module(Hashable with type identity = 'id)\\ntype t = 'key", + "docstrings": [ + "`('key, 'id) hashable` is a module of functions, here it only includes `hash`, `eq`.\n\n Unlike normal functions, when created, it comes with a unique identity (guaranteed\n by the type system).\n\n It can be created using function [`hashableU`]() or [`hashable`]().\n\n The idea of a unique identity when created is that it makes sure two hash sets would type\n mismatch if they use different comparison function" + ] + }, + { + "id": "MakeHashableU.Belt_Id", + "kind": "module", + "item": { + "name": "MakeHashableU", + "docstrings": [], + "items": [ + { + "id": "Belt_Id.MakeHashableU.identity", + "kind": "type", + "name": "identity", + "signature": "type identity", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeHashableU.t", + "kind": "type", + "name": "t", + "signature": "type t = M.t", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeHashableU.hash", + "kind": "value", + "name": "hash", + "signature": "let hash: hash", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeHashableU.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: eq", + "docstrings": [] + } + ] + } + }, + { + "id": "MakeHashable.Belt_Id", + "kind": "module", + "item": { + "name": "MakeHashable", + "docstrings": [], + "items": [ + { + "id": "Belt_Id.MakeHashable.identity", + "kind": "type", + "name": "identity", + "signature": "type identity", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeHashable.t", + "kind": "type", + "name": "t", + "signature": "type t = M.t", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeHashable.hash", + "kind": "value", + "name": "hash", + "signature": "let hash: hash", + "docstrings": [] + }, + { + "id": "Belt_Id.MakeHashable.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: eq", + "docstrings": [] + } + ] + } + }, + { + "id": "Belt_Id.hashableU", + "kind": "value", + "name": "hashableU", + "signature": "let hashableU: (~hash: (. 'a) => int, ~eq: (. 'a, 'a) => bool) => module(Hashable with type t = 'a)", + "docstrings": [] + }, + { + "id": "Belt_Id.hashable", + "kind": "value", + "name": "hashable", + "signature": "let hashable: (~hash: 'a => int, ~eq: ('a, 'a) => bool) => module(Hashable with type t = 'a)", + "docstrings": [] + }, + { + "id": "Belt_Id.getHashInternal", + "kind": "value", + "name": "getHashInternal", + "signature": "let getHashInternal: hash<'a, 'id> => (. 'a) => int", + "docstrings": [] + }, + { + "id": "Belt_Id.getEqInternal", + "kind": "value", + "name": "getEqInternal", + "signature": "let getEqInternal: eq<'a, 'id> => (. 'a, 'a) => bool", + "docstrings": [] + }, + { + "id": "Belt_Id.getCmpInternal", + "kind": "value", + "name": "getCmpInternal", + "signature": "let getCmpInternal: cmp<'a, 'id> => (. 'a, 'a) => int", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_Int.json b/index_data/api/Belt_Int.json new file mode 100644 index 000000000..f6770dd09 --- /dev/null +++ b/index_data/api/Belt_Int.json @@ -0,0 +1,80 @@ +{ + "name": "Belt_Int", + "docstrings": [ + "This module includes convenience methods for handling `int` types." + ], + "items": [ + { + "id": "Belt_Int.toFloat", + "kind": "value", + "name": "toFloat", + "signature": "let toFloat: int => float", + "docstrings": [ + "Converts a given `int` to a `float`.\n\n ```res example\n Js.log(Belt.Int.toFloat(1) === 1.0) /* true */\n ```" + ] + }, + { + "id": "Belt_Int.fromFloat", + "kind": "value", + "name": "fromFloat", + "signature": "let fromFloat: float => int", + "docstrings": [ + "Converts a given `float` to an `int`.\n\n ```res example\n Js.log(Belt.Int.fromFloat(1.0) === 1) /* true */\n ```" + ] + }, + { + "id": "Belt_Int.fromString", + "kind": "value", + "name": "fromString", + "signature": "let fromString: string => option", + "docstrings": [ + "Converts a given `string` to an `int`. Returns `Some(int)` when the input is a number, `None` otherwise.\n\n ```res example\n Js.log(Belt.Int.fromString(\"1\") === Some(1)) /* true */\n ```" + ] + }, + { + "id": "Belt_Int.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: int => string", + "docstrings": [ + "Converts a given `int` to a `string`. Uses the JavaScript `String` constructor under the hood.\n\n ```res example\n Js.log(Belt.Int.toString(1) === \"1\") /* true */\n ```" + ] + }, + { + "id": "Belt_Int.+", + "kind": "value", + "name": "+", + "signature": "let _: %rescript.typehole", + "docstrings": [ + "Addition of two `int` values. Same as the addition from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 + 2 === 4) /* true */\n ```" + ] + }, + { + "id": "Belt_Int.-", + "kind": "value", + "name": "-", + "signature": "let _: %rescript.typehole", + "docstrings": [ + "Subtraction of two `int` values. Same as the subtraction from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 - 1 === 1) /* true */\n ```" + ] + }, + { + "id": "Belt_Int.*", + "kind": "value", + "name": "*", + "signature": "let _: %rescript.typehole", + "docstrings": [ + "Multiplication of two `int` values. Same as the multiplication from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(2 * 2 === 4) /* true */\n ```" + ] + }, + { + "id": "Belt_Int./", + "kind": "value", + "name": "/", + "signature": "let _: %rescript.typehole", + "docstrings": [ + "Division of two `int` values. Same as the division from `Pervasives`.\n\n ```res example\n open Belt.Int\n Js.log(4 / 2 === 2); /* true */\n ```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_List.json b/index_data/api/Belt_List.json new file mode 100644 index 000000000..3b44c811c --- /dev/null +++ b/index_data/api/Belt_List.json @@ -0,0 +1,809 @@ +{ + "name": "Belt_List", + "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." + ], + "items": [ + { + "id": "Belt_List.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = list<'a>", + "docstrings": [ + "`'a t` is compatible with built-in `list` type" + ] + }, + { + "id": "Belt_List.length", + "kind": "value", + "name": "length", + "signature": "let length: t<'a> => int", + "docstrings": [ + "Returns the length of a list.\n\n ```res example\n Belt.List.length(list{1, 2, 3}) // 3\n ```" + ] + }, + { + "id": "Belt_List.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a> => int", + "docstrings": [ + "**See** [`length`](##length)" + ] + }, + { + "id": "Belt_List.head", + "kind": "value", + "name": "head", + "signature": "let head: t<'a> => option<'a>", + "docstrings": [ + "Returns `Some(value)` where `value` is the first element in the list, or\n `None` if `someList` is an empty list.\n\n ```res example\n Belt.List.head(list{}) // None\n Belt.List.head(list{1, 2, 3}) // Some(1)\n ```" + ] + }, + { + "id": "Belt_List.headExn", + "kind": "value", + "name": "headExn", + "signature": "let headExn: t<'a> => 'a", + "docstrings": [ + "Same as [head](#head), but raises an exception if `someList` is empty. Use\n with care.\n\n ```res example\n Belt.List.headExn(list{1, 2, 3}) // 1\n\n Belt.List.headExn(list{}) // Raises an Error\n ```" + ] + }, + { + "id": "Belt_List.tail", + "kind": "value", + "name": "tail", + "signature": "let tail: t<'a> => option>", + "docstrings": [ + "Returns `None` if `someList` is empty, otherwise it returns `Some(tail)`\n where `tail` is everything except the first element of `someList`.\n\n ```res example\n Belt.List.tail(list{1, 2, 3}) // Some(list{2, 3})\n\n Belt.List.tail(list{}) // None\n ```" + ] + }, + { + "id": "Belt_List.tailExn", + "kind": "value", + "name": "tailExn", + "signature": "let tailExn: t<'a> => t<'a>", + "docstrings": [ + "Same as [tail](#tail), but raises an exception if `someList` is empty. Use\n with care.\n\n ```res example\n Belt.List.tailExn(list{1, 2, 3}) // list{2, 3}\n\n Belt.List.tailExn(list{}) // Raises an Error\n ```" + ] + }, + { + "id": "Belt_List.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'a>, 'a) => t<'a>", + "docstrings": [ + "Adds `value` to the beginning of `someList`.\n\n ```res example\n Belt.List.add(list{2, 3}, 1) // list{1, 2, 3}\n\n Belt.List.add(list{\"World\", \"!\"}, \"Hello\") // list{\"Hello\", \"World\", \"!\"}\n ```" + ] + }, + { + "id": "Belt_List.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a>, int) => option<'a>", + "docstrings": [ + "Return the nth element in `someList`, or `None` if `index` is larger than the\n length.\n\n ```res example\n let abc = list{\"A\", \"B\", \"C\"}\n\n abc->Belt.List.get(1) // Some(\"B\")\n\n abc->Belt.List.get(4) // None\n ```" + ] + }, + { + "id": "Belt_List.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'a>, int) => 'a", + "docstrings": [ + "Same as [get](#get), but raises an exception if `index` is larger than the\n length. Use with care.\n\n ```res example\n let abc = list{\"A\", \"B\", \"C\"}\n\n abc->Belt.List.getExn(1) // \"B\"\n\n abc->Belt.List.getExn(4) // Raises an Error\n ```" + ] + }, + { + "id": "Belt_List.make", + "kind": "value", + "name": "make", + "signature": "let make: (int, 'a) => t<'a>", + "docstrings": [ + "Returns a list of length `numItems` with each element filled with value `v`. Returns an empty list if `numItems` is negative.\n\n ```res example\n Belt.List.make(3, 1) // list{1, 1, 1}\n ```" + ] + }, + { + "id": "Belt_List.makeByU", + "kind": "value", + "name": "makeByU", + "signature": "let makeByU: (int, (. int) => 'a) => t<'a>", + "docstrings": [ + "Uncurried version of [makeBy](#makeBy)" + ] + }, + { + "id": "Belt_List.makeBy", + "kind": "value", + "name": "makeBy", + "signature": "let makeBy: (int, int => 'a) => t<'a>", + "docstrings": [ + "Return a list of length `numItems` with element `i` initialized with `f(i)`.\nReturns an empty list if `numItems` is negative.\n\n```res example\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```" + ] + }, + { + "id": "Belt_List.shuffle", + "kind": "value", + "name": "shuffle", + "signature": "let shuffle: t<'a> => t<'a>", + "docstrings": [ + "Returns a new list in random order.\n\n ```res example\n Belt.List.shuffle(list{1, 2, 3}) // list{2, 1, 3}\n ```" + ] + }, + { + "id": "Belt_List.drop", + "kind": "value", + "name": "drop", + "signature": "let drop: (t<'a>, int) => option>", + "docstrings": [ + "Return a new list, dropping the first `n` elements. Returns `None` if `someList` has fewer than `n` elements.\n\n ```res example\n list{1, 2, 3}->Belt.List.drop(2) // Some(list{3})\n\n list{1, 2, 3}->Belt.List.drop(3) // Some(list{})\n\n list{1, 2, 3}->Belt.List.drop(4) // None\n ```" + ] + }, + { + "id": "Belt_List.take", + "kind": "value", + "name": "take", + "signature": "let take: (t<'a>, int) => option>", + "docstrings": [ + "Returns a list with the first `n` elements from `someList`, or `None` if `someList` has fewer than `n` elements.\n\n```res example\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```" + ] + }, + { + "id": "Belt_List.splitAt", + "kind": "value", + "name": "splitAt", + "signature": "let splitAt: (t<'a>, int) => option<(list<'a>, list<'a>)>", + "docstrings": [ + "Split the list `someList` at `index`. Returns `None` when the length of `someList` is less than `index`.\n\n ```res example\n list{\"Hello\", \"World\"}->Belt.List.splitAt(1) // Some((list{\"Hello\"}, list{\"World\"}))\n\n list{0, 1, 2, 3, 4}->Belt.List.splitAt(2) // Some((list{0, 1}, list{2, 3, 4}))\n ```" + ] + }, + { + "id": "Belt_List.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (t<'a>, t<'a>) => t<'a>", + "docstrings": [ + "Returns the list obtained by adding `secondList` after `firstList`.\n\n ```res example\n Belt.List.concat(list{1, 2, 3}, list{4, 5}) // list{1, 2, 3, 4, 5}\n ```" + ] + }, + { + "id": "Belt_List.concatMany", + "kind": "value", + "name": "concatMany", + "signature": "let concatMany: array> => t<'a>", + "docstrings": [ + "Returns the list obtained by concatenating all the lists in array `a`, in\n order.\n\n ```res example\n Belt.List.concatMany([list{1, 2, 3}, list{}, list{3}]) // list{1, 2, 3, 3}\n ```" + ] + }, + { + "id": "Belt_List.reverseConcat", + "kind": "value", + "name": "reverseConcat", + "signature": "let reverseConcat: (t<'a>, t<'a>) => t<'a>", + "docstrings": [ + "Equivalent to writing: `concat(reverse(firstList, secondList)`\n\n ```res example\n Belt.List.reverseConcat(list{1, 2}, list{3, 4}) // list{2, 1, 3, 4}\n ```" + ] + }, + { + "id": "Belt_List.flatten", + "kind": "value", + "name": "flatten", + "signature": "let flatten: t> => t<'a>", + "docstrings": [ + "Return the list obtained by concatenating all the lists in list `ls`, in order.\n\n ```res example\n Belt.List.flatten(list{list{1, 2, 3}, list{}, list{3}}) // list{1, 2, 3, 3}\n ```" + ] + }, + { + "id": "Belt_List.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => t<'b>", + "docstrings": [ + "Uncurried version of [map](#map)." + ] + }, + { + "id": "Belt_List.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>", + "docstrings": [ + "Returns a new list with `f` applied to each element of `someList`.\n\n ```res example\n list{1, 2}->Belt.List.map(x => x + 1) // list{3, 4}\n ```" + ] + }, + { + "id": "Belt_List.zip", + "kind": "value", + "name": "zip", + "signature": "let zip: (t<'a>, t<'b>) => t<('a, 'b)>", + "docstrings": [ + "Returns a list of pairs from the two lists with the length of the shorter list.\n\n ```res example\n Belt.List.zip(list{1, 2}, list{3, 4, 5}) // list{(1, 3), (2, 4)}\n ```" + ] + }, + { + "id": "Belt_List.zipByU", + "kind": "value", + "name": "zipByU", + "signature": "let zipByU: (t<'a>, t<'b>, (. 'a, 'b) => 'c) => t<'c>", + "docstrings": [ + "Uncurried version of [zipBy](#zipBy)." + ] + }, + { + "id": "Belt_List.zipBy", + "kind": "value", + "name": "zipBy", + "signature": "let zipBy: (t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>", + "docstrings": [ + "**See:** [zip](#zip)\n\n ```res example\n Belt.List.zipBy(list{1, 2, 3}, list{4, 5}, (a, b) => 2 * a + b) // list{6, 9}\n ```" + ] + }, + { + "id": "Belt_List.mapWithIndexU", + "kind": "value", + "name": "mapWithIndexU", + "signature": "let mapWithIndexU: (t<'a>, (. int, 'a) => 'b) => t<'b>", + "docstrings": [ + "Uncurried version of [mapWithIndex](#mapWithIndex)." + ] + }, + { + "id": "Belt_List.mapWithIndex", + "kind": "value", + "name": "mapWithIndex", + "signature": "let mapWithIndex: (t<'a>, (int, 'a) => 'b) => t<'b>", + "docstrings": [ + "Applies `f` to each element of `someList`.\n Function `f` takes two arguments: the index starting from 0 and the element from `someList`, in that order.\n\n ```res example\n list{1, 2, 3}->Belt.List.mapWithIndex((index, x) => index + x) // list{1, 3, 5}\n ```" + ] + }, + { + "id": "Belt_List.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<'a> => t<'a>", + "docstrings": [ + "Converts the given array to a list.\n\n ```res example\n Belt.List.fromArray([1, 2, 3]) // list{1, 2, 3}\n ```" + ] + }, + { + "id": "Belt_List.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a> => array<'a>", + "docstrings": [ + "Converts the given list to an array.\n\n ```res example\n Belt.List.toArray(list{1, 2, 3}) // [1, 2, 3]\n ```" + ] + }, + { + "id": "Belt_List.reverse", + "kind": "value", + "name": "reverse", + "signature": "let reverse: t<'a> => t<'a>", + "docstrings": [ + "Returns a new list whose elements are those of `someList` in reversed order.\n\n ```res example\n Belt.List.reverse(list{1, 2, 3}) /* list{3, 2, 1} */\n ```" + ] + }, + { + "id": "Belt_List.mapReverseU", + "kind": "value", + "name": "mapReverseU", + "signature": "let mapReverseU: (t<'a>, (. 'a) => 'b) => t<'b>", + "docstrings": [ + "Uncurried version of [mapReverse](#mapReverse)." + ] + }, + { + "id": "Belt_List.mapReverse", + "kind": "value", + "name": "mapReverse", + "signature": "let mapReverse: (t<'a>, 'a => 'b) => t<'b>", + "docstrings": [ + "Equivalent to:\n\n ```res\n map(someList, f)->reverse\n ```\n\n ```res example\n list{3, 4, 5}->Belt.List.mapReverse(x => x * x) /* list{25, 16, 9} */\n ```" + ] + }, + { + "id": "Belt_List.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a>, (. 'a) => 'b) => unit", + "docstrings": [ + "Uncurried version of [forEach](#forEach)." + ] + }, + { + "id": "Belt_List.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a>, 'a => 'b) => unit", + "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 ```res example\n Belt.List.forEach(list{\"a\", \"b\", \"c\"}, x => Js.log(\"Item: \" ++ x))\n /*\n prints:\n Item: a\n Item: b\n Item: c\n */\n ```" + ] + }, + { + "id": "Belt_List.forEachWithIndexU", + "kind": "value", + "name": "forEachWithIndexU", + "signature": "let forEachWithIndexU: (t<'a>, (. int, 'a) => 'b) => unit", + "docstrings": [ + "Uncurried version of [forEachWithIndex](#forEachWithIndex)." + ] + }, + { + "id": "Belt_List.forEachWithIndex", + "kind": "value", + "name": "forEachWithIndex", + "signature": "let forEachWithIndex: (t<'a>, (int, 'a) => 'b) => unit", + "docstrings": [ + "Call `f` on each element of `someList` from beginning to end.\n Function `f` takes two arguments: the index starting from 0 and the element from `someList`. `f` returns `unit`.\n\n ```res example\n Belt.List.forEachWithIndex(list{\"a\", \"b\", \"c\"}, (index, x) => {\n Js.log(\"Item \" ++ Belt.Int.toString(index) ++ \" is \" ++ x)\n })\n /*\n prints:\n Item 0 is a\n Item 1 is b\n Item 2 is cc\n */\n ```" + ] + }, + { + "id": "Belt_List.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'a>, 'b, (. 'b, 'a) => 'b) => 'b", + "docstrings": [ + "Uncurried version of [reduce](#reduce)." + ] + }, + { + "id": "Belt_List.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a>, 'b, ('b, 'a) => 'b) => 'b", + "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 ```res example\n list{1, 2, 3, 4}->Belt.List.reduce(0, (a, b) => a + b) /* 10 */\n\n /* same as */\n\n list{1, 2, 3, 4}->Belt.List.reduce(0, (acc, item) => acc + item) /* 10 */\n ```" + ] + }, + { + "id": "Belt_List.reduceWithIndexU", + "kind": "value", + "name": "reduceWithIndexU", + "signature": "let reduceWithIndexU: (t<'a>, 'b, (. 'b, 'a, int) => 'b) => 'b", + "docstrings": [ + "Uncurried version of [reduceWithIndex](#reduceWithIndex)." + ] + }, + { + "id": "Belt_List.reduceWithIndex", + "kind": "value", + "name": "reduceWithIndex", + "signature": "let reduceWithIndex: (t<'a>, 'b, ('b, 'a, int) => 'b) => 'b", + "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 ```res example\n list{1, 2, 3, 4}->Belt.List.reduceWithIndex(0, (acc, item, index) => acc + item + index) /* 16 */\n ```" + ] + }, + { + "id": "Belt_List.reduceReverseU", + "kind": "value", + "name": "reduceReverseU", + "signature": "let reduceReverseU: (t<'a>, 'b, (. 'b, 'a) => 'b) => 'b", + "docstrings": [ + "Uncurried version of [reduceReverse](#reduceReverse)." + ] + }, + { + "id": "Belt_List.reduceReverse", + "kind": "value", + "name": "reduceReverse", + "signature": "let reduceReverse: (t<'a>, 'b, ('b, 'a) => 'b) => 'b", + "docstrings": [ + "Works like [reduce](#reduce), except that function `f` is applied to each\n item of `someList` from the last back to the first.\n\n ```res example\n list{1, 2, 3, 4}->Belt.List.reduceReverse(0, (a, b) => a + b) /* 10 */\n\n list{1, 2, 3, 4}->Belt.List.reduceReverse(10, (a, b) => a - b) /* 0 */\n\n list{1, 2, 3, 4}->Belt.List.reduceReverse(list{}, Belt.List.add) // list{1, 2, 3, 4}\n ```" + ] + }, + { + "id": "Belt_List.mapReverse2U", + "kind": "value", + "name": "mapReverse2U", + "signature": "let mapReverse2U: (t<'a>, t<'b>, (. 'a, 'b) => 'c) => t<'c>", + "docstrings": [ + "Uncurried version of [mapReverse2](#mapReverse2)." + ] + }, + { + "id": "Belt_List.mapReverse2", + "kind": "value", + "name": "mapReverse2", + "signature": "let mapReverse2: (t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>", + "docstrings": [ + "Equivalent to: `zipBy(xs, ys, f)->reverse`\n\n ```res example\n\n Belt.List.mapReverse2(list{1, 2, 3}, list{1, 2}, (a, b) => a + b) // list{4, 2}\n ```" + ] + }, + { + "id": "Belt_List.forEach2U", + "kind": "value", + "name": "forEach2U", + "signature": "let forEach2U: (t<'a>, t<'b>, (. 'a, 'b) => 'c) => unit", + "docstrings": [ + "Uncurried version of [forEach2](#forEach2)." + ] + }, + { + "id": "Belt_List.forEach2", + "kind": "value", + "name": "forEach2", + "signature": "let forEach2: (t<'a>, t<'b>, ('a, 'b) => 'c) => unit", + "docstrings": [ + "Stops at the length of the shorter list.\n\n ```res example\n Belt.List.forEach2(list{\"Z\", \"Y\"}, list{\"A\", \"B\", \"C\"}, (x, y) => Js.log2(x, y))\n\n /*\n prints:\n \"Z\" \"A\"\n \"Y\" \"B\"\n */\n ```" + ] + }, + { + "id": "Belt_List.reduce2U", + "kind": "value", + "name": "reduce2U", + "signature": "let reduce2U: (t<'b>, t<'c>, 'a, (. 'a, 'b, 'c) => 'a) => 'a", + "docstrings": [ + "Uncurried version of [reduce2](#reduce2)." + ] + }, + { + "id": "Belt_List.reduce2", + "kind": "value", + "name": "reduce2", + "signature": "let reduce2: (t<'b>, t<'c>, 'a, ('a, 'b, 'c) => 'a) => 'a", + "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 ```res example\n Belt.List.reduce2(list{1, 2, 3}, list{4, 5}, 0, (acc, x, y) => acc + x * x + y) /* 0 + (1 * 1 + 4) + (2 * 2 + 5) */\n ```" + ] + }, + { + "id": "Belt_List.reduceReverse2U", + "kind": "value", + "name": "reduceReverse2U", + "signature": "let reduceReverse2U: (t<'a>, t<'b>, 'c, (. 'c, 'a, 'b) => 'c) => 'c", + "docstrings": [ + "Uncurried version of [reduceReverse2](#reduceReverse2)." + ] + }, + { + "id": "Belt_List.reduceReverse2", + "kind": "value", + "name": "reduceReverse2", + "signature": "let reduceReverse2: (t<'a>, t<'b>, 'c, ('c, 'a, 'b) => 'c) => 'c", + "docstrings": [ + "Applies `f` to each element of `firstList` and `secondList` from end to\n beginning. Stops with the shorter list. Function `f` has three parameters: an\n “accumulator” which starts with a value of init, an item from `firstList`,\n and an item from `secondList`. `reduce2` returns the final value of the\n accumulator.\n\n ```res example\n Belt.List.reduceReverse2(list{1, 2, 3}, list{4, 5}, 0, (acc, x, y) => acc + x * x + y) /* + (1 * 1 + 4) + (2 * 2 + 5) */\n ```" + ] + }, + { + "id": "Belt_List.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'a>, (. 'a) => bool) => bool", + "docstrings": [ + "Uncurried version of [every](#every)." + ] + }, + { + "id": "Belt_List.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'a>, 'a => bool) => bool", + "docstrings": [ + "Returns `true` if all elements satisfy `pred`, where `pred` is a predicate: a function taking an element and returning a bool.\n\n ```res example\n let isBelow10 = value => value < 10\n\n list{1, 9, 8, 2}->Belt.List.every(isBelow10) /* true */\n\n list{1, 99, 8, 2}->Belt.List.every(isBelow10) /* false */\n ```" + ] + }, + { + "id": "Belt_List.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'a>, (. 'a) => bool) => bool", + "docstrings": [ + "Uncurried version of [some](#some)." + ] + }, + { + "id": "Belt_List.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'a>, 'a => bool) => bool", + "docstrings": [ + "Returns `true` if at least _one_ of the elements in `someList` satisfies\n `pred`, where `pred` is a predicate: a function taking an element and\n returning a bool.\n\n ```res example\n let isAbove100 = value => value > 100\n\n list{101, 1, 2, 3}->Belt.List.some(isAbove100) /* true */\n\n list{1, 2, 3, 4}->Belt.List.some(isAbove100) /* false */\n ```" + ] + }, + { + "id": "Belt_List.every2U", + "kind": "value", + "name": "every2U", + "signature": "let every2U: (t<'a>, t<'b>, (. 'a, 'b) => bool) => bool", + "docstrings": [ + "Uncurried version of [every2](#every2)." + ] + }, + { + "id": "Belt_List.every2", + "kind": "value", + "name": "every2", + "signature": "let every2: (t<'a>, t<'b>, ('a, 'b) => bool) => bool", + "docstrings": [ + "Returns `true` if predicate `pred(a, b)` is `true` for all pairs of elements\n up to the shorter length (i.e. `min(length(firstList), length(secondList))`)\n\n ```res example\n Belt.List.every2(list{1, 2, 3}, list{0, 1}, (a, b) => a > b) /* true */\n\n Belt.List.every2(list{}, list{1}, (a, b) => a > b) /* true */\n\n Belt.List.every2(list{2, 3}, list{1}, (a, b) => a > b) /* true */\n\n Belt.List.every2(list{0, 1}, list{5, 0}, (a, b) => a > b) /* false */\n ```" + ] + }, + { + "id": "Belt_List.some2U", + "kind": "value", + "name": "some2U", + "signature": "let some2U: (t<'a>, t<'b>, (. 'a, 'b) => bool) => bool", + "docstrings": [ + "Uncurried version of [some2](#some2)." + ] + }, + { + "id": "Belt_List.some2", + "kind": "value", + "name": "some2", + "signature": "let some2: (t<'a>, t<'b>, ('a, 'b) => bool) => bool", + "docstrings": [ + "Returns `true` if predicate `pred(a, b)` is true for any pair of elements up\n to the shorter length (i.e. `min(length(firstList), length(secondList))`)\n\n ```res example\n Belt.List.some2(list{1, 2, 3}, list{0, 1}, (a, b) => a > b) /* true */\n\n Belt.List.some2(list{}, list{1}, (a, b) => a > b) /* false */\n\n Belt.List.some2(list{2, 3}, list{1}, (a, b) => a > b) /* true */\n\n Belt.List.some2(list{0, 1}, list{5, 0}, (a, b) => a > b) /* true */\n ```" + ] + }, + { + "id": "Belt_List.cmpByLength", + "kind": "value", + "name": "cmpByLength", + "signature": "let cmpByLength: (t<'a>, t<'a>) => int", + "docstrings": [ + "Compare two lists solely by length. Returns `-1` if `length(firstList)` is\n less than `length(secondList)`, `0` if `length(firstList)` equals\n `length(secondList)`, and `1` if `length(firstList)` is greater than\n `length(secondList)`.\n\n ```res example\n Belt.List.cmpByLength(list{1, 2}, list{3, 4, 5, 6}) /* -1 */\n\n Belt.List.cmpByLength(list{1, 2, 3}, list{4, 5, 6}) /* = 0 */\n\n Belt.List.cmpByLength(list{1, 2, 3, 4}, list{5, 6}) /* = 1 */\n ```" + ] + }, + { + "id": "Belt_List.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int", + "docstrings": [ + "Uncurried version of [cmp](#cmp)." + ] + }, + { + "id": "Belt_List.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int", + "docstrings": [ + "Compare elements one by one `compareFn(a, b)`. `compareFn` returns a negative number if `a` is \"less than\" `b`, zero if `a` is \"equal to\" `b`, a positive number if `a` is \"greater than\" `b`.\n\n The comparison returns the first non-zero result of `compareFn`, or zero if `compareFn` returns zero for all `a` and `b`.\n\n If all items have compared equal, but `firstList` is exhausted first, return `-1`. (`firstList` is shorter).\n If all items have compared equal, but `secondList` is exhausted first, return `1` (`firstList` is longer).\n\n ```res example\n Belt.List.cmp(list{3}, list{3, 7}, (a, b) => compare(a, b)) /* (-1) */\n\n Belt.List.cmp(list{5, 3}, list{5}, (a, b) => compare(a, b)) /* 1 */\n\n Belt.List.cmp(list{1, 3, 5}, list{1, 4, 2}, (a, b) => compare(a, b)) /* (-1) */\n\n Belt.List.cmp(list{1, 3, 5}, list{1, 2, 3}, (a, b) => compare(a, b)) /* 1 */\n\n Belt.List.cmp(list{1, 3, 5}, list{1, 3, 5}, (a, b) => compare(a, b)) /* 0 */\n ```\n\n **Please note:** The total ordering of List is different from Array,\n for Array, we compare the length first and, only if the lengths are equal, elements one by one.\n For lists, we just compare elements one by one." + ] + }, + { + "id": "Belt_List.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool", + "docstrings": [ + "Uncurried version of [eq](#eq)." + ] + }, + { + "id": "Belt_List.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool", + "docstrings": [ + "Check equality of `firstList` and `secondList` using `eqElem` for equality on\n elements, where `eqElem` is a function that returns `true` if items `x` and\n `y` meet some criterion for equality, `false` otherwise. eq `false` if length\n of `firstList` and `secondList` are not the same.\n\n ```res example\n Belt.List.eq(list{1, 2, 3}, list{1, 2}, (a, b) => a == b) /* false */\n\n Belt.List.eq(list{1, 2}, list{1, 2}, (a, b) => a == b) /* true */\n\n Belt.List.eq(list{1, 2, 3}, list{(-1), (-2), (-3)}, (a, b) => abs(a) == abs(b)) /* true */\n ```" + ] + }, + { + "id": "Belt_List.hasU", + "kind": "value", + "name": "hasU", + "signature": "let hasU: (t<'a>, 'b, (. 'a, 'b) => bool) => bool", + "docstrings": [ + "Uncurried version of [has](#has)." + ] + }, + { + "id": "Belt_List.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'a>, 'b, ('a, 'b) => bool) => bool", + "docstrings": [ + "Returns `true` if the list contains at least one element for which\n `eqFunction(x)` returns true.\n\n ```res example\n list{1, 2, 3}->Belt.List.has(2, (a, b) => a == b) /* true */\n\n list{1, 2, 3}->Belt.List.has(4, (a, b) => a == b) /* false */\n\n list{(-1), (-2), (-3)}->Belt.List.has(2, (a, b) => abs(a) == abs(b)) /* true */\n ```" + ] + }, + { + "id": "Belt_List.getByU", + "kind": "value", + "name": "getByU", + "signature": "let getByU: (t<'a>, (. 'a) => bool) => option<'a>", + "docstrings": [ + "Uncurried version of [getBy](#getBy)." + ] + }, + { + "id": "Belt_List.getBy", + "kind": "value", + "name": "getBy", + "signature": "let getBy: (t<'a>, 'a => bool) => option<'a>", + "docstrings": [ + "Returns `Some(value)` for the first value in `someList` that satisfies the\n predicate function `pred`. Returns `None` if no element satisfies the function.\n\n ```res example\n Belt.List.getBy(list{1, 4, 3, 2}, x => x > 3) /* Some(4) */\n\n Belt.List.getBy(list{1, 4, 3, 2}, x => x > 4) /* None */\n ```" + ] + }, + { + "id": "Belt_List.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t<'a>, (. 'a) => bool) => t<'a>", + "docstrings": [ + "Uncurried version of [keep](#keep)." + ] + }, + { + "id": "Belt_List.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t<'a>, 'a => bool) => t<'a>", + "docstrings": [ + "Returns a list of all elements in `someList` which satisfy the predicate function `pred`.\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n\n Belt.List.keep(list{1, 2, 3, 4}, isEven) /* list{2, 4} */\n\n Belt.List.keep(list{None, Some(2), Some(3), None}, Belt.Option.isSome) /* list{Some(2), Some(3)} */\n ```" + ] + }, + { + "id": "Belt_List.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t<'a>, 'a => bool) => t<'a>", + "docstrings": [ + "Returns a list of all elements in `someList` which satisfy the predicate function `pred`.\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n\n Belt.List.filter(list{1, 2, 3, 4}, isEven) /* list{2, 4} */\n\n Belt.List.filter(list{None, Some(2), Some(3), None}, Belt.Option.isSome) /* list{Some(2), Some(3)} */\n ```" + ] + }, + { + "id": "Belt_List.keepWithIndexU", + "kind": "value", + "name": "keepWithIndexU", + "signature": "let keepWithIndexU: (t<'a>, (. 'a, int) => bool) => t<'a>", + "docstrings": [ + "Uncurried version of [keepWithIndex](#keepWithIndex)." + ] + }, + { + "id": "Belt_List.keepWithIndex", + "kind": "value", + "name": "keepWithIndex", + "signature": "let keepWithIndex: (t<'a>, ('a, int) => bool) => t<'a>", + "docstrings": [ + "Returns a list of all elements in `someList` which satisfy the predicate function `pred`.\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n\n Belt.List.keepWithIndex(list{1, 2, 3, 4}, (_x, index) => isEven(index)) /* list{1, 3} */\n ```" + ] + }, + { + "id": "Belt_List.filterWithIndex", + "kind": "value", + "name": "filterWithIndex", + "signature": "let filterWithIndex: (t<'a>, ('a, int) => bool) => t<'a>", + "docstrings": [ + "Returns a list of all elements in `someList` which satisfy the predicate function `pred`.\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n\n Belt.List.filterWithIndex(list{1, 2, 3, 4}, (_x, index) => isEven(index)) /* list{1, 3} */\n ```" + ] + }, + { + "id": "Belt_List.keepMapU", + "kind": "value", + "name": "keepMapU", + "signature": "let keepMapU: (t<'a>, (. 'a) => option<'b>) => t<'b>", + "docstrings": [ + "Uncurried version of [keepMap](#keepMap)." + ] + }, + { + "id": "Belt_List.keepMap", + "kind": "value", + "name": "keepMap", + "signature": "let keepMap: (t<'a>, 'a => option<'b>) => t<'b>", + "docstrings": [ + "Applies `f` to each element of `someList`. If `f(x)` returns `Some(value)`, then `value` is _kept_ in the resulting list.\n If `f(x)` returns `None`, the element is _not_ retained in the result.\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n\n list{1, 2, 3, 4}\n ->Belt.List.keepMap(x =>\n if (isEven(x)) {\n Some(x)\n } else {\n None\n }\n ) /* list{2, 4} */\n\n list{Some(1), Some(2), None}->Belt.List.keepMap(x => x) /* list{1, 2} */\n ```" + ] + }, + { + "id": "Belt_List.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t<'a>, (. 'a) => bool) => (t<'a>, t<'a>)", + "docstrings": [ + "Uncurried version of [partition](#partition)." + ] + }, + { + "id": "Belt_List.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t<'a>, 'a => bool) => (t<'a>, t<'a>)", + "docstrings": [ + "Creates a pair of lists; the first list consists of all elements of `someList` that satisfy the predicate function `pred`; the second list consists of all elements of `someList` that _do not_ satisfy `pred.\n\n In other words:\n\n ```res\n (elementsThatSatisfies, elementsThatDoesNotSatisfy)\n ```\n\n ```res example\n Belt.List.partition(list{1, 2, 3, 4}, x => x > 2) /* (list{3, 4}, list{1, 2}) */\n ```" + ] + }, + { + "id": "Belt_List.unzip", + "kind": "value", + "name": "unzip", + "signature": "let unzip: t<('a, 'b)> => (t<'a>, t<'b>)", + "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 ```res example\n Belt.List.unzip(list{(1, 2), (3, 4)}) /* (list{1, 3}, list{2, 4}) */\n\n Belt.List.unzip(list{(\"H\", \"W\"), (\"e\", \"o\"), (\"l\", \"r\"), (\"l\", \"l\"), (\"o\", \"d\"), (\" \", \"!\")})\n /* (list{\"H\", \"e\", \"l\", \"l\", \"o\", \" \"}, list{\"W\", \"o\", \"r\", \"l\", \"d\", \"!\"}) */\n ```" + ] + }, + { + "id": "Belt_List.getAssocU", + "kind": "value", + "name": "getAssocU", + "signature": "let getAssocU: (t<('a, 'c)>, 'b, (. 'a, 'b) => bool) => option<'c>", + "docstrings": [ + "Uncurried version of [getAssoc](#getAssoc)." + ] + }, + { + "id": "Belt_List.getAssoc", + "kind": "value", + "name": "getAssoc", + "signature": "let getAssoc: (t<('a, 'c)>, 'b, ('a, 'b) => bool) => option<'c>", + "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 ```res example\n list{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.getAssoc(3, (a, b) => a == b) /* Some(\"c\") */\n\n list{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")}\n ->Belt.List.getAssoc(15, (k, item) => k /* 15 */ == item /* 9, 5, 22 */)\n /* Some(\"afternoon\") */\n ```" + ] + }, + { + "id": "Belt_List.hasAssocU", + "kind": "value", + "name": "hasAssocU", + "signature": "let hasAssocU: (t<('a, 'c)>, 'b, (. 'a, 'b) => bool) => bool", + "docstrings": [ + "Uncurried version of [hasAssoc](#hasAssoc)." + ] + }, + { + "id": "Belt_List.hasAssoc", + "kind": "value", + "name": "hasAssoc", + "signature": "let hasAssoc: (t<('a, 'c)>, 'b, ('a, 'b) => bool) => bool", + "docstrings": [ + "Returns `true` if there is a pair in `someList` where the first element equals `k` as per the predicate function `eqFunction`.\n\n ```res example\n list{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.hasAssoc(1, (a, b) => a == b) /* true */\n\n list{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")}\n ->Belt.List.hasAssoc(25, (k, item) => k /* 25 */ == item /* 9, 5, 22 */) /* false */\n ```" + ] + }, + { + "id": "Belt_List.removeAssocU", + "kind": "value", + "name": "removeAssocU", + "signature": "let removeAssocU: (t<('a, 'c)>, 'b, (. 'a, 'b) => bool) => t<('a, 'c)>", + "docstrings": [ + "Uncurried version of [removeAssoc](#removeAssoc)." + ] + }, + { + "id": "Belt_List.removeAssoc", + "kind": "value", + "name": "removeAssoc", + "signature": "let removeAssoc: (t<('a, 'c)>, 'b, ('a, 'b) => bool) => t<('a, 'c)>", + "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 ```res example\n list{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.removeAssoc(1, (a, b) => a == b) /* list{(2, \"b\"), (3, \"c\")} */\n\n list{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")}\n ->Belt.List.removeAssoc(9, (k, item) => k /* 9 */ == item /* 9, 5, 22 */)\n /* list{(15, \"afternoon\"), (22, \"night\")} */\n ```" + ] + }, + { + "id": "Belt_List.setAssocU", + "kind": "value", + "name": "setAssocU", + "signature": "let setAssocU: (t<('a, 'c)>, 'a, 'c, (. 'a, 'a) => bool) => t<('a, 'c)>", + "docstrings": [ + "Uncurried version of [setAssoc](#setAssoc)." + ] + }, + { + "id": "Belt_List.setAssoc", + "kind": "value", + "name": "setAssoc", + "signature": "let setAssoc: (t<('a, 'c)>, 'a, 'c, ('a, 'a) => bool) => t<('a, 'c)>", + "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 ```res example\n list{(1, \"a\"), (2, \"b\"), (3, \"c\")}->Belt.List.setAssoc(2, \"x\", (a, b) => a == b) /* list{(1, \"a\"), (2, \"x\"), (3, \"c\")} */\n\n list{(1, \"a\"), (3, \"c\")}->Belt.List.setAssoc(2, \"b\", (a, b) => a == b) /* list{(2, \"b\"), (1, \"a\"), (3, \"c\")} */\n\n list{(9, \"morning\"), (3, \"morning?!\"), (22, \"night\")}\n ->Belt.List.setAssoc(15, \"afternoon\", (a, b) => mod(a, 12) == mod(b, 12))\n /* list{(9, \"morning\"), (15, \"afternoon\"), (22, \"night\")} */\n ```\n\n **Please note**\n\n In the last example, since: `15 mod 12` equals `3 mod 12`\n\n Both the key _and_ the value are replaced in the list." + ] + }, + { + "id": "Belt_List.sortU", + "kind": "value", + "name": "sortU", + "signature": "let sortU: (t<'a>, (. 'a, 'a) => int) => t<'a>", + "docstrings": [ + "Uncurried version of [sort](#sort)." + ] + }, + { + "id": "Belt_List.sort", + "kind": "value", + "name": "sort", + "signature": "let sort: (t<'a>, ('a, 'a) => int) => t<'a>", + "docstrings": [ + "Returns a sorted list.\n\n ```res example\n Belt.List.sort(list{5, 4, 9, 3, 7}, (a, b) => a - b) // list{3, 4, 5, 7, 9}\n ```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_Map.json b/index_data/api/Belt_Map.json new file mode 100644 index 000000000..c9a038345 --- /dev/null +++ b/index_data/api/Belt_Map.json @@ -0,0 +1,522 @@ +{ + "name": "Belt_Map", + "docstrings": [ + "The top level provides generic immutable map operations.\n\n It also has three specialized inner modules `Belt.Map.Int`,\n `Belt.Map.String` and `Belt.Map.Dict`." + ], + "items": [ + { + "id": "Belt_Map.Belt_MapInt", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module Int = Belt_MapInt" + }, + { + "id": "Belt_Map.Belt_MapString", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module String = Belt_MapString" + }, + { + "id": "Belt_Map.Belt_MapDict", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module Dict = Belt_MapDict" + }, + { + "id": "Belt_Map.t", + "kind": "type", + "name": "t", + "signature": "type t<'key, 'value, 'identity>", + "docstrings": [ + "`'key` is the field type\n\n `'value` is the element type\n\n `'identity` the identity of the collection" + ] + }, + { + "id": "Belt_Map.id", + "kind": "type", + "name": "id", + "signature": "type id<'key, 'id> = Belt_Id.comparable<'key, 'id>", + "docstrings": [ + "The identity needed for making an empty map." + ] + }, + { + "id": "Belt_Map.make", + "kind": "value", + "name": "make", + "signature": "let make: (~id: id<'k, 'id>) => t<'k, 'v, 'id>", + "docstrings": [ + "`make(~id)` creates a new map by taking in the comparator.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let m = Belt.Map.make(~id=module(IntCmp))\n\n Belt.Map.set(m, 0, \"a\")\n ```" + ] + }, + { + "id": "Belt_Map.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a, 'b, 'c> => bool", + "docstrings": [ + "`isEmpty(m)` checks whether a map m is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.isEmpty(Belt.Map.fromArray([(1, \"1\")], ~id=module(IntCmp))) == false\n ```" + ] + }, + { + "id": "Belt_Map.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'k, 'v, 'id>, 'k) => bool", + "docstrings": [ + "`has(m, k)` checks whether `m` has the key `k`.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.has(Belt.Map.fromArray([(1, \"1\")], ~id=module(IntCmp)), 1) == true\n ```" + ] + }, + { + "id": "Belt_Map.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, (. 'v, 'v) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_Map.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, ('v, 'v) => int) => int", + "docstrings": [ + "`cmp(m0, m1, vcmp);`\n\n Total ordering of map given total ordering of value function.\n\n It will compare size first and each element following the order one by one." + ] + }, + { + "id": "Belt_Map.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, (. 'v, 'v) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Map.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, ('v, 'v) => bool) => bool", + "docstrings": [ + "`eq(m1, m2, veq)` tests whether the maps `m1` and `m2` are equal, that is,\n contain equal keys and associate them with equal data. `veq` is the\n equality predicate used to compare the data associated with the keys." + ] + }, + { + "id": "Belt_Map.findFirstByU", + "kind": "value", + "name": "findFirstByU", + "signature": "let findFirstByU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => option<('k, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_Map.findFirstBy", + "kind": "value", + "name": "findFirstBy", + "signature": "let findFirstBy: (t<'k, 'v, 'id>, ('k, 'v) => bool) => option<('k, 'v)>", + "docstrings": [ + "`findFirstBy(m, p)` uses function `f` to find the first key value pair to\n match predicate `p`.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"\")])\n\n Belt.Map.findFirstBy(s0, (k, v) => k == 4) /* (4, \"4\") */\n ```" + ] + }, + { + "id": "Belt_Map.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'k, 'v, 'id>, (. 'k, 'v) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_Map.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'k, 'v, 'id>, ('k, 'v) => unit) => unit", + "docstrings": [ + "`forEach(m, f)` applies `f` to all bindings in map `m`. `f` receives the\n `'k` as first argument, and the associated value as second argument. The\n bindings are passed to `f` in increasing order with respect to the ordering\n over the type of the keys.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"\")])\n\n let acc = ref(list{})\n\n Belt.Map.forEach(s0, (k, v) => acc := list{(k, v), ...acc.contents})\n\n acc.contents == list{(4, \"4\"), (3, \"3\"), (2, \"2\"), (1, \"1\")}\n ```" + ] + }, + { + "id": "Belt_Map.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'k, 'v, 'id>, 'acc, (. 'acc, 'k, 'v) => 'acc) => 'acc", + "docstrings": [] + }, + { + "id": "Belt_Map.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'k, 'v, 'id>, 'acc, ('acc, 'k, 'v) => 'acc) => 'acc", + "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 ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray(~id=module(IntCmp), [(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"3\")])\n\n Belt.Map.reduce(s0, list{}, (acc, k, v) => list{\n (k, v),\n ...acc,\n }) /* [(4, \"4\"), (3, \"3\"), (2, \"2\"), (1, \"1\"), 0] */\n ```" + ] + }, + { + "id": "Belt_Map.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Map.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'k, 'v, 'id>, ('k, 'v) => bool) => bool", + "docstrings": [ + "`every(m, p)` checks if all the bindings of the map satisfy the predicate\n `p`. Order unspecified" + ] + }, + { + "id": "Belt_Map.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Map.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'k, 'v, 'id>, ('k, 'v) => bool) => bool", + "docstrings": [ + "`some(m, p)` checks if at least one binding of the map satisfy the\n predicate `p`. Order unspecified" + ] + }, + { + "id": "Belt_Map.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'k, 'v, 'id> => int", + "docstrings": [ + "`size(s)`\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.size(Belt.Map.fromArray([(2, \"2\"), (2, \"1\"), (3, \"3\")], ~id=module(IntCmp))) == 2\n ```" + ] + }, + { + "id": "Belt_Map.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'k, 'v, 'id> => array<('k, 'v)>", + "docstrings": [ + "`toArray(s)`\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.toArray(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))) == [\n (1, \"1\"),\n (2, \"2\"),\n (3, \"3\"),\n ]\n ```" + ] + }, + { + "id": "Belt_Map.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'k, 'v, 'id> => list<('k, 'v)>", + "docstrings": [ + "In increasing order.\n\n See `Belt.Map.toArray`" + ] + }, + { + "id": "Belt_Map.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<('k, 'v)>, ~id: id<'k, 'id>) => t<'k, 'v, 'id>", + "docstrings": [ + "`fromArray(kvs, ~id);`\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.toArray(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))) == [\n (1, \"1\"),\n (2, \"2\"),\n (3, \"3\"),\n ]\n ```" + ] + }, + { + "id": "Belt_Map.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'k, 'v, 'id> => array<'k>", + "docstrings": [ + "`keysToArray(s);`\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.keysToArray(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))) == [\n 1,\n 2,\n 3,\n ]\n ```" + ] + }, + { + "id": "Belt_Map.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'k, 'v, 'id> => array<'v>", + "docstrings": [ + "`valuesToArray(s);`\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.valuesToArray(\n Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp)),\n ) == [\"1\", \"2\", \"3\"]\n ```" + ] + }, + { + "id": "Belt_Map.minKey", + "kind": "value", + "name": "minKey", + "signature": "let minKey: t<'k, 'a, 'b> => option<'k>", + "docstrings": [ + "`minKey(s)` returns the minimum key, None if not exist." + ] + }, + { + "id": "Belt_Map.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "signature": "let minKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>", + "docstrings": [ + "See `Belt.Map.minKey`" + ] + }, + { + "id": "Belt_Map.maxKey", + "kind": "value", + "name": "maxKey", + "signature": "let maxKey: t<'k, 'a, 'b> => option<'k>", + "docstrings": [ + "`maxKey(s)` returns the maximum key, None if not exist." + ] + }, + { + "id": "Belt_Map.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "signature": "let maxKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>", + "docstrings": [ + "See `Belt.Map.maxKey`" + ] + }, + { + "id": "Belt_Map.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'k, 'v, 'a> => option<('k, 'v)>", + "docstrings": [ + "`minimum(s)` returns the minimum key value pair, None if not exist." + ] + }, + { + "id": "Belt_Map.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'k, 'v, 'a> => Js.undefined<('k, 'v)>", + "docstrings": [ + "See `Belt.Map.minimum`" + ] + }, + { + "id": "Belt_Map.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'k, 'v, 'a> => option<('k, 'v)>", + "docstrings": [ + "`maximum(s)` returns the maximum key value pair, None if not exist." + ] + }, + { + "id": "Belt_Map.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'k, 'v, 'a> => Js.undefined<('k, 'v)>", + "docstrings": [ + "See `Belt.Map.maximum`" + ] + }, + { + "id": "Belt_Map.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'k, 'v, 'id>, 'k) => option<'v>", + "docstrings": [ + "`get(s, k)`\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n Belt.Map.get(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp)), 2) ==\n Some(\"2\")\n\n Belt.Map.get(Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp)), 2) == None\n ```" + ] + }, + { + "id": "Belt_Map.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'k, 'v, 'id>, 'k) => Js.undefined<'v>", + "docstrings": [ + "See `Belt.Map.get`\n\n Returns `undefined` when not found" + ] + }, + { + "id": "Belt_Map.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (t<'k, 'v, 'id>, 'k, 'v) => 'v", + "docstrings": [ + "`getWithDefault(s, k, default)`\n\n See `Belt.Map.get`\n\n Returns default when `k` is not found." + ] + }, + { + "id": "Belt_Map.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'k, 'v, 'id>, 'k) => 'v", + "docstrings": [ + "`getExn(s, k)`\n\n See `Belt.Map.getExn`\n\n raise when `k` not exist" + ] + }, + { + "id": "Belt_Map.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'k, 'v, 'id>, 'k) => t<'k, 'v, 'id>", + "docstrings": [ + "`remove(m, x)` when `x` is not in `m`, `m` is returned reference unchanged.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))\n\n let s1 = Belt.Map.remove(s0, 1)\n\n let s2 = Belt.Map.remove(s1, 1)\n\n s1 === s2\n\n Belt.Map.keysToArray(s1) == [2, 3]\n ```" + ] + }, + { + "id": "Belt_Map.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'k, 'v, 'id>, array<'k>) => t<'k, 'v, 'id>", + "docstrings": [ + "`removeMany(s, xs)`\n\n Removing each of `xs` to `s`, note unlike `Belt.Map.remove`, the reference\n of return value might be changed even if none in `xs` exists `s`." + ] + }, + { + "id": "Belt_Map.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'k, 'v, 'id>, 'k, 'v) => t<'k, 'v, 'id>", + "docstrings": [ + "`set(m, x, y)` returns a map containing the same bindings as `m`, with a\n new binding of `x` to `y`. If `x` was already bound in `m`, its previous\n binding disappears.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = (a, b) => Pervasives.compare(a, b)\n })\n\n let s0 = Belt.Map.fromArray([(2, \"2\"), (1, \"1\"), (3, \"3\")], ~id=module(IntCmp))\n\n let s1 = Belt.Map.set(s0, 2, \"3\")\n\n Belt.Map.valuesToArray(s1) == [\"1\", \"3\", \"3\"]\n ```" + ] + }, + { + "id": "Belt_Map.updateU", + "kind": "value", + "name": "updateU", + "signature": "let updateU: (t<'k, 'v, 'id>, 'k, (. option<'v>) => option<'v>) => t<'k, 'v, 'id>", + "docstrings": [] + }, + { + "id": "Belt_Map.update", + "kind": "value", + "name": "update", + "signature": "let update: (t<'k, 'v, 'id>, 'k, option<'v> => option<'v>) => t<'k, 'v, 'id>", + "docstrings": [ + "`update(m, x, f)` returns a map containing the same bindings as `m`, except\n for the binding of `x`. Depending on the value of `y` where `y` is\n `f(get(m, x))`, the binding of `x` is added, removed or updated. If `y` is\n `None`, the binding is removed if it exists; otherwise, if `y` is `Some(z)`\n then `x` is associated to `z` in the resulting map." + ] + }, + { + "id": "Belt_Map.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'k, 'v, 'id>, array<('k, 'v)>) => t<'k, 'v, 'id>", + "docstrings": [ + "`mergeMany(s, xs)`\n\n Adding each of `xs` to `s`, note unlike `add`, the reference of return\n value might be changed even if all values in `xs` exist `s`." + ] + }, + { + "id": "Belt_Map.mergeU", + "kind": "value", + "name": "mergeU", + "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>", + "docstrings": [] + }, + { + "id": "Belt_Map.merge", + "kind": "value", + "name": "merge", + "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>", + "docstrings": [ + "`merge(m1, m2, f)` computes a map whose keys is a subset of keys of `m1`\n and of `m2`. The presence of each such binding, and the corresponding\n value, is determined with the function `f`." + ] + }, + { + "id": "Belt_Map.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => t<'k, 'v, 'id>", + "docstrings": [] + }, + { + "id": "Belt_Map.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t<'k, 'v, 'id>, ('k, 'v) => bool) => t<'k, 'v, 'id>", + "docstrings": [ + "`keep(m, p)` returns the map with all the bindings in m that satisfy\n predicate `p`." + ] + }, + { + "id": "Belt_Map.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => (t<'k, 'v, 'id>, t<'k, 'v, 'id>)", + "docstrings": [] + }, + { + "id": "Belt_Map.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t<'k, 'v, 'id>, ('k, 'v) => bool) => (t<'k, 'v, 'id>, t<'k, 'v, 'id>)", + "docstrings": [ + "`partition(m, p)` returns a pair of maps `(m1, m2)`, where `m1` contains\n all the bindings of `s` that satisfy the predicate `p`, and `m2` is the map\n with all the bindings of `s` that do not satisfy `p`." + ] + }, + { + "id": "Belt_Map.split", + "kind": "value", + "name": "split", + "signature": "let split: (t<'k, 'v, 'id>, 'k) => ((t<'k, 'v, 'id>, t<'k, 'v, 'id>), option<'v>)", + "docstrings": [ + "`split(x, m)` returns a tuple `(l, r)`, data, where `l` is the map with all\n the bindings of `m` whose 'k is strictly less than `x`; `r` is the map with\n all the bindings of m whose 'k is strictly greater than `x`; `data` is\n `None` if `m` contains no binding for `x`, or `Some(v)` if `m` binds `v` to\n `x`." + ] + }, + { + "id": "Belt_Map.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'k, 'v, 'id>, (. 'v) => 'v2) => t<'k, 'v2, 'id>", + "docstrings": [] + }, + { + "id": "Belt_Map.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'k, 'v, 'id>, 'v => 'v2) => t<'k, 'v2, 'id>", + "docstrings": [ + "`map(m, f) returns a map with same domain as`m`, where the associated\n value`a`of all bindings of`m`has been replaced by the result of the\n application of`f`to`a`. The bindings are passed to`f` in increasing order\n with respect to the ordering over the type of the keys." + ] + }, + { + "id": "Belt_Map.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "signature": "let mapWithKeyU: (t<'k, 'v, 'id>, (. 'k, 'v) => 'v2) => t<'k, 'v2, 'id>", + "docstrings": [] + }, + { + "id": "Belt_Map.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "signature": "let mapWithKey: (t<'k, 'v, 'id>, ('k, 'v) => 'v2) => t<'k, 'v2, 'id>", + "docstrings": [ + "`mapWithKey(m, f)`\n\n The same as `Belt.Map.map` except that `f` is supplied with one more\n argument: the key." + ] + }, + { + "id": "Belt_Map.getData", + "kind": "value", + "name": "getData", + "signature": "let getData: t<'k, 'v, 'id> => Belt_MapDict.t<'k, 'v, 'id>", + "docstrings": [ + "`getData(s0)`\n\n Advanced usage only\n\n Returns the raw data (detached from comparator), but its type is still\n manifested, so that user can pass identity directly without boxing." + ] + }, + { + "id": "Belt_Map.getId", + "kind": "value", + "name": "getId", + "signature": "let getId: t<'k, 'v, 'id> => id<'k, 'id>", + "docstrings": [ + "Advanced usage only\n\n Returns the identity of s0." + ] + }, + { + "id": "Belt_Map.packIdData", + "kind": "value", + "name": "packIdData", + "signature": "let packIdData: (~id: id<'k, 'id>, ~data: Belt_MapDict.t<'k, 'v, 'id>) => t<'k, 'v, 'id>", + "docstrings": [ + "`packIdData(~id, ~data)`\n\n Advanced usage only\n\n Returns the packed collection." + ] + }, + { + "id": "Belt_Map.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a, 'b, 'c> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MapDict.json b/index_data/api/Belt_MapDict.json new file mode 100644 index 000000000..dd2e3cba0 --- /dev/null +++ b/index_data/api/Belt_MapDict.json @@ -0,0 +1,421 @@ +{ + "name": "Belt_MapDict", + "docstrings": [ + "This module separates identity from data, it is a bit more verbose but\n slightly more efficient due to the fact that there is no need to pack\n identity and data back after each operation.\n\n **_Advanced usage only_**" + ], + "items": [ + { + "id": "Belt_MapDict.t", + "kind": "type", + "name": "t", + "signature": "type t<'key, 'value, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.cmp", + "kind": "type", + "name": "cmp", + "signature": "type cmp<'key, 'id> = Belt_Id.cmp<'key, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: t<'k, 'v, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'k, 'v, 'id> => bool", + "docstrings": [] + }, + { + "id": "Belt_MapDict.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapDict.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, ~kcmp: cmp<'k, 'id>, ~vcmp: (. 'v, 'v) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_MapDict.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'k, 'v, 'id>, t<'k, 'v, 'id>, ~kcmp: cmp<'k, 'id>, ~vcmp: ('v, 'v) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_MapDict.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, ~kcmp: cmp<'k, 'id>, ~veq: (. 'a, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapDict.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, ~kcmp: cmp<'k, 'id>, ~veq: ('a, 'a) => bool) => bool", + "docstrings": [ + "`eq(m1, m2, cmp)` tests whether the maps `m1` and `m2` are equal, that is,\n contain equal keys and associate them with equal data. `cmp` is the\n equality predicate used to compare the data associated with the keys." + ] + }, + { + "id": "Belt_MapDict.findFirstByU", + "kind": "value", + "name": "findFirstByU", + "signature": "let findFirstByU: (t<'k, 'v, 'id>, (. 'k, 'v) => bool) => option<('k, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.findFirstBy", + "kind": "value", + "name": "findFirstBy", + "signature": "let findFirstBy: (t<'k, 'v, 'id>, ('k, 'v) => bool) => option<('k, 'v)>", + "docstrings": [ + "`findFirstBy(m, p)` uses function `f` to find the first key value pair to\n match predicate `p`.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Map.Dict.fromArray([(4, \"4\"), (1, \"1\"), (2, \"2\"), (3, \"3\")], ~cmp=IntCmp.cmp)\n\n Belt.Map.Dict.findFirstBy(s0, (k, _) => k == 4) == Some((4, \"4\"))\n ```" + ] + }, + { + "id": "Belt_MapDict.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'k, 'a, 'id>, (. 'k, 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MapDict.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'k, 'a, 'id>, ('k, 'a) => unit) => unit", + "docstrings": [ + "`forEach(m, f)` applies `f` to all bindings in map `m`. `f` receives the\n key as first argument, and the associated value as second argument. The\n bindings are passed to `f` in increasing order with respect to the ordering\n over the type of the keys." + ] + }, + { + "id": "Belt_MapDict.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'k, 'a, 'id>, 'b, (. 'b, 'k, 'a) => 'b) => 'b", + "docstrings": [] + }, + { + "id": "Belt_MapDict.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'k, 'a, 'id>, 'b, ('b, 'k, 'a) => 'b) => 'b", + "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." + ] + }, + { + "id": "Belt_MapDict.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapDict.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'k, 'a, 'id>, ('k, 'a) => bool) => bool", + "docstrings": [ + "`every(m, p)` checks if all the bindings of the map satisfy the predicate\n `p`. Order unspecified" + ] + }, + { + "id": "Belt_MapDict.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapDict.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'k, 'a, 'id>, ('k, 'a) => bool) => bool", + "docstrings": [ + "`some(m, p)` checks if at least one binding of the map satisfy the\n predicate `p`. Order unspecified" + ] + }, + { + "id": "Belt_MapDict.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'k, 'a, 'id> => int", + "docstrings": [] + }, + { + "id": "Belt_MapDict.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'k, 'a, 'id> => list<('k, 'a)>", + "docstrings": [ + "In increasing order." + ] + }, + { + "id": "Belt_MapDict.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'k, 'a, 'id> => array<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<('k, 'a)>, ~cmp: cmp<'k, 'id>) => t<'k, 'a, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'k, 'a, 'id> => array<'k>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'k, 'a, 'id> => array<'a>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.minKey", + "kind": "value", + "name": "minKey", + "signature": "let minKey: t<'k, 'a, 'b> => option<'k>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "signature": "let minKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.maxKey", + "kind": "value", + "name": "maxKey", + "signature": "let maxKey: t<'k, 'a, 'b> => option<'k>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "signature": "let maxKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'k, 'a, 'b> => option<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'k, 'a, 'b> => Js.undefined<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'k, 'a, 'b> => option<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'k, 'a, 'b> => Js.undefined<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (t<'k, 'a, 'id>, 'k, 'a, ~cmp: cmp<'k, 'id>) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MapDict.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'k, 'a, 'id>, 'k, ~cmp: cmp<'k, 'id>) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MapDict.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a, 'b, 'c> => unit", + "docstrings": [] + }, + { + "id": "Belt_MapDict.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a, 'b, 'id>, 'a, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>", + "docstrings": [ + "`remove(m, x)` returns a map containing the same bindings as `m`, except\n for `x` which is unbound in the returned map." + ] + }, + { + "id": "Belt_MapDict.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'a, 'b, 'id>, array<'a>, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'a, 'b, 'id>, 'a, 'b, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>", + "docstrings": [ + "`set(m, x, y)` returns a map containing the same bindings as `m`, plus a\n binding of `x` to `y`. If `x` was already bound in `m`, its previous\n binding disappears." + ] + }, + { + "id": "Belt_MapDict.updateU", + "kind": "value", + "name": "updateU", + "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>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.update", + "kind": "value", + "name": "update", + "signature": "let update: (t<'a, 'b, 'id>, 'a, option<'b> => option<'b>, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.mergeU", + "kind": "value", + "name": "mergeU", + "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>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.merge", + "kind": "value", + "name": "merge", + "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>", + "docstrings": [ + "`merge(m1, m2, f)` computes a map whose keys is a subset of keys of `m1`\n and of `m2`. The presence of each such binding, and the corresponding\n value, is determined with the function `f`." + ] + }, + { + "id": "Belt_MapDict.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'a, 'b, 'id>, array<('a, 'b)>, ~cmp: cmp<'a, 'id>) => t<'a, 'b, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => t<'k, 'a, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t<'k, 'a, 'id>, ('k, 'a) => bool) => t<'k, 'a, 'id>", + "docstrings": [ + "`keep(m, p)` returns the map with all the bindings in `m` that satisfy\n predicate `p`." + ] + }, + { + "id": "Belt_MapDict.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => (t<'k, 'a, 'id>, t<'k, 'a, 'id>)", + "docstrings": [] + }, + { + "id": "Belt_MapDict.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t<'k, 'a, 'id>, ('k, 'a) => bool) => (t<'k, 'a, 'id>, t<'k, 'a, 'id>)", + "docstrings": [ + "`partition(m, p)` returns a pair of maps `(m1, m2)`, where `m1` contains\n all the bindings of `s` that satisfy the predicate `p`, and `m2` is the map\n with all the bindings of `s` that do not satisfy `p`." + ] + }, + { + "id": "Belt_MapDict.split", + "kind": "value", + "name": "split", + "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>)", + "docstrings": [ + "`split(x, m)` returns a triple `(l, data, r)`, where `l` is the map with\n all the bindings of `m` whose key is strictly less than `x`; `r` is the map\n with all the bindings of `m` whose key is strictly greater than `x`; `data`\n is `None` if `m` contains no binding for `x`, or `Some(v)` if `m` binds `v`\n to `x`." + ] + }, + { + "id": "Belt_MapDict.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'k, 'a, 'id>, (. 'a) => 'b) => t<'k, 'b, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'k, 'a, 'id>, 'a => 'b) => t<'k, 'b, 'id>", + "docstrings": [ + "`map(m, f)` returns a map with same domain as `m`, where the associated\n value `a` of all bindings of `m` has been replaced by the result of the\n application of `f` to `a`. The bindings are passed to `f` in increasing\n order with respect to the ordering over the type of the keys." + ] + }, + { + "id": "Belt_MapDict.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "signature": "let mapWithKeyU: (t<'k, 'a, 'id>, (. 'k, 'a) => 'b) => t<'k, 'b, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MapDict.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "signature": "let mapWithKey: (t<'k, 'a, 'id>, ('k, 'a) => 'b) => t<'k, 'b, 'id>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MapInt.json b/index_data/api/Belt_MapInt.json new file mode 100644 index 000000000..fd9ba9bc8 --- /dev/null +++ b/index_data/api/Belt_MapInt.json @@ -0,0 +1,423 @@ +{ + "name": "Belt_MapInt", + "docstrings": [], + "items": [ + { + "id": "Belt_MapInt.key", + "kind": "type", + "name": "key", + "signature": "type key = int", + "docstrings": [] + }, + { + "id": "Belt_MapInt.t", + "kind": "type", + "name": "t", + "signature": "type t<'value>", + "docstrings": [ + "The type of maps from type `key` to type `'value`." + ] + }, + { + "id": "Belt_MapInt.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'v> => bool", + "docstrings": [] + }, + { + "id": "Belt_MapInt.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'v>, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapInt.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'v>, t<'v>, (. 'v, 'v) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_MapInt.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'v>, t<'v>, ('v, 'v) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_MapInt.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'v>, t<'v>, (. 'v, 'v) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapInt.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'v>, t<'v>, ('v, 'v) => bool) => bool", + "docstrings": [ + "`eq m1 m2` tests whether the maps `m1` and `m2` are\n equal, that is, contain equal keys and associate them with\n equal data." + ] + }, + { + "id": "Belt_MapInt.findFirstByU", + "kind": "value", + "name": "findFirstByU", + "signature": "let findFirstByU: (t<'v>, (. key, 'v) => bool) => option<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.findFirstBy", + "kind": "value", + "name": "findFirstBy", + "signature": "let findFirstBy: (t<'v>, (key, 'v) => bool) => option<(key, 'v)>", + "docstrings": [ + "`findFirstBy m p` uses funcion `f` to find the first key value pair\n to match predicate `p`.\n\n ```\n let s0 = fromArray ~id:(module IntCmp) [|4,\"4\";1,\"1\";2,\"2,\"3\"\"|];;\n findFirstBy s0 (fun k v -> k = 4 ) = option (4, \"4\");;\n ```" + ] + }, + { + "id": "Belt_MapInt.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'v>, (. key, 'v) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MapInt.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'v>, (key, 'v) => unit) => unit", + "docstrings": [ + "`forEach m f` applies `f` to all bindings in map `m`.\n `f` receives the key as first argument, and the associated value\n as second argument. The bindings are passed to `f` in increasing\n order with respect to the ordering over the type of the keys." + ] + }, + { + "id": "Belt_MapInt.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'v>, 'v2, (. 'v2, key, 'v) => 'v2) => 'v2", + "docstrings": [] + }, + { + "id": "Belt_MapInt.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'v>, 'v2, ('v2, key, 'v) => 'v2) => 'v2", + "docstrings": [ + "`reduce m a f` computes `(f kN dN ... (f k1 d1 a)...)`,\n where `k1 ... kN` are the keys of all bindings in `m`\n (in increasing order), and `d1 ... dN` are the associated data." + ] + }, + { + "id": "Belt_MapInt.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'v>, (. key, 'v) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapInt.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'v>, (key, 'v) => bool) => bool", + "docstrings": [ + "`every m p` checks if all the bindings of the map\n satisfy the predicate `p`. Order unspecified" + ] + }, + { + "id": "Belt_MapInt.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'v>, (. key, 'v) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapInt.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'v>, (key, 'v) => bool) => bool", + "docstrings": [ + "`some m p` checks if at least one binding of the map\n satisfy the predicate `p`. Order unspecified" + ] + }, + { + "id": "Belt_MapInt.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'v> => int", + "docstrings": [] + }, + { + "id": "Belt_MapInt.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'v> => list<(key, 'v)>", + "docstrings": [ + "In increasing order." + ] + }, + { + "id": "Belt_MapInt.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'v> => array<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<(key, 'v)> => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'v> => array", + "docstrings": [] + }, + { + "id": "Belt_MapInt.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'v> => array<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.minKey", + "kind": "value", + "name": "minKey", + "signature": "let minKey: t<'a> => option", + "docstrings": [] + }, + { + "id": "Belt_MapInt.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "signature": "let minKeyUndefined: t<'a> => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MapInt.maxKey", + "kind": "value", + "name": "maxKey", + "signature": "let maxKey: t<'a> => option", + "docstrings": [] + }, + { + "id": "Belt_MapInt.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "signature": "let maxKeyUndefined: t<'a> => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MapInt.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'v> => option<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'v> => Js.undefined<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'v> => option<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'v> => Js.undefined<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'v>, key) => option<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'v>, key) => Js.undefined<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (t<'v>, key, 'v) => 'v", + "docstrings": [] + }, + { + "id": "Belt_MapInt.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'v>, key) => 'v", + "docstrings": [] + }, + { + "id": "Belt_MapInt.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + }, + { + "id": "Belt_MapInt.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'v>, key) => t<'v>", + "docstrings": [ + "`remove m x` returns a map containing the same bindings as\n `m`, except for `x` which is unbound in the returned map." + ] + }, + { + "id": "Belt_MapInt.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'v>, array) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'v>, key, 'v) => t<'v>", + "docstrings": [ + "`set m x y` returns a map containing the same bindings as\n `m`, plus a binding of `x` to `y`. If `x` was already bound\n in `m`, its previous binding disappears." + ] + }, + { + "id": "Belt_MapInt.updateU", + "kind": "value", + "name": "updateU", + "signature": "let updateU: (t<'v>, key, (. option<'v>) => option<'v>) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.update", + "kind": "value", + "name": "update", + "signature": "let update: (t<'v>, key, option<'v> => option<'v>) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.mergeU", + "kind": "value", + "name": "mergeU", + "signature": "let mergeU: (t<'v>, t<'v2>, (. key, option<'v>, option<'v2>) => option<'c>) => t<'c>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.merge", + "kind": "value", + "name": "merge", + "signature": "let merge: (t<'v>, t<'v2>, (key, option<'v>, option<'v2>) => option<'c>) => t<'c>", + "docstrings": [ + "`merge m1 m2 f` computes a map whose keys is a subset of keys of `m1`\n and of `m2`. The presence of each such binding, and the corresponding\n value, is determined with the function `f`." + ] + }, + { + "id": "Belt_MapInt.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'v>, array<(key, 'v)>) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t<'v>, (. key, 'v) => bool) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t<'v>, (key, 'v) => bool) => t<'v>", + "docstrings": [ + "`keep m p` returns the map with all the bindings in `m`\n that satisfy predicate `p`." + ] + }, + { + "id": "Belt_MapInt.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t<'v>, (. key, 'v) => bool) => (t<'v>, t<'v>)", + "docstrings": [] + }, + { + "id": "Belt_MapInt.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t<'v>, (key, 'v) => bool) => (t<'v>, t<'v>)", + "docstrings": [ + "`partition m p` returns a pair of maps `(m1, m2)`, where\n `m1` contains all the bindings of `s` that satisfy the\n predicate `p`, and `m2` is the map with all the bindings of\n `s` that do not satisfy `p`." + ] + }, + { + "id": "Belt_MapInt.split", + "kind": "value", + "name": "split", + "signature": "let split: (key, t<'v>) => (t<'v>, option<'v>, t<'v>)", + "docstrings": [ + "`split x m` returns a triple `(l, data, r)`, where\n `l` is the map with all the bindings of `m` whose key\n is strictly less than `x`;\n `r` is the map with all the bindings of `m` whose key\n is strictly greater than `x`;\n `data` is `None` if `m` contains no binding for `x`,\n or `Some v` if `m` binds `v` to `x`." + ] + }, + { + "id": "Belt_MapInt.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'v>, (. 'v) => 'v2) => t<'v2>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'v>, 'v => 'v2) => t<'v2>", + "docstrings": [ + "`map m f` returns a map with same domain as `m`, where the\n associated value `a` of all bindings of `m` has been\n replaced by the result of the application of `f` to `a`.\n The bindings are passed to `f` in increasing order\n with respect to the ordering over the type of the keys." + ] + }, + { + "id": "Belt_MapInt.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "signature": "let mapWithKeyU: (t<'v>, (. key, 'v) => 'v2) => t<'v2>", + "docstrings": [] + }, + { + "id": "Belt_MapInt.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "signature": "let mapWithKey: (t<'v>, (key, 'v) => 'v2) => t<'v2>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MapString.json b/index_data/api/Belt_MapString.json new file mode 100644 index 000000000..366302095 --- /dev/null +++ b/index_data/api/Belt_MapString.json @@ -0,0 +1,423 @@ +{ + "name": "Belt_MapString", + "docstrings": [], + "items": [ + { + "id": "Belt_MapString.key", + "kind": "type", + "name": "key", + "signature": "type key = string", + "docstrings": [] + }, + { + "id": "Belt_MapString.t", + "kind": "type", + "name": "t", + "signature": "type t<'value>", + "docstrings": [ + "The type of maps from type `key` to type `'value`." + ] + }, + { + "id": "Belt_MapString.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'v> => bool", + "docstrings": [] + }, + { + "id": "Belt_MapString.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'v>, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapString.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'v>, t<'v>, (. 'v, 'v) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_MapString.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'v>, t<'v>, ('v, 'v) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_MapString.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'v>, t<'v>, (. 'v, 'v) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapString.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'v>, t<'v>, ('v, 'v) => bool) => bool", + "docstrings": [ + "`eq m1 m2` tests whether the maps `m1` and `m2` are\n equal, that is, contain equal keys and associate them with\n equal data." + ] + }, + { + "id": "Belt_MapString.findFirstByU", + "kind": "value", + "name": "findFirstByU", + "signature": "let findFirstByU: (t<'v>, (. key, 'v) => bool) => option<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapString.findFirstBy", + "kind": "value", + "name": "findFirstBy", + "signature": "let findFirstBy: (t<'v>, (key, 'v) => bool) => option<(key, 'v)>", + "docstrings": [ + "`findFirstBy m p` uses funcion `f` to find the first key value pair\n to match predicate `p`.\n\n ```\n let s0 = fromArray ~id:(module IntCmp) [|4,\"4\";1,\"1\";2,\"2,\"3\"\"|];;\n findFirstBy s0 (fun k v -> k = 4 ) = option (4, \"4\");;\n ```" + ] + }, + { + "id": "Belt_MapString.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'v>, (. key, 'v) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MapString.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'v>, (key, 'v) => unit) => unit", + "docstrings": [ + "`forEach m f` applies `f` to all bindings in map `m`.\n `f` receives the key as first argument, and the associated value\n as second argument. The bindings are passed to `f` in increasing\n order with respect to the ordering over the type of the keys." + ] + }, + { + "id": "Belt_MapString.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'v>, 'v2, (. 'v2, key, 'v) => 'v2) => 'v2", + "docstrings": [] + }, + { + "id": "Belt_MapString.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'v>, 'v2, ('v2, key, 'v) => 'v2) => 'v2", + "docstrings": [ + "`reduce m a f` computes `(f kN dN ... (f k1 d1 a)...)`,\n where `k1 ... kN` are the keys of all bindings in `m`\n (in increasing order), and `d1 ... dN` are the associated data." + ] + }, + { + "id": "Belt_MapString.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'v>, (. key, 'v) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapString.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'v>, (key, 'v) => bool) => bool", + "docstrings": [ + "`every m p` checks if all the bindings of the map\n satisfy the predicate `p`. Order unspecified" + ] + }, + { + "id": "Belt_MapString.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'v>, (. key, 'v) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MapString.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'v>, (key, 'v) => bool) => bool", + "docstrings": [ + "`some m p` checks if at least one binding of the map\n satisfy the predicate `p`. Order unspecified" + ] + }, + { + "id": "Belt_MapString.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'v> => int", + "docstrings": [] + }, + { + "id": "Belt_MapString.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'v> => list<(key, 'v)>", + "docstrings": [ + "In increasing order." + ] + }, + { + "id": "Belt_MapString.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'v> => array<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapString.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<(key, 'v)> => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'v> => array", + "docstrings": [] + }, + { + "id": "Belt_MapString.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'v> => array<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.minKey", + "kind": "value", + "name": "minKey", + "signature": "let minKey: t<'a> => option", + "docstrings": [] + }, + { + "id": "Belt_MapString.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "signature": "let minKeyUndefined: t<'a> => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MapString.maxKey", + "kind": "value", + "name": "maxKey", + "signature": "let maxKey: t<'a> => option", + "docstrings": [] + }, + { + "id": "Belt_MapString.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "signature": "let maxKeyUndefined: t<'a> => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MapString.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'v> => option<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapString.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'v> => Js.undefined<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapString.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'v> => option<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapString.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'v> => Js.undefined<(key, 'v)>", + "docstrings": [] + }, + { + "id": "Belt_MapString.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'v>, key) => option<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'v>, key) => Js.undefined<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (t<'v>, key, 'v) => 'v", + "docstrings": [] + }, + { + "id": "Belt_MapString.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'v>, key) => 'v", + "docstrings": [] + }, + { + "id": "Belt_MapString.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + }, + { + "id": "Belt_MapString.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'v>, key) => t<'v>", + "docstrings": [ + "`remove m x` returns a map containing the same bindings as\n `m`, except for `x` which is unbound in the returned map." + ] + }, + { + "id": "Belt_MapString.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'v>, array) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'v>, key, 'v) => t<'v>", + "docstrings": [ + "`set m x y` returns a map containing the same bindings as\n `m`, plus a binding of `x` to `y`. If `x` was already bound\n in `m`, its previous binding disappears." + ] + }, + { + "id": "Belt_MapString.updateU", + "kind": "value", + "name": "updateU", + "signature": "let updateU: (t<'v>, key, (. option<'v>) => option<'v>) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.update", + "kind": "value", + "name": "update", + "signature": "let update: (t<'v>, key, option<'v> => option<'v>) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.mergeU", + "kind": "value", + "name": "mergeU", + "signature": "let mergeU: (t<'v>, t<'v2>, (. key, option<'v>, option<'v2>) => option<'c>) => t<'c>", + "docstrings": [] + }, + { + "id": "Belt_MapString.merge", + "kind": "value", + "name": "merge", + "signature": "let merge: (t<'v>, t<'v2>, (key, option<'v>, option<'v2>) => option<'c>) => t<'c>", + "docstrings": [ + "`merge m1 m2 f` computes a map whose keys is a subset of keys of `m1`\n and of `m2`. The presence of each such binding, and the corresponding\n value, is determined with the function `f`." + ] + }, + { + "id": "Belt_MapString.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'v>, array<(key, 'v)>) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t<'v>, (. key, 'v) => bool) => t<'v>", + "docstrings": [] + }, + { + "id": "Belt_MapString.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t<'v>, (key, 'v) => bool) => t<'v>", + "docstrings": [ + "`keep m p` returns the map with all the bindings in `m`\n that satisfy predicate `p`." + ] + }, + { + "id": "Belt_MapString.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t<'v>, (. key, 'v) => bool) => (t<'v>, t<'v>)", + "docstrings": [] + }, + { + "id": "Belt_MapString.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t<'v>, (key, 'v) => bool) => (t<'v>, t<'v>)", + "docstrings": [ + "`partition m p` returns a pair of maps `(m1, m2)`, where\n `m1` contains all the bindings of `s` that satisfy the\n predicate `p`, and `m2` is the map with all the bindings of\n `s` that do not satisfy `p`." + ] + }, + { + "id": "Belt_MapString.split", + "kind": "value", + "name": "split", + "signature": "let split: (key, t<'v>) => (t<'v>, option<'v>, t<'v>)", + "docstrings": [ + "`split x m` returns a triple `(l, data, r)`, where\n `l` is the map with all the bindings of `m` whose key\n is strictly less than `x`;\n `r` is the map with all the bindings of `m` whose key\n is strictly greater than `x`;\n `data` is `None` if `m` contains no binding for `x`,\n or `Some v` if `m` binds `v` to `x`." + ] + }, + { + "id": "Belt_MapString.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'v>, (. 'v) => 'v2) => t<'v2>", + "docstrings": [] + }, + { + "id": "Belt_MapString.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'v>, 'v => 'v2) => t<'v2>", + "docstrings": [ + "`map m f` returns a map with same domain as `m`, where the\n associated value `a` of all bindings of `m` has been\n replaced by the result of the application of `f` to `a`.\n The bindings are passed to `f` in increasing order\n with respect to the ordering over the type of the keys." + ] + }, + { + "id": "Belt_MapString.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "signature": "let mapWithKeyU: (t<'v>, (. key, 'v) => 'v2) => t<'v2>", + "docstrings": [] + }, + { + "id": "Belt_MapString.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "signature": "let mapWithKey: (t<'v>, (key, 'v) => 'v2) => t<'v2>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MutableMap.json b/index_data/api/Belt_MutableMap.json new file mode 100644 index 000000000..3d91a32e3 --- /dev/null +++ b/index_data/api/Belt_MutableMap.json @@ -0,0 +1,369 @@ +{ + "name": "Belt_MutableMap", + "docstrings": [], + "items": [ + { + "id": "Belt_MutableMap.Belt_MutableMapInt", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module Int = Belt_MutableMapInt" + }, + { + "id": "Belt_MutableMap.Belt_MutableMapString", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module String = Belt_MutableMapString" + }, + { + "id": "Belt_MutableMap.t", + "kind": "type", + "name": "t", + "signature": "type t<'k, 'v, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.id", + "kind": "type", + "name": "id", + "signature": "type id<'key, 'id> = Belt_Id.comparable<'key, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.make", + "kind": "value", + "name": "make", + "signature": "let make: (~id: id<'k, 'id>) => t<'k, 'a, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a, 'b, 'c> => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a, 'b, 'c> => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'k, 'a, 'b>, 'k) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, (. 'a, 'a) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, ('a, 'a) => int) => int", + "docstrings": [ + "`cmp(m1, m2, cmp)` First compare by size, if size is the same, compare by\n key, value pair." + ] + }, + { + "id": "Belt_MutableMap.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, (. 'a, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'k, 'a, 'id>, t<'k, 'a, 'id>, ('a, 'a) => bool) => bool", + "docstrings": [ + "`eq(m1, m2, eqf)` tests whether the maps `m1` and `m2` are equal, that is,\n contain equal keys and associate them with equal data. `eqf` is the\n equality predicate used to compare the data associated with the keys." + ] + }, + { + "id": "Belt_MutableMap.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'k, 'a, 'id>, (. 'k, 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'k, 'a, 'id>, ('k, 'a) => unit) => unit", + "docstrings": [ + "`forEach(m, f)` applies f to all bindings in map `m`. `f` receives the `'k`\n as first argument, and the associated value as second argument. The\n bindings are passed to `f` in increasing order with respect to the ordering\n over the type of the keys." + ] + }, + { + "id": "Belt_MutableMap.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'k, 'a, 'id>, 'b, (. 'b, 'k, 'a) => 'b) => 'b", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'k, 'a, 'id>, 'b, ('b, 'k, 'a) => 'b) => 'b", + "docstrings": [ + "`reduce(m, a, f), computes`(f(kN, dN) ... (f(k1, d1, a))...)`, where`k1 ...\n kN`are the keys of all bindings in`m`(in increasing order), and`d1 ... dN`\n are the associated data." + ] + }, + { + "id": "Belt_MutableMap.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'k, 'a, 'id>, ('k, 'a) => bool) => bool", + "docstrings": [ + "`every(m, p)` checks if all the bindings of the map satisfy the predicate\n `p`." + ] + }, + { + "id": "Belt_MutableMap.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'k, 'a, 'id>, (. 'k, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'k, 'a, 'id>, ('k, 'a) => bool) => bool", + "docstrings": [ + "`some(m, p)` checks if at least one binding of the map satisfy the\n predicate `p`." + ] + }, + { + "id": "Belt_MutableMap.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'k, 'a, 'id> => int", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'k, 'a, 'id> => list<('k, 'a)>", + "docstrings": [ + "In increasing order." + ] + }, + { + "id": "Belt_MutableMap.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'k, 'a, 'id> => array<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<('k, 'a)>, ~id: id<'k, 'id>) => t<'k, 'a, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'k, 'a, 'b> => array<'k>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'a, 'a0, 'b> => array<'a0>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.minKey", + "kind": "value", + "name": "minKey", + "signature": "let minKey: t<'k, 'a, 'b> => option<'k>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "signature": "let minKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.maxKey", + "kind": "value", + "name": "maxKey", + "signature": "let maxKey: t<'k, 'a, 'b> => option<'k>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "signature": "let maxKeyUndefined: t<'k, 'a, 'b> => Js.undefined<'k>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'k, 'a, 'b> => option<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'k, 'a, 'b> => Js.undefined<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'k, 'a, 'b> => option<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'k, 'a, 'b> => Js.undefined<('k, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'k, 'a, 'id>, 'k) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'k, 'a, 'id>, 'k) => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (t<'k, 'a, 'id>, 'k, 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'k, 'a, 'id>, 'k) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a, 'b, 'c> => unit", + "docstrings": [ + "Raise when invariant is not held." + ] + }, + { + "id": "Belt_MutableMap.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'k, 'a, 'id>, 'k) => unit", + "docstrings": [ + "`remove(m, x)` do the in-place modification." + ] + }, + { + "id": "Belt_MutableMap.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'k, 'a, 'id>, array<'k>) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'k, 'a, 'id>, 'k, 'a) => unit", + "docstrings": [ + "`set(m, x, y)` do the in-place modification" + ] + }, + { + "id": "Belt_MutableMap.updateU", + "kind": "value", + "name": "updateU", + "signature": "let updateU: (t<'k, 'a, 'id>, 'k, (. option<'a>) => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.update", + "kind": "value", + "name": "update", + "signature": "let update: (t<'k, 'a, 'id>, 'k, option<'a> => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'k, 'a, 'id>, array<('k, 'a)>) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'k, 'a, 'id>, (. 'a) => 'b) => t<'k, 'b, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'k, 'a, 'id>, 'a => 'b) => t<'k, 'b, 'id>", + "docstrings": [ + "`map(m, f)` returns a map with same domain as `m`, where the associated\n value a of all bindings of `m` has been replaced by the result of the\n application of `f` to `a`. The bindings are passed to `f` in increasing\n order with respect to the ordering over the type of the keys." + ] + }, + { + "id": "Belt_MutableMap.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "signature": "let mapWithKeyU: (t<'k, 'a, 'id>, (. 'k, 'a) => 'b) => t<'k, 'b, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MutableMap.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "signature": "let mapWithKey: (t<'k, 'a, 'id>, ('k, 'a) => 'b) => t<'k, 'b, 'id>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MutableMapInt.json b/index_data/api/Belt_MutableMapInt.json new file mode 100644 index 000000000..63967b041 --- /dev/null +++ b/index_data/api/Belt_MutableMapInt.json @@ -0,0 +1,352 @@ +{ + "name": "Belt_MutableMapInt", + "docstrings": [], + "items": [ + { + "id": "Belt_MutableMapInt.key", + "kind": "type", + "name": "key", + "signature": "type key = int", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.make", + "kind": "value", + "name": "make", + "signature": "let make: unit => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a> => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a> => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'a>, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int", + "docstrings": [ + "`cmp m1 m2 cmp`\n First compare by size, if size is the same,\n compare by key, value pair" + ] + }, + { + "id": "Belt_MutableMapInt.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool", + "docstrings": [ + "`eq m1 m2 cmp`" + ] + }, + { + "id": "Belt_MutableMapInt.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a>, (. key, 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a>, (key, 'a) => unit) => unit", + "docstrings": [ + "`forEach m f` applies `f` to all bindings in map `m`.\n `f` receives the key as first argument, and the associated value\n as second argument.\n The application order of `f` is in increasing order." + ] + }, + { + "id": "Belt_MutableMapInt.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'a>, 'b, (. 'b, key, 'a) => 'b) => 'b", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a>, 'b, ('b, key, 'a) => 'b) => 'b", + "docstrings": [ + "`reduce m a f` computes `(f kN dN ... (f k1 d1 a)...)`,\n where `k1 ... kN` are the keys of all bindings in `m`\n (in increasing order), and `d1 ... dN` are the associated data." + ] + }, + { + "id": "Belt_MutableMapInt.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'a>, (. key, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'a>, (key, 'a) => bool) => bool", + "docstrings": [ + "`every m p` checks if all the bindings of the map\n satisfy the predicate `p`.\n The application order of `p` is unspecified." + ] + }, + { + "id": "Belt_MutableMapInt.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'a>, (. key, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'a>, (key, 'a) => bool) => bool", + "docstrings": [ + "`some m p` checks if at least one binding of the map\n satisfy the predicate `p`.\n The application order of `p` is unspecified." + ] + }, + { + "id": "Belt_MutableMapInt.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a> => int", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'a> => list<(key, 'a)>", + "docstrings": [ + "In increasing order" + ] + }, + { + "id": "Belt_MutableMapInt.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a> => array<(key, 'a)>", + "docstrings": [ + "In increasing order" + ] + }, + { + "id": "Belt_MutableMapInt.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<(key, 'a)> => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'a> => array", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'a> => array<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.minKey", + "kind": "value", + "name": "minKey", + "signature": "let minKey: t<'a> => option", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "signature": "let minKeyUndefined: t<'a> => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.maxKey", + "kind": "value", + "name": "maxKey", + "signature": "let maxKey: t<'a> => option", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "signature": "let maxKeyUndefined: t<'a> => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'a> => option<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'a> => Js.undefined<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'a> => option<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'a> => Js.undefined<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a>, key) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'a>, key) => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (t<'a>, key, 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'a>, key) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + }, + { + "id": "Belt_MutableMapInt.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a>, key) => unit", + "docstrings": [ + "`remove m x` do the in-place modification" + ] + }, + { + "id": "Belt_MutableMapInt.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'a>, array) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'a>, key, 'a) => unit", + "docstrings": [ + "`set m x y` do the in-place modification, return\n `m` for chaining. If `x` was already bound\n in `m`, its previous binding disappears." + ] + }, + { + "id": "Belt_MutableMapInt.updateU", + "kind": "value", + "name": "updateU", + "signature": "let updateU: (t<'a>, key, (. option<'a>) => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.update", + "kind": "value", + "name": "update", + "signature": "let update: (t<'a>, key, option<'a> => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => t<'b>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>", + "docstrings": [ + "`map m f` returns a map with same domain as `m`, where the\n associated value `a` of all bindings of `m` has been\n replaced by the result of the application of `f` to `a`.\n The bindings are passed to `f` in increasing order\n with respect to the ordering over the type of the keys." + ] + }, + { + "id": "Belt_MutableMapInt.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "signature": "let mapWithKeyU: (t<'a>, (. key, 'a) => 'b) => t<'b>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapInt.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "signature": "let mapWithKey: (t<'a>, (key, 'a) => 'b) => t<'b>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MutableMapString.json b/index_data/api/Belt_MutableMapString.json new file mode 100644 index 000000000..7da8b3e34 --- /dev/null +++ b/index_data/api/Belt_MutableMapString.json @@ -0,0 +1,352 @@ +{ + "name": "Belt_MutableMapString", + "docstrings": [], + "items": [ + { + "id": "Belt_MutableMapString.key", + "kind": "type", + "name": "key", + "signature": "type key = string", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.make", + "kind": "value", + "name": "make", + "signature": "let make: unit => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a> => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a> => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'a>, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'a>, t<'a>, (. 'a, 'a) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'a>, t<'a>, ('a, 'a) => int) => int", + "docstrings": [ + "`cmp m1 m2 cmp`\n First compare by size, if size is the same,\n compare by key, value pair" + ] + }, + { + "id": "Belt_MutableMapString.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'a>, t<'a>, (. 'a, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'a>, t<'a>, ('a, 'a) => bool) => bool", + "docstrings": [ + "`eq m1 m2 cmp`" + ] + }, + { + "id": "Belt_MutableMapString.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a>, (. key, 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a>, (key, 'a) => unit) => unit", + "docstrings": [ + "`forEach m f` applies `f` to all bindings in map `m`.\n `f` receives the key as first argument, and the associated value\n as second argument.\n The application order of `f` is in increasing order." + ] + }, + { + "id": "Belt_MutableMapString.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'a>, 'b, (. 'b, key, 'a) => 'b) => 'b", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a>, 'b, ('b, key, 'a) => 'b) => 'b", + "docstrings": [ + "`reduce m a f` computes `(f kN dN ... (f k1 d1 a)...)`,\n where `k1 ... kN` are the keys of all bindings in `m`\n (in increasing order), and `d1 ... dN` are the associated data." + ] + }, + { + "id": "Belt_MutableMapString.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'a>, (. key, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'a>, (key, 'a) => bool) => bool", + "docstrings": [ + "`every m p` checks if all the bindings of the map\n satisfy the predicate `p`.\n The application order of `p` is unspecified." + ] + }, + { + "id": "Belt_MutableMapString.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'a>, (. key, 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'a>, (key, 'a) => bool) => bool", + "docstrings": [ + "`some m p` checks if at least one binding of the map\n satisfy the predicate `p`.\n The application order of `p` is unspecified." + ] + }, + { + "id": "Belt_MutableMapString.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a> => int", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'a> => list<(key, 'a)>", + "docstrings": [ + "In increasing order" + ] + }, + { + "id": "Belt_MutableMapString.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a> => array<(key, 'a)>", + "docstrings": [ + "In increasing order" + ] + }, + { + "id": "Belt_MutableMapString.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<(key, 'a)> => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'a> => array", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'a> => array<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.minKey", + "kind": "value", + "name": "minKey", + "signature": "let minKey: t<'a> => option", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "signature": "let minKeyUndefined: t<'a> => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.maxKey", + "kind": "value", + "name": "maxKey", + "signature": "let maxKey: t<'a> => option", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "signature": "let maxKeyUndefined: t<'a> => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'a> => option<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'a> => Js.undefined<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'a> => option<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'a> => Js.undefined<(key, 'a)>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a>, key) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'a>, key) => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (t<'a>, key, 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'a>, key) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + }, + { + "id": "Belt_MutableMapString.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a>, key) => unit", + "docstrings": [ + "`remove m x` do the in-place modification" + ] + }, + { + "id": "Belt_MutableMapString.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'a>, array) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'a>, key, 'a) => unit", + "docstrings": [ + "`set m x y` do the in-place modification, return\n `m` for chaining. If `x` was already bound\n in `m`, its previous binding disappears." + ] + }, + { + "id": "Belt_MutableMapString.updateU", + "kind": "value", + "name": "updateU", + "signature": "let updateU: (t<'a>, key, (. option<'a>) => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.update", + "kind": "value", + "name": "update", + "signature": "let update: (t<'a>, key, option<'a> => option<'a>) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => t<'b>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>", + "docstrings": [ + "`map m f` returns a map with same domain as `m`, where the\n associated value `a` of all bindings of `m` has been\n replaced by the result of the application of `f` to `a`.\n The bindings are passed to `f` in increasing order\n with respect to the ordering over the type of the keys." + ] + }, + { + "id": "Belt_MutableMapString.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "signature": "let mapWithKeyU: (t<'a>, (. key, 'a) => 'b) => t<'b>", + "docstrings": [] + }, + { + "id": "Belt_MutableMapString.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "signature": "let mapWithKey: (t<'a>, (key, 'a) => 'b) => t<'b>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MutableQueue.json b/index_data/api/Belt_MutableQueue.json new file mode 100644 index 000000000..91d2daf64 --- /dev/null +++ b/index_data/api/Belt_MutableQueue.json @@ -0,0 +1,198 @@ +{ + "name": "Belt_MutableQueue", + "docstrings": [ + "A FIFO (first in first out) queue data structure." + ], + "items": [ + { + "id": "Belt_MutableQueue.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [ + "The type of queues containing elements of `type('a)`." + ] + }, + { + "id": "Belt_MutableQueue.make", + "kind": "value", + "name": "make", + "signature": "let make: unit => t<'a>", + "docstrings": [ + "Returns a new queue, initially empty." + ] + }, + { + "id": "Belt_MutableQueue.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a> => unit", + "docstrings": [ + "Discard all elements from the queue." + ] + }, + { + "id": "Belt_MutableQueue.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a> => bool", + "docstrings": [ + "Returns `true` if the given queue is empty, `false` otherwise." + ] + }, + { + "id": "Belt_MutableQueue.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<'a> => t<'a>", + "docstrings": [ + "`fromArray` a is equivalent to `Array.forEach(a, add(q, a));`" + ] + }, + { + "id": "Belt_MutableQueue.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'a>, 'a) => unit", + "docstrings": [ + "`add(q, x)` adds the element `x` at the end of the queue `q`." + ] + }, + { + "id": "Belt_MutableQueue.peek", + "kind": "value", + "name": "peek", + "signature": "let peek: t<'a> => option<'a>", + "docstrings": [ + "`peekOpt(q)` returns the first element in queue `q`, without removing it from the queue." + ] + }, + { + "id": "Belt_MutableQueue.peekUndefined", + "kind": "value", + "name": "peekUndefined", + "signature": "let peekUndefined: t<'a> => Js.undefined<'a>", + "docstrings": [ + "`peekUndefined(q)` returns `undefined` if not found." + ] + }, + { + "id": "Belt_MutableQueue.peekExn", + "kind": "value", + "name": "peekExn", + "signature": "let peekExn: t<'a> => 'a", + "docstrings": [ + "raise an exception if `q` is empty" + ] + }, + { + "id": "Belt_MutableQueue.pop", + "kind": "value", + "name": "pop", + "signature": "let pop: t<'a> => option<'a>", + "docstrings": [ + "`pop(q)` removes and returns the first element in queue `q`." + ] + }, + { + "id": "Belt_MutableQueue.popUndefined", + "kind": "value", + "name": "popUndefined", + "signature": "let popUndefined: t<'a> => Js.undefined<'a>", + "docstrings": [ + "`popUndefined(q)` removes and returns the first element in queue `q`. it will return `undefined` if it is already empty." + ] + }, + { + "id": "Belt_MutableQueue.popExn", + "kind": "value", + "name": "popExn", + "signature": "let popExn: t<'a> => 'a", + "docstrings": [ + "`popExn(q)` raise an exception if q is empty." + ] + }, + { + "id": "Belt_MutableQueue.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [ + "`copy(q)` returns a fresh queue." + ] + }, + { + "id": "Belt_MutableQueue.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a> => int", + "docstrings": [ + "Returns the number of elements in a queue." + ] + }, + { + "id": "Belt_MutableQueue.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'a>, (. 'a) => 'b) => t<'b>", + "docstrings": [] + }, + { + "id": "Belt_MutableQueue.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>", + "docstrings": [] + }, + { + "id": "Belt_MutableQueue.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a>, (. 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableQueue.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a>, 'a => unit) => unit", + "docstrings": [ + "`forEach(q, f) applies`f`in turn to all elements of`q`, from the least\n recently entered to the most recently entered. The queue itself is unchanged." + ] + }, + { + "id": "Belt_MutableQueue.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'a>, 'b, (. 'b, 'a) => 'b) => 'b", + "docstrings": [] + }, + { + "id": "Belt_MutableQueue.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a>, 'b, ('b, 'a) => 'b) => 'b", + "docstrings": [ + "`reduce(q, accu, f)` is equivalent to `List.reduce(l, accu, f)`, where `l` is the list of `q`'s elements. The queue remains unchanged." + ] + }, + { + "id": "Belt_MutableQueue.transfer", + "kind": "value", + "name": "transfer", + "signature": "let transfer: (t<'a>, t<'a>) => unit", + "docstrings": [ + "`transfer(q1, q2)` adds all of `q1`'s elements at the end of the queue `q2`, then clears `q1`. It is equivalent to the sequence `forEach((x) => add(x, q2), q1);`; clear `q1`, but runs in constant time." + ] + }, + { + "id": "Belt_MutableQueue.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a> => array<'a>", + "docstrings": [ + "First added will be in the beginning of the array." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MutableSet.json b/index_data/api/Belt_MutableSet.json new file mode 100644 index 000000000..2c57e2d8b --- /dev/null +++ b/index_data/api/Belt_MutableSet.json @@ -0,0 +1,406 @@ +{ + "name": "Belt_MutableSet", + "docstrings": [ + "A **mutable** sorted set module which allows customized compare behavior.\n The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.\n\n It 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 ```res example\n module 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\n let mySet = Belt.MutableSet.make(~id=module(PairComparator))\n mySet->Belt.MutableSet.add((1, 2))\n ```" + ], + "items": [ + { + "id": "Belt_MutableSet.Belt_MutableSetInt", + "kind": "moduleAlias", + "docstrings": [ + "Specialized when key type is `int`, more efficient\n than the generic type" + ], + "signature": "module Int = Belt_MutableSetInt" + }, + { + "id": "Belt_MutableSet.Belt_MutableSetString", + "kind": "moduleAlias", + "docstrings": [ + "Specialized when key type is `string`, more efficient\n than the generic type" + ], + "signature": "module String = Belt_MutableSetString" + }, + { + "id": "Belt_MutableSet.t", + "kind": "type", + "name": "t", + "signature": "type t<'value, 'identity>", + "docstrings": [ + "`'value` is the element type\n\n `'identity` the identity of the collection" + ] + }, + { + "id": "Belt_MutableSet.id", + "kind": "type", + "name": "id", + "signature": "type id<'value, 'id> = Belt_Id.comparable<'value, 'id>", + "docstrings": [ + "The identity needed for making a set from scratch" + ] + }, + { + "id": "Belt_MutableSet.make", + "kind": "value", + "name": "make", + "signature": "let make: (~id: id<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Creates a new set by taking in the comparator" + ] + }, + { + "id": "Belt_MutableSet.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<'value>, ~id: id<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Creates new set from array of elements.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 3, 2, 4], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.toArray /* [1, 2, 3, 4] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "signature": "let fromSortedArrayUnsafe: (array<'value>, ~id: id<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "The same as [fromArray][#fromarray] except it is after assuming the input array is already sorted." + ] + }, + { + "id": "Belt_MutableSet.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'value, 'id> => t<'value, 'id>", + "docstrings": [ + "Returns copy of a set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 3, 2, 4], ~id=module(IntCmp))\n\n let copied = s0->Belt.MutableSet.copy\n copied->Belt.MutableSet.toArray /* [1, 2, 3, 4] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a, 'b> => bool", + "docstrings": [ + "Checks if set is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let empty = Belt.MutableSet.fromArray([], ~id=module(IntCmp))\n let notEmpty = Belt.MutableSet.fromArray([1], ~id=module(IntCmp))\n\n Belt.MutableSet.isEmpty(empty) /* true */\n Belt.MutableSet.isEmpty(notEmpty) /* false */\n ```" + ] + }, + { + "id": "Belt_MutableSet.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'value, 'id>, 'value) => bool", + "docstrings": [ + "Checks if element exists in set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.MutableSet.fromArray([1, 4, 2, 5], ~id=module(IntCmp))\n\n set->Belt.MutableSet.has(3) /* false */\n set->Belt.MutableSet.has(1) /* true */\n ```" + ] + }, + { + "id": "Belt_MutableSet.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'value, 'id>, 'value) => unit", + "docstrings": [ + "Adds element to set. If element existed in set, value is unchanged.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n s0->Belt.MutableSet.add(1)\n s0->Belt.MutableSet.add(2)\n s0->Belt.MutableSet.add(2)\n\n s0->Belt.MutableSet.toArray /* [1, 2] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.addCheck", + "kind": "value", + "name": "addCheck", + "signature": "let addCheck: (t<'value, 'id>, 'value) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSet.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'value, 'id>, array<'value>) => unit", + "docstrings": [ + "Adds each element of array to set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.MutableSet.make(~id=module(IntCmp))\n\n set->Belt.MutableSet.mergeMany([5, 4, 3, 2, 1])\n set->Belt.MutableSet.toArray /* [1, 2, 3, 4, 5] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'value, 'id>, 'value) => unit", + "docstrings": [ + "Removes element from set. If element did not exist in set, value is unchanged.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([2, 3, 1, 4, 5], ~id=module(IntCmp))\n s0->Belt.MutableSet.remove(1)\n s0->Belt.MutableSet.remove(3)\n s0->Belt.MutableSet.remove(3)\n\n s0->Belt.MutableSet.toArray /* [2,4,5] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.removeCheck", + "kind": "value", + "name": "removeCheck", + "signature": "let removeCheck: (t<'value, 'id>, 'value) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSet.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'value, 'id>, array<'value>) => unit", + "docstrings": [ + "Removes each element of array from set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.MutableSet.fromArray([1, 2, 3, 4], ~id=module(IntCmp))\n\n set->Belt.MutableSet.removeMany([5, 4, 3, 2, 1])\n set->Belt.MutableSet.toArray /* [] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.union", + "kind": "value", + "name": "union", + "signature": "let union: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Returns union of two sets.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\n let union = Belt.MutableSet.union(s0, s1)\n union->Belt.MutableSet.toArray /* [1,2,3,4,5,6] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Returns intersection of two sets.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\n let intersect = Belt.MutableSet.intersect(s0, s1)\n intersect->Belt.MutableSet.toArray /* [2,3,5] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Returns elements from first set, not existing in second set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\n Belt.MutableSet.toArray(Belt.MutableSet.diff(s0, s1)) /* [6] */\n Belt.MutableSet.toArray(Belt.MutableSet.diff(s1, s0)) /* [1,4] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t<'value, 'id>, t<'value, 'id>) => bool", + "docstrings": [ + "Checks if second set is subset of first set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([5, 2, 3, 1, 5, 4], ~id=module(IntCmp))\n let s2 = Belt.MutableSet.intersect(s0, s1)\n Belt.MutableSet.subset(s2, s0) /* true */\n Belt.MutableSet.subset(s2, s1) /* true */\n Belt.MutableSet.subset(s1, s0) /* false */\n ```" + ] + }, + { + "id": "Belt_MutableSet.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'value, 'id>, t<'value, 'id>) => int", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function for doing sets of sets. It compares size first and then iterates over each element following the order of elements." + ] + }, + { + "id": "Belt_MutableSet.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'value, 'id>, t<'value, 'id>) => bool", + "docstrings": [ + "Checks if two sets are equal.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3], ~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 5], ~id=module(IntCmp))\n\n Belt.MutableSet.eq(s0, s1) /* true */\n ```" + ] + }, + { + "id": "Belt_MutableSet.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'value, 'id>, (. 'value) => unit) => unit", + "docstrings": [ + "Same as [forEach](##forEach) but takes uncurried functon." + ] + }, + { + "id": "Belt_MutableSet.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'value, 'id>, 'value => unit) => unit", + "docstrings": [ + "Applies function `f` in turn to all elements of set in increasing order.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n let acc = ref(list{})\n s0->Belt.MutableSet.forEach(x => acc := Belt.List.add(acc.contents, x))\n acc /* [6,5,3,2] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'value, 'id>, 'a, (. 'a, 'value) => 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MutableSet.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'value, 'id>, 'a, ('a, 'value) => 'a) => 'a", + "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 ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([5, 2, 3, 5, 6], ~id=module(IntCmp))\n s0->Belt.MutableSet.reduce(list{}, (acc, element) => acc->Belt.List.add(element)) /* [6,5,3,2] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'value, 'id>, (. 'value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSet.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'value, 'id>, 'value => bool) => bool", + "docstrings": [ + "Checks if all elements of the set satisfy the predicate. Order unspecified.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.MutableSet.fromArray([2, 4, 6, 8], ~id=module(IntCmp))\n s0->Belt.MutableSet.every(isEven) /* true */\n ```" + ] + }, + { + "id": "Belt_MutableSet.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'value, 'id>, (. 'value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSet.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'value, 'id>, 'value => bool) => bool", + "docstrings": [ + "Checks if at least one element of the set satisfies the predicate.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 4, 6, 8], ~id=module(IntCmp))\n s0->Belt.MutableSet.some(isOdd) /* true */\n ```" + ] + }, + { + "id": "Belt_MutableSet.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t<'value, 'id>, (. 'value) => bool) => t<'value, 'id>", + "docstrings": [] + }, + { + "id": "Belt_MutableSet.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t<'value, 'id>, 'value => bool) => t<'value, 'id>", + "docstrings": [ + "Returns the set of all elements that satisfy the predicate.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n let s1 = s0->Belt.MutableSet.keep(isEven)\n\n s1->Belt.MutableSet.toArray /* [2, 4] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t<'value, 'id>, (. 'value) => bool) => (t<'value, 'id>, t<'value, 'id>)", + "docstrings": [] + }, + { + "id": "Belt_MutableSet.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t<'value, 'id>, 'value => bool) => (t<'value, 'id>, t<'value, 'id>)", + "docstrings": [ + "```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n let (s1, s2) = s0->Belt.MutableSet.partition(isOdd)\n\n s1->Belt.MutableSet.toArray /* [1,3,5] */\n s2->Belt.MutableSet.toArray /* [2,4] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'value, 'id> => int", + "docstrings": [ + "Returns size of the set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.size /* 4 */\n ```" + ] + }, + { + "id": "Belt_MutableSet.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'value, 'id> => list<'value>", + "docstrings": [ + "Returns list of ordered set elements.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.toList /* [1,2,3,5] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'value, 'id> => array<'value>", + "docstrings": [ + "Returns array of ordered set elements.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.toArray /* [1,2,3,5] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'value, 'id> => option<'value>", + "docstrings": [ + "Returns minimum value of the collection. `None` if collection is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.minimum /* None */\n s1->Belt.MutableSet.minimum /* Some(1) */\n ```" + ] + }, + { + "id": "Belt_MutableSet.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'value, 'id> => Js.undefined<'value>", + "docstrings": [ + "Returns minimum value of the collection. `undefined` if collection is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.minUndefined /* undefined */\n s1->Belt.MutableSet.minUndefined /* 1 */\n ```" + ] + }, + { + "id": "Belt_MutableSet.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'value, 'id> => option<'value>", + "docstrings": [ + "Returns maximum value of the collection. `None` if collection is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.maximum /* None */\n s1->Belt.MutableSet.maximum /* Some(5) */\n ```" + ] + }, + { + "id": "Belt_MutableSet.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'value, 'id> => Js.undefined<'value>", + "docstrings": [ + "Returns maximum value of the collection. `undefined` if collection is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.make(~id=module(IntCmp))\n let s1 = Belt.MutableSet.fromArray([3, 2, 1, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.maxUndefined /* undefined */\n s1->Belt.MutableSet.maxUndefined /* 5 */\n ```" + ] + }, + { + "id": "Belt_MutableSet.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'value, 'id>, 'value) => option<'value>", + "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 ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n\n s0->Belt.MutableSet.get(3) /* Some(3) */\n s0->Belt.MutableSet.get(20) /* None */\n ```" + ] + }, + { + "id": "Belt_MutableSet.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'value, 'id>, 'value) => Js.undefined<'value>", + "docstrings": [ + "Same as [get](#get) but returns `undefined` when element does not exist." + ] + }, + { + "id": "Belt_MutableSet.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'value, 'id>, 'value) => 'value", + "docstrings": [ + "Same as [get](#get) but raise when element does not exist." + ] + }, + { + "id": "Belt_MutableSet.split", + "kind": "value", + "name": "split", + "signature": "let split: (t<'value, 'id>, 'value) => ((t<'value, 'id>, t<'value, 'id>), bool)", + "docstrings": [ + "Returns a tuple `((smaller, larger), present)`, `present` is true when element exist in set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.MutableSet.fromArray([1, 2, 3, 4, 5], ~id=module(IntCmp))\n\n let ((smaller, larger), present) = s0->Belt.MutableSet.split(3)\n\n present /* true */\n smaller->Belt.MutableSet.toArray /* [1,2] */\n larger->Belt.MutableSet.toArray /* [4,5] */\n ```" + ] + }, + { + "id": "Belt_MutableSet.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a, 'b> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MutableSetInt.json b/index_data/api/Belt_MutableSetInt.json new file mode 100644 index 000000000..d11473e0a --- /dev/null +++ b/index_data/api/Belt_MutableSetInt.json @@ -0,0 +1,340 @@ +{ + "name": "Belt_MutableSetInt", + "docstrings": [ + "This module is [`Belt.MutableSet`]() specialized with key type to be a primitive type.\n\n It is more efficient in general, the API is the same with [`Belt.MutableSet`]() except its key type is fixed,\n and identity is not needed(using the built-in one)\n\n **See** [`Belt.MutableSet`]()" + ], + "items": [ + { + "id": "Belt_MutableSetInt.value", + "kind": "type", + "name": "value", + "signature": "type value = int", + "docstrings": [ + "The type of the set elements." + ] + }, + { + "id": "Belt_MutableSetInt.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [ + "The type of sets." + ] + }, + { + "id": "Belt_MutableSetInt.make", + "kind": "value", + "name": "make", + "signature": "let make: unit => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "signature": "let fromSortedArrayUnsafe: array => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.has", + "kind": "value", + "name": "has", + "signature": "let has: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.add", + "kind": "value", + "name": "add", + "signature": "let add: (t, value) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.addCheck", + "kind": "value", + "name": "addCheck", + "signature": "let addCheck: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t, value) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.removeCheck", + "kind": "value", + "name": "removeCheck", + "signature": "let removeCheck: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.union", + "kind": "value", + "name": "union", + "signature": "let union: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t, t) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t, t) => int", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t, t) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t, (. value) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, value => unit) => unit", + "docstrings": [ + "In increasing order" + ] + }, + { + "id": "Belt_MutableSetInt.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t, 'a, (. 'a, value) => 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, 'a, ('a, value) => 'a) => 'a", + "docstrings": [ + "Iterate in increasing order." + ] + }, + { + "id": "Belt_MutableSetInt.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t, (. value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, value => bool) => bool", + "docstrings": [ + "`every p s` checks if all elements of the set\n satisfy the predicate `p`. Order unspecified." + ] + }, + { + "id": "Belt_MutableSetInt.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t, (. value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, value => bool) => bool", + "docstrings": [ + "`some p s` checks if at least one element of\n the set satisfies the predicate `p`. Oder unspecified." + ] + }, + { + "id": "Belt_MutableSetInt.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t, (. value) => bool) => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t, value => bool) => t", + "docstrings": [ + "`keep s p` returns a fresh copy of the set of all elements in `s`\n that satisfy predicate `p`." + ] + }, + { + "id": "Belt_MutableSetInt.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t, (. value) => bool) => (t, t)", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t, value => bool) => (t, t)", + "docstrings": [ + "`partition s p` returns a fresh copy pair of sets `(s1, s2)`, where\n `s1` is the set of all the elements of `s` that satisfy the\n predicate `p`, and `s2` is the set of all the elements of\n `s` that do not satisfy `p`." + ] + }, + { + "id": "Belt_MutableSetInt.size", + "kind": "value", + "name": "size", + "signature": "let size: t => int", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t => list", + "docstrings": [ + "In increasing order with respect" + ] + }, + { + "id": "Belt_MutableSetInt.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t => array", + "docstrings": [ + "In increasing order with respect" + ] + }, + { + "id": "Belt_MutableSetInt.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t => option", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t => option", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.get", + "kind": "value", + "name": "get", + "signature": "let get: (t, value) => option", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t, value) => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t, value) => value", + "docstrings": [] + }, + { + "id": "Belt_MutableSetInt.split", + "kind": "value", + "name": "split", + "signature": "let split: (t, value) => ((t, t), bool)", + "docstrings": [ + "`split s key` return a fresh copy of each" + ] + }, + { + "id": "Belt_MutableSetInt.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MutableSetString.json b/index_data/api/Belt_MutableSetString.json new file mode 100644 index 000000000..288953ad4 --- /dev/null +++ b/index_data/api/Belt_MutableSetString.json @@ -0,0 +1,340 @@ +{ + "name": "Belt_MutableSetString", + "docstrings": [ + "This module is [`Belt.MutableSet`]() specialized with key type to be a primitive type.\n\n It is more efficient in general, the API is the same with [`Belt.MutableSet`]() except its key type is fixed,\n and identity is not needed(using the built-in one)\n\n **See** [`Belt.MutableSet`]()" + ], + "items": [ + { + "id": "Belt_MutableSetString.value", + "kind": "type", + "name": "value", + "signature": "type value = string", + "docstrings": [ + "The type of the set elements." + ] + }, + { + "id": "Belt_MutableSetString.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [ + "The type of sets." + ] + }, + { + "id": "Belt_MutableSetString.make", + "kind": "value", + "name": "make", + "signature": "let make: unit => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "signature": "let fromSortedArrayUnsafe: array => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.has", + "kind": "value", + "name": "has", + "signature": "let has: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.add", + "kind": "value", + "name": "add", + "signature": "let add: (t, value) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.addCheck", + "kind": "value", + "name": "addCheck", + "signature": "let addCheck: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t, value) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.removeCheck", + "kind": "value", + "name": "removeCheck", + "signature": "let removeCheck: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.union", + "kind": "value", + "name": "union", + "signature": "let union: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t, t) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t, t) => int", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t, t) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t, (. value) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, value => unit) => unit", + "docstrings": [ + "In increasing order" + ] + }, + { + "id": "Belt_MutableSetString.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t, 'a, (. 'a, value) => 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, 'a, ('a, value) => 'a) => 'a", + "docstrings": [ + "Iterate in increasing order." + ] + }, + { + "id": "Belt_MutableSetString.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t, (. value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, value => bool) => bool", + "docstrings": [ + "`every p s` checks if all elements of the set\n satisfy the predicate `p`. Order unspecified." + ] + }, + { + "id": "Belt_MutableSetString.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t, (. value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, value => bool) => bool", + "docstrings": [ + "`some p s` checks if at least one element of\n the set satisfies the predicate `p`. Oder unspecified." + ] + }, + { + "id": "Belt_MutableSetString.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t, (. value) => bool) => t", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t, value => bool) => t", + "docstrings": [ + "`keep s p` returns a fresh copy of the set of all elements in `s`\n that satisfy predicate `p`." + ] + }, + { + "id": "Belt_MutableSetString.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t, (. value) => bool) => (t, t)", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t, value => bool) => (t, t)", + "docstrings": [ + "`partition s p` returns a fresh copy pair of sets `(s1, s2)`, where\n `s1` is the set of all the elements of `s` that satisfy the\n predicate `p`, and `s2` is the set of all the elements of\n `s` that do not satisfy `p`." + ] + }, + { + "id": "Belt_MutableSetString.size", + "kind": "value", + "name": "size", + "signature": "let size: t => int", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t => list", + "docstrings": [ + "In increasing order with respect" + ] + }, + { + "id": "Belt_MutableSetString.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t => array", + "docstrings": [ + "In increasing order with respect" + ] + }, + { + "id": "Belt_MutableSetString.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t => option", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t => option", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.get", + "kind": "value", + "name": "get", + "signature": "let get: (t, value) => option", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t, value) => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t, value) => value", + "docstrings": [] + }, + { + "id": "Belt_MutableSetString.split", + "kind": "value", + "name": "split", + "signature": "let split: (t, value) => ((t, t), bool)", + "docstrings": [ + "`split s key` return a fresh copy of each" + ] + }, + { + "id": "Belt_MutableSetString.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_MutableStack.json b/index_data/api/Belt_MutableStack.json new file mode 100644 index 000000000..cda41d12c --- /dev/null +++ b/index_data/api/Belt_MutableStack.json @@ -0,0 +1,121 @@ +{ + "name": "Belt_MutableStack", + "docstrings": [ + "First in last out stack. This module implements stacks, with in-place\nmodification." + ], + "items": [ + { + "id": "Belt_MutableStack.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.make", + "kind": "value", + "name": "make", + "signature": "let make: unit => t<'a>", + "docstrings": [ + "Returns a new stack, initially empty." + ] + }, + { + "id": "Belt_MutableStack.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a> => unit", + "docstrings": [ + "Discard all elements from the stack." + ] + }, + { + "id": "Belt_MutableStack.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [ + "`copy(x)` O(1) operation, return a new stack." + ] + }, + { + "id": "Belt_MutableStack.push", + "kind": "value", + "name": "push", + "signature": "let push: (t<'a>, 'a) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.popUndefined", + "kind": "value", + "name": "popUndefined", + "signature": "let popUndefined: t<'a> => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.pop", + "kind": "value", + "name": "pop", + "signature": "let pop: t<'a> => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.topUndefined", + "kind": "value", + "name": "topUndefined", + "signature": "let topUndefined: t<'a> => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.top", + "kind": "value", + "name": "top", + "signature": "let top: t<'a> => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a> => bool", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a> => int", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a>, (. 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a>, 'a => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.dynamicPopIterU", + "kind": "value", + "name": "dynamicPopIterU", + "signature": "let dynamicPopIterU: (t<'a>, (. 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_MutableStack.dynamicPopIter", + "kind": "value", + "name": "dynamicPopIter", + "signature": "let dynamicPopIter: (t<'a>, 'a => unit) => unit", + "docstrings": [ + "`dynamicPopIter(s, f)` apply `f` to each element of `s`. The item is poped\n before applying `f`, `s` will be empty after this opeartion. This function is\n useful for worklist algorithm." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_Option.json b/index_data/api/Belt_Option.json new file mode 100644 index 000000000..2954f38fa --- /dev/null +++ b/index_data/api/Belt_Option.json @@ -0,0 +1,188 @@ +{ + "name": "Belt_Option", + "docstrings": [ + "In Belt we represent the existence and nonexistence of a value by wrapping it\n with the `option` type. In order to make it a bit more convenient to work with\n option-types, Belt provides utility-functions for it.\n\n The `option` type is a part of the ReScript standard library which is defined like this:\n\n ```res sig\n type option<'a> = None | Some('a)\n ```\n\n ```res example\n let someString: option = Some(\"hello\")\n ```" + ], + "items": [ + { + "id": "Belt_Option.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (option<'a>, (. 'a) => bool) => option<'a>", + "docstrings": [ + "Uncurried version of `keep`" + ] + }, + { + "id": "Belt_Option.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (option<'a>, 'a => bool) => option<'a>", + "docstrings": [ + "If `optionValue` is `Some(value)` and `p(value) = true`, it returns `Some(value)`; otherwise returns `None`\n\n ```res example\n Belt.Option.keep(Some(10), x => x > 5) /* returns `Some(10)` */\n Belt.Option.keep(Some(4), x => x > 5) /* returns `None` */\n Belt.Option.keep(None, x => x > 5) /* returns `None` */\n ```" + ] + }, + { + "id": "Belt_Option.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (option<'a>, (. 'a) => unit) => unit", + "docstrings": [ + "Uncurried version of `forEach`" + ] + }, + { + "id": "Belt_Option.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (option<'a>, 'a => unit) => unit", + "docstrings": [ + "If `optionValue` is `Some(value`), it calls `f(value)`; otherwise returns `()`\n\n ```res example\n Belt.Option.forEach(Some(\"thing\"), x => Js.log(x)) /* logs \"thing\" */\n Belt.Option.forEach(None, x => Js.log(x)) /* returns () */\n ```" + ] + }, + { + "id": "Belt_Option.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: option<'a> => 'a", + "docstrings": [ + "Raises an Error in case `None` is provided. Use with care.\n\n ```res example\n Belt.Option.getExn(Some(3)) /* 3 */\n\n Belt.Option.getExn(None) /* Raises an Error */\n ```" + ] + }, + { + "id": "Belt_Option.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "signature": "let getUnsafe: option<'a> => 'a", + "docstrings": [ + "`getUnsafe(x)` returns `x`\n\n This is an unsafe operation, it assumes `x` is neither `None`\n nor `Some(None(...)))`" + ] + }, + { + "id": "Belt_Option.mapWithDefaultU", + "kind": "value", + "name": "mapWithDefaultU", + "signature": "let mapWithDefaultU: (option<'a>, 'b, (. 'a) => 'b) => 'b", + "docstrings": [ + "Uncurried version of `mapWithDefault`" + ] + }, + { + "id": "Belt_Option.mapWithDefault", + "kind": "value", + "name": "mapWithDefault", + "signature": "let mapWithDefault: (option<'a>, 'b, 'a => 'b) => 'b", + "docstrings": [ + "If `optionValue` is of `Some(value)`,\n this function returns that value applied with `f`, in other words `f(value)`.\n\n If `optionValue` is `None`, the default is returned.\n\n ```res example\n let someValue = Some(3)\n someValue->Belt.Option.mapWithDefault(0, x => x + 5) /* 8 */\n\n let noneValue = None\n noneValue->Belt.Option.mapWithDefault(0, x => x + 5) /* 0 */\n ```" + ] + }, + { + "id": "Belt_Option.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (option<'a>, (. 'a) => 'b) => option<'b>", + "docstrings": [ + "Uncurried version of `map`" + ] + }, + { + "id": "Belt_Option.map", + "kind": "value", + "name": "map", + "signature": "let map: (option<'a>, 'a => 'b) => option<'b>", + "docstrings": [ + "If `optionValue` is `Some(value)` this returns `f(value)`, otherwise it returns `None`.\n\n ```res example\n Belt.Option.map(Some(3), x => x * x) /* Some(9) */\n\n Belt.Option.map(None, x => x * x) /* None */\n ```" + ] + }, + { + "id": "Belt_Option.flatMapU", + "kind": "value", + "name": "flatMapU", + "signature": "let flatMapU: (option<'a>, (. 'a) => option<'b>) => option<'b>", + "docstrings": [ + "Uncurried version of `flatMap`" + ] + }, + { + "id": "Belt_Option.flatMap", + "kind": "value", + "name": "flatMap", + "signature": "let flatMap: (option<'a>, 'a => option<'b>) => option<'b>", + "docstrings": [ + "If `optionValue` is `Some(value)`, returns `f(value)`, otherwise returns\n `None`.
\n The function `f` must have a return type of `option<'b>`.\n\n ```res example\n let addIfAboveOne = value =>\n if (value > 1) {\n Some(value + 1)\n } else {\n None\n }\n\n Belt.Option.flatMap(Some(2), addIfAboveOne) /* Some(3) */\n\n Belt.Option.flatMap(Some(-4), addIfAboveOne) /* None */\n\n Belt.Option.flatMap(None, addIfAboveOne) /* None */\n ```" + ] + }, + { + "id": "Belt_Option.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (option<'a>, 'a) => 'a", + "docstrings": [ + "If `optionalValue` is `Some(value)`, returns `value`, otherwise default.\n\n ```res example\n Belt.Option.getWithDefault(None, \"Banana\") /* Banana */\n\n Belt.Option.getWithDefault(Some(\"Apple\"), \"Banana\") /* Apple */\n ```\n\n ```res example\n let greet = (firstName: option) =>\n \"Greetings \" ++ firstName->Belt.Option.getWithDefault(\"Anonymous\")\n\n Some(\"Jane\")->greet /* \"Greetings Jane\" */\n\n None->greet /* \"Greetings Anonymous\" */\n ```" + ] + }, + { + "id": "Belt_Option.orElse", + "kind": "value", + "name": "orElse", + "signature": "let orElse: (option<'a>, option<'a>) => option<'a>", + "docstrings": [ + "`orElse optionalValue otherOptional`\n\n If `optionalValue` is `Some value`, returns `Some value`, otherwise `otherOptional`\n\n ```\n orElse (Some 1812) (Some 1066) = Some 1812;;\n orElse None (Some 1066) = Some 1066;;\n orElse None None = None;;\n ```" + ] + }, + { + "id": "Belt_Option.isSome", + "kind": "value", + "name": "isSome", + "signature": "let isSome: option<'a> => bool", + "docstrings": [ + "Returns `true` if the argument is `Some(value)`, `false` otherwise.\n\n ```res example\n Belt.Option.isSome(None) /* false */\n\n Belt.Option.isSome(Some(1)) /* true */\n ```" + ] + }, + { + "id": "Belt_Option.isNone", + "kind": "value", + "name": "isNone", + "signature": "let isNone: option<'a> => bool", + "docstrings": [ + "Returns `true` if the argument is `None`, `false` otherwise.\n\n ```res example\n Belt.Option.isNone(None) /* true */\n\n Belt.Option.isNone(Some(1)) /* false */\n ```" + ] + }, + { + "id": "Belt_Option.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (option<'a>, option<'b>, (. 'a, 'b) => bool) => bool", + "docstrings": [ + "Uncurried version of `eq`" + ] + }, + { + "id": "Belt_Option.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (option<'a>, option<'b>, ('a, 'b) => bool) => bool", + "docstrings": [ + "Evaluates two optional values for equality with respect to a predicate\n function. If both `optValue1` and `optValue2` are `None`, returns `true`.\n If one of the arguments is `Some(value)` and the other is `None`, returns\n `false`.\n\n If arguments are `Some(value1)` and `Some(value2)`, returns the result of\n `predicate(value1, value2)`; the predicate function must return a bool.\n\n ```res example\n let clockEqual = (a, b) => mod(a, 12) == mod(b, 12)\n\n open Belt.Option\n\n eq(Some(3), Some(15), clockEqual) /* true */\n\n eq(Some(3), None, clockEqual) /* false */\n\n eq(None, Some(3), clockEqual) /* false */\n\n eq(None, None, clockEqual) /* true */\n ```" + ] + }, + { + "id": "Belt_Option.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (option<'a>, option<'b>, (. 'a, 'b) => int) => int", + "docstrings": [ + "Uncurried version of `cmp`" + ] + }, + { + "id": "Belt_Option.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (option<'a>, option<'b>, ('a, 'b) => int) => int", + "docstrings": [ + "`cmp(optValue1, optValue2, comparisonFunction)` compares two optional values\n with respect to given `comparisonFunction`.\n\n If both `optValue1` and `optValue2` are `None`, it returns `0`.\n\n If the first argument is `Some(value1)` and the second is `None`, returns `1`\n (something is greater than nothing).\n\n If the first argument is `None` and the second is `Some(value2)`, returns `-1`\n (nothing is less than something).\n\n If the arguments are `Some(value1)` and `Some(value2)`, returns the result of\n `comparisonFunction(value1, value2)`; comparisonFunction takes two arguments\n and returns `-1` if the first argument is less than the second, `0` if the\n arguments are equal, and `1` if the first argument is greater than the second.\n\n ```res example\n let clockCompare = (a, b) => compare(mod(a, 12), mod(b, 12))\n\n open Belt.Option\n\n cmp(Some(3), Some(15), clockCompare) /* 0 */\n\n cmp(Some(3), Some(14), clockCompare) /* 1 */\n\n cmp(Some(2), Some(15), clockCompare) /* (-1) */\n\n cmp(None, Some(15), clockCompare) /* (-1) */\n\n cmp(Some(14), None, clockCompare) /* 1 */\n\n cmp(None, None, clockCompare) /* 0 */\n ```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_Range.json b/index_data/api/Belt_Range.json new file mode 100644 index 000000000..10d88d69e --- /dev/null +++ b/index_data/api/Belt_Range.json @@ -0,0 +1,88 @@ +{ + "name": "Belt_Range", + "docstrings": [ + "A small utility module to provide inclusive range operations for `[start,\n finish]`. Internally it is relying on loops instead of creating new arrays,\n which makes it pretty performant and memory friendly." + ], + "items": [ + { + "id": "Belt_Range.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (int, int, (. int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_Range.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (int, int, int => unit) => unit", + "docstrings": [ + "`forEach(start, finish, action)`\n\n equivalent to `Belt.Array.(forEach(range(start, finish), action))`\n\n ```res example\n Belt.Range.forEach(0, 4, (i) => Js.log(i))\n\n /**\n * prints:\n * 0\n * 1\n * 2\n * 3\n * 4\n */\n ```" + ] + }, + { + "id": "Belt_Range.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (int, int, (. int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Range.every", + "kind": "value", + "name": "every", + "signature": "let every: (int, int, int => bool) => bool", + "docstrings": [ + "`every(start, finish, p)`\n\n equivalent to `Belt.Array.(every(range(start, finish), p))`\n\n ```res example\n Belt.Range.every(0, 4, (i) => i < 5) /* true */\n\n Belt.Range.every(0, 4, (i) => i < 4) /* false */\n ```" + ] + }, + { + "id": "Belt_Range.everyByU", + "kind": "value", + "name": "everyByU", + "signature": "let everyByU: (int, int, ~step: int, (. int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Range.everyBy", + "kind": "value", + "name": "everyBy", + "signature": "let everyBy: (int, int, ~step: int, int => bool) => bool", + "docstrings": [ + "`everyBy(start, finish, ~step, p)`\n\n See `Belt_Array.rangeBy`\n\n equivalent to `Belt.Array.(every(rangeBy(start, finish, ~step), p))`\n\n ```res example\n Belt.Range.everyBy(0, 4, ~step=1, (i) => mod(i, 2) === 0) /* false */\n\n Belt.Range.everyBy(0, 4, ~step=2, (i) => mod(i, 2) === 0) /* true */\n ```" + ] + }, + { + "id": "Belt_Range.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (int, int, (. int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Range.some", + "kind": "value", + "name": "some", + "signature": "let some: (int, int, int => bool) => bool", + "docstrings": [ + "`some(start, finish, p)`\n\n equivalent to `Belt.Array.(some(range(start, finish), p))`\n\n ```res example\n Belt.Range.some(0, 4, (i) => i > 5) /* false */\n\n Belt.Range.some(0, 4, (i) => i > 2) /* true */\n ```" + ] + }, + { + "id": "Belt_Range.someByU", + "kind": "value", + "name": "someByU", + "signature": "let someByU: (int, int, ~step: int, (. int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Range.someBy", + "kind": "value", + "name": "someBy", + "signature": "let someBy: (int, int, ~step: int, int => bool) => bool", + "docstrings": [ + "`someBy(start, finish, ~step, p)`\n\n See `Belt_Array.rangeBy`\n\n equivalent to `Belt.Array.(some(rangeBy(start, finish, ~step), p))`\n\n ```res example\n Belt.Range.someBy(1, 5, ~step=2, (i) => mod(i, 2) === 0) /* false */\n Belt.Range.someBy(0, 4, ~step=2, (i) => mod(i, 2) === 0) /* true */\n ```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_Result.json b/index_data/api/Belt_Result.json new file mode 100644 index 000000000..3d8d6d3a6 --- /dev/null +++ b/index_data/api/Belt_Result.json @@ -0,0 +1,148 @@ +{ + "name": "Belt_Result", + "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." + ], + "items": [ + { + "id": "Belt_Result.t", + "kind": "type", + "name": "t", + "signature": "type t<'a, 'b> = Ok('a) | Error('b)", + "docstrings": [], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Ok", + "docstrings": [], + "signature": "Ok('a)" + }, + { + "constructorName": "Error", + "docstrings": [ + "The type `Result.t(result, err)` describes a variant of two states:\n `Ok(someResult)` represents a successful operation, whereby\n ``Error(someError)` signals an erronous operation.\n\n In this concrete example, we are defining our own `Result` type to reflect an HTTP like\n query operation:\n\n ```res example\n type responseError = NotAvailable | NotFound\n type queryResult = t\n\n let failQueryUser = (username: string): queryResult => {\n Error(NotAvailable)\n }\n```" + ], + "signature": "Error('b)" + } + ] + } + }, + { + "id": "Belt_Result.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: t<'a, 'b> => 'a", + "docstrings": [ + "`getExn(res)`: when `res` is `Ok(n)`, returns `n` when `res` is `Error(m)`, raise an exception\n\n ```res example\n Belt.Result.getExn(Belt.Result.Ok(42)) == 42\n\n Belt.Result.getExn(Belt.Result.Error(\"Invalid data\")) /* raises exception */\n ```" + ] + }, + { + "id": "Belt_Result.mapWithDefaultU", + "kind": "value", + "name": "mapWithDefaultU", + "signature": "let mapWithDefaultU: (t<'a, 'c>, 'b, (. 'a) => 'b) => 'b", + "docstrings": [] + }, + { + "id": "Belt_Result.mapWithDefault", + "kind": "value", + "name": "mapWithDefault", + "signature": "let mapWithDefault: (t<'a, 'c>, 'b, 'a => 'b) => 'b", + "docstrings": [ + "`mapWithDefault(res, default, f)`: When res is `Ok(n)`, returns `f(n)`,\n otherwise `default`.\n\n ```res example\n let ok = Belt.Result.Ok(42)\n Belt.Result.mapWithDefault(ok, 0, (x) => x / 2) == 21\n\n let error = Belt.Result.Error(\"Invalid data\")\n Belt.Result.mapWithDefault(error, 0, (x) => x / 2) == 0\n ```" + ] + }, + { + "id": "Belt_Result.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'a, 'c>, (. 'a) => 'b) => t<'b, 'c>", + "docstrings": [] + }, + { + "id": "Belt_Result.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'a, 'c>, 'a => 'b) => t<'b, 'c>", + "docstrings": [ + "`map(res, f)`: When res is `Ok(n)`, returns `Ok(f(n))`. Otherwise returns res\n unchanged. Function `f` takes a value of the same type as `n` and returns an\n ordinary value.\n\n ```res example\n let f = (x) => sqrt(Belt.Int.toFloat(x))\n\n Belt.Result.map(Ok(64), f) == Ok(8.0)\n\n Belt.Result.map(Error(\"Invalid data\"), f) == Error(\"Invalid data\")\n ```" + ] + }, + { + "id": "Belt_Result.flatMapU", + "kind": "value", + "name": "flatMapU", + "signature": "let flatMapU: (t<'a, 'c>, (. 'a) => t<'b, 'c>) => t<'b, 'c>", + "docstrings": [] + }, + { + "id": "Belt_Result.flatMap", + "kind": "value", + "name": "flatMap", + "signature": "let flatMap: (t<'a, 'c>, 'a => t<'b, 'c>) => t<'b, 'c>", + "docstrings": [ + "`flatMap(res, f)`: When res is `Ok(n)`, returns `f(n)`. Otherwise, returns res\n unchanged. Function `f` takes a value of the same type as `n` and returns a\n `Belt.Result`.\n\n ```res example\n let recip = (x) =>\n if (x !== 0.0) {\n Belt.Result.Ok(1.0 /. x)\n } else {\n Belt.Result.Error(\"Divide by zero\")\n }\n\n Belt.Result.flatMap(Ok(2.0), recip) == Ok(0.5)\n\n Belt.Result.flatMap(Ok(0.0), recip) == Error(\"Divide by zero\")\n\n Belt.Result.flatMap(Error(\"Already bad\"), recip) == Error(\"Already bad\")\n ```" + ] + }, + { + "id": "Belt_Result.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (t<'a, 'b>, 'a) => 'a", + "docstrings": [ + "`getWithDefault(res, defaultValue)`: If `res` is `Ok(n)`, returns `n`,\n otherwise `default`\n\n ```res example\n Belt.Result.getWithDefault(Ok(42), 0) == 42\n\n Belt.Result.getWithDefault(Error(\"Invalid Data\"), 0) == 0\n ```" + ] + }, + { + "id": "Belt_Result.isOk", + "kind": "value", + "name": "isOk", + "signature": "let isOk: t<'a, 'b> => bool", + "docstrings": [ + "`isOk(res)`: Returns `true` if `res` is of the form `Ok(n)`, `false` if it is\n the `Error(e)` variant." + ] + }, + { + "id": "Belt_Result.isError", + "kind": "value", + "name": "isError", + "signature": "let isError: t<'a, 'b> => bool", + "docstrings": [ + "`isError(res)`: Returns `true` if `res` is of the form `Error(e)`, `false` if\n it is the `Ok(n)` variant." + ] + }, + { + "id": "Belt_Result.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'a, 'c>, t<'b, 'd>, (. 'a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Result.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'a, 'c>, t<'b, 'd>, ('a, 'b) => bool) => bool", + "docstrings": [ + "`eq(res1, res2, f)`: Determine if two `Belt.Result` variables are equal with\n respect to an equality function. If `res1` and `res2` are of the form `Ok(n)`\n and `Ok(m)`, return the result of `f(n, m)`. If one of `res1` and `res2` are of\n the form `Error(e)`, return false If both `res1` and `res2` are of the form\n `Error(e)`, return true\n\n ```res example\n let good1 = Belt.Result.Ok(42)\n\n let good2 = Belt.Result.Ok(32)\n\n let bad1 = Belt.Result.Error(\"invalid\")\n\n let bad2 = Belt.Result.Error(\"really invalid\")\n\n let mod10equal = (a, b) => mod(a, 10) === mod(b, 10)\n\n Belt.Result.eq(good1, good2, mod10equal) == true\n\n Belt.Result.eq(good1, bad1, mod10equal) == false\n\n Belt.Result.eq(bad2, good2, mod10equal) == false\n\n Belt.Result.eq(bad1, bad2, mod10equal) == true\n ```" + ] + }, + { + "id": "Belt_Result.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'a, 'c>, t<'b, 'd>, (. 'a, 'b) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_Result.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'a, 'c>, t<'b, 'd>, ('a, 'b) => int) => int", + "docstrings": [ + "`cmp(res1, res2, f)`: Compare two `Belt.Result` variables with respect to a\n comparison function. The comparison function returns -1 if the first variable\n is \"less than\" the second, 0 if the two variables are equal, and 1 if the first\n is \"greater than\" the second.\n\n If `res1` and `res2` are of the form `Ok(n)` and `Ok(m)`, return the result of\n `f(n, m)`. If `res1` is of the form `Error(e)` and `res2` of the form `Ok(n)`,\n return -1 (nothing is less than something) If `res1` is of the form `Ok(n)` and\n `res2` of the form `Error(e)`, return 1 (something is greater than nothing) If\n both `res1` and `res2` are of the form `Error(e)`, return 0 (equal)\n\n ```res example\n let good1 = Belt.Result.Ok(59)\n\n let good2 = Belt.Result.Ok(37)\n\n let bad1 = Belt.Result.Error(\"invalid\")\n\n let bad2 = Belt.Result.Error(\"really invalid\")\n\n let mod10cmp = (a, b) => Pervasives.compare(mod(a, 10), mod(b, 10))\n\n Belt.Result.cmp(Ok(39), Ok(57), mod10cmp) == 1\n\n Belt.Result.cmp(Ok(57), Ok(39), mod10cmp) == (-1)\n\n Belt.Result.cmp(Ok(39), Error(\"y\"), mod10cmp) == 1\n\n Belt.Result.cmp(Error(\"x\"), Ok(57), mod10cmp) == (-1)\n\n Belt.Result.cmp(Error(\"x\"), Error(\"y\"), mod10cmp) == 0\n ```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_Set.json b/index_data/api/Belt_Set.json new file mode 100644 index 000000000..b7c00357d --- /dev/null +++ b/index_data/api/Belt_Set.json @@ -0,0 +1,418 @@ +{ + "name": "Belt_Set", + "docstrings": [ + "An _immutable_ sorted set module which allows customized _compare_ behavior.\n\n The implementation uses balanced binary trees, and therefore searching\n and insertion take time logarithmic in the size of the map.\n\n For more info on this module's usage of identity, `make` and others, please see\n the top level documentation of Belt, **A special encoding for collection safety**.\n\n Example usage:\n\n ```res example\n module 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\n let mySet = Belt.Set.make(~id=module(PairComparator))\n let mySet2 = Belt.Set.add(mySet, (1, 2))\n ```\n\n **Note:** This module's examples will assume a predeclared module for integers\n called `IntCmp`. It is declared like this:\n\n ```res example\n module IntCmp =\n Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n ```" + ], + "items": [ + { + "id": "Belt_Set.Belt_SetInt", + "kind": "moduleAlias", + "docstrings": [ + "Specialized when value type is `int`, more efficient\n than the generic type, its compare behavior is fixed using the built-in comparison" + ], + "signature": "module Int = Belt_SetInt" + }, + { + "id": "Belt_Set.Belt_SetString", + "kind": "moduleAlias", + "docstrings": [ + "Specialized when value type is `string`, more efficient\n than the generic type, its compare behavior is fixed using the built-in comparison" + ], + "signature": "module String = Belt_SetString" + }, + { + "id": "Belt_Set.Belt_SetDict", + "kind": "moduleAlias", + "docstrings": [ + "This module separates identity from data, it is a bit more verbose but slightly\n more efficient due to the fact that there is no need to pack identity and data back\n after each operation" + ], + "signature": "module Dict = Belt_SetDict" + }, + { + "id": "Belt_Set.t", + "kind": "type", + "name": "t", + "signature": "type t<'value, 'identity>", + "docstrings": [ + "`'value` is the element type\n\n `'identity` the identity of the collection" + ] + }, + { + "id": "Belt_Set.id", + "kind": "type", + "name": "id", + "signature": "type id<'value, 'id> = Belt_Id.comparable<'value, 'id>", + "docstrings": [ + "The identity needed for making a set from scratch" + ] + }, + { + "id": "Belt_Set.make", + "kind": "value", + "name": "make", + "signature": "let make: (~id: id<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Creates a new set by taking in the comparator\n\n ```res example\n let set = Belt.Set.make(~id=module(IntCmp))\n ```" + ] + }, + { + "id": "Belt_Set.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<'value>, ~id: id<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Creates new set from array of elements.\n\n ```res example\n let s0 = Belt.Set.fromArray([1, 3, 2, 4], ~id=module(IntCmp))\n\n s0->Belt.Set.toArray /* [1, 2, 3, 4] */\n ```" + ] + }, + { + "id": "Belt_Set.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "signature": "let fromSortedArrayUnsafe: (array<'value>, ~id: id<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "The same as [fromArray][#fromarray] except it is after assuming the input array is already sorted." + ] + }, + { + "id": "Belt_Set.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a, 'b> => bool", + "docstrings": [ + "Checks if set is empty.\n\n ```res example\n let empty = Belt.Set.fromArray([], ~id=module(IntCmp))\n let notEmpty = Belt.Set.fromArray([1],~id=module(IntCmp))\n\n Belt.Set.isEmpty(empty) /* true */\n Belt.Set.isEmpty(notEmpty) /* false */\n ```" + ] + }, + { + "id": "Belt_Set.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'value, 'id>, 'value) => bool", + "docstrings": [ + "Checks if element exists in set.\n\n ```res example\n let set = Belt.Set.fromArray([1, 4, 2, 5], ~id=module(IntCmp))\n\n set->Belt.Set.has(3) /* false */\n set->Belt.Set.has(1) /* true */\n ```" + ] + }, + { + "id": "Belt_Set.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'value, 'id>, 'value) => t<'value, 'id>", + "docstrings": [ + "Adds element to set. If element existed in set, value is unchanged.\n\n ```res example\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = s0->Belt.Set.add(1)\n let s2 = s1->Belt.Set.add(2)\n let s3 = s2->Belt.Set.add(2)\n s0->Belt.Set.toArray /* [] */\n s1->Belt.Set.toArray /* [1] */\n s2->Belt.Set.toArray /* [1, 2] */\n s3->Belt.Set.toArray /* [1,2 ] */\n s2 == s3 /* true */\n ```" + ] + }, + { + "id": "Belt_Set.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'value, 'id>, array<'value>) => t<'value, 'id>", + "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 ```res example\n let set = Belt.Set.make(~id=module(IntCmp))\n\n let newSet = set->Belt.Set.mergeMany([5, 4, 3, 2, 1])\n newSet->Belt.Set.toArray /* [1, 2, 3, 4, 5] */\n ```" + ] + }, + { + "id": "Belt_Set.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'value, 'id>, 'value) => t<'value, 'id>", + "docstrings": [ + "Removes element from set. If element did not exist in set, value is unchanged.\n\n ```res example\n let s0 = Belt.Set.fromArray([2,3,1,4,5], ~id=module(IntCmp))\n let s1 = s0->Belt.Set.remove(1)\n let s2 = s1->Belt.Set.remove(3)\n let s3 = s2->Belt.Set.remove(3)\n\n s1->Belt.Set.toArray /* [2,3,4,5] */\n s2->Belt.Set.toArray /* [2,4,5] */\n s2 == s3 /* true */\n ```" + ] + }, + { + "id": "Belt_Set.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'value, 'id>, array<'value>) => t<'value, 'id>", + "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 ```res example\n let set = Belt.Set.fromArray([1, 2, 3, 4],~id=module(IntCmp))\n\n let newSet = set->Belt.Set.removeMany([5, 4, 3, 2, 1])\n newSet->Belt.Set.toArray /* [] */\n ```" + ] + }, + { + "id": "Belt_Set.union", + "kind": "value", + "name": "union", + "signature": "let union: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Returns union of two sets.\n\n ```res example\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\n let union = Belt.Set.union(s0, s1)\n union->Belt.Set.toArray /* [1,2,3,4,5,6] */\n ```" + ] + }, + { + "id": "Belt_Set.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Returns intersection of two sets.\n\n ```res example\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\n let intersect = Belt.Set.intersect(s0, s1)\n intersect->Belt.Set.toArray /* [2,3,5] */\n ```" + ] + }, + { + "id": "Belt_Set.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (t<'value, 'id>, t<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Returns elements from first set, not existing in second set.\n\n ```res example\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\n Belt.Set.toArray(Belt.Set.diff(s0, s1)) /* [6] */\n Belt.Set.toArray(Belt.Set.diff(s1,s0)) /* [1,4] */\n ```" + ] + }, + { + "id": "Belt_Set.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t<'value, 'id>, t<'value, 'id>) => bool", + "docstrings": [ + "Checks if second set is subset of first set.\n\n ```res example\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([5,2,3,1,5,4], ~id=module(IntCmp))\n let s2 = Belt.Set.intersect(s0, s1)\n Belt.Set.subset(s2, s0) /* true */\n Belt.Set.subset(s2, s1) /* true */\n Belt.Set.subset(s1, s0) /* false */\n ```" + ] + }, + { + "id": "Belt_Set.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'value, 'id>, t<'value, 'id>) => int", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function for doing sets of sets. It compares size first and then iterates over each element following the order of elements." + ] + }, + { + "id": "Belt_Set.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'value, 'id>, t<'value, 'id>) => bool", + "docstrings": [ + "Checks if two sets are equal.\n\n ```res example\n let s0 = Belt.Set.fromArray([5,2,3], ~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,5], ~id=module(IntCmp))\n\n Belt.Set.eq(s0, s1) /* true */\n ```" + ] + }, + { + "id": "Belt_Set.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'value, 'id>, (. 'value) => unit) => unit", + "docstrings": [ + "Same as [forEach](##forEach) but takes uncurried functon." + ] + }, + { + "id": "Belt_Set.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'value, 'id>, 'value => unit) => unit", + "docstrings": [ + "Applies function `f` in turn to all elements of set in increasing order.\n\n ```res example\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n let acc = ref(list{})\n s0->Belt.Set.forEach(x => {\n acc := Belt.List.add(acc.contents, x)\n })\n acc /* [6,5,3,2] */\n ```" + ] + }, + { + "id": "Belt_Set.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'value, 'id>, 'a, (. 'a, 'value) => 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_Set.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'value, 'id>, 'a, ('a, 'value) => 'a) => 'a", + "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 ```res example\n let s0 = Belt.Set.fromArray([5,2,3,5,6], ~id=module(IntCmp))\n s0->Belt.Set.reduce(list{}, (acc, element) =>\n acc->Belt.List.add(element)\n ) /* [6,5,3,2] */\n ```" + ] + }, + { + "id": "Belt_Set.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'value, 'id>, (. 'value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Set.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'value, 'id>, 'value => bool) => bool", + "docstrings": [ + "Checks if all elements of the set satisfy the predicate. Order unspecified.\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.Set.fromArray([2,4,6,8], ~id=module(IntCmp))\n s0->Belt.Set.every(isEven) /* true */\n ```" + ] + }, + { + "id": "Belt_Set.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'value, 'id>, (. 'value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_Set.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'value, 'id>, 'value => bool) => bool", + "docstrings": [ + "Checks if at least one element of the set satisfies the predicate.\n\n ```res example\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.Set.fromArray([1,2,4,6,8], ~id=module(IntCmp))\n s0->Belt.Set.some(isOdd) /* true */\n ```" + ] + }, + { + "id": "Belt_Set.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t<'value, 'id>, (. 'value) => bool) => t<'value, 'id>", + "docstrings": [] + }, + { + "id": "Belt_Set.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t<'value, 'id>, 'value => bool) => t<'value, 'id>", + "docstrings": [ + "Returns the set of all elements that satisfy the predicate.\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n let s1 = s0->Belt.Set.keep(isEven)\n\n s1->Belt.Set.toArray /* [2,4] */\n ```" + ] + }, + { + "id": "Belt_Set.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t<'value, 'id>, (. 'value) => bool) => (t<'value, 'id>, t<'value, 'id>)", + "docstrings": [] + }, + { + "id": "Belt_Set.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t<'value, 'id>, 'value => bool) => (t<'value, 'id>, t<'value, 'id>)", + "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 ```res example\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n let (s1, s2) = s0->Belt.Set.partition(isOdd)\n\n s1->Belt.Set.toArray /* [1,3,5] */\n s2->Belt.Set.toArray /* [2,4] */\n ```" + ] + }, + { + "id": "Belt_Set.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'value, 'id> => int", + "docstrings": [ + "Returns size of the set.\n\n ```res example\n let s0 = Belt.Set.fromArray([1,2,3,4], ~id=module(IntCmp))\n\n s0->Belt.Set.size /* 4 */\n ```" + ] + }, + { + "id": "Belt_Set.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'value, 'id> => array<'value>", + "docstrings": [ + "Returns array of ordered set elements.\n\n ```res example\n let s0 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.toArray /* [1,2,3,5] */\n ```" + ] + }, + { + "id": "Belt_Set.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'value, 'id> => list<'value>", + "docstrings": [ + "Returns list of ordered set elements.\n\n ```res example\n let s0 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.toList /* [1,2,3,5] */\n ```" + ] + }, + { + "id": "Belt_Set.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'value, 'id> => option<'value>", + "docstrings": [ + "Returns minimum value of the collection. `None` if collection is empty.\n\n ```res example\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.minimum /* None */\n s1->Belt.Set.minimum /* Some(1) */\n ```" + ] + }, + { + "id": "Belt_Set.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'value, 'id> => Js.undefined<'value>", + "docstrings": [ + "Returns minimum value of the collection. `undefined` if collection is empty.\n\n ```res example\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.minUndefined /* undefined */\n s1->Belt.Set.minUndefined /* 1 */\n ```" + ] + }, + { + "id": "Belt_Set.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'value, 'id> => option<'value>", + "docstrings": [ + "Returns maximum value of the collection. `None` if collection is empty.\n\n ```res example\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.maximum /* None */\n s1->Belt.Set.maximum /* Some(5) */\n ```" + ] + }, + { + "id": "Belt_Set.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'value, 'id> => Js.undefined<'value>", + "docstrings": [ + "Returns maximum value of the collection. `undefined` if collection is empty.\n\n ```res example\n let s0 = Belt.Set.make(~id=module(IntCmp))\n let s1 = Belt.Set.fromArray([3,2,1,5], ~id=module(IntCmp))\n\n s0->Belt.Set.maxUndefined /* undefined */\n s1->Belt.Set.maxUndefined /* 5 */\n ```" + ] + }, + { + "id": "Belt_Set.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'value, 'id>, 'value) => option<'value>", + "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 ```res example\n let s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n\n s0->Belt.Set.get(3) /* Some(3) */\n s0->Belt.Set.get(20) /* None */\n ```" + ] + }, + { + "id": "Belt_Set.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'value, 'id>, 'value) => Js.undefined<'value>", + "docstrings": [ + "Same as [get](#get) but returns `undefined` when element does not exist." + ] + }, + { + "id": "Belt_Set.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'value, 'id>, 'value) => 'value", + "docstrings": [ + "Same as [get](#get) but raise when element does not exist." + ] + }, + { + "id": "Belt_Set.split", + "kind": "value", + "name": "split", + "signature": "let split: (t<'value, 'id>, 'value) => ((t<'value, 'id>, t<'value, 'id>), bool)", + "docstrings": [ + "Returns a tuple `((smaller, larger), present)`, `present` is true when element exist in set.\n\n ```res example\n let s0 = Belt.Set.fromArray([1,2,3,4,5], ~id=module(IntCmp))\n\n let ((smaller, larger), present) = s0->Belt.Set.split(3)\n\n present /* true */\n smaller->Belt.Set.toArray /* [1,2] */\n larger->Belt.Set.toArray /* [4,5] */\n\n ```" + ] + }, + { + "id": "Belt_Set.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a, 'b> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + }, + { + "id": "Belt_Set.getData", + "kind": "value", + "name": "getData", + "signature": "let getData: t<'value, 'id> => Belt_SetDict.t<'value, 'id>", + "docstrings": [ + "**Advanced usage only**\n\n Returns the raw data (detached from comparator), but its type is still manifested, so that user can pass identity directly without boxing." + ] + }, + { + "id": "Belt_Set.getId", + "kind": "value", + "name": "getId", + "signature": "let getId: t<'value, 'id> => id<'value, 'id>", + "docstrings": [ + "**Advanced usage only**\n\n Returns the identity of set." + ] + }, + { + "id": "Belt_Set.packIdData", + "kind": "value", + "name": "packIdData", + "signature": "let packIdData: (~id: id<'value, 'id>, ~data: Belt_SetDict.t<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "**Advanced usage only**\n\n Returns the packed collection." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_SetDict.json b/index_data/api/Belt_SetDict.json new file mode 100644 index 000000000..badd6d7a5 --- /dev/null +++ b/index_data/api/Belt_SetDict.json @@ -0,0 +1,367 @@ +{ + "name": "Belt_SetDict", + "docstrings": [ + "This module separates identity from data. It is a bit more verbose but slightly more efficient due to the fact that there is no need to pack identity and data back after each operation." + ], + "items": [ + { + "id": "Belt_SetDict.t", + "kind": "type", + "name": "t", + "signature": "type t<'value, 'identity>", + "docstrings": [ + "`'value` is the element type\n\n `'identity` the identity of the collection" + ] + }, + { + "id": "Belt_SetDict.cmp", + "kind": "type", + "name": "cmp", + "signature": "type cmp<'value, 'id> = Belt_Id.cmp<'value, 'id>", + "docstrings": [ + "Type of compare function." + ] + }, + { + "id": "Belt_SetDict.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: t<'value, 'id>", + "docstrings": [ + "```res example\n let s0 = Belt.Set.Dict.empty\n ```" + ] + }, + { + "id": "Belt_SetDict.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<'value>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Creates new set from array of elements.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([1, 3, 2, 4], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.toArray /* [1, 2, 3, 4] */\n ```" + ] + }, + { + "id": "Belt_SetDict.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "signature": "let fromSortedArrayUnsafe: array<'value> => t<'value, 'id>", + "docstrings": [ + "The same as [fromArray][#fromarray] except it is after assuming the input array is already sorted." + ] + }, + { + "id": "Belt_SetDict.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a, 'b> => bool", + "docstrings": [ + "Checks if set is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let empty = Belt.Set.Dict.fromArray([], ~cmp=IntCmp.cmp)\n let notEmpty = Belt.Set.Dict.fromArray([1], ~cmp=IntCmp.cmp)\n\n Belt.Set.Dict.isEmpty(empty) /* true */\n Belt.Set.Dict.isEmpty(notEmpty) /* false */\n ```" + ] + }, + { + "id": "Belt_SetDict.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => bool", + "docstrings": [ + "Checks if an element exists in the set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.Set.Dict.fromArray([1, 4, 2, 5], ~cmp=IntCmp.cmp)\n\n set->Belt.Set.Dict.has(3, ~cmp=IntCmp.cmp) /* false */\n set->Belt.Set.Dict.has(1, ~cmp=IntCmp.cmp) /* true */\n ```" + ] + }, + { + "id": "Belt_SetDict.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Adds element to set. If element existed in set, value is unchanged.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = s0->Belt.Set.Dict.add(1, ~cmp=IntCmp.cmp)\n let s2 = s1->Belt.Set.Dict.add(2, ~cmp=IntCmp.cmp)\n let s3 = s2->Belt.Set.Dict.add(2, ~cmp=IntCmp.cmp)\n s0->Belt.Set.Dict.toArray /* [] */\n s1->Belt.Set.Dict.toArray /* [1] */\n s2->Belt.Set.Dict.toArray /* [1, 2] */\n s3->Belt.Set.Dict.toArray /* [1,2 ] */\n s2 == s3 /* true */\n ```" + ] + }, + { + "id": "Belt_SetDict.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t<'value, 'id>, array<'value>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>", + "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 ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.Set.Dict.empty\n\n let newSet = set->Belt.Set.Dict.mergeMany([5, 4, 3, 2, 1], ~cmp=IntCmp.cmp)\n newSet->Belt.Set.Dict.toArray /* [1, 2, 3, 4, 5] */\n ```" + ] + }, + { + "id": "Belt_SetDict.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Removes element from set. If element did not exist in set, value is unchanged.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([2, 3, 1, 4, 5], ~cmp=IntCmp.cmp)\n let s1 = s0->Belt.Set.Dict.remove(1, ~cmp=IntCmp.cmp)\n let s2 = s1->Belt.Set.Dict.remove(3, ~cmp=IntCmp.cmp)\n let s3 = s2->Belt.Set.Dict.remove(3, ~cmp=IntCmp.cmp)\n\n s1->Belt.Set.Dict.toArray /* [2,3,4,5] */\n s2->Belt.Set.Dict.toArray /* [2,4,5] */\n s2 == s3 /* true */\n ```" + ] + }, + { + "id": "Belt_SetDict.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t<'value, 'id>, array<'value>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>", + "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 ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let set = Belt.Set.Dict.fromArray([1, 2, 3, 4], ~cmp=IntCmp.cmp)\n\n let newSet = set->Belt.Set.Dict.removeMany([5, 4, 3, 2, 1], ~cmp=IntCmp.cmp)\n newSet->Belt.Set.Dict.toArray /* [] */\n ```" + ] + }, + { + "id": "Belt_SetDict.union", + "kind": "value", + "name": "union", + "signature": "let union: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Returns union of two sets.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\n let union = Belt.Set.Dict.union(s0, s1, ~cmp=IntCmp.cmp)\n union->Belt.Set.Dict.toArray /* [1,2,3,4,5,6] */\n ```" + ] + }, + { + "id": "Belt_SetDict.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Returns intersection of two sets.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\n let intersect = Belt.Set.Dict.intersect(s0, s1, ~cmp=IntCmp.cmp)\n intersect->Belt.Set.Dict.toArray /* [2,3,5] */\n ```" + ] + }, + { + "id": "Belt_SetDict.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => t<'value, 'id>", + "docstrings": [ + "Returns elements from first set, not existing in second set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\n\n let diff1 = Belt.Set.Dict.diff(s0, s1, ~cmp=IntCmp.cmp)\n let diff2 = Belt.Set.Dict.diff(s1, s0, ~cmp=IntCmp.cmp)\n\n diff1->Belt.Set.Dict.toArray /* [6] */\n diff2->Belt.Set.Dict.toArray /* [1,4] */\n ```" + ] + }, + { + "id": "Belt_SetDict.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => bool", + "docstrings": [ + "Checks if second set is subset of first set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([5, 2, 3, 1, 5, 4], ~cmp=IntCmp.cmp)\n let s2 = Belt.Set.Dict.intersect(s0, s1, ~cmp=IntCmp.cmp)\n Belt.Set.Dict.subset(s2, s0, ~cmp=IntCmp.cmp) /* true */\n Belt.Set.Dict.subset(s2, s1, ~cmp=IntCmp.cmp) /* true */\n Belt.Set.Dict.subset(s1, s0, ~cmp=IntCmp.cmp) /* false */\n ```" + ] + }, + { + "id": "Belt_SetDict.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => int", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function for doing sets of sets. It compares size first and then iterates over each element following the order of elements." + ] + }, + { + "id": "Belt_SetDict.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'value, 'id>, t<'value, 'id>, ~cmp: cmp<'value, 'id>) => bool", + "docstrings": [ + "Checks if two sets are equal.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3], ~cmp=IntCmp.cmp)\n let s1 = Belt.Set.Dict.fromArray([3, 2, 5], ~cmp=IntCmp.cmp)\n\n Belt.Set.Dict.eq(s0, s1, ~cmp=IntCmp.cmp) /* true */\n ```" + ] + }, + { + "id": "Belt_SetDict.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'value, 'id>, (. 'value) => unit) => unit", + "docstrings": [ + "Same as [forEach](##forEach) but takes uncurried functon." + ] + }, + { + "id": "Belt_SetDict.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'value, 'id>, 'value => unit) => unit", + "docstrings": [ + "Applies function `f` in turn to all elements of set in increasing order.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n let acc = ref(list{})\n s0->Belt.Set.Dict.forEach(x => acc := Belt.List.add(acc.contents, x))\n acc /* [6,5,3,2] */\n ```" + ] + }, + { + "id": "Belt_SetDict.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'value, 'id>, 'a, (. 'a, 'value) => 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_SetDict.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'value, 'id>, 'a, ('a, 'value) => 'a) => 'a", + "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 ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([5, 2, 3, 5, 6], ~cmp=IntCmp.cmp)\n s0->Belt.Set.Dict.reduce(list{}, (acc, element) => acc->Belt.List.add(element)) /* [6,5,3,2] */\n ```" + ] + }, + { + "id": "Belt_SetDict.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'value, 'id>, (. 'value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_SetDict.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'value, 'id>, 'value => bool) => bool", + "docstrings": [ + "Checks if all elements of the set satisfy the predicate. Order unspecified.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.Set.Dict.fromArray([2, 4, 6, 8], ~cmp=IntCmp.cmp)\n s0->Belt.Set.Dict.every(isEven) /* true */\n ```" + ] + }, + { + "id": "Belt_SetDict.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'value, 'id>, (. 'value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_SetDict.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'value, 'id>, 'value => bool) => bool", + "docstrings": [ + "Checks if at least one element of the set satisfies the predicate.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 4, 6, 8], ~cmp=IntCmp.cmp)\n s0->Belt.Set.Dict.some(isOdd) /* true */\n ```" + ] + }, + { + "id": "Belt_SetDict.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t<'value, 'id>, (. 'value) => bool) => t<'value, 'id>", + "docstrings": [] + }, + { + "id": "Belt_SetDict.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t<'value, 'id>, 'value => bool) => t<'value, 'id>", + "docstrings": [ + "Returns the set of all elements that satisfy the predicate.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isEven = x => mod(x, 2) == 0\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n let s1 = s0->Belt.Set.Dict.keep(isEven)\n\n s1->Belt.Set.Dict.toArray /* [2,4] */\n ```" + ] + }, + { + "id": "Belt_SetDict.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t<'value, 'id>, (. 'value) => bool) => (t<'value, 'id>, t<'value, 'id>)", + "docstrings": [] + }, + { + "id": "Belt_SetDict.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t<'value, 'id>, 'value => bool) => (t<'value, 'id>, t<'value, 'id>)", + "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 ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let isOdd = x => mod(x, 2) != 0\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n let (s1, s2) = s0->Belt.Set.Dict.partition(isOdd)\n\n s1->Belt.Set.Dict.toArray /* [1,3,5] */\n s2->Belt.Set.Dict.toArray /* [2,4] */\n ```" + ] + }, + { + "id": "Belt_SetDict.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'value, 'id> => int", + "docstrings": [ + "Returns size of the set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.size /* 4 */\n ```" + ] + }, + { + "id": "Belt_SetDict.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'value, 'id> => list<'value>", + "docstrings": [ + "Returns list of ordered set elements.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.toList /* [1,2,3,5] */\n ```" + ] + }, + { + "id": "Belt_SetDict.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'value, 'id> => array<'value>", + "docstrings": [ + "Returns array of ordered set elements.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.toArray /* [1,2,3,5] */\n ```" + ] + }, + { + "id": "Belt_SetDict.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'value, 'id> => option<'value>", + "docstrings": [ + "Returns minimum value of the collection. `None` if collection is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.minimum /* None */\n s1->Belt.Set.Dict.minimum /* Some(1) */\n ```" + ] + }, + { + "id": "Belt_SetDict.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'value, 'id> => Js.undefined<'value>", + "docstrings": [ + "Returns minimum value of the collection. `undefined` if collection is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.minUndefined /* undefined */\n s1->Belt.Set.Dict.minUndefined /* 1 */\n ```" + ] + }, + { + "id": "Belt_SetDict.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'value, 'id> => option<'value>", + "docstrings": [ + "Returns maximum value of the collection. `None` if collection is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.maximum /* None */\n s1->Belt.Set.Dict.maximum /* Some(5) */\n ```" + ] + }, + { + "id": "Belt_SetDict.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'value, 'id> => Js.undefined<'value>", + "docstrings": [ + "Returns maximum value of the collection. `undefined` if collection is empty.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.empty\n let s1 = Belt.Set.Dict.fromArray([3, 2, 1, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.maxUndefined /* undefined */\n s1->Belt.Set.Dict.maxUndefined /* 5 */\n ```" + ] + }, + { + "id": "Belt_SetDict.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => option<'value>", + "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 ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n\n s0->Belt.Set.Dict.get(3, ~cmp=IntCmp.cmp) /* Some(3) */\n s0->Belt.Set.Dict.get(20, ~cmp=IntCmp.cmp) /* None */\n ```" + ] + }, + { + "id": "Belt_SetDict.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => Js.undefined<'value>", + "docstrings": [ + "Same as [get](#get) but returns `undefined` when element does not exist." + ] + }, + { + "id": "Belt_SetDict.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'value, 'id>, 'value, ~cmp: cmp<'value, 'id>) => 'value", + "docstrings": [ + "Same as [get](#get) but raise when element does not exist." + ] + }, + { + "id": "Belt_SetDict.split", + "kind": "value", + "name": "split", + "signature": "let split: (\\n t<'value, 'id>,\\n 'value,\\n ~cmp: cmp<'value, 'id>,\\n) => ((t<'value, 'id>, t<'value, 'id>), bool)", + "docstrings": [ + "Returns a tuple `((smaller, larger), present)`, `present` is true when element exist in set.\n\n ```res example\n module IntCmp = Belt.Id.MakeComparable({\n type t = int\n let cmp = Pervasives.compare\n })\n\n let s0 = Belt.Set.Dict.fromArray([1, 2, 3, 4, 5], ~cmp=IntCmp.cmp)\n\n let ((smaller, larger), present) = s0->Belt.Set.Dict.split(3, ~cmp=IntCmp.cmp)\n\n present /* true */\n smaller->Belt.Set.Dict.toArray /* [1,2] */\n larger->Belt.Set.Dict.toArray /* [4,5] */\n ```" + ] + }, + { + "id": "Belt_SetDict.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a, 'b> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_SetInt.json b/index_data/api/Belt_SetInt.json new file mode 100644 index 000000000..294175e4d --- /dev/null +++ b/index_data/api/Belt_SetInt.json @@ -0,0 +1,327 @@ +{ + "name": "Belt_SetInt", + "docstrings": [ + "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_SetInt.value", + "kind": "type", + "name": "value", + "signature": "type value = int", + "docstrings": [ + "The type of the set elements." + ] + }, + { + "id": "Belt_SetInt.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [ + "The type of sets." + ] + }, + { + "id": "Belt_SetInt.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: t", + "docstrings": [] + }, + { + "id": "Belt_SetInt.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array => t", + "docstrings": [] + }, + { + "id": "Belt_SetInt.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "signature": "let fromSortedArrayUnsafe: array => t", + "docstrings": [] + }, + { + "id": "Belt_SetInt.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t => bool", + "docstrings": [] + }, + { + "id": "Belt_SetInt.has", + "kind": "value", + "name": "has", + "signature": "let has: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_SetInt.add", + "kind": "value", + "name": "add", + "signature": "let add: (t, value) => t", + "docstrings": [ + "`add s x` If `x` was already in `s`, `s` is returned unchanged." + ] + }, + { + "id": "Belt_SetInt.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t, array) => t", + "docstrings": [] + }, + { + "id": "Belt_SetInt.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t, value) => t", + "docstrings": [ + "`remove m x` If `x` was not in `m`, `m` is returned reference unchanged." + ] + }, + { + "id": "Belt_SetInt.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t, array) => t", + "docstrings": [] + }, + { + "id": "Belt_SetInt.union", + "kind": "value", + "name": "union", + "signature": "let union: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_SetInt.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_SetInt.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_SetInt.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t, t) => bool", + "docstrings": [ + "`subset s1 s2` tests whether the set `s1` is a subset of\n the set `s2`." + ] + }, + { + "id": "Belt_SetInt.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t, t) => int", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function\n for doing sets of sets." + ] + }, + { + "id": "Belt_SetInt.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t, t) => bool", + "docstrings": [ + "`eq s1 s2` tests whether the sets `s1` and `s2` are\n equal, that is, contain equal elements." + ] + }, + { + "id": "Belt_SetInt.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t, (. value) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_SetInt.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, value => unit) => unit", + "docstrings": [ + "`forEach s f` applies `f` in turn to all elements of `s`.\n In increasing order" + ] + }, + { + "id": "Belt_SetInt.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t, 'a, (. 'a, value) => 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_SetInt.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, 'a, ('a, value) => 'a) => 'a", + "docstrings": [ + "Iterate in increasing order." + ] + }, + { + "id": "Belt_SetInt.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t, (. value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_SetInt.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, value => bool) => bool", + "docstrings": [ + "`every p s` checks if all elements of the set\n satisfy the predicate `p`. Order unspecified." + ] + }, + { + "id": "Belt_SetInt.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t, (. value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_SetInt.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, value => bool) => bool", + "docstrings": [ + "`some p s` checks if at least one element of\n the set satisfies the predicate `p`. Oder unspecified." + ] + }, + { + "id": "Belt_SetInt.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t, (. value) => bool) => t", + "docstrings": [] + }, + { + "id": "Belt_SetInt.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t, value => bool) => t", + "docstrings": [ + "`keep p s` returns the set of all elements in `s`\n that satisfy predicate `p`." + ] + }, + { + "id": "Belt_SetInt.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t, (. value) => bool) => (t, t)", + "docstrings": [] + }, + { + "id": "Belt_SetInt.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t, value => bool) => (t, t)", + "docstrings": [ + "`partition p s` returns a pair of sets `(s1, s2)`, where\n `s1` is the set of all the elements of `s` that satisfy the\n predicate `p`, and `s2` is the set of all the elements of\n `s` that do not satisfy `p`." + ] + }, + { + "id": "Belt_SetInt.size", + "kind": "value", + "name": "size", + "signature": "let size: t => int", + "docstrings": [] + }, + { + "id": "Belt_SetInt.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t => list", + "docstrings": [ + "In increasing order" + ] + }, + { + "id": "Belt_SetInt.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t => array", + "docstrings": [] + }, + { + "id": "Belt_SetInt.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t => option", + "docstrings": [] + }, + { + "id": "Belt_SetInt.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_SetInt.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t => option", + "docstrings": [] + }, + { + "id": "Belt_SetInt.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_SetInt.get", + "kind": "value", + "name": "get", + "signature": "let get: (t, value) => option", + "docstrings": [] + }, + { + "id": "Belt_SetInt.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t, value) => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_SetInt.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t, value) => value", + "docstrings": [] + }, + { + "id": "Belt_SetInt.split", + "kind": "value", + "name": "split", + "signature": "let split: (t, value) => ((t, t), bool)", + "docstrings": [ + "`split x s` returns a triple `(l, present, r)`, where\n `l` is the set of elements of `s` that are\n strictly less than `x`;\n `r` is the set of elements of `s` that are\n strictly greater than `x`;\n `present` is `false` if `s` contains no element equal to `x`,\n or `true` if `s` contains an element equal to `x`." + ] + }, + { + "id": "Belt_SetInt.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_SetString.json b/index_data/api/Belt_SetString.json new file mode 100644 index 000000000..db732762e --- /dev/null +++ b/index_data/api/Belt_SetString.json @@ -0,0 +1,327 @@ +{ + "name": "Belt_SetString", + "docstrings": [ + "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_SetString.value", + "kind": "type", + "name": "value", + "signature": "type value = string", + "docstrings": [ + "The type of the set elements." + ] + }, + { + "id": "Belt_SetString.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [ + "The type of sets." + ] + }, + { + "id": "Belt_SetString.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: t", + "docstrings": [] + }, + { + "id": "Belt_SetString.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array => t", + "docstrings": [] + }, + { + "id": "Belt_SetString.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "signature": "let fromSortedArrayUnsafe: array => t", + "docstrings": [] + }, + { + "id": "Belt_SetString.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t => bool", + "docstrings": [] + }, + { + "id": "Belt_SetString.has", + "kind": "value", + "name": "has", + "signature": "let has: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_SetString.add", + "kind": "value", + "name": "add", + "signature": "let add: (t, value) => t", + "docstrings": [ + "`add s x` If `x` was already in `s`, `s` is returned unchanged." + ] + }, + { + "id": "Belt_SetString.mergeMany", + "kind": "value", + "name": "mergeMany", + "signature": "let mergeMany: (t, array) => t", + "docstrings": [] + }, + { + "id": "Belt_SetString.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t, value) => t", + "docstrings": [ + "`remove m x` If `x` was not in `m`, `m` is returned reference unchanged." + ] + }, + { + "id": "Belt_SetString.removeMany", + "kind": "value", + "name": "removeMany", + "signature": "let removeMany: (t, array) => t", + "docstrings": [] + }, + { + "id": "Belt_SetString.union", + "kind": "value", + "name": "union", + "signature": "let union: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_SetString.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_SetString.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (t, t) => t", + "docstrings": [] + }, + { + "id": "Belt_SetString.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t, t) => bool", + "docstrings": [ + "`subset s1 s2` tests whether the set `s1` is a subset of\n the set `s2`." + ] + }, + { + "id": "Belt_SetString.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t, t) => int", + "docstrings": [ + "Total ordering between sets. Can be used as the ordering function\n for doing sets of sets." + ] + }, + { + "id": "Belt_SetString.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t, t) => bool", + "docstrings": [ + "`eq s1 s2` tests whether the sets `s1` and `s2` are\n equal, that is, contain equal elements." + ] + }, + { + "id": "Belt_SetString.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t, (. value) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_SetString.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, value => unit) => unit", + "docstrings": [ + "`forEach s f` applies `f` in turn to all elements of `s`.\n In increasing order" + ] + }, + { + "id": "Belt_SetString.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t, 'a, (. 'a, value) => 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_SetString.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, 'a, ('a, value) => 'a) => 'a", + "docstrings": [ + "Iterate in increasing order." + ] + }, + { + "id": "Belt_SetString.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t, (. value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_SetString.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, value => bool) => bool", + "docstrings": [ + "`every p s` checks if all elements of the set\n satisfy the predicate `p`. Order unspecified." + ] + }, + { + "id": "Belt_SetString.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t, (. value) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_SetString.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, value => bool) => bool", + "docstrings": [ + "`some p s` checks if at least one element of\n the set satisfies the predicate `p`. Oder unspecified." + ] + }, + { + "id": "Belt_SetString.keepU", + "kind": "value", + "name": "keepU", + "signature": "let keepU: (t, (. value) => bool) => t", + "docstrings": [] + }, + { + "id": "Belt_SetString.keep", + "kind": "value", + "name": "keep", + "signature": "let keep: (t, value => bool) => t", + "docstrings": [ + "`keep p s` returns the set of all elements in `s`\n that satisfy predicate `p`." + ] + }, + { + "id": "Belt_SetString.partitionU", + "kind": "value", + "name": "partitionU", + "signature": "let partitionU: (t, (. value) => bool) => (t, t)", + "docstrings": [] + }, + { + "id": "Belt_SetString.partition", + "kind": "value", + "name": "partition", + "signature": "let partition: (t, value => bool) => (t, t)", + "docstrings": [ + "`partition p s` returns a pair of sets `(s1, s2)`, where\n `s1` is the set of all the elements of `s` that satisfy the\n predicate `p`, and `s2` is the set of all the elements of\n `s` that do not satisfy `p`." + ] + }, + { + "id": "Belt_SetString.size", + "kind": "value", + "name": "size", + "signature": "let size: t => int", + "docstrings": [] + }, + { + "id": "Belt_SetString.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t => list", + "docstrings": [ + "In increasing order" + ] + }, + { + "id": "Belt_SetString.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t => array", + "docstrings": [] + }, + { + "id": "Belt_SetString.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t => option", + "docstrings": [] + }, + { + "id": "Belt_SetString.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_SetString.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t => option", + "docstrings": [] + }, + { + "id": "Belt_SetString.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_SetString.get", + "kind": "value", + "name": "get", + "signature": "let get: (t, value) => option", + "docstrings": [] + }, + { + "id": "Belt_SetString.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t, value) => Js.undefined", + "docstrings": [] + }, + { + "id": "Belt_SetString.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t, value) => value", + "docstrings": [] + }, + { + "id": "Belt_SetString.split", + "kind": "value", + "name": "split", + "signature": "let split: (t, value) => ((t, t), bool)", + "docstrings": [ + "`split x s` returns a triple `(l, present, r)`, where\n `l` is the set of elements of `s` that are\n strictly less than `x`;\n `r` is the set of elements of `s` that are\n strictly greater than `x`;\n `present` is `false` if `s` contains no element equal to `x`,\n or `true` if `s` contains an element equal to `x`." + ] + }, + { + "id": "Belt_SetString.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_SortArray.json b/index_data/api/Belt_SortArray.json new file mode 100644 index 000000000..ae291e2c1 --- /dev/null +++ b/index_data/api/Belt_SortArray.json @@ -0,0 +1,148 @@ +{ + "name": "Belt_SortArray", + "docstrings": [ + "A module for Array sort relevant utiliites" + ], + "items": [ + { + "id": "Belt_SortArray.Belt_SortArrayInt", + "kind": "moduleAlias", + "docstrings": [ + "Specalized when key type is `int`, more efficient\n than the generic type" + ], + "signature": "module Int = Belt_SortArrayInt" + }, + { + "id": "Belt_SortArray.Belt_SortArrayString", + "kind": "moduleAlias", + "docstrings": [ + "Specalized when key type is `string`, more efficient\n than the generic type" + ], + "signature": "module String = Belt_SortArrayString" + }, + { + "id": "Belt_SortArray.strictlySortedLengthU", + "kind": "value", + "name": "strictlySortedLengthU", + "signature": "let strictlySortedLengthU: (array<'a>, (. 'a, 'a) => bool) => int", + "docstrings": [] + }, + { + "id": "Belt_SortArray.strictlySortedLength", + "kind": "value", + "name": "strictlySortedLength", + "signature": "let strictlySortedLength: (array<'a>, ('a, 'a) => bool) => int", + "docstrings": [ + "`strictlySortedLenght(xs, cmp);` return `+n` means increasing order `-n` means negative order\n\n ```res example\n Belt.SortArray.strictlySortedLength([1, 2, 3, 4, 3], (x, y) => x < y) == 4\n\n Belt.SortArray.strictlySortedLength([], (x, y) => x < y) == 0\n\n Belt.SortArray.strictlySortedLength([1], (x, y) => x < y) == 1\n\n Belt.SortArray.strictlySortedLength([4, 3, 2, 1], (x, y) => x < y) == -4\n ```" + ] + }, + { + "id": "Belt_SortArray.isSortedU", + "kind": "value", + "name": "isSortedU", + "signature": "let isSortedU: (array<'a>, (. 'a, 'a) => int) => bool", + "docstrings": [] + }, + { + "id": "Belt_SortArray.isSorted", + "kind": "value", + "name": "isSorted", + "signature": "let isSorted: (array<'a>, ('a, 'a) => int) => bool", + "docstrings": [ + "`isSorted(arr, cmp)`: Returns true if array is increasingly sorted (equal is okay)" + ] + }, + { + "id": "Belt_SortArray.stableSortInPlaceByU", + "kind": "value", + "name": "stableSortInPlaceByU", + "signature": "let stableSortInPlaceByU: (array<'a>, (. 'a, 'a) => int) => unit", + "docstrings": [] + }, + { + "id": "Belt_SortArray.stableSortInPlaceBy", + "kind": "value", + "name": "stableSortInPlaceBy", + "signature": "let stableSortInPlaceBy: (array<'a>, ('a, 'a) => int) => unit", + "docstrings": [] + }, + { + "id": "Belt_SortArray.stableSortByU", + "kind": "value", + "name": "stableSortByU", + "signature": "let stableSortByU: (array<'a>, (. 'a, 'a) => int) => array<'a>", + "docstrings": [] + }, + { + "id": "Belt_SortArray.stableSortBy", + "kind": "value", + "name": "stableSortBy", + "signature": "let stableSortBy: (array<'a>, ('a, 'a) => int) => array<'a>", + "docstrings": [ + "`stableSortBy(xs, cmp)`: Returns a fresh array Sort `xs` in place using\n comparator `cmp`, the stable means if the elements are equal, their order will\n be preserved" + ] + }, + { + "id": "Belt_SortArray.binarySearchByU", + "kind": "value", + "name": "binarySearchByU", + "signature": "let binarySearchByU: (array<'a>, 'a, (. 'a, 'a) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_SortArray.binarySearchBy", + "kind": "value", + "name": "binarySearchBy", + "signature": "let binarySearchBy: (array<'a>, 'a, ('a, 'a) => int) => int", + "docstrings": [ + "If value is not found and value is less than one or more elements in array, the\n negative number returned is the bitwise complement of the index of the first\n element that is larger than value.\n\n If value is not found and value is greater\n than all elements in array, the negative number returned is the bitwise\n complement of (the index of the last element plus 1)for example, if `key` is\n smaller than all elements return `-1` since `lnot(-1) == 0` if `key` is larger\n than all elements return `lnot(-1) == 0` since `lnot(- (len + 1)) == len`\n\n ```res example\n Belt.SortArray.binarySearchBy([1, 2, 3, 4, 33, 35, 36], 33, Pervasives.compare) == 4\n\n lnot(Belt.SortArray.binarySearchBy([1, 3, 5, 7], 4, Pervasives.compare)) == 2\n ```" + ] + }, + { + "id": "Belt_SortArray.unionU", + "kind": "value", + "name": "unionU", + "signature": "let unionU: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, (. 'a, 'a) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_SortArray.union", + "kind": "value", + "name": "union", + "signature": "let union: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, ('a, 'a) => int) => int", + "docstrings": [ + "`union src src1ofs src1len src2 src2ofs src2len dst dstofs cmp`\n assume `src` and `src2` is strictly sorted.\n for equivalent elements, it is picked from `src`\n also assume that `dst` is large enough to store all elements" + ] + }, + { + "id": "Belt_SortArray.intersectU", + "kind": "value", + "name": "intersectU", + "signature": "let intersectU: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, (. 'a, 'a) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_SortArray.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, ('a, 'a) => int) => int", + "docstrings": [ + "`union src src1ofs src1len src2 src2ofs src2len dst dstofs cmp`\n\n **return** the `offset` in the output array" + ] + }, + { + "id": "Belt_SortArray.diffU", + "kind": "value", + "name": "diffU", + "signature": "let diffU: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, (. 'a, 'a) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_SortArray.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (array<'a>, int, int, array<'a>, int, int, array<'a>, int, ('a, 'a) => int) => int", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_SortArrayInt.json b/index_data/api/Belt_SortArrayInt.json new file mode 100644 index 000000000..1e050dd88 --- /dev/null +++ b/index_data/api/Belt_SortArrayInt.json @@ -0,0 +1,83 @@ +{ + "name": "Belt_SortArrayInt", + "docstrings": [ + "This is a specialized module for [`Belt_SortArray`](), the docs in that module also\n applies here, except the comparator is fixed and inlined" + ], + "items": [ + { + "id": "Belt_SortArrayInt.element", + "kind": "type", + "name": "element", + "signature": "type element = int", + "docstrings": [] + }, + { + "id": "Belt_SortArrayInt.strictlySortedLength", + "kind": "value", + "name": "strictlySortedLength", + "signature": "let strictlySortedLength: array => int", + "docstrings": [ + "The same as [`Belt_SortArray.strictlySortedLength`]() except the comparator is fixed\n\n **return** `+n` means increasing order `-n` means negative order" + ] + }, + { + "id": "Belt_SortArrayInt.isSorted", + "kind": "value", + "name": "isSorted", + "signature": "let isSorted: array => bool", + "docstrings": [ + "`sorted xs` return true if `xs` is in non strict increasing order" + ] + }, + { + "id": "Belt_SortArrayInt.stableSortInPlace", + "kind": "value", + "name": "stableSortInPlace", + "signature": "let stableSortInPlace: array => unit", + "docstrings": [ + "The same as [`Belt_SortArray.stableSortInPlaceBy`]() except the comparator is fixed" + ] + }, + { + "id": "Belt_SortArrayInt.stableSort", + "kind": "value", + "name": "stableSort", + "signature": "let stableSort: array => array", + "docstrings": [ + "The same as [`Belt_SortArray.stableSortBy`]() except the comparator is fixed" + ] + }, + { + "id": "Belt_SortArrayInt.binarySearch", + "kind": "value", + "name": "binarySearch", + "signature": "let binarySearch: (array, element) => int", + "docstrings": [ + "If value is not found and value is less than one or more elements in array,\n the negative number returned is the bitwise complement of the index of the first element\n that is larger than value.\n\n If value is not found and value is greater than all elements in array,\n the negative number returned is the bitwise complement of\n (the index of the last element plus 1)\n\n for example, if `key` is smaller than all elements return `-1` since `lnot (-1) = 0`\n if `key` is larger than all elements return `- (len + 1)` since `lnot (-(len+1)) = len`" + ] + }, + { + "id": "Belt_SortArrayInt.union", + "kind": "value", + "name": "union", + "signature": "let union: (array, int, int, array, int, int, array, int) => int", + "docstrings": [ + "`union src src1ofs src1len src2 src2ofs src2len dst dstofs cmp`\n assume `src` and `src2` is strictly sorted.\n for equivalent elements, it is picked from `src`\n also assume that `dst` is large enough to store all elements" + ] + }, + { + "id": "Belt_SortArrayInt.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (array, int, int, array, int, int, array, int) => int", + "docstrings": [] + }, + { + "id": "Belt_SortArrayInt.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (array, int, int, array, int, int, array, int) => int", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_SortArrayString.json b/index_data/api/Belt_SortArrayString.json new file mode 100644 index 000000000..c3fe48344 --- /dev/null +++ b/index_data/api/Belt_SortArrayString.json @@ -0,0 +1,83 @@ +{ + "name": "Belt_SortArrayString", + "docstrings": [ + "This is a specialized module for [`Belt_SortArray`](), the docs in that module also\n applies here, except the comparator is fixed and inlined" + ], + "items": [ + { + "id": "Belt_SortArrayString.element", + "kind": "type", + "name": "element", + "signature": "type element = string", + "docstrings": [] + }, + { + "id": "Belt_SortArrayString.strictlySortedLength", + "kind": "value", + "name": "strictlySortedLength", + "signature": "let strictlySortedLength: array => int", + "docstrings": [ + "The same as [`Belt_SortArray.strictlySortedLength`]() except the comparator is fixed\n\n **return** `+n` means increasing order `-n` means negative order" + ] + }, + { + "id": "Belt_SortArrayString.isSorted", + "kind": "value", + "name": "isSorted", + "signature": "let isSorted: array => bool", + "docstrings": [ + "`sorted xs` return true if `xs` is in non strict increasing order" + ] + }, + { + "id": "Belt_SortArrayString.stableSortInPlace", + "kind": "value", + "name": "stableSortInPlace", + "signature": "let stableSortInPlace: array => unit", + "docstrings": [ + "The same as [`Belt_SortArray.stableSortInPlaceBy`]() except the comparator is fixed" + ] + }, + { + "id": "Belt_SortArrayString.stableSort", + "kind": "value", + "name": "stableSort", + "signature": "let stableSort: array => array", + "docstrings": [ + "The same as [`Belt_SortArray.stableSortBy`]() except the comparator is fixed" + ] + }, + { + "id": "Belt_SortArrayString.binarySearch", + "kind": "value", + "name": "binarySearch", + "signature": "let binarySearch: (array, element) => int", + "docstrings": [ + "If value is not found and value is less than one or more elements in array,\n the negative number returned is the bitwise complement of the index of the first element\n that is larger than value.\n\n If value is not found and value is greater than all elements in array,\n the negative number returned is the bitwise complement of\n (the index of the last element plus 1)\n\n for example, if `key` is smaller than all elements return `-1` since `lnot (-1) = 0`\n if `key` is larger than all elements return `- (len + 1)` since `lnot (-(len+1)) = len`" + ] + }, + { + "id": "Belt_SortArrayString.union", + "kind": "value", + "name": "union", + "signature": "let union: (array, int, int, array, int, int, array, int) => int", + "docstrings": [ + "`union src src1ofs src1len src2 src2ofs src2len dst dstofs cmp`\n assume `src` and `src2` is strictly sorted.\n for equivalent elements, it is picked from `src`\n also assume that `dst` is large enough to store all elements" + ] + }, + { + "id": "Belt_SortArrayString.intersect", + "kind": "value", + "name": "intersect", + "signature": "let intersect: (array, int, int, array, int, int, array, int) => int", + "docstrings": [] + }, + { + "id": "Belt_SortArrayString.diff", + "kind": "value", + "name": "diff", + "signature": "let diff: (array, int, int, array, int, int, array, int) => int", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internalAVLset.json b/index_data/api/Belt_internalAVLset.json new file mode 100644 index 000000000..39cfd978a --- /dev/null +++ b/index_data/api/Belt_internalAVLset.json @@ -0,0 +1,399 @@ +{ + "name": "Belt_internalAVLset", + "docstrings": [], + "items": [ + { + "id": "Belt_internalAVLset.t", + "kind": "type", + "name": "t", + "signature": "type t<'value> = option>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.node", + "kind": "type", + "name": "node", + "signature": "type node<'value> = {\\n mutable value: 'value,\\n mutable height: int,\\n mutable left: t<'value>,\\n mutable right: t<'value>,\\n}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "value", + "docstrings": [], + "signature": "'value" + }, + { + "fieldName": "height", + "docstrings": [], + "signature": "int" + }, + { + "fieldName": "left", + "docstrings": [], + "signature": "t<'value>" + }, + { + "fieldName": "right", + "docstrings": [], + "signature": "t<'value>" + } + ] + } + }, + { + "id": "Belt_internalAVLset.cmp", + "kind": "type", + "name": "cmp", + "signature": "type cmp<'a, 'b> = Belt_Id.cmp<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.create", + "kind": "value", + "name": "create", + "signature": "let create: (t<'a>, 'a, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.bal", + "kind": "value", + "name": "bal", + "signature": "let bal: (t<'a>, 'a, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.singleton", + "kind": "value", + "name": "singleton", + "signature": "let singleton: 'a => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'a> => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'a> => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'a> => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'a> => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.removeMinAuxWithRef", + "kind": "value", + "name": "removeMinAuxWithRef", + "signature": "let removeMinAuxWithRef: (node<'a>, Belt_internals.ref<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a> => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.stackAllLeft", + "kind": "value", + "name": "stackAllLeft", + "signature": "let stackAllLeft: (t<'a>, list>) => list>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a>, (. 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a>, 'a => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'a>, 'b, (. 'b, 'a) => 'b) => 'b", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a>, 'b, ('b, 'a) => 'b) => 'b", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'a>, (. 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'a>, 'a => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'a>, (. 'a) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'a>, 'a => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.joinShared", + "kind": "value", + "name": "joinShared", + "signature": "let joinShared: (t<'a>, 'a, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.concatShared", + "kind": "value", + "name": "concatShared", + "signature": "let concatShared: (t<'a>, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.keepSharedU", + "kind": "value", + "name": "keepSharedU", + "signature": "let keepSharedU: (t<'a>, (. 'a) => bool) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.keepShared", + "kind": "value", + "name": "keepShared", + "signature": "let keepShared: (t<'a>, 'a => bool) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.keepCopyU", + "kind": "value", + "name": "keepCopyU", + "signature": "let keepCopyU: (t<'a>, (. 'a) => bool) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.keepCopy", + "kind": "value", + "name": "keepCopy", + "signature": "let keepCopy: (t<'a>, 'a => bool) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.partitionSharedU", + "kind": "value", + "name": "partitionSharedU", + "signature": "let partitionSharedU: (t<'a>, (. 'a) => bool) => (t<'a>, t<'a>)", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.partitionShared", + "kind": "value", + "name": "partitionShared", + "signature": "let partitionShared: (t<'a>, 'a => bool) => (t<'a>, t<'a>)", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.partitionCopyU", + "kind": "value", + "name": "partitionCopyU", + "signature": "let partitionCopyU: (t<'a>, (. 'a) => bool) => (t<'a>, t<'a>)", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.partitionCopy", + "kind": "value", + "name": "partitionCopy", + "signature": "let partitionCopy: (t<'a>, 'a => bool) => (t<'a>, t<'a>)", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.lengthNode", + "kind": "value", + "name": "lengthNode", + "signature": "let lengthNode: node<'a> => int", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a> => int", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'a> => list<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + }, + { + "id": "Belt_internalAVLset.fillArray", + "kind": "value", + "name": "fillArray", + "signature": "let fillArray: (node<'a>, int, array<'a>) => int", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a> => array<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.fromSortedArrayAux", + "kind": "value", + "name": "fromSortedArrayAux", + "signature": "let fromSortedArrayAux: (array<'a>, int, int) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.fromSortedArrayRevAux", + "kind": "value", + "name": "fromSortedArrayRevAux", + "signature": "let fromSortedArrayRevAux: (array<'a>, int, int) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "signature": "let fromSortedArrayUnsafe: array<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'a>, 'a, ~cmp: cmp<'a, 'b>) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'a>, t<'a>, ~cmp: cmp<'a, 'b>) => int", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'a>, t<'a>, ~cmp: cmp<'a, 'b>) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t<'a>, t<'a>, ~cmp: cmp<'a, 'b>) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a>, 'a, ~cmp: cmp<'a, 'b>) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'a>, 'a, ~cmp: cmp<'a, 'b>) => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'a>, 'a, ~cmp: cmp<'a, 'b>) => 'a", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<'a>, ~cmp: cmp<'a, 'b>) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.addMutate", + "kind": "value", + "name": "addMutate", + "signature": "let addMutate: (~cmp: cmp<'a, 'b>, t<'a>, 'a) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.balMutate", + "kind": "value", + "name": "balMutate", + "signature": "let balMutate: node<'a> => node<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLset.removeMinAuxWithRootMutate", + "kind": "value", + "name": "removeMinAuxWithRootMutate", + "signature": "let removeMinAuxWithRootMutate: (node<'a>, node<'a>) => t<'a>", + "docstrings": [ + "`removeMinAuxWithRootMutate root n`\n remove the minimum of n in place and store its value in the `key root`" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internalAVLtree.json b/index_data/api/Belt_internalAVLtree.json new file mode 100644 index 000000000..d1a0c96a0 --- /dev/null +++ b/index_data/api/Belt_internalAVLtree.json @@ -0,0 +1,500 @@ +{ + "name": "Belt_internalAVLtree", + "docstrings": [], + "items": [ + { + "id": "Belt_internalAVLtree.t", + "kind": "type", + "name": "t", + "signature": "type t<'key, 'a> = option>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.node", + "kind": "type", + "name": "node", + "signature": "type node<'k, 'v> = {\\n mutable key: 'k,\\n mutable value: 'v,\\n mutable height: int,\\n mutable left: t<'k, 'v>,\\n mutable right: t<'k, 'v>,\\n}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "key", + "docstrings": [], + "signature": "'k" + }, + { + "fieldName": "value", + "docstrings": [], + "signature": "'v" + }, + { + "fieldName": "height", + "docstrings": [], + "signature": "int" + }, + { + "fieldName": "left", + "docstrings": [], + "signature": "t<'k, 'v>" + }, + { + "fieldName": "right", + "docstrings": [], + "signature": "t<'k, 'v>" + } + ] + } + }, + { + "id": "Belt_internalAVLtree.cmp", + "kind": "type", + "name": "cmp", + "signature": "type cmp<'k, 'id> = Belt_Id.cmp<'k, 'id>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'k, 'v> => t<'k, 'v>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.create", + "kind": "value", + "name": "create", + "signature": "let create: (t<'a, 'b>, 'a, 'b, t<'a, 'b>) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.bal", + "kind": "value", + "name": "bal", + "signature": "let bal: (t<'a, 'b>, 'a, 'b, t<'a, 'b>) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.singleton", + "kind": "value", + "name": "singleton", + "signature": "let singleton: ('a, 'b) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.updateValue", + "kind": "value", + "name": "updateValue", + "signature": "let updateValue: (node<'k, 'v>, 'v) => node<'k, 'v>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.minKey", + "kind": "value", + "name": "minKey", + "signature": "let minKey: t<'a, 'b> => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.minKeyUndefined", + "kind": "value", + "name": "minKeyUndefined", + "signature": "let minKeyUndefined: t<'a, 'b> => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.maxKey", + "kind": "value", + "name": "maxKey", + "signature": "let maxKey: t<'a, 'b> => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.maxKeyUndefined", + "kind": "value", + "name": "maxKeyUndefined", + "signature": "let maxKeyUndefined: t<'a, 'b> => Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.minimum", + "kind": "value", + "name": "minimum", + "signature": "let minimum: t<'a, 'b> => option<('a, 'b)>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.minUndefined", + "kind": "value", + "name": "minUndefined", + "signature": "let minUndefined: t<'a, 'b> => Js.undefined<('a, 'b)>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.maximum", + "kind": "value", + "name": "maximum", + "signature": "let maximum: t<'a, 'b> => option<('a, 'b)>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.maxUndefined", + "kind": "value", + "name": "maxUndefined", + "signature": "let maxUndefined: t<'a, 'b> => Js.undefined<('a, 'b)>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.removeMinAuxWithRef", + "kind": "value", + "name": "removeMinAuxWithRef", + "signature": "let removeMinAuxWithRef: (node<'a, 'b>, Belt_internals.ref<'a>, Belt_internals.ref<'b>) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a, 'b> => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.stackAllLeft", + "kind": "value", + "name": "stackAllLeft", + "signature": "let stackAllLeft: (t<'a, 'b>, list>) => list>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.findFirstByU", + "kind": "value", + "name": "findFirstByU", + "signature": "let findFirstByU: (t<'a, 'b>, (. 'a, 'b) => bool) => option<('a, 'b)>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.findFirstBy", + "kind": "value", + "name": "findFirstBy", + "signature": "let findFirstBy: (t<'a, 'b>, ('a, 'b) => bool) => option<('a, 'b)>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a, 'b>, (. 'a, 'b) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a, 'b>, ('a, 'b) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.mapU", + "kind": "value", + "name": "mapU", + "signature": "let mapU: (t<'c, 'a>, (. 'a) => 'b) => t<'c, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'c, 'a>, 'a => 'b) => t<'c, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.mapWithKeyU", + "kind": "value", + "name": "mapWithKeyU", + "signature": "let mapWithKeyU: (t<'a, 'b>, (. 'a, 'b) => 'c) => t<'a, 'c>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.mapWithKey", + "kind": "value", + "name": "mapWithKey", + "signature": "let mapWithKey: (t<'a, 'b>, ('a, 'b) => 'c) => t<'a, 'c>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'a, 'b>, 'c, (. 'c, 'a, 'b) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a, 'b>, 'c, ('c, 'a, 'b) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.everyU", + "kind": "value", + "name": "everyU", + "signature": "let everyU: (t<'a, 'b>, (. 'a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'a, 'b>, ('a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.someU", + "kind": "value", + "name": "someU", + "signature": "let someU: (t<'a, 'b>, (. 'a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'a, 'b>, ('a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.join", + "kind": "value", + "name": "join", + "signature": "let join: (t<'a, 'b>, 'a, 'b, t<'a, 'b>) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (t<'a, 'b>, t<'a, 'b>) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.concatOrJoin", + "kind": "value", + "name": "concatOrJoin", + "signature": "let concatOrJoin: (t<'a, 'b>, 'a, option<'b>, t<'a, 'b>) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.keepSharedU", + "kind": "value", + "name": "keepSharedU", + "signature": "let keepSharedU: (t<'a, 'b>, (. 'a, 'b) => bool) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.keepShared", + "kind": "value", + "name": "keepShared", + "signature": "let keepShared: (t<'a, 'b>, ('a, 'b) => bool) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.keepMapU", + "kind": "value", + "name": "keepMapU", + "signature": "let keepMapU: (t<'a, 'b>, (. 'a, 'b) => option<'c>) => t<'a, 'c>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.keepMap", + "kind": "value", + "name": "keepMap", + "signature": "let keepMap: (t<'a, 'b>, ('a, 'b) => option<'c>) => t<'a, 'c>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.partitionSharedU", + "kind": "value", + "name": "partitionSharedU", + "signature": "let partitionSharedU: (t<'a, 'b>, (. 'a, 'b) => bool) => (t<'a, 'b>, t<'a, 'b>)", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.partitionShared", + "kind": "value", + "name": "partitionShared", + "signature": "let partitionShared: (t<'a, 'b>, ('a, 'b) => bool) => (t<'a, 'b>, t<'a, 'b>)", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.lengthNode", + "kind": "value", + "name": "lengthNode", + "signature": "let lengthNode: node<'a, 'b> => int", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.size", + "kind": "value", + "name": "size", + "signature": "let size: t<'a, 'b> => int", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'a, 'b> => list<('a, 'b)>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.checkInvariantInternal", + "kind": "value", + "name": "checkInvariantInternal", + "signature": "let checkInvariantInternal: t<'a, 'b> => unit", + "docstrings": [ + "**raise** when invariant is not held" + ] + }, + { + "id": "Belt_internalAVLtree.fillArray", + "kind": "value", + "name": "fillArray", + "signature": "let fillArray: (node<'a, 'b>, int, array<('a, 'b)>) => int", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a, 'b> => array<('a, 'b)>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'a, 'b> => array<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'a, 'b> => array<'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.fromSortedArrayAux", + "kind": "value", + "name": "fromSortedArrayAux", + "signature": "let fromSortedArrayAux: (array<('a, 'b)>, int, int) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.fromSortedArrayRevAux", + "kind": "value", + "name": "fromSortedArrayRevAux", + "signature": "let fromSortedArrayRevAux: (array<('a, 'b)>, int, int) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.fromSortedArrayUnsafe", + "kind": "value", + "name": "fromSortedArrayUnsafe", + "signature": "let fromSortedArrayUnsafe: array<('a, 'b)> => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (t<'a, 'b>, t<'a, 'c>, ~kcmp: cmp<'a, 'd>, ~vcmp: (. 'b, 'c) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (t<'a, 'b>, t<'a, 'c>, ~kcmp: cmp<'a, 'd>, ~vcmp: ('b, 'c) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (t<'a, 'b>, t<'a, 'c>, ~kcmp: cmp<'a, 'd>, ~veq: (. 'b, 'c) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t<'a, 'b>, t<'a, 'c>, ~kcmp: cmp<'a, 'd>, ~veq: ('b, 'c) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a, 'b>, 'a, ~cmp: cmp<'a, 'c>) => option<'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t<'a, 'b>, 'a, ~cmp: cmp<'a, 'c>) => Js.undefined<'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (t<'a, 'b>, 'a, 'b, ~cmp: cmp<'a, 'c>) => 'b", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t<'a, 'b>, 'a, ~cmp: cmp<'a, 'c>) => 'b", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.has", + "kind": "value", + "name": "has", + "signature": "let has: (t<'a, 'b>, 'a, ~cmp: cmp<'a, 'c>) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: (array<('a, 'b)>, ~cmp: cmp<'a, 'id>) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.updateMutate", + "kind": "value", + "name": "updateMutate", + "signature": "let updateMutate: (t<'a, 'b>, 'a, 'b, ~cmp: cmp<'a, 'id>) => t<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.balMutate", + "kind": "value", + "name": "balMutate", + "signature": "let balMutate: node<'a, 'b> => node<'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalAVLtree.removeMinAuxWithRootMutate", + "kind": "value", + "name": "removeMinAuxWithRootMutate", + "signature": "let removeMinAuxWithRootMutate: (node<'a, 'b>, node<'a, 'b>) => t<'a, 'b>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internalBuckets.json b/index_data/api/Belt_internalBuckets.json new file mode 100644 index 000000000..338e6d533 --- /dev/null +++ b/index_data/api/Belt_internalBuckets.json @@ -0,0 +1,162 @@ +{ + "name": "Belt_internalBuckets", + "docstrings": [], + "items": [ + { + "id": "Belt_internalBuckets.Belt_internalBucketsType", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module C = Belt_internalBucketsType" + }, + { + "id": "Belt_internalBuckets.bucket", + "kind": "type", + "name": "bucket", + "signature": "type bucket<'a, 'b> = {\\n mutable key: 'a,\\n mutable value: 'b,\\n mutable next: C.opt>,\\n}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "key", + "docstrings": [], + "signature": "'a" + }, + { + "fieldName": "value", + "docstrings": [], + "signature": "'b" + }, + { + "fieldName": "next", + "docstrings": [], + "signature": "C.opt>" + } + ] + } + }, + { + "id": "Belt_internalBuckets.t", + "kind": "type", + "name": "t", + "signature": "type t<'hash, 'eq, 'a, 'b> = C.container<'hash, 'eq, bucket<'a, 'b>>", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "size", + "docstrings": [], + "signature": "int" + }, + { + "fieldName": "buckets", + "docstrings": [], + "signature": "array>" + }, + { + "fieldName": "hash", + "docstrings": [], + "signature": "'hash" + }, + { + "fieldName": "eq", + "docstrings": [], + "signature": "'eq" + } + ] + } + }, + { + "id": "Belt_internalBuckets.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'hash, 'eq, 'a, 'b> => t<'hash, 'eq, 'a, 'b>", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'a, 'b, 'a0, 'b0>, (. 'a0, 'b0) => 'c) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a, 'b, 'a0, 'b0>, ('a0, 'b0) => 'c) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'a, 'b, 'a0, 'b0>, 'c, (. 'c, 'a0, 'b0) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a, 'b, 'a0, 'b0>, 'c, ('c, 'a0, 'b0) => 'c) => 'c", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.logStats", + "kind": "value", + "name": "logStats", + "signature": "let logStats: t<'a, 'b, 'c, 'd> => unit", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.keepMapInPlaceU", + "kind": "value", + "name": "keepMapInPlaceU", + "signature": "let keepMapInPlaceU: (t<'a, 'b, 'a0, 'b0>, (. 'a0, 'b0) => option<'b0>) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.keepMapInPlace", + "kind": "value", + "name": "keepMapInPlace", + "signature": "let keepMapInPlace: (t<'a, 'b, 'a0, 'b0>, ('a0, 'b0) => option<'b0>) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.fillArray", + "kind": "value", + "name": "fillArray", + "signature": "let fillArray: (int, array<('a, 'b)>, bucket<'a, 'b>) => int", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.keysToArray", + "kind": "value", + "name": "keysToArray", + "signature": "let keysToArray: t<'a, 'b, 'a0, 'c> => array<'a0>", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.valuesToArray", + "kind": "value", + "name": "valuesToArray", + "signature": "let valuesToArray: t<'a, 'b, 'c, 'b0> => array<'b0>", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a, 'b, 'a0, 'b0> => array<('a0, 'b0)>", + "docstrings": [] + }, + { + "id": "Belt_internalBuckets.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "signature": "let getBucketHistogram: t<'a, 'b, 'c, 'd> => array", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internalBucketsType.json b/index_data/api/Belt_internalBucketsType.json new file mode 100644 index 000000000..b8d62d034 --- /dev/null +++ b/index_data/api/Belt_internalBucketsType.json @@ -0,0 +1,87 @@ +{ + "name": "Belt_internalBucketsType", + "docstrings": [], + "items": [ + { + "id": "Belt_internalBucketsType.opt", + "kind": "type", + "name": "opt", + "signature": "type opt<'a> = Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalBucketsType.container", + "kind": "type", + "name": "container", + "signature": "type container<'hash, 'eq, 'c> = {\\n mutable size: int,\\n mutable buckets: array>,\\n hash: 'hash,\\n eq: 'eq,\\n}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "size", + "docstrings": [], + "signature": "int" + }, + { + "fieldName": "buckets", + "docstrings": [], + "signature": "array>" + }, + { + "fieldName": "hash", + "docstrings": [], + "signature": "'hash" + }, + { + "fieldName": "eq", + "docstrings": [], + "signature": "'eq" + } + ] + } + }, + { + "id": "Belt_internalBucketsType.toOpt", + "kind": "value", + "name": "toOpt", + "signature": "let toOpt: opt<'a> => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalBucketsType.return", + "kind": "value", + "name": "return", + "signature": "let return: 'a => opt<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalBucketsType.emptyOpt", + "kind": "value", + "name": "emptyOpt", + "signature": "let emptyOpt: Js.undefined<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalBucketsType.make", + "kind": "value", + "name": "make", + "signature": "let make: (~hash: 'hash, ~eq: 'eq, ~hintSize: int) => container<'hash, 'eq, 'a>", + "docstrings": [] + }, + { + "id": "Belt_internalBucketsType.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: container<'a, 'b, 'c> => unit", + "docstrings": [] + }, + { + "id": "Belt_internalBucketsType.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: container<'a, 'b, 'c> => bool", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internalMapInt.json b/index_data/api/Belt_internalMapInt.json new file mode 100644 index 000000000..bb386662c --- /dev/null +++ b/index_data/api/Belt_internalMapInt.json @@ -0,0 +1,171 @@ +{ + "name": "Belt_internalMapInt", + "docstrings": [], + "items": [ + { + "id": "Belt_internalMapInt.key", + "kind": "type", + "name": "key", + "signature": "type key = int", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.Belt_internalAVLtree", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module N = Belt_internalAVLtree" + }, + { + "id": "Belt_internalMapInt.Belt_Array", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module A = Belt_Array" + }, + { + "id": "Belt_internalMapInt.Belt_SortArray", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module S = Belt_SortArray" + }, + { + "id": "Belt_internalMapInt.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.add", + "kind": "value", + "name": "add", + "signature": "let add: (N.t, key, 'a) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.get", + "kind": "value", + "name": "get", + "signature": "let get: (N.t, key) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (N.t, key) => Js.Undefined.t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (N.t, key) => 'a", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (N.t, key, 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.has", + "kind": "value", + "name": "has", + "signature": "let has: (N.t, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (N.t, key) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.splitAux", + "kind": "value", + "name": "splitAux", + "signature": "let splitAux: (key, N.node) => (t<'a>, option<'a>, t<'a>)", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.split", + "kind": "value", + "name": "split", + "signature": "let split: (key, option>) => (t<'a>, option<'a>, t<'a>)", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.mergeU", + "kind": "value", + "name": "mergeU", + "signature": "let mergeU: (N.t, t<'b>, (. key, option<'a>, option<'b>) => option<'c>) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.merge", + "kind": "value", + "name": "merge", + "signature": "let merge: (N.t, t<'b>, (key, option<'a>, option<'b>) => option<'c>) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.compareAux", + "kind": "value", + "name": "compareAux", + "signature": "let compareAux: (list>, list>, (. 'a, 'b) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (N.t, N.t, (. 'a, 'b) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (N.t, N.t, ('a, 'b) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.eqAux", + "kind": "value", + "name": "eqAux", + "signature": "let eqAux: (list>, list>, (. 'a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (N.t, N.t, (. 'a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (N.t, N.t, ('a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.addMutate", + "kind": "value", + "name": "addMutate", + "signature": "let addMutate: (t<'a>, key, 'a) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalMapInt.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<(key, 'a)> => N.t", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internalMapString.json b/index_data/api/Belt_internalMapString.json new file mode 100644 index 000000000..c799f3ed4 --- /dev/null +++ b/index_data/api/Belt_internalMapString.json @@ -0,0 +1,171 @@ +{ + "name": "Belt_internalMapString", + "docstrings": [], + "items": [ + { + "id": "Belt_internalMapString.key", + "kind": "type", + "name": "key", + "signature": "type key = string", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.Belt_internalAVLtree", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module N = Belt_internalAVLtree" + }, + { + "id": "Belt_internalMapString.Belt_Array", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module A = Belt_Array" + }, + { + "id": "Belt_internalMapString.Belt_SortArray", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module S = Belt_SortArray" + }, + { + "id": "Belt_internalMapString.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.add", + "kind": "value", + "name": "add", + "signature": "let add: (N.t, key, 'a) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.get", + "kind": "value", + "name": "get", + "signature": "let get: (N.t, key) => option<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (N.t, key) => Js.Undefined.t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (N.t, key) => 'a", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: (N.t, key, 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.has", + "kind": "value", + "name": "has", + "signature": "let has: (N.t, key) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (N.t, key) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.splitAux", + "kind": "value", + "name": "splitAux", + "signature": "let splitAux: (key, N.node) => (t<'a>, option<'a>, t<'a>)", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.split", + "kind": "value", + "name": "split", + "signature": "let split: (key, option>) => (t<'a>, option<'a>, t<'a>)", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.mergeU", + "kind": "value", + "name": "mergeU", + "signature": "let mergeU: (N.t, t<'b>, (. key, option<'a>, option<'b>) => option<'c>) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.merge", + "kind": "value", + "name": "merge", + "signature": "let merge: (N.t, t<'b>, (key, option<'a>, option<'b>) => option<'c>) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.compareAux", + "kind": "value", + "name": "compareAux", + "signature": "let compareAux: (list>, list>, (. 'a, 'b) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.cmpU", + "kind": "value", + "name": "cmpU", + "signature": "let cmpU: (N.t, N.t, (. 'a, 'b) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (N.t, N.t, ('a, 'b) => int) => int", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.eqAux", + "kind": "value", + "name": "eqAux", + "signature": "let eqAux: (list>, list>, (. 'a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.eqU", + "kind": "value", + "name": "eqU", + "signature": "let eqU: (N.t, N.t, (. 'a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (N.t, N.t, ('a, 'b) => bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.addMutate", + "kind": "value", + "name": "addMutate", + "signature": "let addMutate: (t<'a>, key, 'a) => t<'a>", + "docstrings": [] + }, + { + "id": "Belt_internalMapString.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<(key, 'a)> => N.t", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internalSetBuckets.json b/index_data/api/Belt_internalSetBuckets.json new file mode 100644 index 000000000..3dc807f25 --- /dev/null +++ b/index_data/api/Belt_internalSetBuckets.json @@ -0,0 +1,129 @@ +{ + "name": "Belt_internalSetBuckets", + "docstrings": [], + "items": [ + { + "id": "Belt_internalSetBuckets.Belt_internalBucketsType", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module C = Belt_internalBucketsType" + }, + { + "id": "Belt_internalSetBuckets.bucket", + "kind": "type", + "name": "bucket", + "signature": "type bucket<'a> = {\\n mutable key: 'a,\\n mutable next: C.opt>,\\n}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "key", + "docstrings": [], + "signature": "'a" + }, + { + "fieldName": "next", + "docstrings": [], + "signature": "C.opt>" + } + ] + } + }, + { + "id": "Belt_internalSetBuckets.t", + "kind": "type", + "name": "t", + "signature": "type t<'hash, 'eq, 'a> = C.container<'hash, 'eq, bucket<'a>>", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "size", + "docstrings": [], + "signature": "int" + }, + { + "fieldName": "buckets", + "docstrings": [], + "signature": "array>" + }, + { + "fieldName": "hash", + "docstrings": [], + "signature": "'hash" + }, + { + "fieldName": "eq", + "docstrings": [], + "signature": "'eq" + } + ] + } + }, + { + "id": "Belt_internalSetBuckets.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'hash, 'eq, 'a> => t<'hash, 'eq, 'a>", + "docstrings": [] + }, + { + "id": "Belt_internalSetBuckets.forEachU", + "kind": "value", + "name": "forEachU", + "signature": "let forEachU: (t<'hash, 'eq, 'a>, (. 'a) => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalSetBuckets.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'hash, 'eq, 'a>, 'a => unit) => unit", + "docstrings": [] + }, + { + "id": "Belt_internalSetBuckets.fillArray", + "kind": "value", + "name": "fillArray", + "signature": "let fillArray: (int, array<'a>, bucket<'a>) => int", + "docstrings": [] + }, + { + "id": "Belt_internalSetBuckets.toArray", + "kind": "value", + "name": "toArray", + "signature": "let toArray: t<'a, 'b, 'a0> => array<'a0>", + "docstrings": [] + }, + { + "id": "Belt_internalSetBuckets.reduceU", + "kind": "value", + "name": "reduceU", + "signature": "let reduceU: (t<'a, 'b, 'a0>, 'b0, (. 'b0, 'a0) => 'b0) => 'b0", + "docstrings": [] + }, + { + "id": "Belt_internalSetBuckets.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a, 'b, 'a0>, 'b0, ('b0, 'a0) => 'b0) => 'b0", + "docstrings": [] + }, + { + "id": "Belt_internalSetBuckets.logStats", + "kind": "value", + "name": "logStats", + "signature": "let logStats: t<'a, 'b, 'c> => unit", + "docstrings": [] + }, + { + "id": "Belt_internalSetBuckets.getBucketHistogram", + "kind": "value", + "name": "getBucketHistogram", + "signature": "let getBucketHistogram: t<'a, 'b, 'c> => array", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internalSetInt.json b/index_data/api/Belt_internalSetInt.json new file mode 100644 index 000000000..cb1dc81d9 --- /dev/null +++ b/index_data/api/Belt_internalSetInt.json @@ -0,0 +1,108 @@ +{ + "name": "Belt_internalSetInt", + "docstrings": [], + "items": [ + { + "id": "Belt_internalSetInt.value", + "kind": "type", + "name": "value", + "signature": "type value = int", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.Belt_SortArrayInt", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module S = Belt_SortArrayInt" + }, + { + "id": "Belt_internalSetInt.Belt_internalAVLset", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module N = Belt_internalAVLset" + }, + { + "id": "Belt_internalSetInt.Belt_Array", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module A = Belt_Array" + }, + { + "id": "Belt_internalSetInt.t", + "kind": "type", + "name": "t", + "signature": "type t = N.t", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.has", + "kind": "value", + "name": "has", + "signature": "let has: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.compareAux", + "kind": "value", + "name": "compareAux", + "signature": "let compareAux: (list>, list>) => int", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (N.t, N.t) => int", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t, N.t) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t, t) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.get", + "kind": "value", + "name": "get", + "signature": "let get: (t, value) => option", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t, value) => Js.Undefined.t", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t, value) => value", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.addMutate", + "kind": "value", + "name": "addMutate", + "signature": "let addMutate: (N.t, value) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalSetInt.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array => N.t", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internalSetString.json b/index_data/api/Belt_internalSetString.json new file mode 100644 index 000000000..e2e78c4db --- /dev/null +++ b/index_data/api/Belt_internalSetString.json @@ -0,0 +1,108 @@ +{ + "name": "Belt_internalSetString", + "docstrings": [], + "items": [ + { + "id": "Belt_internalSetString.value", + "kind": "type", + "name": "value", + "signature": "type value = string", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.Belt_SortArrayString", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module S = Belt_SortArrayString" + }, + { + "id": "Belt_internalSetString.Belt_internalAVLset", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module N = Belt_internalAVLset" + }, + { + "id": "Belt_internalSetString.Belt_Array", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module A = Belt_Array" + }, + { + "id": "Belt_internalSetString.t", + "kind": "type", + "name": "t", + "signature": "type t = N.t", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.has", + "kind": "value", + "name": "has", + "signature": "let has: (t, value) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.compareAux", + "kind": "value", + "name": "compareAux", + "signature": "let compareAux: (list>, list>) => int", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.cmp", + "kind": "value", + "name": "cmp", + "signature": "let cmp: (N.t, N.t) => int", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.eq", + "kind": "value", + "name": "eq", + "signature": "let eq: (t, N.t) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.subset", + "kind": "value", + "name": "subset", + "signature": "let subset: (t, t) => bool", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.get", + "kind": "value", + "name": "get", + "signature": "let get: (t, value) => option", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.getUndefined", + "kind": "value", + "name": "getUndefined", + "signature": "let getUndefined: (t, value) => Js.Undefined.t", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: (t, value) => value", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.addMutate", + "kind": "value", + "name": "addMutate", + "signature": "let addMutate: (N.t, value) => N.t", + "docstrings": [] + }, + { + "id": "Belt_internalSetString.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array => N.t", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Belt_internals.json b/index_data/api/Belt_internals.json new file mode 100644 index 000000000..b8cfc9791 --- /dev/null +++ b/index_data/api/Belt_internals.json @@ -0,0 +1,379 @@ +{ + "name": "Belt_internals", + "docstrings": [], + "items": [ + { + "id": "Belt_internals.^", + "kind": "value", + "name": "^", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.=", + "kind": "value", + "name": "=", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.<>", + "kind": "value", + "name": "<>", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.==", + "kind": "value", + "name": "==", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.!=", + "kind": "value", + "name": "!=", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.<", + "kind": "value", + "name": "<", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.>", + "kind": "value", + "name": ">", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.<=", + "kind": "value", + "name": "<=", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.>=", + "kind": "value", + "name": ">=", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.+", + "kind": "value", + "name": "+", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.-", + "kind": "value", + "name": "-", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.~-", + "kind": "value", + "name": "~-", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.*", + "kind": "value", + "name": "*", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals./", + "kind": "value", + "name": "/", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.lsl", + "kind": "value", + "name": "lsl", + "signature": "let lsl: (int, int) => int", + "docstrings": [] + }, + { + "id": "Belt_internals.lor", + "kind": "value", + "name": "lor", + "signature": "let lor: (int, int) => int", + "docstrings": [] + }, + { + "id": "Belt_internals.land", + "kind": "value", + "name": "land", + "signature": "let land: (int, int) => int", + "docstrings": [] + }, + { + "id": "Belt_internals.mod", + "kind": "value", + "name": "mod", + "signature": "let mod: (int, int) => int", + "docstrings": [] + }, + { + "id": "Belt_internals.lsr", + "kind": "value", + "name": "lsr", + "signature": "let lsr: (int, int) => int", + "docstrings": [] + }, + { + "id": "Belt_internals.lxor", + "kind": "value", + "name": "lxor", + "signature": "let lxor: (int, int) => int", + "docstrings": [] + }, + { + "id": "Belt_internals.asr", + "kind": "value", + "name": "asr", + "signature": "let asr: (int, int) => int", + "docstrings": [] + }, + { + "id": "Belt_internals.ref", + "kind": "type", + "name": "ref", + "signature": "type ref<'a> = {mutable contents: 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "contents", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Belt_internals.ref", + "kind": "value", + "name": "ref", + "signature": "let ref: 'a => ref<'a>", + "docstrings": [] + }, + { + "id": "Belt_internals.||", + "kind": "value", + "name": "||", + "signature": "let _: (bool, bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internals.&&", + "kind": "value", + "name": "&&", + "signature": "let _: (bool, bool) => bool", + "docstrings": [] + }, + { + "id": "Belt_internals.not", + "kind": "value", + "name": "not", + "signature": "let not: bool => bool", + "docstrings": [] + }, + { + "id": "Belt_internals.raise", + "kind": "value", + "name": "raise", + "signature": "let raise: exn => 'a", + "docstrings": [] + }, + { + "id": "Belt_internals.ignore", + "kind": "value", + "name": "ignore", + "signature": "let ignore: 'a => unit", + "docstrings": [] + }, + { + "id": "Belt_internals.|>", + "kind": "value", + "name": "|>", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.@@", + "kind": "value", + "name": "@@", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.**", + "kind": "value", + "name": "**", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.~-.", + "kind": "value", + "name": "~-.", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.+.", + "kind": "value", + "name": "+.", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.-.", + "kind": "value", + "name": "-.", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals.*.", + "kind": "value", + "name": "*.", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Belt_internals./.", + "kind": "value", + "name": "/.", + "signature": "let _: %rescript.typehole", + "docstrings": [] + }, + { + "id": "Obj.Belt_internals", + "kind": "module", + "item": { + "name": "Obj", + "docstrings": [], + "items": [ + { + "id": "Belt_internals.Obj.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [] + }, + { + "id": "Belt_internals.Obj.field", + "kind": "value", + "name": "field", + "signature": "let field: (t, int) => t", + "docstrings": [] + }, + { + "id": "Belt_internals.Obj.set_field", + "kind": "value", + "name": "set_field", + "signature": "let set_field: (t, int, t) => unit", + "docstrings": [] + }, + { + "id": "Belt_internals.Obj.tag", + "kind": "value", + "name": "tag", + "signature": "let tag: t => int", + "docstrings": [] + }, + { + "id": "Belt_internals.Obj.repr", + "kind": "value", + "name": "repr", + "signature": "let repr: 'a => t", + "docstrings": [] + }, + { + "id": "Belt_internals.Obj.obj", + "kind": "value", + "name": "obj", + "signature": "let obj: t => 'a", + "docstrings": [] + }, + { + "id": "Belt_internals.Obj.magic", + "kind": "value", + "name": "magic", + "signature": "let magic: 'a => 'b", + "docstrings": [] + }, + { + "id": "Belt_internals.Obj.size", + "kind": "value", + "name": "size", + "signature": "let size: t => int", + "docstrings": [] + } + ] + } + }, + { + "id": "Pervasives.Belt_internals", + "kind": "module", + "item": { + "name": "Pervasives", + "docstrings": [], + "items": [ + { + "id": "Belt_internals.Pervasives.compare", + "kind": "value", + "name": "compare", + "signature": "let compare: ('a, 'a) => int", + "docstrings": [] + }, + { + "id": "Belt_internals.Pervasives.not", + "kind": "value", + "name": "not", + "signature": "let not: bool => bool", + "docstrings": [] + }, + { + "id": "Belt_internals.Pervasives.min", + "kind": "value", + "name": "min", + "signature": "let min: ('a, 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_internals.Pervasives.max", + "kind": "value", + "name": "max", + "signature": "let max: ('a, 'a) => 'a", + "docstrings": [] + }, + { + "id": "Belt_internals.Pervasives.=", + "kind": "value", + "name": "=", + "signature": "let _: %rescript.typehole", + "docstrings": [] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/index_data/api/Buffer.json b/index_data/api/Buffer.json new file mode 100644 index 000000000..341297475 --- /dev/null +++ b/index_data/api/Buffer.json @@ -0,0 +1,195 @@ +{ + "name": "Buffer", + "docstrings": [], + "items": [ + { + "id": "Buffer.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [ + "The abstract type of buffers." + ] + }, + { + "id": "Buffer.create", + "kind": "value", + "name": "create", + "signature": "let create: int => t", + "docstrings": [ + "[create n] returns a fresh buffer, initially empty.\n The [n] parameter is the initial size of the internal byte sequence\n that holds the buffer contents. That byte sequence is automatically\n reallocated when more than [n] characters are stored in the buffer,\n but shrinks back to [n] characters when [reset] is called.\n For best performance, [n] should be of the same order of magnitude\n as the number of characters that are expected to be stored in\n the buffer (for instance, 80 for a buffer that holds one output\n line). Nothing bad will happen if the buffer grows beyond that\n limit, however. In doubt, take [n = 16] for instance.\n If [n] is not between 1 and {!Sys.max_string_length}, it will\n be clipped to that interval." + ] + }, + { + "id": "Buffer.contents", + "kind": "value", + "name": "contents", + "signature": "let contents: t => string", + "docstrings": [ + "Return a copy of the current contents of the buffer.\n The buffer itself is unchanged." + ] + }, + { + "id": "Buffer.to_bytes", + "kind": "value", + "name": "to_bytes", + "signature": "let to_bytes: t => bytes", + "docstrings": [ + "Return a copy of the current contents of the buffer.\n The buffer itself is unchanged.\n @since 4.02" + ] + }, + { + "id": "Buffer.sub", + "kind": "value", + "name": "sub", + "signature": "let sub: (t, int, int) => string", + "docstrings": [ + "[Buffer.sub b off len] returns a copy of [len] bytes from the\n current contents of the buffer [b], starting at offset [off].\n\n Raise [Invalid_argument] if [srcoff] and [len] do not designate a valid\n range of [b]." + ] + }, + { + "id": "Buffer.blit", + "kind": "value", + "name": "blit", + "signature": "let blit: (t, int, bytes, int, int) => unit", + "docstrings": [ + "[Buffer.blit src srcoff dst dstoff len] copies [len] characters from\n the current contents of the buffer [src], starting at offset [srcoff]\n to [dst], starting at character [dstoff].\n\n Raise [Invalid_argument] if [srcoff] and [len] do not designate a valid\n range of [src], or if [dstoff] and [len] do not designate a valid\n range of [dst].\n @since 3.11.2" + ] + }, + { + "id": "Buffer.nth", + "kind": "value", + "name": "nth", + "signature": "let nth: (t, int) => char", + "docstrings": [ + "Get the n-th character of the buffer. Raise [Invalid_argument] if\n index out of bounds" + ] + }, + { + "id": "Buffer.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [ + "Return the number of characters currently contained in the buffer." + ] + }, + { + "id": "Buffer.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t => unit", + "docstrings": [ + "Empty the buffer." + ] + }, + { + "id": "Buffer.reset", + "kind": "value", + "name": "reset", + "signature": "let reset: t => unit", + "docstrings": [ + "Empty the buffer and deallocate the internal byte sequence holding the\n buffer contents, replacing it with the initial internal byte sequence\n of length [n] that was allocated by {!Buffer.create} [n].\n For long-lived buffers that may have grown a lot, [reset] allows\n faster reclamation of the space used by the buffer." + ] + }, + { + "id": "Buffer.add_char", + "kind": "value", + "name": "add_char", + "signature": "let add_char: (t, char) => unit", + "docstrings": [ + "[add_char b c] appends the character [c] at the end of buffer [b]." + ] + }, + { + "id": "Buffer.add_utf_8_uchar", + "kind": "value", + "name": "add_utf_8_uchar", + "signature": "let add_utf_8_uchar: (t, Uchar.t) => unit", + "docstrings": [ + "[add_utf_8_uchar b u] appends the {{:https://tools.ietf.org/html/rfc3629}\n UTF-8} encoding of [u] at the end of buffer [b].\n\n @since 4.06.0" + ] + }, + { + "id": "Buffer.add_utf_16le_uchar", + "kind": "value", + "name": "add_utf_16le_uchar", + "signature": "let add_utf_16le_uchar: (t, Uchar.t) => unit", + "docstrings": [ + "[add_utf_16le_uchar b u] appends the\n {{:https://tools.ietf.org/html/rfc2781}UTF-16LE} encoding of [u]\n at the end of buffer [b].\n\n @since 4.06.0" + ] + }, + { + "id": "Buffer.add_utf_16be_uchar", + "kind": "value", + "name": "add_utf_16be_uchar", + "signature": "let add_utf_16be_uchar: (t, Uchar.t) => unit", + "docstrings": [ + "[add_utf_16be_uchar b u] appends the\n {{:https://tools.ietf.org/html/rfc2781}UTF-16BE} encoding of [u]\n at the end of buffer [b].\n\n @since 4.06.0" + ] + }, + { + "id": "Buffer.add_string", + "kind": "value", + "name": "add_string", + "signature": "let add_string: (t, string) => unit", + "docstrings": [ + "[add_string b s] appends the string [s] at the end of buffer [b]." + ] + }, + { + "id": "Buffer.add_bytes", + "kind": "value", + "name": "add_bytes", + "signature": "let add_bytes: (t, bytes) => unit", + "docstrings": [ + "[add_bytes b s] appends the byte sequence [s] at the end of buffer [b].\n @since 4.02" + ] + }, + { + "id": "Buffer.add_substring", + "kind": "value", + "name": "add_substring", + "signature": "let add_substring: (t, string, int, int) => unit", + "docstrings": [ + "[add_substring b s ofs len] takes [len] characters from offset\n [ofs] in string [s] and appends them at the end of buffer [b]." + ] + }, + { + "id": "Buffer.add_subbytes", + "kind": "value", + "name": "add_subbytes", + "signature": "let add_subbytes: (t, bytes, int, int) => unit", + "docstrings": [ + "[add_subbytes b s ofs len] takes [len] characters from offset\n [ofs] in byte sequence [s] and appends them at the end of buffer [b].\n @since 4.02" + ] + }, + { + "id": "Buffer.add_substitute", + "kind": "value", + "name": "add_substitute", + "signature": "let add_substitute: (t, string => string, string) => unit", + "docstrings": [ + "[add_substitute b f s] appends the string pattern [s] at the end\n of buffer [b] with substitution.\n The substitution process looks for variables into\n the pattern and substitutes each variable name by its value, as\n obtained by applying the mapping [f] to the variable name. Inside the\n string pattern, a variable name immediately follows a non-escaped\n [$] character and is one of the following:\n - a non empty sequence of alphanumeric or [_] characters,\n - an arbitrary sequence of characters enclosed by a pair of\n matching parentheses or curly brackets.\n An escaped [$] character is a [$] that immediately follows a backslash\n character; it then stands for a plain [$].\n Raise [Not_found] if the closing character of a parenthesized variable\n cannot be found." + ] + }, + { + "id": "Buffer.add_buffer", + "kind": "value", + "name": "add_buffer", + "signature": "let add_buffer: (t, t) => unit", + "docstrings": [ + "[add_buffer b1 b2] appends the current contents of buffer [b2]\n at the end of buffer [b1]. [b2] is not modified." + ] + }, + { + "id": "Buffer.truncate", + "kind": "value", + "name": "truncate", + "signature": "let truncate: (t, int) => unit", + "docstrings": [ + "[truncate b len] truncates the length of [b] to [len]\n Note: the internal byte sequence is not shortened.\n Raise [Invalid_argument] if [len < 0] or [len > length b].\n @since 4.05.0" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Bytes.json b/index_data/api/Bytes.json new file mode 100644 index 000000000..31f98d9a4 --- /dev/null +++ b/index_data/api/Bytes.json @@ -0,0 +1,416 @@ +{ + "name": "Bytes", + "docstrings": [], + "items": [ + { + "id": "Bytes.length", + "kind": "value", + "name": "length", + "signature": "let length: bytes => int", + "docstrings": [ + "Return the length (number of bytes) of the argument." + ] + }, + { + "id": "Bytes.get", + "kind": "value", + "name": "get", + "signature": "let get: (bytes, int) => char", + "docstrings": [ + "[get s n] returns the byte at index [n] in argument [s].\n\n Raise [Invalid_argument] if [n] is not a valid index in [s]." + ] + }, + { + "id": "Bytes.set", + "kind": "value", + "name": "set", + "signature": "let set: (bytes, int, char) => unit", + "docstrings": [ + "[set s n c] modifies [s] in place, replacing the byte at index [n]\n with [c].\n\n Raise [Invalid_argument] if [n] is not a valid index in [s]." + ] + }, + { + "id": "Bytes.create", + "kind": "value", + "name": "create", + "signature": "let create: int => bytes", + "docstrings": [ + "[create n] returns a new byte sequence of length [n]. The\n sequence is uninitialized and contains arbitrary bytes.\n\n Raise [Invalid_argument] if [n < 0] or [n > ]{!Sys.max_string_length}." + ] + }, + { + "id": "Bytes.make", + "kind": "value", + "name": "make", + "signature": "let make: (int, char) => bytes", + "docstrings": [ + "[make n c] returns a new byte sequence of length [n], filled with\n the byte [c].\n\n Raise [Invalid_argument] if [n < 0] or [n > ]{!Sys.max_string_length}." + ] + }, + { + "id": "Bytes.init", + "kind": "value", + "name": "init", + "signature": "let init: (int, int => char) => bytes", + "docstrings": [ + "[Bytes.init n f] returns a fresh byte sequence of length [n], with\n character [i] initialized to the result of [f i] (in increasing\n index order).\n\n Raise [Invalid_argument] if [n < 0] or [n > ]{!Sys.max_string_length}." + ] + }, + { + "id": "Bytes.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: bytes", + "docstrings": [ + "A byte sequence of size 0." + ] + }, + { + "id": "Bytes.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: bytes => bytes", + "docstrings": [ + "Return a new byte sequence that contains the same bytes as the\n argument." + ] + }, + { + "id": "Bytes.of_string", + "kind": "value", + "name": "of_string", + "signature": "let of_string: string => bytes", + "docstrings": [ + "Return a new byte sequence that contains the same bytes as the\n given string." + ] + }, + { + "id": "Bytes.to_string", + "kind": "value", + "name": "to_string", + "signature": "let to_string: bytes => string", + "docstrings": [ + "Return a new string that contains the same bytes as the given byte\n sequence." + ] + }, + { + "id": "Bytes.sub", + "kind": "value", + "name": "sub", + "signature": "let sub: (bytes, int, int) => bytes", + "docstrings": [ + "[sub s start len] returns a new byte sequence of length [len],\n containing the subsequence of [s] that starts at position [start]\n and has length [len].\n\n Raise [Invalid_argument] if [start] and [len] do not designate a\n valid range of [s]." + ] + }, + { + "id": "Bytes.sub_string", + "kind": "value", + "name": "sub_string", + "signature": "let sub_string: (bytes, int, int) => string", + "docstrings": [ + "Same as [sub] but return a string instead of a byte sequence." + ] + }, + { + "id": "Bytes.extend", + "kind": "value", + "name": "extend", + "signature": "let extend: (bytes, int, int) => bytes", + "docstrings": [ + "[extend s left right] returns a new byte sequence that contains\n the bytes of [s], with [left] uninitialized bytes prepended and\n [right] uninitialized bytes appended to it. If [left] or [right]\n is negative, then bytes are removed (instead of appended) from\n the corresponding side of [s].\n\n Raise [Invalid_argument] if the result length is negative or\n longer than {!Sys.max_string_length} bytes." + ] + }, + { + "id": "Bytes.fill", + "kind": "value", + "name": "fill", + "signature": "let fill: (bytes, int, int, char) => unit", + "docstrings": [ + "[fill s start len c] modifies [s] in place, replacing [len]\n characters with [c], starting at [start].\n\n Raise [Invalid_argument] if [start] and [len] do not designate a\n valid range of [s]." + ] + }, + { + "id": "Bytes.blit", + "kind": "value", + "name": "blit", + "signature": "let blit: (bytes, int, bytes, int, int) => unit", + "docstrings": [ + "[blit src srcoff dst dstoff len] copies [len] bytes from sequence\n [src], starting at index [srcoff], to sequence [dst], starting at\n index [dstoff]. It works correctly even if [src] and [dst] are the\n same byte sequence, and the source and destination intervals\n overlap.\n\n Raise [Invalid_argument] if [srcoff] and [len] do not\n designate a valid range of [src], or if [dstoff] and [len]\n do not designate a valid range of [dst]." + ] + }, + { + "id": "Bytes.blit_string", + "kind": "value", + "name": "blit_string", + "signature": "let blit_string: (string, int, bytes, int, int) => unit", + "docstrings": [ + "[blit src srcoff dst dstoff len] copies [len] bytes from string\n [src], starting at index [srcoff], to byte sequence [dst],\n starting at index [dstoff].\n\n Raise [Invalid_argument] if [srcoff] and [len] do not\n designate a valid range of [src], or if [dstoff] and [len]\n do not designate a valid range of [dst]." + ] + }, + { + "id": "Bytes.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (bytes, list) => bytes", + "docstrings": [ + "[concat sep sl] concatenates the list of byte sequences [sl],\n inserting the separator byte sequence [sep] between each, and\n returns the result as a new byte sequence.\n\n Raise [Invalid_argument] if the result is longer than\n {!Sys.max_string_length} bytes." + ] + }, + { + "id": "Bytes.cat", + "kind": "value", + "name": "cat", + "signature": "let cat: (bytes, bytes) => bytes", + "docstrings": [ + "[cat s1 s2] concatenates [s1] and [s2] and returns the result\n as new byte sequence.\n\n Raise [Invalid_argument] if the result is longer than\n {!Sys.max_string_length} bytes." + ] + }, + { + "id": "Bytes.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (char => unit, bytes) => unit", + "docstrings": [ + "[iter f s] applies function [f] in turn to all the bytes of [s].\n It is equivalent to [f (get s 0); f (get s 1); ...; f (get s\n (length s - 1)); ()]." + ] + }, + { + "id": "Bytes.iteri", + "kind": "value", + "name": "iteri", + "signature": "let iteri: ((int, char) => unit, bytes) => unit", + "docstrings": [ + "Same as {!Bytes.iter}, but the function is applied to the index of\n the byte as first argument and the byte itself as second\n argument." + ] + }, + { + "id": "Bytes.map", + "kind": "value", + "name": "map", + "signature": "let map: (char => char, bytes) => bytes", + "docstrings": [ + "[map f s] applies function [f] in turn to all the bytes of [s]\n (in increasing index order) and stores the resulting bytes in\n a new sequence that is returned as the result." + ] + }, + { + "id": "Bytes.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((int, char) => char, bytes) => bytes", + "docstrings": [ + "[mapi f s] calls [f] with each character of [s] and its\n index (in increasing index order) and stores the resulting bytes\n in a new sequence that is returned as the result." + ] + }, + { + "id": "Bytes.trim", + "kind": "value", + "name": "trim", + "signature": "let trim: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, without leading and trailing\n whitespace. The bytes regarded as whitespace are the ASCII\n characters [' '], ['\\012'], ['\\n'], ['\\r'], and ['\\t']." + ] + }, + { + "id": "Bytes.escaped", + "kind": "value", + "name": "escaped", + "signature": "let escaped: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with special characters represented\n by escape sequences, following the lexical conventions of OCaml.\n All characters outside the ASCII printable range (32..126) are\n escaped, as well as backslash and double-quote.\n\n Raise [Invalid_argument] if the result is longer than\n {!Sys.max_string_length} bytes." + ] + }, + { + "id": "Bytes.index", + "kind": "value", + "name": "index", + "signature": "let index: (bytes, char) => int", + "docstrings": [ + "[index s c] returns the index of the first occurrence of byte [c]\n in [s].\n\n Raise [Not_found] if [c] does not occur in [s]." + ] + }, + { + "id": "Bytes.index_opt", + "kind": "value", + "name": "index_opt", + "signature": "let index_opt: (bytes, char) => option", + "docstrings": [ + "[index_opt s c] returns the index of the first occurrence of byte [c]\n in [s] or [None] if [c] does not occur in [s].\n @since 4.05" + ] + }, + { + "id": "Bytes.rindex", + "kind": "value", + "name": "rindex", + "signature": "let rindex: (bytes, char) => int", + "docstrings": [ + "[rindex s c] returns the index of the last occurrence of byte [c]\n in [s].\n\n Raise [Not_found] if [c] does not occur in [s]." + ] + }, + { + "id": "Bytes.rindex_opt", + "kind": "value", + "name": "rindex_opt", + "signature": "let rindex_opt: (bytes, char) => option", + "docstrings": [ + "[rindex_opt s c] returns the index of the last occurrence of byte [c]\n in [s] or [None] if [c] does not occur in [s].\n @since 4.05" + ] + }, + { + "id": "Bytes.index_from", + "kind": "value", + "name": "index_from", + "signature": "let index_from: (bytes, int, char) => int", + "docstrings": [ + "[index_from s i c] returns the index of the first occurrence of\n byte [c] in [s] after position [i]. [Bytes.index s c] is\n equivalent to [Bytes.index_from s 0 c].\n\n Raise [Invalid_argument] if [i] is not a valid position in [s].\n Raise [Not_found] if [c] does not occur in [s] after position [i]." + ] + }, + { + "id": "Bytes.index_from_opt", + "kind": "value", + "name": "index_from_opt", + "signature": "let index_from_opt: (bytes, int, char) => option", + "docstrings": [ + "[index_from _opts i c] returns the index of the first occurrence of\n byte [c] in [s] after position [i] or [None] if [c] does not occur in [s] after position [i].\n [Bytes.index_opt s c] is equivalent to [Bytes.index_from_opt s 0 c].\n\n Raise [Invalid_argument] if [i] is not a valid position in [s].\n @since 4.05" + ] + }, + { + "id": "Bytes.rindex_from", + "kind": "value", + "name": "rindex_from", + "signature": "let rindex_from: (bytes, int, char) => int", + "docstrings": [ + "[rindex_from s i c] returns the index of the last occurrence of\n byte [c] in [s] before position [i+1]. [rindex s c] is equivalent\n to [rindex_from s (Bytes.length s - 1) c].\n\n Raise [Invalid_argument] if [i+1] is not a valid position in [s].\n Raise [Not_found] if [c] does not occur in [s] before position [i+1]." + ] + }, + { + "id": "Bytes.rindex_from_opt", + "kind": "value", + "name": "rindex_from_opt", + "signature": "let rindex_from_opt: (bytes, int, char) => option", + "docstrings": [ + "[rindex_from_opt s i c] returns the index of the last occurrence\n of byte [c] in [s] before position [i+1] or [None] if [c] does not\n occur in [s] before position [i+1]. [rindex_opt s c] is equivalent to\n [rindex_from s (Bytes.length s - 1) c].\n\n Raise [Invalid_argument] if [i+1] is not a valid position in [s].\n @since 4.05" + ] + }, + { + "id": "Bytes.contains", + "kind": "value", + "name": "contains", + "signature": "let contains: (bytes, char) => bool", + "docstrings": [ + "[contains s c] tests if byte [c] appears in [s]." + ] + }, + { + "id": "Bytes.contains_from", + "kind": "value", + "name": "contains_from", + "signature": "let contains_from: (bytes, int, char) => bool", + "docstrings": [ + "[contains_from s start c] tests if byte [c] appears in [s] after\n position [start]. [contains s c] is equivalent to [contains_from\n s 0 c].\n\n Raise [Invalid_argument] if [start] is not a valid position in [s]." + ] + }, + { + "id": "Bytes.rcontains_from", + "kind": "value", + "name": "rcontains_from", + "signature": "let rcontains_from: (bytes, int, char) => bool", + "docstrings": [ + "[rcontains_from s stop c] tests if byte [c] appears in [s] before\n position [stop+1].\n\n Raise [Invalid_argument] if [stop < 0] or [stop+1] is not a valid\n position in [s]." + ] + }, + { + "id": "Bytes.uppercase_ascii", + "kind": "value", + "name": "uppercase_ascii", + "signature": "let uppercase_ascii: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with all lowercase letters\n translated to uppercase, using the US-ASCII character set.\n @since 4.03.0" + ] + }, + { + "id": "Bytes.lowercase_ascii", + "kind": "value", + "name": "lowercase_ascii", + "signature": "let lowercase_ascii: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with all uppercase letters\n translated to lowercase, using the US-ASCII character set.\n @since 4.03.0" + ] + }, + { + "id": "Bytes.capitalize_ascii", + "kind": "value", + "name": "capitalize_ascii", + "signature": "let capitalize_ascii: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with the first character set to uppercase,\n using the US-ASCII character set.\n @since 4.03.0" + ] + }, + { + "id": "Bytes.uncapitalize_ascii", + "kind": "value", + "name": "uncapitalize_ascii", + "signature": "let uncapitalize_ascii: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with the first character set to lowercase,\n using the US-ASCII character set.\n @since 4.03.0" + ] + }, + { + "id": "Bytes.t", + "kind": "type", + "name": "t", + "signature": "type t = bytes", + "docstrings": [ + "An alias for the type of byte sequences." + ] + }, + { + "id": "Bytes.compare", + "kind": "value", + "name": "compare", + "signature": "let compare: (t, t) => int", + "docstrings": [ + "The comparison function for byte sequences, with the same\n specification as {!Pervasives.compare}. Along with the type [t],\n this function [compare] allows the module [Bytes] to be passed as\n argument to the functors {!Set.Make} and {!Map.Make}." + ] + }, + { + "id": "Bytes.equal", + "kind": "value", + "name": "equal", + "signature": "let equal: (t, t) => bool", + "docstrings": [ + "The equality function for byte sequences.\n @since 4.03.0" + ] + }, + { + "id": "Bytes.unsafe_to_string", + "kind": "value", + "name": "unsafe_to_string", + "signature": "let unsafe_to_string: bytes => string", + "docstrings": [ + "Unsafely convert a byte sequence into a string.\n\n To reason about the use of [unsafe_to_string], it is convenient to\n consider an \"ownership\" discipline. A piece of code that\n manipulates some data \"owns\" it; there are several disjoint ownership\n modes, including:\n - Unique ownership: the data may be accessed and mutated\n - Shared ownership: the data has several owners, that may only\n access it, not mutate it.\n\n Unique ownership is linear: passing the data to another piece of\n code means giving up ownership (we cannot write the\n data again). A unique owner may decide to make the data shared\n (giving up mutation rights on it), but shared data may not become\n uniquely-owned again.\n\n [unsafe_to_string s] can only be used when the caller owns the byte\n sequence [s] -- either uniquely or as shared immutable data. The\n caller gives up ownership of [s], and gains ownership of the\n returned string.\n\n There are two valid use-cases that respect this ownership\n discipline:\n\n 1. Creating a string by initializing and mutating a byte sequence\n that is never changed after initialization is performed.\n\n {[\nlet string_init len f : string =\n let s = Bytes.create len in\n for i = 0 to len - 1 do Bytes.set s i (f i) done;\n Bytes.unsafe_to_string s\n ]}\n\n This function is safe because the byte sequence [s] will never be\n accessed or mutated after [unsafe_to_string] is called. The\n [string_init] code gives up ownership of [s], and returns the\n ownership of the resulting string to its caller.\n\n Note that it would be unsafe if [s] was passed as an additional\n parameter to the function [f] as it could escape this way and be\n mutated in the future -- [string_init] would give up ownership of\n [s] to pass it to [f], and could not call [unsafe_to_string]\n safely.\n\n We have provided the {!String.init}, {!String.map} and\n {!String.mapi} functions to cover most cases of building\n new strings. You should prefer those over [to_string] or\n [unsafe_to_string] whenever applicable.\n\n 2. Temporarily giving ownership of a byte sequence to a function\n that expects a uniquely owned string and returns ownership back, so\n that we can mutate the sequence again after the call ended.\n\n {[\nlet bytes_length (s : bytes) =\n String.length (Bytes.unsafe_to_string s)\n ]}\n\n In this use-case, we do not promise that [s] will never be mutated\n after the call to [bytes_length s]. The {!String.length} function\n temporarily borrows unique ownership of the byte sequence\n (and sees it as a [string]), but returns this ownership back to\n the caller, which may assume that [s] is still a valid byte\n sequence after the call. Note that this is only correct because we\n know that {!String.length} does not capture its argument -- it could\n escape by a side-channel such as a memoization combinator.\n\n The caller may not mutate [s] while the string is borrowed (it has\n temporarily given up ownership). This affects concurrent programs,\n but also higher-order functions: if {!String.length} returned\n a closure to be called later, [s] should not be mutated until this\n closure is fully applied and returns ownership." + ] + }, + { + "id": "Bytes.unsafe_of_string", + "kind": "value", + "name": "unsafe_of_string", + "signature": "let unsafe_of_string: string => bytes", + "docstrings": [ + "Unsafely convert a shared string to a byte sequence that should\n not be mutated.\n\n The same ownership discipline that makes [unsafe_to_string]\n correct applies to [unsafe_of_string]: you may use it if you were\n the owner of the [string] value, and you will own the return\n [bytes] in the same mode.\n\n In practice, unique ownership of string values is extremely\n difficult to reason about correctly. You should always assume\n strings are shared, never uniquely owned.\n\n For example, string literals are implicitly shared by the\n compiler, so you never uniquely own them.\n\n {[\nlet incorrect = Bytes.unsafe_of_string \"hello\"\nlet s = Bytes.of_string \"hello\"\n ]}\n\n The first declaration is incorrect, because the string literal\n [\"hello\"] could be shared by the compiler with other parts of the\n program, and mutating [incorrect] is a bug. You must always use\n the second version, which performs a copy and is thus correct.\n\n Assuming unique ownership of strings that are not string\n literals, but are (partly) built from string literals, is also\n incorrect. For example, mutating [unsafe_of_string (\"foo\" ^ s)]\n could mutate the shared string [\"foo\"] -- assuming a rope-like\n representation of strings. More generally, functions operating on\n strings will assume shared ownership, they do not preserve unique\n ownership. It is thus incorrect to assume unique ownership of the\n result of [unsafe_of_string].\n\n The only case we have reasonable confidence is safe is if the\n produced [bytes] is shared -- used as an immutable byte\n sequence. This is possibly useful for incremental migration of\n low-level programs that manipulate immutable sequences of bytes\n (for example {!Marshal.from_bytes}) and previously used the\n [string] type for this purpose." + ] + }, + { + "id": "Bytes.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (bytes, int) => char", + "docstrings": [] + }, + { + "id": "Bytes.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (bytes, int, char) => unit", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/BytesLabels.json b/index_data/api/BytesLabels.json new file mode 100644 index 000000000..74d4eaf3d --- /dev/null +++ b/index_data/api/BytesLabels.json @@ -0,0 +1,412 @@ +{ + "name": "BytesLabels", + "docstrings": [], + "items": [ + { + "id": "BytesLabels.length", + "kind": "value", + "name": "length", + "signature": "let length: bytes => int", + "docstrings": [ + "Return the length (number of bytes) of the argument." + ] + }, + { + "id": "BytesLabels.get", + "kind": "value", + "name": "get", + "signature": "let get: (bytes, int) => char", + "docstrings": [ + "[get s n] returns the byte at index [n] in argument [s].\n\n Raise [Invalid_argument] if [n] is not a valid index in [s]." + ] + }, + { + "id": "BytesLabels.set", + "kind": "value", + "name": "set", + "signature": "let set: (bytes, int, char) => unit", + "docstrings": [ + "[set s n c] modifies [s] in place, replacing the byte at index [n]\n with [c].\n\n Raise [Invalid_argument] if [n] is not a valid index in [s]." + ] + }, + { + "id": "BytesLabels.create", + "kind": "value", + "name": "create", + "signature": "let create: int => bytes", + "docstrings": [ + "[create n] returns a new byte sequence of length [n]. The\n sequence is uninitialized and contains arbitrary bytes.\n\n Raise [Invalid_argument] if [n < 0] or [n > ]{!Sys.max_string_length}." + ] + }, + { + "id": "BytesLabels.make", + "kind": "value", + "name": "make", + "signature": "let make: (int, char) => bytes", + "docstrings": [ + "[make n c] returns a new byte sequence of length [n], filled with\n the byte [c].\n\n Raise [Invalid_argument] if [n < 0] or [n > ]{!Sys.max_string_length}." + ] + }, + { + "id": "BytesLabels.init", + "kind": "value", + "name": "init", + "signature": "let init: (int, ~f: int => char) => bytes", + "docstrings": [ + "[init n f] returns a fresh byte sequence of length [n],\n with character [i] initialized to the result of [f i].\n\n Raise [Invalid_argument] if [n < 0] or [n > ]{!Sys.max_string_length}." + ] + }, + { + "id": "BytesLabels.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: bytes", + "docstrings": [ + "A byte sequence of size 0." + ] + }, + { + "id": "BytesLabels.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: bytes => bytes", + "docstrings": [ + "Return a new byte sequence that contains the same bytes as the\n argument." + ] + }, + { + "id": "BytesLabels.of_string", + "kind": "value", + "name": "of_string", + "signature": "let of_string: string => bytes", + "docstrings": [ + "Return a new byte sequence that contains the same bytes as the\n given string." + ] + }, + { + "id": "BytesLabels.to_string", + "kind": "value", + "name": "to_string", + "signature": "let to_string: bytes => string", + "docstrings": [ + "Return a new string that contains the same bytes as the given byte\n sequence." + ] + }, + { + "id": "BytesLabels.sub", + "kind": "value", + "name": "sub", + "signature": "let sub: (bytes, ~pos: int, ~len: int) => bytes", + "docstrings": [ + "[sub s start len] returns a new byte sequence of length [len],\n containing the subsequence of [s] that starts at position [start]\n and has length [len].\n\n Raise [Invalid_argument] if [start] and [len] do not designate a\n valid range of [s]." + ] + }, + { + "id": "BytesLabels.sub_string", + "kind": "value", + "name": "sub_string", + "signature": "let sub_string: (bytes, ~pos: int, ~len: int) => string", + "docstrings": [ + "Same as [sub] but return a string instead of a byte sequence." + ] + }, + { + "id": "BytesLabels.extend", + "kind": "value", + "name": "extend", + "signature": "let extend: (bytes, ~left: int, ~right: int) => bytes", + "docstrings": [ + "[extend s left right] returns a new byte sequence that contains\n the bytes of [s], with [left] uninitialized bytes prepended and\n [right] uninitialized bytes appended to it. If [left] or [right]\n is negative, then bytes are removed (instead of appended) from\n the corresponding side of [s].\n\n Raise [Invalid_argument] if the result length is negative or\n longer than {!Sys.max_string_length} bytes.\n @since 4.05.0" + ] + }, + { + "id": "BytesLabels.fill", + "kind": "value", + "name": "fill", + "signature": "let fill: (bytes, ~pos: int, ~len: int, char) => unit", + "docstrings": [ + "[fill s start len c] modifies [s] in place, replacing [len]\n characters with [c], starting at [start].\n\n Raise [Invalid_argument] if [start] and [len] do not designate a\n valid range of [s]." + ] + }, + { + "id": "BytesLabels.blit", + "kind": "value", + "name": "blit", + "signature": "let blit: (~src: bytes, ~src_pos: int, ~dst: bytes, ~dst_pos: int, ~len: int) => unit", + "docstrings": [ + "[blit src srcoff dst dstoff len] copies [len] bytes from sequence\n [src], starting at index [srcoff], to sequence [dst], starting at\n index [dstoff]. It works correctly even if [src] and [dst] are the\n same byte sequence, and the source and destination intervals\n overlap.\n\n Raise [Invalid_argument] if [srcoff] and [len] do not\n designate a valid range of [src], or if [dstoff] and [len]\n do not designate a valid range of [dst]." + ] + }, + { + "id": "BytesLabels.blit_string", + "kind": "value", + "name": "blit_string", + "signature": "let blit_string: (~src: string, ~src_pos: int, ~dst: bytes, ~dst_pos: int, ~len: int) => unit", + "docstrings": [ + "[blit src srcoff dst dstoff len] copies [len] bytes from string\n [src], starting at index [srcoff], to byte sequence [dst],\n starting at index [dstoff].\n\n Raise [Invalid_argument] if [srcoff] and [len] do not\n designate a valid range of [src], or if [dstoff] and [len]\n do not designate a valid range of [dst].\n @since 4.05.0" + ] + }, + { + "id": "BytesLabels.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (~sep: bytes, list) => bytes", + "docstrings": [ + "[concat sep sl] concatenates the list of byte sequences [sl],\n inserting the separator byte sequence [sep] between each, and\n returns the result as a new byte sequence." + ] + }, + { + "id": "BytesLabels.cat", + "kind": "value", + "name": "cat", + "signature": "let cat: (bytes, bytes) => bytes", + "docstrings": [ + "[cat s1 s2] concatenates [s1] and [s2] and returns the result\n as new byte sequence.\n\n Raise [Invalid_argument] if the result is longer than\n {!Sys.max_string_length} bytes.\n @since 4.05.0" + ] + }, + { + "id": "BytesLabels.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (~f: char => unit, bytes) => unit", + "docstrings": [ + "[iter f s] applies function [f] in turn to all the bytes of [s].\n It is equivalent to [f (get s 0); f (get s 1); ...; f (get s\n (length s - 1)); ()]." + ] + }, + { + "id": "BytesLabels.iteri", + "kind": "value", + "name": "iteri", + "signature": "let iteri: (~f: (int, char) => unit, bytes) => unit", + "docstrings": [ + "Same as {!Bytes.iter}, but the function is applied to the index of\n the byte as first argument and the byte itself as second\n argument." + ] + }, + { + "id": "BytesLabels.map", + "kind": "value", + "name": "map", + "signature": "let map: (~f: char => char, bytes) => bytes", + "docstrings": [ + "[map f s] applies function [f] in turn to all the bytes of [s] and\n stores the resulting bytes in a new sequence that is returned as\n the result." + ] + }, + { + "id": "BytesLabels.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (~f: (int, char) => char, bytes) => bytes", + "docstrings": [ + "[mapi f s] calls [f] with each character of [s] and its\n index (in increasing index order) and stores the resulting bytes\n in a new sequence that is returned as the result." + ] + }, + { + "id": "BytesLabels.trim", + "kind": "value", + "name": "trim", + "signature": "let trim: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, without leading and trailing\n whitespace. The bytes regarded as whitespace are the ASCII\n characters [' '], ['\\012'], ['\\n'], ['\\r'], and ['\\t']." + ] + }, + { + "id": "BytesLabels.escaped", + "kind": "value", + "name": "escaped", + "signature": "let escaped: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with special characters represented\n by escape sequences, following the lexical conventions of OCaml." + ] + }, + { + "id": "BytesLabels.index", + "kind": "value", + "name": "index", + "signature": "let index: (bytes, char) => int", + "docstrings": [ + "[index s c] returns the index of the first occurrence of byte [c]\n in [s].\n\n Raise [Not_found] if [c] does not occur in [s]." + ] + }, + { + "id": "BytesLabels.index_opt", + "kind": "value", + "name": "index_opt", + "signature": "let index_opt: (bytes, char) => option", + "docstrings": [ + "[index_opt s c] returns the index of the first occurrence of byte [c]\n in [s] or [None] if [c] does not occur in [s].\n @since 4.05" + ] + }, + { + "id": "BytesLabels.rindex", + "kind": "value", + "name": "rindex", + "signature": "let rindex: (bytes, char) => int", + "docstrings": [ + "[rindex s c] returns the index of the last occurrence of byte [c]\n in [s].\n\n Raise [Not_found] if [c] does not occur in [s]." + ] + }, + { + "id": "BytesLabels.rindex_opt", + "kind": "value", + "name": "rindex_opt", + "signature": "let rindex_opt: (bytes, char) => option", + "docstrings": [ + "[rindex_opt s c] returns the index of the last occurrence of byte [c]\n in [s] or [None] if [c] does not occur in [s].\n @since 4.05" + ] + }, + { + "id": "BytesLabels.index_from", + "kind": "value", + "name": "index_from", + "signature": "let index_from: (bytes, int, char) => int", + "docstrings": [ + "[index_from s i c] returns the index of the first occurrence of\n byte [c] in [s] after position [i]. [Bytes.index s c] is\n equivalent to [Bytes.index_from s 0 c].\n\n Raise [Invalid_argument] if [i] is not a valid position in [s].\n Raise [Not_found] if [c] does not occur in [s] after position [i]." + ] + }, + { + "id": "BytesLabels.index_from_opt", + "kind": "value", + "name": "index_from_opt", + "signature": "let index_from_opt: (bytes, int, char) => option", + "docstrings": [ + "[index_from _opts i c] returns the index of the first occurrence of\n byte [c] in [s] after position [i] or [None] if [c] does not occur in [s] after position [i].\n [Bytes.index_opt s c] is equivalent to [Bytes.index_from_opt s 0 c].\n\n Raise [Invalid_argument] if [i] is not a valid position in [s].\n @since 4.05" + ] + }, + { + "id": "BytesLabels.rindex_from", + "kind": "value", + "name": "rindex_from", + "signature": "let rindex_from: (bytes, int, char) => int", + "docstrings": [ + "[rindex_from s i c] returns the index of the last occurrence of\n byte [c] in [s] before position [i+1]. [rindex s c] is equivalent\n to [rindex_from s (Bytes.length s - 1) c].\n\n Raise [Invalid_argument] if [i+1] is not a valid position in [s].\n Raise [Not_found] if [c] does not occur in [s] before position [i+1]." + ] + }, + { + "id": "BytesLabels.rindex_from_opt", + "kind": "value", + "name": "rindex_from_opt", + "signature": "let rindex_from_opt: (bytes, int, char) => option", + "docstrings": [ + "[rindex_from_opt s i c] returns the index of the last occurrence\n of byte [c] in [s] before position [i+1] or [None] if [c] does not\n occur in [s] before position [i+1]. [rindex_opt s c] is equivalent to\n [rindex_from s (Bytes.length s - 1) c].\n\n Raise [Invalid_argument] if [i+1] is not a valid position in [s].\n @since 4.05" + ] + }, + { + "id": "BytesLabels.contains", + "kind": "value", + "name": "contains", + "signature": "let contains: (bytes, char) => bool", + "docstrings": [ + "[contains s c] tests if byte [c] appears in [s]." + ] + }, + { + "id": "BytesLabels.contains_from", + "kind": "value", + "name": "contains_from", + "signature": "let contains_from: (bytes, int, char) => bool", + "docstrings": [ + "[contains_from s start c] tests if byte [c] appears in [s] after\n position [start]. [contains s c] is equivalent to [contains_from\n s 0 c].\n\n Raise [Invalid_argument] if [start] is not a valid position in [s]." + ] + }, + { + "id": "BytesLabels.rcontains_from", + "kind": "value", + "name": "rcontains_from", + "signature": "let rcontains_from: (bytes, int, char) => bool", + "docstrings": [ + "[rcontains_from s stop c] tests if byte [c] appears in [s] before\n position [stop+1].\n\n Raise [Invalid_argument] if [stop < 0] or [stop+1] is not a valid\n position in [s]." + ] + }, + { + "id": "BytesLabels.uppercase_ascii", + "kind": "value", + "name": "uppercase_ascii", + "signature": "let uppercase_ascii: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with all lowercase letters\n translated to uppercase, using the US-ASCII character set.\n @since 4.05.0" + ] + }, + { + "id": "BytesLabels.lowercase_ascii", + "kind": "value", + "name": "lowercase_ascii", + "signature": "let lowercase_ascii: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with all uppercase letters\n translated to lowercase, using the US-ASCII character set.\n @since 4.05.0" + ] + }, + { + "id": "BytesLabels.capitalize_ascii", + "kind": "value", + "name": "capitalize_ascii", + "signature": "let capitalize_ascii: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with the first character set to uppercase,\n using the US-ASCII character set.\n @since 4.05.0" + ] + }, + { + "id": "BytesLabels.uncapitalize_ascii", + "kind": "value", + "name": "uncapitalize_ascii", + "signature": "let uncapitalize_ascii: bytes => bytes", + "docstrings": [ + "Return a copy of the argument, with the first character set to lowercase,\n using the US-ASCII character set.\n @since 4.05.0" + ] + }, + { + "id": "BytesLabels.t", + "kind": "type", + "name": "t", + "signature": "type t = bytes", + "docstrings": [ + "An alias for the type of byte sequences." + ] + }, + { + "id": "BytesLabels.compare", + "kind": "value", + "name": "compare", + "signature": "let compare: (t, t) => int", + "docstrings": [ + "The comparison function for byte sequences, with the same\n specification as {!Pervasives.compare}. Along with the type [t],\n this function [compare] allows the module [Bytes] to be passed as\n argument to the functors {!Set.Make} and {!Map.Make}." + ] + }, + { + "id": "BytesLabels.equal", + "kind": "value", + "name": "equal", + "signature": "let equal: (t, t) => bool", + "docstrings": [ + "The equality function for byte sequences.\n @since 4.05.0" + ] + }, + { + "id": "BytesLabels.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (bytes, int) => char", + "docstrings": [] + }, + { + "id": "BytesLabels.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (bytes, int, char) => unit", + "docstrings": [] + }, + { + "id": "BytesLabels.unsafe_to_string", + "kind": "value", + "name": "unsafe_to_string", + "signature": "let unsafe_to_string: bytes => string", + "docstrings": [] + }, + { + "id": "BytesLabels.unsafe_of_string", + "kind": "value", + "name": "unsafe_of_string", + "signature": "let unsafe_of_string: string => bytes", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Callback.json b/index_data/api/Callback.json new file mode 100644 index 000000000..d68ebfa75 --- /dev/null +++ b/index_data/api/Callback.json @@ -0,0 +1,24 @@ +{ + "name": "Callback", + "docstrings": [], + "items": [ + { + "id": "Callback.register", + "kind": "value", + "name": "register", + "signature": "let register: (string, 'a) => unit", + "docstrings": [ + "[Callback.register n v] registers the value [v] under\n the name [n]. C code can later retrieve a handle to [v]\n by calling [caml_named_value(n)]." + ] + }, + { + "id": "Callback.register_exception", + "kind": "value", + "name": "register_exception", + "signature": "let register_exception: (string, exn) => unit", + "docstrings": [ + "[Callback.register_exception n exn] registers the\n exception contained in the exception value [exn]\n under the name [n]. C code can later retrieve a handle to\n the exception by calling [caml_named_value(n)]. The exception\n value thus obtained is suitable for passing as first argument\n to [raise_constant] or [raise_with_arg]." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/CamlinternalLazy.json b/index_data/api/CamlinternalLazy.json new file mode 100644 index 000000000..e897403d0 --- /dev/null +++ b/index_data/api/CamlinternalLazy.json @@ -0,0 +1,27 @@ +{ + "name": "CamlinternalLazy", + "docstrings": [], + "items": [ + { + "id": "CamlinternalLazy.force", + "kind": "value", + "name": "force", + "signature": "let force: lazy_t<'a> => 'a", + "docstrings": [] + }, + { + "id": "CamlinternalLazy.force_val", + "kind": "value", + "name": "force_val", + "signature": "let force_val: lazy_t<'a> => 'a", + "docstrings": [] + }, + { + "id": "CamlinternalLazy.is_val", + "kind": "value", + "name": "is_val", + "signature": "let is_val: lazy_t<'a> => bool", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/CamlinternalMod.json b/index_data/api/CamlinternalMod.json new file mode 100644 index 000000000..535561364 --- /dev/null +++ b/index_data/api/CamlinternalMod.json @@ -0,0 +1,43 @@ +{ + "name": "CamlinternalMod", + "docstrings": [], + "items": [ + { + "id": "CamlinternalMod.shape", + "kind": "type", + "name": "shape", + "signature": "type shape =\\n | Function\\n | Lazy\\n | Class\\n | Module(array)\\n | Value(Obj.t)", + "docstrings": [], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Function", + "docstrings": [], + "signature": "Function" + }, + { + "constructorName": "Lazy", + "docstrings": [], + "signature": "Lazy" + }, + { + "constructorName": "Class", + "docstrings": [], + "signature": "Class" + }, + { + "constructorName": "Module", + "docstrings": [], + "signature": "Module(array)" + }, + { + "constructorName": "Value", + "docstrings": [], + "signature": "Value(Obj.t)" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/index_data/api/Char.json b/index_data/api/Char.json new file mode 100644 index 000000000..adcc38b25 --- /dev/null +++ b/index_data/api/Char.json @@ -0,0 +1,103 @@ +{ + "name": "Char", + "docstrings": [], + "items": [ + { + "id": "Char.code", + "kind": "value", + "name": "code", + "signature": "let code: char => int", + "docstrings": [ + "Return the ASCII code of the argument." + ] + }, + { + "id": "Char.chr", + "kind": "value", + "name": "chr", + "signature": "let chr: int => char", + "docstrings": [ + "Return the character with the given ASCII code.\n Raise [Invalid_argument \"Char.chr\"] if the argument is\n outside the range 0--255." + ] + }, + { + "id": "Char.escaped", + "kind": "value", + "name": "escaped", + "signature": "let escaped: char => string", + "docstrings": [ + "Return a string representing the given character,\n with special characters escaped following the lexical conventions\n of OCaml.\n All characters outside the ASCII printable range (32..126) are\n escaped, as well as backslash, double-quote, and single-quote." + ] + }, + { + "id": "Char.lowercase", + "kind": "value", + "name": "lowercase", + "signature": "let lowercase: char => char", + "docstrings": [ + "Convert the given character to its equivalent lowercase character,\n using the ISO Latin-1 (8859-1) character set.\n @deprecated Functions operating on Latin-1 character set are deprecated." + ] + }, + { + "id": "Char.uppercase", + "kind": "value", + "name": "uppercase", + "signature": "let uppercase: char => char", + "docstrings": [ + "Convert the given character to its equivalent uppercase character,\n using the ISO Latin-1 (8859-1) character set.\n @deprecated Functions operating on Latin-1 character set are deprecated." + ] + }, + { + "id": "Char.lowercase_ascii", + "kind": "value", + "name": "lowercase_ascii", + "signature": "let lowercase_ascii: char => char", + "docstrings": [ + "Convert the given character to its equivalent lowercase character,\n using the US-ASCII character set.\n @since 4.03.0" + ] + }, + { + "id": "Char.uppercase_ascii", + "kind": "value", + "name": "uppercase_ascii", + "signature": "let uppercase_ascii: char => char", + "docstrings": [ + "Convert the given character to its equivalent uppercase character,\n using the US-ASCII character set.\n @since 4.03.0" + ] + }, + { + "id": "Char.t", + "kind": "type", + "name": "t", + "signature": "type t = char", + "docstrings": [ + "An alias for the type of characters." + ] + }, + { + "id": "Char.compare", + "kind": "value", + "name": "compare", + "signature": "let compare: (t, t) => int", + "docstrings": [ + "The comparison function for characters, with the same specification as\n {!Pervasives.compare}. Along with the type [t], this function [compare]\n allows the module [Char] to be passed as argument to the functors\n {!Set.Make} and {!Map.Make}." + ] + }, + { + "id": "Char.equal", + "kind": "value", + "name": "equal", + "signature": "let equal: (t, t) => bool", + "docstrings": [ + "The equal function for chars.\n @since 4.03.0" + ] + }, + { + "id": "Char.unsafe_chr", + "kind": "value", + "name": "unsafe_chr", + "signature": "let unsafe_chr: int => char", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Complex.json b/index_data/api/Complex.json new file mode 100644 index 000000000..0dad6cf7c --- /dev/null +++ b/index_data/api/Complex.json @@ -0,0 +1,192 @@ +{ + "name": "Complex", + "docstrings": [], + "items": [ + { + "id": "Complex.t", + "kind": "type", + "name": "t", + "signature": "type t = {re: float, im: float}", + "docstrings": [ + "The type of complex numbers. [re] is the real part and [im] the\n imaginary part." + ], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "re", + "docstrings": [], + "signature": "float" + }, + { + "fieldName": "im", + "docstrings": [], + "signature": "float" + } + ] + } + }, + { + "id": "Complex.zero", + "kind": "value", + "name": "zero", + "signature": "let zero: t", + "docstrings": [ + "The complex number [0]." + ] + }, + { + "id": "Complex.one", + "kind": "value", + "name": "one", + "signature": "let one: t", + "docstrings": [ + "The complex number [1]." + ] + }, + { + "id": "Complex.i", + "kind": "value", + "name": "i", + "signature": "let i: t", + "docstrings": [ + "The complex number [i]." + ] + }, + { + "id": "Complex.neg", + "kind": "value", + "name": "neg", + "signature": "let neg: t => t", + "docstrings": [ + "Unary negation." + ] + }, + { + "id": "Complex.conj", + "kind": "value", + "name": "conj", + "signature": "let conj: t => t", + "docstrings": [ + "Conjugate: given the complex [x + i.y], returns [x - i.y]." + ] + }, + { + "id": "Complex.add", + "kind": "value", + "name": "add", + "signature": "let add: (t, t) => t", + "docstrings": [ + "Addition" + ] + }, + { + "id": "Complex.sub", + "kind": "value", + "name": "sub", + "signature": "let sub: (t, t) => t", + "docstrings": [ + "Subtraction" + ] + }, + { + "id": "Complex.mul", + "kind": "value", + "name": "mul", + "signature": "let mul: (t, t) => t", + "docstrings": [ + "Multiplication" + ] + }, + { + "id": "Complex.inv", + "kind": "value", + "name": "inv", + "signature": "let inv: t => t", + "docstrings": [ + "Multiplicative inverse ([1/z])." + ] + }, + { + "id": "Complex.div", + "kind": "value", + "name": "div", + "signature": "let div: (t, t) => t", + "docstrings": [ + "Division" + ] + }, + { + "id": "Complex.sqrt", + "kind": "value", + "name": "sqrt", + "signature": "let sqrt: t => t", + "docstrings": [ + "Square root. The result [x + i.y] is such that [x > 0] or\n [x = 0] and [y >= 0].\n This function has a discontinuity along the negative real axis." + ] + }, + { + "id": "Complex.norm2", + "kind": "value", + "name": "norm2", + "signature": "let norm2: t => float", + "docstrings": [ + "Norm squared: given [x + i.y], returns [x^2 + y^2]." + ] + }, + { + "id": "Complex.norm", + "kind": "value", + "name": "norm", + "signature": "let norm: t => float", + "docstrings": [ + "Norm: given [x + i.y], returns [sqrt(x^2 + y^2)]." + ] + }, + { + "id": "Complex.arg", + "kind": "value", + "name": "arg", + "signature": "let arg: t => float", + "docstrings": [ + "Argument. The argument of a complex number is the angle\n in the complex plane between the positive real axis and a line\n passing through zero and the number. This angle ranges from\n [-pi] to [pi]. This function has a discontinuity along the\n negative real axis." + ] + }, + { + "id": "Complex.polar", + "kind": "value", + "name": "polar", + "signature": "let polar: (float, float) => t", + "docstrings": [ + "[polar norm arg] returns the complex having norm [norm]\n and argument [arg]." + ] + }, + { + "id": "Complex.exp", + "kind": "value", + "name": "exp", + "signature": "let exp: t => t", + "docstrings": [ + "Exponentiation. [exp z] returns [e] to the [z] power." + ] + }, + { + "id": "Complex.log", + "kind": "value", + "name": "log", + "signature": "let log: t => t", + "docstrings": [ + "Natural logarithm (in base [e])." + ] + }, + { + "id": "Complex.pow", + "kind": "value", + "name": "pow", + "signature": "let pow: (t, t) => t", + "docstrings": [ + "Power function. [pow z1 z2] returns [z1] to the [z2] power." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Digest.json b/index_data/api/Digest.json new file mode 100644 index 000000000..1fb0f9eec --- /dev/null +++ b/index_data/api/Digest.json @@ -0,0 +1,87 @@ +{ + "name": "Digest", + "docstrings": [], + "items": [ + { + "id": "Digest.t", + "kind": "type", + "name": "t", + "signature": "type t = string", + "docstrings": [ + "The type of digests: 16-character strings." + ] + }, + { + "id": "Digest.compare", + "kind": "value", + "name": "compare", + "signature": "let compare: (t, t) => int", + "docstrings": [ + "The comparison function for 16-character digest, with the same\n specification as {!Pervasives.compare} and the implementation\n shared with {!String.compare}. Along with the type [t], this\n function [compare] allows the module [Digest] to be passed as\n argument to the functors {!Set.Make} and {!Map.Make}.\n @since 4.00.0" + ] + }, + { + "id": "Digest.equal", + "kind": "value", + "name": "equal", + "signature": "let equal: (t, t) => bool", + "docstrings": [ + "The equal function for 16-character digest.\n @since 4.03.0" + ] + }, + { + "id": "Digest.string", + "kind": "value", + "name": "string", + "signature": "let string: string => t", + "docstrings": [ + "Return the digest of the given string." + ] + }, + { + "id": "Digest.bytes", + "kind": "value", + "name": "bytes", + "signature": "let bytes: bytes => t", + "docstrings": [ + "Return the digest of the given byte sequence.\n @since 4.02.0" + ] + }, + { + "id": "Digest.substring", + "kind": "value", + "name": "substring", + "signature": "let substring: (string, int, int) => t", + "docstrings": [ + "[Digest.substring s ofs len] returns the digest of the substring\n of [s] starting at index [ofs] and containing [len] characters." + ] + }, + { + "id": "Digest.subbytes", + "kind": "value", + "name": "subbytes", + "signature": "let subbytes: (bytes, int, int) => t", + "docstrings": [ + "[Digest.subbytes s ofs len] returns the digest of the subsequence\n of [s] starting at index [ofs] and containing [len] bytes.\n @since 4.02.0" + ] + }, + { + "id": "Digest.to_hex", + "kind": "value", + "name": "to_hex", + "signature": "let to_hex: t => string", + "docstrings": [ + "Return the printable hexadecimal representation of the given digest.\n Raise [Invalid_argument] if the argument is not exactly 16 bytes." + ] + }, + { + "id": "Digest.from_hex", + "kind": "value", + "name": "from_hex", + "signature": "let from_hex: string => t", + "docstrings": [ + "Convert a hexadecimal representation back into the corresponding digest.\n Raise [Invalid_argument] if the argument is not exactly 32 hexadecimal\n characters.\n @since 4.00.0" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Dom.json b/index_data/api/Dom.json new file mode 100644 index 000000000..ef65d2e71 --- /dev/null +++ b/index_data/api/Dom.json @@ -0,0 +1,1841 @@ +{ + "name": "Dom", + "docstrings": [], + "items": [ + { + "id": "Dom._baseClass", + "kind": "type", + "name": "_baseClass", + "signature": "type _baseClass", + "docstrings": [] + }, + { + "id": "Dom.animation", + "kind": "type", + "name": "animation", + "signature": "type animation", + "docstrings": [] + }, + { + "id": "Dom.cssStyleDeclaration", + "kind": "type", + "name": "cssStyleDeclaration", + "signature": "type cssStyleDeclaration", + "docstrings": [] + }, + { + "id": "Dom.cssStyleSheet", + "kind": "type", + "name": "cssStyleSheet", + "signature": "type cssStyleSheet", + "docstrings": [] + }, + { + "id": "Dom.eventTarget_like", + "kind": "type", + "name": "eventTarget_like", + "signature": "type eventTarget_like<'a>", + "docstrings": [] + }, + { + "id": "Dom.eventTarget", + "kind": "type", + "name": "eventTarget", + "signature": "type eventTarget = eventTarget_like<_baseClass>", + "docstrings": [] + }, + { + "id": "Dom._node", + "kind": "type", + "name": "_node", + "signature": "type _node<'a>", + "docstrings": [] + }, + { + "id": "Dom.node_like", + "kind": "type", + "name": "node_like", + "signature": "type node_like<'a> = eventTarget_like<_node<'a>>", + "docstrings": [] + }, + { + "id": "Dom.node", + "kind": "type", + "name": "node", + "signature": "type node = node_like<_baseClass>", + "docstrings": [] + }, + { + "id": "Dom._attr", + "kind": "type", + "name": "_attr", + "signature": "type _attr", + "docstrings": [] + }, + { + "id": "Dom.attr", + "kind": "type", + "name": "attr", + "signature": "type attr = node_like<_attr>", + "docstrings": [] + }, + { + "id": "Dom._characterData", + "kind": "type", + "name": "_characterData", + "signature": "type _characterData<'a>", + "docstrings": [] + }, + { + "id": "Dom.characterData_like", + "kind": "type", + "name": "characterData_like", + "signature": "type characterData_like<'a> = node_like<_characterData<'a>>", + "docstrings": [] + }, + { + "id": "Dom.characterData", + "kind": "type", + "name": "characterData", + "signature": "type characterData = characterData_like<_baseClass>", + "docstrings": [] + }, + { + "id": "Dom._cdataSection", + "kind": "type", + "name": "_cdataSection", + "signature": "type _cdataSection", + "docstrings": [] + }, + { + "id": "Dom.cdataSection", + "kind": "type", + "name": "cdataSection", + "signature": "type cdataSection = characterData_like<_cdataSection>", + "docstrings": [] + }, + { + "id": "Dom._comment", + "kind": "type", + "name": "_comment", + "signature": "type _comment", + "docstrings": [] + }, + { + "id": "Dom.comment", + "kind": "type", + "name": "comment", + "signature": "type comment = characterData_like<_comment>", + "docstrings": [] + }, + { + "id": "Dom._document", + "kind": "type", + "name": "_document", + "signature": "type _document<'a>", + "docstrings": [] + }, + { + "id": "Dom.document_like", + "kind": "type", + "name": "document_like", + "signature": "type document_like<'a> = node_like<_document<'a>>", + "docstrings": [] + }, + { + "id": "Dom.document", + "kind": "type", + "name": "document", + "signature": "type document = document_like<_baseClass>", + "docstrings": [] + }, + { + "id": "Dom._documentFragment", + "kind": "type", + "name": "_documentFragment", + "signature": "type _documentFragment", + "docstrings": [] + }, + { + "id": "Dom.documentFragment", + "kind": "type", + "name": "documentFragment", + "signature": "type documentFragment = node_like<_documentFragment>", + "docstrings": [] + }, + { + "id": "Dom._documentType", + "kind": "type", + "name": "_documentType", + "signature": "type _documentType", + "docstrings": [] + }, + { + "id": "Dom.documentType", + "kind": "type", + "name": "documentType", + "signature": "type documentType = node_like<_documentType>", + "docstrings": [] + }, + { + "id": "Dom.domImplementation", + "kind": "type", + "name": "domImplementation", + "signature": "type domImplementation", + "docstrings": [] + }, + { + "id": "Dom._element", + "kind": "type", + "name": "_element", + "signature": "type _element<'a>", + "docstrings": [] + }, + { + "id": "Dom.element_like", + "kind": "type", + "name": "element_like", + "signature": "type element_like<'a> = node_like<_element<'a>>", + "docstrings": [] + }, + { + "id": "Dom.element", + "kind": "type", + "name": "element", + "signature": "type element = element_like<_baseClass>", + "docstrings": [] + }, + { + "id": "Dom.htmlCollection", + "kind": "type", + "name": "htmlCollection", + "signature": "type htmlCollection", + "docstrings": [] + }, + { + "id": "Dom.htmlFormControlsCollection", + "kind": "type", + "name": "htmlFormControlsCollection", + "signature": "type htmlFormControlsCollection", + "docstrings": [] + }, + { + "id": "Dom.htmlOptionsCollection", + "kind": "type", + "name": "htmlOptionsCollection", + "signature": "type htmlOptionsCollection", + "docstrings": [] + }, + { + "id": "Dom.intersectionObserver", + "kind": "type", + "name": "intersectionObserver", + "signature": "type intersectionObserver", + "docstrings": [] + }, + { + "id": "Dom.intersectionObserverEntry", + "kind": "type", + "name": "intersectionObserverEntry", + "signature": "type intersectionObserverEntry", + "docstrings": [] + }, + { + "id": "Dom.mutationObserver", + "kind": "type", + "name": "mutationObserver", + "signature": "type mutationObserver", + "docstrings": [] + }, + { + "id": "Dom.mutationRecord", + "kind": "type", + "name": "mutationRecord", + "signature": "type mutationRecord", + "docstrings": [] + }, + { + "id": "Dom.performanceObserver", + "kind": "type", + "name": "performanceObserver", + "signature": "type performanceObserver", + "docstrings": [] + }, + { + "id": "Dom.performanceObserverEntryList", + "kind": "type", + "name": "performanceObserverEntryList", + "signature": "type performanceObserverEntryList", + "docstrings": [] + }, + { + "id": "Dom.reportingObserver", + "kind": "type", + "name": "reportingObserver", + "signature": "type reportingObserver", + "docstrings": [] + }, + { + "id": "Dom.reportingObserverOptions", + "kind": "type", + "name": "reportingObserverOptions", + "signature": "type reportingObserverOptions", + "docstrings": [] + }, + { + "id": "Dom.resizeObserver", + "kind": "type", + "name": "resizeObserver", + "signature": "type resizeObserver", + "docstrings": [] + }, + { + "id": "Dom.resizeObserverEntry", + "kind": "type", + "name": "resizeObserverEntry", + "signature": "type resizeObserverEntry", + "docstrings": [] + }, + { + "id": "Dom.namedNodeMap", + "kind": "type", + "name": "namedNodeMap", + "signature": "type namedNodeMap", + "docstrings": [] + }, + { + "id": "Dom.nodeList", + "kind": "type", + "name": "nodeList", + "signature": "type nodeList", + "docstrings": [] + }, + { + "id": "Dom.radioNodeList", + "kind": "type", + "name": "radioNodeList", + "signature": "type radioNodeList", + "docstrings": [] + }, + { + "id": "Dom.processingInstruction", + "kind": "type", + "name": "processingInstruction", + "signature": "type processingInstruction", + "docstrings": [] + }, + { + "id": "Dom._shadowRoot", + "kind": "type", + "name": "_shadowRoot", + "signature": "type _shadowRoot", + "docstrings": [] + }, + { + "id": "Dom.shadowRoot", + "kind": "type", + "name": "shadowRoot", + "signature": "type shadowRoot = node_like<_shadowRoot>", + "docstrings": [] + }, + { + "id": "Dom._text", + "kind": "type", + "name": "_text", + "signature": "type _text", + "docstrings": [] + }, + { + "id": "Dom.text", + "kind": "type", + "name": "text", + "signature": "type text = characterData_like<_text>", + "docstrings": [] + }, + { + "id": "Dom.domRect", + "kind": "type", + "name": "domRect", + "signature": "type domRect", + "docstrings": [] + }, + { + "id": "Dom.dataTransfer", + "kind": "type", + "name": "dataTransfer", + "signature": "type dataTransfer", + "docstrings": [] + }, + { + "id": "Dom.domStringMap", + "kind": "type", + "name": "domStringMap", + "signature": "type domStringMap", + "docstrings": [] + }, + { + "id": "Dom.history", + "kind": "type", + "name": "history", + "signature": "type history", + "docstrings": [] + }, + { + "id": "Dom._htmlDocument", + "kind": "type", + "name": "_htmlDocument", + "signature": "type _htmlDocument", + "docstrings": [] + }, + { + "id": "Dom.htmlDocument", + "kind": "type", + "name": "htmlDocument", + "signature": "type htmlDocument = document_like<_htmlDocument>", + "docstrings": [] + }, + { + "id": "Dom._htmlElement", + "kind": "type", + "name": "_htmlElement", + "signature": "type _htmlElement<'a>", + "docstrings": [] + }, + { + "id": "Dom.htmlElement_like", + "kind": "type", + "name": "htmlElement_like", + "signature": "type htmlElement_like<'a> = element_like<_htmlElement<'a>>", + "docstrings": [] + }, + { + "id": "Dom.htmlElement", + "kind": "type", + "name": "htmlElement", + "signature": "type htmlElement = htmlElement_like<_baseClass>", + "docstrings": [] + }, + { + "id": "Dom._htmlAnchorElement", + "kind": "type", + "name": "_htmlAnchorElement", + "signature": "type _htmlAnchorElement", + "docstrings": [] + }, + { + "id": "Dom.htmlAnchorElement", + "kind": "type", + "name": "htmlAnchorElement", + "signature": "type htmlAnchorElement = htmlElement_like<_htmlAnchorElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlAreaElement", + "kind": "type", + "name": "_htmlAreaElement", + "signature": "type _htmlAreaElement", + "docstrings": [] + }, + { + "id": "Dom.htmlAreaElement", + "kind": "type", + "name": "htmlAreaElement", + "signature": "type htmlAreaElement = htmlElement_like<_htmlAreaElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlAudioElement", + "kind": "type", + "name": "_htmlAudioElement", + "signature": "type _htmlAudioElement", + "docstrings": [] + }, + { + "id": "Dom.htmlAudioElement", + "kind": "type", + "name": "htmlAudioElement", + "signature": "type htmlAudioElement = htmlElement_like<_htmlAudioElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlBaseElement", + "kind": "type", + "name": "_htmlBaseElement", + "signature": "type _htmlBaseElement", + "docstrings": [] + }, + { + "id": "Dom.htmlBaseElement", + "kind": "type", + "name": "htmlBaseElement", + "signature": "type htmlBaseElement = htmlElement_like<_htmlBaseElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlBodyElement", + "kind": "type", + "name": "_htmlBodyElement", + "signature": "type _htmlBodyElement", + "docstrings": [] + }, + { + "id": "Dom.htmlBodyElement", + "kind": "type", + "name": "htmlBodyElement", + "signature": "type htmlBodyElement = htmlElement_like<_htmlBodyElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlBrElement", + "kind": "type", + "name": "_htmlBrElement", + "signature": "type _htmlBrElement", + "docstrings": [] + }, + { + "id": "Dom.htmlBrElement", + "kind": "type", + "name": "htmlBrElement", + "signature": "type htmlBrElement = htmlElement_like<_htmlBrElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlButtonElement", + "kind": "type", + "name": "_htmlButtonElement", + "signature": "type _htmlButtonElement", + "docstrings": [] + }, + { + "id": "Dom.htmlButtonElement", + "kind": "type", + "name": "htmlButtonElement", + "signature": "type htmlButtonElement = htmlElement_like<_htmlButtonElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlCanvasElement", + "kind": "type", + "name": "_htmlCanvasElement", + "signature": "type _htmlCanvasElement", + "docstrings": [] + }, + { + "id": "Dom.htmlCanvasElement", + "kind": "type", + "name": "htmlCanvasElement", + "signature": "type htmlCanvasElement = htmlElement_like<_htmlCanvasElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlDataElement", + "kind": "type", + "name": "_htmlDataElement", + "signature": "type _htmlDataElement", + "docstrings": [] + }, + { + "id": "Dom.htmlDataElement", + "kind": "type", + "name": "htmlDataElement", + "signature": "type htmlDataElement = htmlElement_like<_htmlDataElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlDataListElement", + "kind": "type", + "name": "_htmlDataListElement", + "signature": "type _htmlDataListElement", + "docstrings": [] + }, + { + "id": "Dom.htmlDataListElement", + "kind": "type", + "name": "htmlDataListElement", + "signature": "type htmlDataListElement = htmlElement_like<_htmlDataListElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlDialogElement", + "kind": "type", + "name": "_htmlDialogElement", + "signature": "type _htmlDialogElement", + "docstrings": [] + }, + { + "id": "Dom.htmlDialogElement", + "kind": "type", + "name": "htmlDialogElement", + "signature": "type htmlDialogElement = htmlElement_like<_htmlDialogElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlDivElement", + "kind": "type", + "name": "_htmlDivElement", + "signature": "type _htmlDivElement", + "docstrings": [] + }, + { + "id": "Dom.htmlDivElement", + "kind": "type", + "name": "htmlDivElement", + "signature": "type htmlDivElement = htmlElement_like<_htmlDivElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlDlistElement", + "kind": "type", + "name": "_htmlDlistElement", + "signature": "type _htmlDlistElement", + "docstrings": [] + }, + { + "id": "Dom.htmlDlistElement", + "kind": "type", + "name": "htmlDlistElement", + "signature": "type htmlDlistElement = htmlElement_like<_htmlDlistElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlEmbedElement", + "kind": "type", + "name": "_htmlEmbedElement", + "signature": "type _htmlEmbedElement", + "docstrings": [] + }, + { + "id": "Dom.htmlEmbedElement", + "kind": "type", + "name": "htmlEmbedElement", + "signature": "type htmlEmbedElement = htmlElement_like<_htmlEmbedElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlFieldSetElement", + "kind": "type", + "name": "_htmlFieldSetElement", + "signature": "type _htmlFieldSetElement", + "docstrings": [] + }, + { + "id": "Dom.htmlFieldSetElement", + "kind": "type", + "name": "htmlFieldSetElement", + "signature": "type htmlFieldSetElement = htmlElement_like<_htmlFieldSetElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlFormElement", + "kind": "type", + "name": "_htmlFormElement", + "signature": "type _htmlFormElement", + "docstrings": [] + }, + { + "id": "Dom.htmlFormElement", + "kind": "type", + "name": "htmlFormElement", + "signature": "type htmlFormElement = htmlElement_like<_htmlFormElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlHeadElement", + "kind": "type", + "name": "_htmlHeadElement", + "signature": "type _htmlHeadElement", + "docstrings": [] + }, + { + "id": "Dom.htmlHeadElement", + "kind": "type", + "name": "htmlHeadElement", + "signature": "type htmlHeadElement = htmlElement_like<_htmlHeadElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlHeadingElement", + "kind": "type", + "name": "_htmlHeadingElement", + "signature": "type _htmlHeadingElement", + "docstrings": [] + }, + { + "id": "Dom.htmlHeadingElement", + "kind": "type", + "name": "htmlHeadingElement", + "signature": "type htmlHeadingElement = htmlElement_like<_htmlHeadingElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlHrElement", + "kind": "type", + "name": "_htmlHrElement", + "signature": "type _htmlHrElement", + "docstrings": [] + }, + { + "id": "Dom.htmlHrElement", + "kind": "type", + "name": "htmlHrElement", + "signature": "type htmlHrElement = htmlElement_like<_htmlHrElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlHtmlElement", + "kind": "type", + "name": "_htmlHtmlElement", + "signature": "type _htmlHtmlElement", + "docstrings": [] + }, + { + "id": "Dom.htmlHtmlElement", + "kind": "type", + "name": "htmlHtmlElement", + "signature": "type htmlHtmlElement = htmlElement_like<_htmlHtmlElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlIframeElement", + "kind": "type", + "name": "_htmlIframeElement", + "signature": "type _htmlIframeElement", + "docstrings": [] + }, + { + "id": "Dom.htmlIframeElement", + "kind": "type", + "name": "htmlIframeElement", + "signature": "type htmlIframeElement = htmlElement_like<_htmlIframeElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlImageElement", + "kind": "type", + "name": "_htmlImageElement", + "signature": "type _htmlImageElement", + "docstrings": [] + }, + { + "id": "Dom.htmlImageElement", + "kind": "type", + "name": "htmlImageElement", + "signature": "type htmlImageElement = htmlElement_like<_htmlImageElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlInputElement", + "kind": "type", + "name": "_htmlInputElement", + "signature": "type _htmlInputElement", + "docstrings": [] + }, + { + "id": "Dom.htmlInputElement", + "kind": "type", + "name": "htmlInputElement", + "signature": "type htmlInputElement = htmlElement_like<_htmlInputElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlLabelElement", + "kind": "type", + "name": "_htmlLabelElement", + "signature": "type _htmlLabelElement", + "docstrings": [] + }, + { + "id": "Dom.htmlLabelElement", + "kind": "type", + "name": "htmlLabelElement", + "signature": "type htmlLabelElement = htmlElement_like<_htmlLabelElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlLegendElement", + "kind": "type", + "name": "_htmlLegendElement", + "signature": "type _htmlLegendElement", + "docstrings": [] + }, + { + "id": "Dom.htmlLegendElement", + "kind": "type", + "name": "htmlLegendElement", + "signature": "type htmlLegendElement = htmlElement_like<_htmlLegendElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlLiElement", + "kind": "type", + "name": "_htmlLiElement", + "signature": "type _htmlLiElement", + "docstrings": [] + }, + { + "id": "Dom.htmlLiElement", + "kind": "type", + "name": "htmlLiElement", + "signature": "type htmlLiElement = htmlElement_like<_htmlLiElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlLinkElement", + "kind": "type", + "name": "_htmlLinkElement", + "signature": "type _htmlLinkElement", + "docstrings": [] + }, + { + "id": "Dom.htmlLinkElement", + "kind": "type", + "name": "htmlLinkElement", + "signature": "type htmlLinkElement = htmlElement_like<_htmlLinkElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlMapElement", + "kind": "type", + "name": "_htmlMapElement", + "signature": "type _htmlMapElement", + "docstrings": [] + }, + { + "id": "Dom.htmlMapElement", + "kind": "type", + "name": "htmlMapElement", + "signature": "type htmlMapElement = htmlElement_like<_htmlMapElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlMediaElement", + "kind": "type", + "name": "_htmlMediaElement", + "signature": "type _htmlMediaElement", + "docstrings": [] + }, + { + "id": "Dom.htmlMediaElement", + "kind": "type", + "name": "htmlMediaElement", + "signature": "type htmlMediaElement = htmlElement_like<_htmlMediaElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlMenuElement", + "kind": "type", + "name": "_htmlMenuElement", + "signature": "type _htmlMenuElement", + "docstrings": [] + }, + { + "id": "Dom.htmlMenuElement", + "kind": "type", + "name": "htmlMenuElement", + "signature": "type htmlMenuElement = htmlElement_like<_htmlMenuElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlMetaElement", + "kind": "type", + "name": "_htmlMetaElement", + "signature": "type _htmlMetaElement", + "docstrings": [] + }, + { + "id": "Dom.htmlMetaElement", + "kind": "type", + "name": "htmlMetaElement", + "signature": "type htmlMetaElement = htmlElement_like<_htmlMetaElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlMeterElement", + "kind": "type", + "name": "_htmlMeterElement", + "signature": "type _htmlMeterElement", + "docstrings": [] + }, + { + "id": "Dom.htmlMeterElement", + "kind": "type", + "name": "htmlMeterElement", + "signature": "type htmlMeterElement = htmlElement_like<_htmlMeterElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlModElement", + "kind": "type", + "name": "_htmlModElement", + "signature": "type _htmlModElement", + "docstrings": [] + }, + { + "id": "Dom.htmlModElement", + "kind": "type", + "name": "htmlModElement", + "signature": "type htmlModElement = htmlElement_like<_htmlModElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlOListElement", + "kind": "type", + "name": "_htmlOListElement", + "signature": "type _htmlOListElement", + "docstrings": [] + }, + { + "id": "Dom.htmlOListElement", + "kind": "type", + "name": "htmlOListElement", + "signature": "type htmlOListElement = htmlElement_like<_htmlOListElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlObjectElement", + "kind": "type", + "name": "_htmlObjectElement", + "signature": "type _htmlObjectElement", + "docstrings": [] + }, + { + "id": "Dom.htmlObjectElement", + "kind": "type", + "name": "htmlObjectElement", + "signature": "type htmlObjectElement = htmlElement_like<_htmlObjectElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlOptGroupElement", + "kind": "type", + "name": "_htmlOptGroupElement", + "signature": "type _htmlOptGroupElement", + "docstrings": [] + }, + { + "id": "Dom.htmlOptGroupElement", + "kind": "type", + "name": "htmlOptGroupElement", + "signature": "type htmlOptGroupElement = htmlElement_like<_htmlOptGroupElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlOptionElement", + "kind": "type", + "name": "_htmlOptionElement", + "signature": "type _htmlOptionElement", + "docstrings": [] + }, + { + "id": "Dom.htmlOptionElement", + "kind": "type", + "name": "htmlOptionElement", + "signature": "type htmlOptionElement = htmlElement_like<_htmlOptionElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlOutputElement", + "kind": "type", + "name": "_htmlOutputElement", + "signature": "type _htmlOutputElement", + "docstrings": [] + }, + { + "id": "Dom.htmlOutputElement", + "kind": "type", + "name": "htmlOutputElement", + "signature": "type htmlOutputElement = htmlElement_like<_htmlOutputElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlParagraphElement", + "kind": "type", + "name": "_htmlParagraphElement", + "signature": "type _htmlParagraphElement", + "docstrings": [] + }, + { + "id": "Dom.htmlParagraphElement", + "kind": "type", + "name": "htmlParagraphElement", + "signature": "type htmlParagraphElement = htmlElement_like<_htmlParagraphElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlParamElement", + "kind": "type", + "name": "_htmlParamElement", + "signature": "type _htmlParamElement", + "docstrings": [] + }, + { + "id": "Dom.htmlParamElement", + "kind": "type", + "name": "htmlParamElement", + "signature": "type htmlParamElement = htmlElement_like<_htmlParamElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlPreElement", + "kind": "type", + "name": "_htmlPreElement", + "signature": "type _htmlPreElement", + "docstrings": [] + }, + { + "id": "Dom.htmlPreElement", + "kind": "type", + "name": "htmlPreElement", + "signature": "type htmlPreElement = htmlElement_like<_htmlPreElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlProgressElement", + "kind": "type", + "name": "_htmlProgressElement", + "signature": "type _htmlProgressElement", + "docstrings": [] + }, + { + "id": "Dom.htmlProgressElement", + "kind": "type", + "name": "htmlProgressElement", + "signature": "type htmlProgressElement = htmlElement_like<_htmlProgressElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlQuoteElement", + "kind": "type", + "name": "_htmlQuoteElement", + "signature": "type _htmlQuoteElement", + "docstrings": [] + }, + { + "id": "Dom.htmlQuoteElement", + "kind": "type", + "name": "htmlQuoteElement", + "signature": "type htmlQuoteElement = htmlElement_like<_htmlQuoteElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlScriptElement", + "kind": "type", + "name": "_htmlScriptElement", + "signature": "type _htmlScriptElement", + "docstrings": [] + }, + { + "id": "Dom.htmlScriptElement", + "kind": "type", + "name": "htmlScriptElement", + "signature": "type htmlScriptElement = htmlElement_like<_htmlScriptElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlSelectElement", + "kind": "type", + "name": "_htmlSelectElement", + "signature": "type _htmlSelectElement", + "docstrings": [] + }, + { + "id": "Dom.htmlSelectElement", + "kind": "type", + "name": "htmlSelectElement", + "signature": "type htmlSelectElement = htmlElement_like<_htmlSelectElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlSlotElement", + "kind": "type", + "name": "_htmlSlotElement", + "signature": "type _htmlSlotElement", + "docstrings": [] + }, + { + "id": "Dom.htmlSlotElement", + "kind": "type", + "name": "htmlSlotElement", + "signature": "type htmlSlotElement = htmlElement_like<_htmlSlotElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlSourceElement", + "kind": "type", + "name": "_htmlSourceElement", + "signature": "type _htmlSourceElement", + "docstrings": [] + }, + { + "id": "Dom.htmlSourceElement", + "kind": "type", + "name": "htmlSourceElement", + "signature": "type htmlSourceElement = htmlElement_like<_htmlSourceElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlSpanElement", + "kind": "type", + "name": "_htmlSpanElement", + "signature": "type _htmlSpanElement", + "docstrings": [] + }, + { + "id": "Dom.htmlSpanElement", + "kind": "type", + "name": "htmlSpanElement", + "signature": "type htmlSpanElement = htmlElement_like<_htmlSpanElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlStyleElement", + "kind": "type", + "name": "_htmlStyleElement", + "signature": "type _htmlStyleElement", + "docstrings": [] + }, + { + "id": "Dom.htmlStyleElement", + "kind": "type", + "name": "htmlStyleElement", + "signature": "type htmlStyleElement = htmlElement_like<_htmlStyleElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTableCaptionElement", + "kind": "type", + "name": "_htmlTableCaptionElement", + "signature": "type _htmlTableCaptionElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTableCaptionElement", + "kind": "type", + "name": "htmlTableCaptionElement", + "signature": "type htmlTableCaptionElement = htmlElement_like<_htmlTableCaptionElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTableCellElement", + "kind": "type", + "name": "_htmlTableCellElement", + "signature": "type _htmlTableCellElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTableCellElement", + "kind": "type", + "name": "htmlTableCellElement", + "signature": "type htmlTableCellElement = htmlElement_like<_htmlTableCellElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTableColElement", + "kind": "type", + "name": "_htmlTableColElement", + "signature": "type _htmlTableColElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTableColElement", + "kind": "type", + "name": "htmlTableColElement", + "signature": "type htmlTableColElement = htmlElement_like<_htmlTableColElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTableDataCellElement", + "kind": "type", + "name": "_htmlTableDataCellElement", + "signature": "type _htmlTableDataCellElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTableDataCellElement", + "kind": "type", + "name": "htmlTableDataCellElement", + "signature": "type htmlTableDataCellElement = htmlElement_like<_htmlTableDataCellElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTableElement", + "kind": "type", + "name": "_htmlTableElement", + "signature": "type _htmlTableElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTableElement", + "kind": "type", + "name": "htmlTableElement", + "signature": "type htmlTableElement = htmlElement_like<_htmlTableElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTableHeaderCellElement", + "kind": "type", + "name": "_htmlTableHeaderCellElement", + "signature": "type _htmlTableHeaderCellElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTableHeaderCellElement", + "kind": "type", + "name": "htmlTableHeaderCellElement", + "signature": "type htmlTableHeaderCellElement = htmlElement_like<_htmlTableHeaderCellElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTableRowElement", + "kind": "type", + "name": "_htmlTableRowElement", + "signature": "type _htmlTableRowElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTableRowElement", + "kind": "type", + "name": "htmlTableRowElement", + "signature": "type htmlTableRowElement = htmlElement_like<_htmlTableRowElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTableSectionElement", + "kind": "type", + "name": "_htmlTableSectionElement", + "signature": "type _htmlTableSectionElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTableSectionElement", + "kind": "type", + "name": "htmlTableSectionElement", + "signature": "type htmlTableSectionElement = htmlElement_like<_htmlTableSectionElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTextAreaElement", + "kind": "type", + "name": "_htmlTextAreaElement", + "signature": "type _htmlTextAreaElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTextAreaElement", + "kind": "type", + "name": "htmlTextAreaElement", + "signature": "type htmlTextAreaElement = htmlElement_like<_htmlTextAreaElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTimeElement", + "kind": "type", + "name": "_htmlTimeElement", + "signature": "type _htmlTimeElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTimeElement", + "kind": "type", + "name": "htmlTimeElement", + "signature": "type htmlTimeElement = htmlElement_like<_htmlTimeElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTitleElement", + "kind": "type", + "name": "_htmlTitleElement", + "signature": "type _htmlTitleElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTitleElement", + "kind": "type", + "name": "htmlTitleElement", + "signature": "type htmlTitleElement = htmlElement_like<_htmlTitleElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlTrackElement", + "kind": "type", + "name": "_htmlTrackElement", + "signature": "type _htmlTrackElement", + "docstrings": [] + }, + { + "id": "Dom.htmlTrackElement", + "kind": "type", + "name": "htmlTrackElement", + "signature": "type htmlTrackElement = htmlElement_like<_htmlTrackElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlUlistElement", + "kind": "type", + "name": "_htmlUlistElement", + "signature": "type _htmlUlistElement", + "docstrings": [] + }, + { + "id": "Dom.htmlUlistElement", + "kind": "type", + "name": "htmlUlistElement", + "signature": "type htmlUlistElement = htmlElement_like<_htmlUlistElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlUnknownElement", + "kind": "type", + "name": "_htmlUnknownElement", + "signature": "type _htmlUnknownElement", + "docstrings": [] + }, + { + "id": "Dom.htmlUnknownElement", + "kind": "type", + "name": "htmlUnknownElement", + "signature": "type htmlUnknownElement = htmlElement_like<_htmlUnknownElement>", + "docstrings": [] + }, + { + "id": "Dom._htmlVideoElement", + "kind": "type", + "name": "_htmlVideoElement", + "signature": "type _htmlVideoElement", + "docstrings": [] + }, + { + "id": "Dom.htmlVideoElement", + "kind": "type", + "name": "htmlVideoElement", + "signature": "type htmlVideoElement = htmlElement_like<_htmlVideoElement>", + "docstrings": [] + }, + { + "id": "Dom.location", + "kind": "type", + "name": "location", + "signature": "type location", + "docstrings": [] + }, + { + "id": "Dom.window", + "kind": "type", + "name": "window", + "signature": "type window", + "docstrings": [] + }, + { + "id": "Dom._xmlDocument", + "kind": "type", + "name": "_xmlDocument", + "signature": "type _xmlDocument", + "docstrings": [] + }, + { + "id": "Dom.xmlDocument", + "kind": "type", + "name": "xmlDocument", + "signature": "type xmlDocument = document_like<_xmlDocument>", + "docstrings": [] + }, + { + "id": "Dom.event_like", + "kind": "type", + "name": "event_like", + "signature": "type event_like<'a>", + "docstrings": [] + }, + { + "id": "Dom.event", + "kind": "type", + "name": "event", + "signature": "type event = event_like<_baseClass>", + "docstrings": [] + }, + { + "id": "Dom._uiEvent", + "kind": "type", + "name": "_uiEvent", + "signature": "type _uiEvent<'a>", + "docstrings": [] + }, + { + "id": "Dom.uiEvent_like", + "kind": "type", + "name": "uiEvent_like", + "signature": "type uiEvent_like<'a> = event_like<_uiEvent<'a>>", + "docstrings": [] + }, + { + "id": "Dom.uiEvent", + "kind": "type", + "name": "uiEvent", + "signature": "type uiEvent = uiEvent_like<_baseClass>", + "docstrings": [] + }, + { + "id": "Dom._animationEvent", + "kind": "type", + "name": "_animationEvent", + "signature": "type _animationEvent", + "docstrings": [] + }, + { + "id": "Dom.animationEvent", + "kind": "type", + "name": "animationEvent", + "signature": "type animationEvent = event_like<_animationEvent>", + "docstrings": [] + }, + { + "id": "Dom._beforeUnloadEvent", + "kind": "type", + "name": "_beforeUnloadEvent", + "signature": "type _beforeUnloadEvent", + "docstrings": [] + }, + { + "id": "Dom.beforeUnloadEvent", + "kind": "type", + "name": "beforeUnloadEvent", + "signature": "type beforeUnloadEvent = event_like<_beforeUnloadEvent>", + "docstrings": [] + }, + { + "id": "Dom._clipboardEvent", + "kind": "type", + "name": "_clipboardEvent", + "signature": "type _clipboardEvent", + "docstrings": [] + }, + { + "id": "Dom.clipboardEvent", + "kind": "type", + "name": "clipboardEvent", + "signature": "type clipboardEvent = event_like<_clipboardEvent>", + "docstrings": [] + }, + { + "id": "Dom._closeEvent", + "kind": "type", + "name": "_closeEvent", + "signature": "type _closeEvent", + "docstrings": [] + }, + { + "id": "Dom.closeEvent", + "kind": "type", + "name": "closeEvent", + "signature": "type closeEvent = event_like<_closeEvent>", + "docstrings": [] + }, + { + "id": "Dom._compositionEvent", + "kind": "type", + "name": "_compositionEvent", + "signature": "type _compositionEvent", + "docstrings": [] + }, + { + "id": "Dom.compositionEvent", + "kind": "type", + "name": "compositionEvent", + "signature": "type compositionEvent = uiEvent_like<_compositionEvent>", + "docstrings": [] + }, + { + "id": "Dom._customEvent", + "kind": "type", + "name": "_customEvent", + "signature": "type _customEvent", + "docstrings": [] + }, + { + "id": "Dom.customEvent", + "kind": "type", + "name": "customEvent", + "signature": "type customEvent = event_like<_customEvent>", + "docstrings": [] + }, + { + "id": "Dom._dragEvent", + "kind": "type", + "name": "_dragEvent", + "signature": "type _dragEvent", + "docstrings": [] + }, + { + "id": "Dom.dragEvent", + "kind": "type", + "name": "dragEvent", + "signature": "type dragEvent = event_like<_dragEvent>", + "docstrings": [] + }, + { + "id": "Dom._errorEvent", + "kind": "type", + "name": "_errorEvent", + "signature": "type _errorEvent", + "docstrings": [] + }, + { + "id": "Dom.errorEvent", + "kind": "type", + "name": "errorEvent", + "signature": "type errorEvent = event_like<_errorEvent>", + "docstrings": [] + }, + { + "id": "Dom._focusEvent", + "kind": "type", + "name": "_focusEvent", + "signature": "type _focusEvent", + "docstrings": [] + }, + { + "id": "Dom.focusEvent", + "kind": "type", + "name": "focusEvent", + "signature": "type focusEvent = uiEvent_like<_focusEvent>", + "docstrings": [] + }, + { + "id": "Dom._idbVersionChangeEvent", + "kind": "type", + "name": "_idbVersionChangeEvent", + "signature": "type _idbVersionChangeEvent", + "docstrings": [] + }, + { + "id": "Dom.idbVersionChangeEvent", + "kind": "type", + "name": "idbVersionChangeEvent", + "signature": "type idbVersionChangeEvent = event_like<_idbVersionChangeEvent>", + "docstrings": [] + }, + { + "id": "Dom._inputEvent", + "kind": "type", + "name": "_inputEvent", + "signature": "type _inputEvent", + "docstrings": [] + }, + { + "id": "Dom.inputEvent", + "kind": "type", + "name": "inputEvent", + "signature": "type inputEvent = uiEvent_like<_inputEvent>", + "docstrings": [] + }, + { + "id": "Dom._keyboardEvent", + "kind": "type", + "name": "_keyboardEvent", + "signature": "type _keyboardEvent", + "docstrings": [] + }, + { + "id": "Dom.keyboardEvent", + "kind": "type", + "name": "keyboardEvent", + "signature": "type keyboardEvent = uiEvent_like<_keyboardEvent>", + "docstrings": [] + }, + { + "id": "Dom._mouseEvent", + "kind": "type", + "name": "_mouseEvent", + "signature": "type _mouseEvent<'a>", + "docstrings": [] + }, + { + "id": "Dom.mouseEvent_like", + "kind": "type", + "name": "mouseEvent_like", + "signature": "type mouseEvent_like<'a> = uiEvent_like<_mouseEvent<'a>>", + "docstrings": [] + }, + { + "id": "Dom.mouseEvent", + "kind": "type", + "name": "mouseEvent", + "signature": "type mouseEvent = mouseEvent_like<_baseClass>", + "docstrings": [] + }, + { + "id": "Dom._pageTransitionEvent", + "kind": "type", + "name": "_pageTransitionEvent", + "signature": "type _pageTransitionEvent", + "docstrings": [] + }, + { + "id": "Dom.pageTransitionEvent", + "kind": "type", + "name": "pageTransitionEvent", + "signature": "type pageTransitionEvent = event_like<_pageTransitionEvent>", + "docstrings": [] + }, + { + "id": "Dom._pointerEvent", + "kind": "type", + "name": "_pointerEvent", + "signature": "type _pointerEvent", + "docstrings": [] + }, + { + "id": "Dom.pointerEvent", + "kind": "type", + "name": "pointerEvent", + "signature": "type pointerEvent = mouseEvent_like<_pointerEvent>", + "docstrings": [] + }, + { + "id": "Dom._popStateEvent", + "kind": "type", + "name": "_popStateEvent", + "signature": "type _popStateEvent", + "docstrings": [] + }, + { + "id": "Dom.popStateEvent", + "kind": "type", + "name": "popStateEvent", + "signature": "type popStateEvent = event_like<_popStateEvent>", + "docstrings": [] + }, + { + "id": "Dom._progressEvent", + "kind": "type", + "name": "_progressEvent", + "signature": "type _progressEvent", + "docstrings": [] + }, + { + "id": "Dom.progressEvent", + "kind": "type", + "name": "progressEvent", + "signature": "type progressEvent = event_like<_progressEvent>", + "docstrings": [] + }, + { + "id": "Dom._relatedEvent", + "kind": "type", + "name": "_relatedEvent", + "signature": "type _relatedEvent", + "docstrings": [] + }, + { + "id": "Dom.relatedEvent", + "kind": "type", + "name": "relatedEvent", + "signature": "type relatedEvent = event_like<_relatedEvent>", + "docstrings": [] + }, + { + "id": "Dom._storageEvent", + "kind": "type", + "name": "_storageEvent", + "signature": "type _storageEvent", + "docstrings": [] + }, + { + "id": "Dom.storageEvent", + "kind": "type", + "name": "storageEvent", + "signature": "type storageEvent = event_like<_storageEvent>", + "docstrings": [] + }, + { + "id": "Dom._svgZoomEvent", + "kind": "type", + "name": "_svgZoomEvent", + "signature": "type _svgZoomEvent", + "docstrings": [] + }, + { + "id": "Dom.svgZoomEvent", + "kind": "type", + "name": "svgZoomEvent", + "signature": "type svgZoomEvent = event_like<_svgZoomEvent>", + "docstrings": [] + }, + { + "id": "Dom._timeEvent", + "kind": "type", + "name": "_timeEvent", + "signature": "type _timeEvent", + "docstrings": [] + }, + { + "id": "Dom.timeEvent", + "kind": "type", + "name": "timeEvent", + "signature": "type timeEvent = event_like<_timeEvent>", + "docstrings": [] + }, + { + "id": "Dom._touchEvent", + "kind": "type", + "name": "_touchEvent", + "signature": "type _touchEvent", + "docstrings": [] + }, + { + "id": "Dom.touchEvent", + "kind": "type", + "name": "touchEvent", + "signature": "type touchEvent = uiEvent_like<_touchEvent>", + "docstrings": [] + }, + { + "id": "Dom._trackEvent", + "kind": "type", + "name": "_trackEvent", + "signature": "type _trackEvent", + "docstrings": [] + }, + { + "id": "Dom.trackEvent", + "kind": "type", + "name": "trackEvent", + "signature": "type trackEvent = event_like<_trackEvent>", + "docstrings": [] + }, + { + "id": "Dom._transitionEvent", + "kind": "type", + "name": "_transitionEvent", + "signature": "type _transitionEvent", + "docstrings": [] + }, + { + "id": "Dom.transitionEvent", + "kind": "type", + "name": "transitionEvent", + "signature": "type transitionEvent = event_like<_transitionEvent>", + "docstrings": [] + }, + { + "id": "Dom._webGlContextEvent", + "kind": "type", + "name": "_webGlContextEvent", + "signature": "type _webGlContextEvent", + "docstrings": [] + }, + { + "id": "Dom.webGlContextEvent", + "kind": "type", + "name": "webGlContextEvent", + "signature": "type webGlContextEvent = event_like<_webGlContextEvent>", + "docstrings": [] + }, + { + "id": "Dom._wheelEvent", + "kind": "type", + "name": "_wheelEvent", + "signature": "type _wheelEvent", + "docstrings": [] + }, + { + "id": "Dom.wheelEvent", + "kind": "type", + "name": "wheelEvent", + "signature": "type wheelEvent = uiEvent_like<_wheelEvent>", + "docstrings": [] + }, + { + "id": "Dom.range", + "kind": "type", + "name": "range", + "signature": "type range", + "docstrings": [] + }, + { + "id": "Dom.selection", + "kind": "type", + "name": "selection", + "signature": "type selection", + "docstrings": [] + }, + { + "id": "Dom.domTokenList", + "kind": "type", + "name": "domTokenList", + "signature": "type domTokenList", + "docstrings": [] + }, + { + "id": "Dom.domSettableTokenList", + "kind": "type", + "name": "domSettableTokenList", + "signature": "type domSettableTokenList", + "docstrings": [] + }, + { + "id": "Dom.nodeFilter", + "kind": "type", + "name": "nodeFilter", + "signature": "type nodeFilter = {acceptNode: element => int}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "acceptNode", + "docstrings": [], + "signature": "element => int" + } + ] + } + }, + { + "id": "Dom.nodeIterator", + "kind": "type", + "name": "nodeIterator", + "signature": "type nodeIterator", + "docstrings": [] + }, + { + "id": "Dom.treeWalker", + "kind": "type", + "name": "treeWalker", + "signature": "type treeWalker", + "docstrings": [] + }, + { + "id": "Dom.svgRect", + "kind": "type", + "name": "svgRect", + "signature": "type svgRect", + "docstrings": [] + }, + { + "id": "Dom.svgPoint", + "kind": "type", + "name": "svgPoint", + "signature": "type svgPoint", + "docstrings": [] + }, + { + "id": "Dom.eventPointerId", + "kind": "type", + "name": "eventPointerId", + "signature": "type eventPointerId", + "docstrings": [] + }, + { + "id": "Dom.Dom_storage", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module Storage = Dom_storage" + }, + { + "id": "Dom.Dom_storage2", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module Storage2 = Dom_storage2" + } + ] +} \ No newline at end of file diff --git a/index_data/api/Dom_storage.json b/index_data/api/Dom_storage.json new file mode 100644 index 000000000..5a711c462 --- /dev/null +++ b/index_data/api/Dom_storage.json @@ -0,0 +1,97 @@ +{ + "name": "Dom_storage", + "docstrings": [], + "items": [ + { + "id": "Dom_storage.t", + "kind": "type", + "name": "t", + "signature": "type t = Dom_storage2.t", + "docstrings": [] + }, + { + "id": "Dom_storage.getItem", + "kind": "value", + "name": "getItem", + "signature": "let getItem: (t, string) => option", + "docstrings": [] + }, + { + "id": "Dom_storage.getItem", + "kind": "value", + "name": "getItem", + "signature": "let getItem: (string, t) => option", + "docstrings": [] + }, + { + "id": "Dom_storage.setItem", + "kind": "value", + "name": "setItem", + "signature": "let setItem: (t, string, string) => unit", + "docstrings": [] + }, + { + "id": "Dom_storage.setItem", + "kind": "value", + "name": "setItem", + "signature": "let setItem: (string, string, t) => unit", + "docstrings": [] + }, + { + "id": "Dom_storage.removeItem", + "kind": "value", + "name": "removeItem", + "signature": "let removeItem: (t, string) => unit", + "docstrings": [] + }, + { + "id": "Dom_storage.removeItem", + "kind": "value", + "name": "removeItem", + "signature": "let removeItem: (string, t) => unit", + "docstrings": [] + }, + { + "id": "Dom_storage.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t => unit", + "docstrings": [] + }, + { + "id": "Dom_storage.key", + "kind": "value", + "name": "key", + "signature": "let key: (t, int) => option", + "docstrings": [] + }, + { + "id": "Dom_storage.key", + "kind": "value", + "name": "key", + "signature": "let key: (int, t) => option", + "docstrings": [] + }, + { + "id": "Dom_storage.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Dom_storage.localStorage", + "kind": "value", + "name": "localStorage", + "signature": "let localStorage: t", + "docstrings": [] + }, + { + "id": "Dom_storage.sessionStorage", + "kind": "value", + "name": "sessionStorage", + "signature": "let sessionStorage: t", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Dom_storage2.json b/index_data/api/Dom_storage2.json new file mode 100644 index 000000000..1b9b1bccd --- /dev/null +++ b/index_data/api/Dom_storage2.json @@ -0,0 +1,69 @@ +{ + "name": "Dom_storage2", + "docstrings": [], + "items": [ + { + "id": "Dom_storage2.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [] + }, + { + "id": "Dom_storage2.getItem", + "kind": "value", + "name": "getItem", + "signature": "let getItem: (t, string) => option", + "docstrings": [] + }, + { + "id": "Dom_storage2.setItem", + "kind": "value", + "name": "setItem", + "signature": "let setItem: (t, string, string) => unit", + "docstrings": [] + }, + { + "id": "Dom_storage2.removeItem", + "kind": "value", + "name": "removeItem", + "signature": "let removeItem: (t, string) => unit", + "docstrings": [] + }, + { + "id": "Dom_storage2.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t => unit", + "docstrings": [] + }, + { + "id": "Dom_storage2.key", + "kind": "value", + "name": "key", + "signature": "let key: (t, int) => option", + "docstrings": [] + }, + { + "id": "Dom_storage2.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Dom_storage2.localStorage", + "kind": "value", + "name": "localStorage", + "signature": "let localStorage: t", + "docstrings": [] + }, + { + "id": "Dom_storage2.sessionStorage", + "kind": "value", + "name": "sessionStorage", + "signature": "let sessionStorage: t", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Filename.json b/index_data/api/Filename.json new file mode 100644 index 000000000..dce19831a --- /dev/null +++ b/index_data/api/Filename.json @@ -0,0 +1,159 @@ +{ + "name": "Filename", + "docstrings": [], + "items": [ + { + "id": "Filename.current_dir_name", + "kind": "value", + "name": "current_dir_name", + "signature": "let current_dir_name: string", + "docstrings": [ + "The conventional name for the current directory (e.g. [.] in Unix)." + ] + }, + { + "id": "Filename.parent_dir_name", + "kind": "value", + "name": "parent_dir_name", + "signature": "let parent_dir_name: string", + "docstrings": [ + "The conventional name for the parent of the current directory\n (e.g. [..] in Unix)." + ] + }, + { + "id": "Filename.dir_sep", + "kind": "value", + "name": "dir_sep", + "signature": "let dir_sep: string", + "docstrings": [ + "The directory separator (e.g. [/] in Unix). @since 3.11.2" + ] + }, + { + "id": "Filename.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (string, string) => string", + "docstrings": [ + "[concat dir file] returns a file name that designates file\n [file] in directory [dir]." + ] + }, + { + "id": "Filename.is_relative", + "kind": "value", + "name": "is_relative", + "signature": "let is_relative: string => bool", + "docstrings": [ + "Return [true] if the file name is relative to the current\n directory, [false] if it is absolute (i.e. in Unix, starts\n with [/])." + ] + }, + { + "id": "Filename.is_implicit", + "kind": "value", + "name": "is_implicit", + "signature": "let is_implicit: string => bool", + "docstrings": [ + "Return [true] if the file name is relative and does not start\n with an explicit reference to the current directory ([./] or\n [../] in Unix), [false] if it starts with an explicit reference\n to the root directory or the current directory." + ] + }, + { + "id": "Filename.check_suffix", + "kind": "value", + "name": "check_suffix", + "signature": "let check_suffix: (string, string) => bool", + "docstrings": [ + "[check_suffix name suff] returns [true] if the filename [name]\n ends with the suffix [suff]." + ] + }, + { + "id": "Filename.chop_suffix", + "kind": "value", + "name": "chop_suffix", + "signature": "let chop_suffix: (string, string) => string", + "docstrings": [ + "[chop_suffix name suff] removes the suffix [suff] from\n the filename [name]. The behavior is undefined if [name] does not\n end with the suffix [suff]." + ] + }, + { + "id": "Filename.extension", + "kind": "value", + "name": "extension", + "signature": "let extension: string => string", + "docstrings": [ + "[extension name] is the shortest suffix [ext] of [name0] where:\n\n - [name0] is the longest suffix of [name] that does not\n contain a directory separator;\n - [ext] starts with a period;\n - [ext] is preceded by at least one non-period character\n in [name0].\n\n If such a suffix does not exist, [extension name] is the empty\n string.\n\n @since 4.04" + ] + }, + { + "id": "Filename.remove_extension", + "kind": "value", + "name": "remove_extension", + "signature": "let remove_extension: string => string", + "docstrings": [ + "Return the given file name without its extension, as defined\n in {!Filename.extension}. If the extension is empty, the function\n returns the given file name.\n\n The following invariant holds for any file name [s]:\n\n [remove_extension s ^ extension s = s]\n\n @since 4.04" + ] + }, + { + "id": "Filename.chop_extension", + "kind": "value", + "name": "chop_extension", + "signature": "let chop_extension: string => string", + "docstrings": [ + "Same as {!Filename.remove_extension}, but raise [Invalid_argument]\n if the given name has an empty extension." + ] + }, + { + "id": "Filename.basename", + "kind": "value", + "name": "basename", + "signature": "let basename: string => string", + "docstrings": [ + "Split a file name into directory name / base file name.\n If [name] is a valid file name, then [concat (dirname name) (basename name)]\n returns a file name which is equivalent to [name]. Moreover,\n after setting the current directory to [dirname name] (with {!Sys.chdir}),\n references to [basename name] (which is a relative file name)\n designate the same file as [name] before the call to {!Sys.chdir}.\n\n This function conforms to the specification of POSIX.1-2008 for the\n [basename] utility." + ] + }, + { + "id": "Filename.dirname", + "kind": "value", + "name": "dirname", + "signature": "let dirname: string => string", + "docstrings": [ + "See {!Filename.basename}.\n This function conforms to the specification of POSIX.1-2008 for the\n [dirname] utility." + ] + }, + { + "id": "Filename.get_temp_dir_name", + "kind": "value", + "name": "get_temp_dir_name", + "signature": "let get_temp_dir_name: unit => string", + "docstrings": [ + "The name of the temporary directory:\n Under Unix, the value of the [TMPDIR] environment variable, or \"/tmp\"\n if the variable is not set.\n Under Windows, the value of the [TEMP] environment variable, or \".\"\n if the variable is not set.\n The temporary directory can be changed with {!Filename.set_temp_dir_name}.\n @since 4.00.0" + ] + }, + { + "id": "Filename.set_temp_dir_name", + "kind": "value", + "name": "set_temp_dir_name", + "signature": "let set_temp_dir_name: string => unit", + "docstrings": [ + "Change the temporary directory returned by {!Filename.get_temp_dir_name}\n and used by {!Filename.temp_file} and {!Filename.open_temp_file}.\n @since 4.00.0" + ] + }, + { + "id": "Filename.temp_dir_name", + "kind": "value", + "name": "temp_dir_name", + "signature": "let temp_dir_name: string", + "docstrings": [ + "The name of the initial temporary directory:\n Under Unix, the value of the [TMPDIR] environment variable, or \"/tmp\"\n if the variable is not set.\n Under Windows, the value of the [TEMP] environment variable, or \".\"\n if the variable is not set.\n @deprecated You should use {!Filename.get_temp_dir_name} instead.\n @since 3.09.1" + ] + }, + { + "id": "Filename.quote", + "kind": "value", + "name": "quote", + "signature": "let quote: string => string", + "docstrings": [ + "Return a quoted version of a file name, suitable for use as\n one argument in a command line, escaping all meta-characters.\n Warning: under Windows, the output is only suitable for use\n with programs that follow the standard Windows quoting\n conventions." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Genlex.json b/index_data/api/Genlex.json new file mode 100644 index 000000000..a5bcdb8cb --- /dev/null +++ b/index_data/api/Genlex.json @@ -0,0 +1,59 @@ +{ + "name": "Genlex", + "docstrings": [], + "items": [ + { + "id": "Genlex.token", + "kind": "type", + "name": "token", + "signature": "type token =\\n | Kwd(string)\\n | Ident(string)\\n | Int(int)\\n | Float(float)\\n | String(string)\\n | Char(char)", + "docstrings": [ + "The type of tokens. The lexical classes are: [Int] and [Float]\n for integer and floating-point numbers; [String] for\n string literals, enclosed in double quotes; [Char] for\n character literals, enclosed in single quotes; [Ident] for\n identifiers (either sequences of letters, digits, underscores\n and quotes, or sequences of 'operator characters' such as\n [+], [*], etc); and [Kwd] for keywords (either identifiers or\n single 'special characters' such as [(], [}], etc)." + ], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Kwd", + "docstrings": [], + "signature": "Kwd(string)" + }, + { + "constructorName": "Ident", + "docstrings": [], + "signature": "Ident(string)" + }, + { + "constructorName": "Int", + "docstrings": [], + "signature": "Int(int)" + }, + { + "constructorName": "Float", + "docstrings": [], + "signature": "Float(float)" + }, + { + "constructorName": "String", + "docstrings": [], + "signature": "String(string)" + }, + { + "constructorName": "Char", + "docstrings": [], + "signature": "Char(char)" + } + ] + } + }, + { + "id": "Genlex.make_lexer", + "kind": "value", + "name": "make_lexer", + "signature": "let make_lexer: (list, Stream.t) => Stream.t", + "docstrings": [ + "Construct the lexer function. The first argument is the list of\n keywords. An identifier [s] is returned as [Kwd s] if [s]\n belongs to this list, and as [Ident s] otherwise.\n A special character [s] is returned as [Kwd s] if [s]\n belongs to this list, and cause a lexical error (exception\n {!Stream.Error} with the offending lexeme as its parameter) otherwise.\n Blanks and newlines are skipped. Comments delimited by [(*] and [*)]\n are skipped as well, and can be nested. A {!Stream.Failure} exception\n is raised if end of stream is unexpectedly reached." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Hashtbl.json b/index_data/api/Hashtbl.json new file mode 100644 index 000000000..cdd420584 --- /dev/null +++ b/index_data/api/Hashtbl.json @@ -0,0 +1,539 @@ +{ + "name": "Hashtbl", + "docstrings": [], + "items": [ + { + "id": "Hashtbl.t", + "kind": "type", + "name": "t", + "signature": "type t<'a, 'b>", + "docstrings": [ + "The type of hash tables from type ['a] to type ['b]." + ] + }, + { + "id": "Hashtbl.create", + "kind": "value", + "name": "create", + "signature": "let create: (~random: bool=?, int) => t<'a, 'b>", + "docstrings": [ + "[Hashtbl.create n] creates a new, empty hash table, with\n initial size [n]. For best results, [n] should be on the\n order of the expected number of elements that will be in\n the table. The table grows as needed, so [n] is just an\n initial guess.\n\n The optional [random] parameter (a boolean) controls whether\n the internal organization of the hash table is randomized at each\n execution of [Hashtbl.create] or deterministic over all executions.\n\n A hash table that is created with [~random:false] uses a\n fixed hash function ({!Hashtbl.hash}) to distribute keys among\n buckets. As a consequence, collisions between keys happen\n deterministically. In Web-facing applications or other\n security-sensitive applications, the deterministic collision\n patterns can be exploited by a malicious user to create a\n denial-of-service attack: the attacker sends input crafted to\n create many collisions in the table, slowing the application down.\n\n A hash table that is created with [~random:true] uses the seeded\n hash function {!Hashtbl.seeded_hash} with a seed that is randomly\n chosen at hash table creation time. In effect, the hash function\n used is randomly selected among [2^{30}] different hash functions.\n All these hash functions have different collision patterns,\n rendering ineffective the denial-of-service attack described above.\n However, because of randomization, enumerating all elements of the\n hash table using {!Hashtbl.fold} or {!Hashtbl.iter} is no longer\n deterministic: elements are enumerated in different orders at\n different runs of the program.\n\n If no [~random] parameter is given, hash tables are created\n in non-random mode by default. This default can be changed\n either programmatically by calling {!Hashtbl.randomize} or by\n setting the [R] flag in the [OCAMLRUNPARAM] environment variable.\n\n @before 4.00.0 the [random] parameter was not present and all\n hash tables were created in non-randomized mode." + ] + }, + { + "id": "Hashtbl.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a, 'b> => unit", + "docstrings": [ + "Empty a hash table. Use [reset] instead of [clear] to shrink the\n size of the bucket table to its initial size." + ] + }, + { + "id": "Hashtbl.reset", + "kind": "value", + "name": "reset", + "signature": "let reset: t<'a, 'b> => unit", + "docstrings": [ + "Empty a hash table and shrink the size of the bucket table\n to its initial size.\n @since 4.00.0" + ] + }, + { + "id": "Hashtbl.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a, 'b> => t<'a, 'b>", + "docstrings": [ + "Return a copy of the given hashtable." + ] + }, + { + "id": "Hashtbl.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'a, 'b>, 'a, 'b) => unit", + "docstrings": [ + "[Hashtbl.add tbl x y] adds a binding of [x] to [y] in table [tbl].\n Previous bindings for [x] are not removed, but simply\n hidden. That is, after performing {!Hashtbl.remove}[ tbl x],\n the previous binding for [x], if any, is restored.\n (Same behavior as with association lists.)" + ] + }, + { + "id": "Hashtbl.find", + "kind": "value", + "name": "find", + "signature": "let find: (t<'a, 'b>, 'a) => 'b", + "docstrings": [ + "[Hashtbl.find tbl x] returns the current binding of [x] in [tbl],\n or raises [Not_found] if no such binding exists." + ] + }, + { + "id": "Hashtbl.find_opt", + "kind": "value", + "name": "find_opt", + "signature": "let find_opt: (t<'a, 'b>, 'a) => option<'b>", + "docstrings": [ + "[Hashtbl.find_opt tbl x] returns the current binding of [x] in [tbl],\n or [None] if no such binding exists.\n @since 4.05" + ] + }, + { + "id": "Hashtbl.find_all", + "kind": "value", + "name": "find_all", + "signature": "let find_all: (t<'a, 'b>, 'a) => list<'b>", + "docstrings": [ + "[Hashtbl.find_all tbl x] returns the list of all data\n associated with [x] in [tbl].\n The current binding is returned first, then the previous\n bindings, in reverse order of introduction in the table." + ] + }, + { + "id": "Hashtbl.mem", + "kind": "value", + "name": "mem", + "signature": "let mem: (t<'a, 'b>, 'a) => bool", + "docstrings": [ + "[Hashtbl.mem tbl x] checks if [x] is bound in [tbl]." + ] + }, + { + "id": "Hashtbl.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a, 'b>, 'a) => unit", + "docstrings": [ + "[Hashtbl.remove tbl x] removes the current binding of [x] in [tbl],\n restoring the previous binding if it exists.\n It does nothing if [x] is not bound in [tbl]." + ] + }, + { + "id": "Hashtbl.replace", + "kind": "value", + "name": "replace", + "signature": "let replace: (t<'a, 'b>, 'a, 'b) => unit", + "docstrings": [ + "[Hashtbl.replace tbl x y] replaces the current binding of [x]\n in [tbl] by a binding of [x] to [y]. If [x] is unbound in [tbl],\n a binding of [x] to [y] is added to [tbl].\n This is functionally equivalent to {!Hashtbl.remove}[ tbl x]\n followed by {!Hashtbl.add}[ tbl x y]." + ] + }, + { + "id": "Hashtbl.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (('a, 'b) => unit, t<'a, 'b>) => unit", + "docstrings": [ + "[Hashtbl.iter f tbl] applies [f] to all bindings in table [tbl].\n [f] receives the key as first argument, and the associated value\n as second argument. Each binding is presented exactly once to [f].\n\n The order in which the bindings are passed to [f] is unspecified.\n However, if the table contains several bindings for the same key,\n they are passed to [f] in reverse order of introduction, that is,\n the most recent binding is passed first.\n\n If the hash table was created in non-randomized mode, the order\n in which the bindings are enumerated is reproducible between\n successive runs of the program, and even between minor versions\n of OCaml. For randomized hash tables, the order of enumeration\n is entirely random.\n\n The behavior is not defined if the hash table is modified\n by [f] during the iteration." + ] + }, + { + "id": "Hashtbl.filter_map_inplace", + "kind": "value", + "name": "filter_map_inplace", + "signature": "let filter_map_inplace: (('a, 'b) => option<'b>, t<'a, 'b>) => unit", + "docstrings": [ + "[Hashtbl.filter_map_inplace f tbl] applies [f] to all bindings in\n table [tbl] and update each binding depending on the result of\n [f]. If [f] returns [None], the binding is discarded. If it\n returns [Some new_val], the binding is update to associate the key\n to [new_val].\n\n Other comments for {!Hashtbl.iter} apply as well.\n @since 4.03.0" + ] + }, + { + "id": "Hashtbl.fold", + "kind": "value", + "name": "fold", + "signature": "let fold: (('a, 'b, 'c) => 'c, t<'a, 'b>, 'c) => 'c", + "docstrings": [ + "[Hashtbl.fold f tbl init] computes\n [(f kN dN ... (f k1 d1 init)...)],\n where [k1 ... kN] are the keys of all bindings in [tbl],\n and [d1 ... dN] are the associated values.\n Each binding is presented exactly once to [f].\n\n The order in which the bindings are passed to [f] is unspecified.\n However, if the table contains several bindings for the same key,\n they are passed to [f] in reverse order of introduction, that is,\n the most recent binding is passed first.\n\n If the hash table was created in non-randomized mode, the order\n in which the bindings are enumerated is reproducible between\n successive runs of the program, and even between minor versions\n of OCaml. For randomized hash tables, the order of enumeration\n is entirely random.\n\n The behavior is not defined if the hash table is modified\n by [f] during the iteration." + ] + }, + { + "id": "Hashtbl.length", + "kind": "value", + "name": "length", + "signature": "let length: t<'a, 'b> => int", + "docstrings": [ + "[Hashtbl.length tbl] returns the number of bindings in [tbl].\n It takes constant time. Multiple bindings are counted once each, so\n [Hashtbl.length] gives the number of times [Hashtbl.iter] calls its\n first argument." + ] + }, + { + "id": "Hashtbl.randomize", + "kind": "value", + "name": "randomize", + "signature": "let randomize: unit => unit", + "docstrings": [ + "After a call to [Hashtbl.randomize()], hash tables are created in\n randomized mode by default: {!Hashtbl.create} returns randomized\n hash tables, unless the [~random:false] optional parameter is given.\n The same effect can be achieved by setting the [R] parameter in\n the [OCAMLRUNPARAM] environment variable.\n\n It is recommended that applications or Web frameworks that need to\n protect themselves against the denial-of-service attack described\n in {!Hashtbl.create} call [Hashtbl.randomize()] at initialization\n time.\n\n Note that once [Hashtbl.randomize()] was called, there is no way\n to revert to the non-randomized default behavior of {!Hashtbl.create}.\n This is intentional. Non-randomized hash tables can still be\n created using [Hashtbl.create ~random:false].\n\n @since 4.00.0" + ] + }, + { + "id": "Hashtbl.is_randomized", + "kind": "value", + "name": "is_randomized", + "signature": "let is_randomized: unit => bool", + "docstrings": [ + "return if the tables are currently created in randomized mode by default\n\n @since 4.03.0" + ] + }, + { + "id": "Hashtbl.statistics", + "kind": "type", + "name": "statistics", + "signature": "type statistics = {\\n num_bindings: int,\\n num_buckets: int,\\n max_bucket_length: int,\\n bucket_histogram: array,\\n}", + "docstrings": [ + "@since 4.00.0" + ], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "num_bindings", + "docstrings": [ + "Number of bindings present in the table.\n Same value as returned by {!Hashtbl.length}." + ], + "signature": "int" + }, + { + "fieldName": "num_buckets", + "docstrings": [ + "Number of buckets in the table." + ], + "signature": "int" + }, + { + "fieldName": "max_bucket_length", + "docstrings": [ + "Maximal number of bindings per bucket." + ], + "signature": "int" + }, + { + "fieldName": "bucket_histogram", + "docstrings": [ + "Histogram of bucket sizes. This array [histo] has\n length [max_bucket_length + 1]. The value of\n [histo.(i)] is the number of buckets whose size is [i]." + ], + "signature": "array" + } + ] + } + }, + { + "id": "Hashtbl.stats", + "kind": "value", + "name": "stats", + "signature": "let stats: t<'a, 'b> => statistics", + "docstrings": [ + "[Hashtbl.stats tbl] returns statistics about the table [tbl]:\n number of buckets, size of the biggest bucket, distribution of\n buckets by size.\n @since 4.00.0" + ] + }, + { + "id": "Make.Hashtbl", + "kind": "module", + "item": { + "name": "Make", + "docstrings": [], + "items": [ + { + "id": "Hashtbl.Make.key", + "kind": "type", + "name": "key", + "signature": "type key = H.t", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.create", + "kind": "value", + "name": "create", + "signature": "let create: int => t<'a>", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a> => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.reset", + "kind": "value", + "name": "reset", + "signature": "let reset: t<'a> => unit", + "docstrings": [ + "@since 4.00.0" + ] + }, + { + "id": "Hashtbl.Make.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'a>, key, 'a) => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a>, key) => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.find", + "kind": "value", + "name": "find", + "signature": "let find: (t<'a>, key) => 'a", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.find_opt", + "kind": "value", + "name": "find_opt", + "signature": "let find_opt: (t<'a>, key) => option<'a>", + "docstrings": [ + "@since 4.05.0" + ] + }, + { + "id": "Hashtbl.Make.find_all", + "kind": "value", + "name": "find_all", + "signature": "let find_all: (t<'a>, key) => list<'a>", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.replace", + "kind": "value", + "name": "replace", + "signature": "let replace: (t<'a>, key, 'a) => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.mem", + "kind": "value", + "name": "mem", + "signature": "let mem: (t<'a>, key) => bool", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: ((key, 'a) => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.filter_map_inplace", + "kind": "value", + "name": "filter_map_inplace", + "signature": "let filter_map_inplace: ((key, 'a) => option<'a>, t<'a>) => unit", + "docstrings": [ + "@since 4.03.0" + ] + }, + { + "id": "Hashtbl.Make.fold", + "kind": "value", + "name": "fold", + "signature": "let fold: ((key, 'a, 'b) => 'b, t<'a>, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.length", + "kind": "value", + "name": "length", + "signature": "let length: t<'a> => int", + "docstrings": [] + }, + { + "id": "Hashtbl.Make.stats", + "kind": "value", + "name": "stats", + "signature": "let stats: t<'a> => statistics", + "docstrings": [ + "@since 4.00.0" + ] + } + ] + } + }, + { + "id": "MakeSeeded.Hashtbl", + "kind": "module", + "item": { + "name": "MakeSeeded", + "docstrings": [], + "items": [ + { + "id": "Hashtbl.MakeSeeded.key", + "kind": "type", + "name": "key", + "signature": "type key = H.t", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.create", + "kind": "value", + "name": "create", + "signature": "let create: (~random: bool=?, int) => t<'a>", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a> => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.reset", + "kind": "value", + "name": "reset", + "signature": "let reset: t<'a> => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'a>, key, 'a) => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a>, key) => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.find", + "kind": "value", + "name": "find", + "signature": "let find: (t<'a>, key) => 'a", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.find_opt", + "kind": "value", + "name": "find_opt", + "signature": "let find_opt: (t<'a>, key) => option<'a>", + "docstrings": [ + "@since 4.05.0" + ] + }, + { + "id": "Hashtbl.MakeSeeded.find_all", + "kind": "value", + "name": "find_all", + "signature": "let find_all: (t<'a>, key) => list<'a>", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.replace", + "kind": "value", + "name": "replace", + "signature": "let replace: (t<'a>, key, 'a) => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.mem", + "kind": "value", + "name": "mem", + "signature": "let mem: (t<'a>, key) => bool", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: ((key, 'a) => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.filter_map_inplace", + "kind": "value", + "name": "filter_map_inplace", + "signature": "let filter_map_inplace: ((key, 'a) => option<'a>, t<'a>) => unit", + "docstrings": [ + "@since 4.03.0" + ] + }, + { + "id": "Hashtbl.MakeSeeded.fold", + "kind": "value", + "name": "fold", + "signature": "let fold: ((key, 'a, 'b) => 'b, t<'a>, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.length", + "kind": "value", + "name": "length", + "signature": "let length: t<'a> => int", + "docstrings": [] + }, + { + "id": "Hashtbl.MakeSeeded.stats", + "kind": "value", + "name": "stats", + "signature": "let stats: t<'a> => statistics", + "docstrings": [] + } + ] + } + }, + { + "id": "Hashtbl.hash", + "kind": "value", + "name": "hash", + "signature": "let hash: 'a => int", + "docstrings": [ + "[Hashtbl.hash x] associates a nonnegative integer to any value of\n any type. It is guaranteed that\n if [x = y] or [Pervasives.compare x y = 0], then [hash x = hash y].\n Moreover, [hash] always terminates, even on cyclic structures." + ] + }, + { + "id": "Hashtbl.seeded_hash", + "kind": "value", + "name": "seeded_hash", + "signature": "let seeded_hash: (int, 'a) => int", + "docstrings": [ + "A variant of {!Hashtbl.hash} that is further parameterized by\n an integer seed.\n @since 4.00.0" + ] + }, + { + "id": "Hashtbl.hash_param", + "kind": "value", + "name": "hash_param", + "signature": "let hash_param: (int, int, 'a) => int", + "docstrings": [ + "[Hashtbl.hash_param meaningful total x] computes a hash value for [x],\n with the same properties as for [hash]. The two extra integer\n parameters [meaningful] and [total] give more precise control over\n hashing. Hashing performs a breadth-first, left-to-right traversal\n of the structure [x], stopping after [meaningful] meaningful nodes\n were encountered, or [total] nodes (meaningful or not) were\n encountered. If [total] as specified by the user exceeds a certain\n value, currently 256, then it is capped to that value.\n Meaningful nodes are: integers; floating-point\n numbers; strings; characters; booleans; and constant\n constructors. Larger values of [meaningful] and [total] means that\n more nodes are taken into account to compute the final hash value,\n and therefore collisions are less likely to happen. However,\n hashing takes longer. The parameters [meaningful] and [total]\n govern the tradeoff between accuracy and speed. As default\n choices, {!Hashtbl.hash} and {!Hashtbl.seeded_hash} take\n [meaningful = 10] and [total = 100]." + ] + }, + { + "id": "Hashtbl.seeded_hash_param", + "kind": "value", + "name": "seeded_hash_param", + "signature": "let seeded_hash_param: (int, int, int, 'a) => int", + "docstrings": [ + "A variant of {!Hashtbl.hash_param} that is further parameterized by\n an integer seed. Usage:\n [Hashtbl.seeded_hash_param meaningful total seed x].\n @since 4.00.0" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/HashtblLabels.json b/index_data/api/HashtblLabels.json new file mode 100644 index 000000000..7622170d2 --- /dev/null +++ b/index_data/api/HashtblLabels.json @@ -0,0 +1,518 @@ +{ + "name": "HashtblLabels", + "docstrings": [], + "items": [ + { + "id": "HashtblLabels.t", + "kind": "type", + "name": "t", + "signature": "type t<'a, 'b> = Hashtbl.t<'a, 'b>", + "docstrings": [] + }, + { + "id": "HashtblLabels.seeded_hash_param", + "kind": "value", + "name": "seeded_hash_param", + "signature": "let seeded_hash_param: (int, int, int, 'a) => int", + "docstrings": [] + }, + { + "id": "HashtblLabels.hash_param", + "kind": "value", + "name": "hash_param", + "signature": "let hash_param: (int, int, 'a) => int", + "docstrings": [] + }, + { + "id": "HashtblLabels.seeded_hash", + "kind": "value", + "name": "seeded_hash", + "signature": "let seeded_hash: (int, 'a) => int", + "docstrings": [] + }, + { + "id": "HashtblLabels.hash", + "kind": "value", + "name": "hash", + "signature": "let hash: 'a => int", + "docstrings": [] + }, + { + "id": "HashtblLabels.stats", + "kind": "value", + "name": "stats", + "signature": "let stats: Hashtbl.t<'a, 'b> => Hashtbl.statistics", + "docstrings": [] + }, + { + "id": "HashtblLabels.is_randomized", + "kind": "value", + "name": "is_randomized", + "signature": "let is_randomized: unit => bool", + "docstrings": [] + }, + { + "id": "HashtblLabels.randomize", + "kind": "value", + "name": "randomize", + "signature": "let randomize: unit => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.length", + "kind": "value", + "name": "length", + "signature": "let length: Hashtbl.t<'a, 'b> => int", + "docstrings": [] + }, + { + "id": "HashtblLabels.fold", + "kind": "value", + "name": "fold", + "signature": "let fold: (('a, 'b, 'c) => 'c, Hashtbl.t<'a, 'b>, 'c) => 'c", + "docstrings": [] + }, + { + "id": "HashtblLabels.filter_map_inplace", + "kind": "value", + "name": "filter_map_inplace", + "signature": "let filter_map_inplace: (('a, 'b) => option<'b>, Hashtbl.t<'a, 'b>) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (('a, 'b) => unit, Hashtbl.t<'a, 'b>) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.replace", + "kind": "value", + "name": "replace", + "signature": "let replace: (Hashtbl.t<'a, 'b>, 'a, 'b) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (Hashtbl.t<'a, 'b>, 'a) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.mem", + "kind": "value", + "name": "mem", + "signature": "let mem: (Hashtbl.t<'a, 'b>, 'a) => bool", + "docstrings": [] + }, + { + "id": "HashtblLabels.find_all", + "kind": "value", + "name": "find_all", + "signature": "let find_all: (Hashtbl.t<'a, 'b>, 'a) => list<'b>", + "docstrings": [] + }, + { + "id": "HashtblLabels.find_opt", + "kind": "value", + "name": "find_opt", + "signature": "let find_opt: (Hashtbl.t<'a, 'b>, 'a) => option<'b>", + "docstrings": [] + }, + { + "id": "HashtblLabels.find", + "kind": "value", + "name": "find", + "signature": "let find: (Hashtbl.t<'a, 'b>, 'a) => 'b", + "docstrings": [] + }, + { + "id": "HashtblLabels.add", + "kind": "value", + "name": "add", + "signature": "let add: (Hashtbl.t<'a, 'b>, 'a, 'b) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: Hashtbl.t<'a, 'b> => Hashtbl.t<'a, 'b>", + "docstrings": [] + }, + { + "id": "HashtblLabels.reset", + "kind": "value", + "name": "reset", + "signature": "let reset: Hashtbl.t<'a, 'b> => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: Hashtbl.t<'a, 'b> => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.create", + "kind": "value", + "name": "create", + "signature": "let create: (~random: bool=?, int) => Hashtbl.t<'a, 'b>", + "docstrings": [] + }, + { + "id": "HashtblLabels.add", + "kind": "value", + "name": "add", + "signature": "let add: (Hashtbl.t<'a, 'b>, ~key: 'a, ~data: 'b) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.replace", + "kind": "value", + "name": "replace", + "signature": "let replace: (Hashtbl.t<'a, 'b>, ~key: 'a, ~data: 'b) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (~f: (~key: 'a, ~data: 'b) => unit, Hashtbl.t<'a, 'b>) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.filter_map_inplace", + "kind": "value", + "name": "filter_map_inplace", + "signature": "let filter_map_inplace: (~f: (~key: 'a, ~data: 'b) => option<'b>, Hashtbl.t<'a, 'b>) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.fold", + "kind": "value", + "name": "fold", + "signature": "let fold: (~f: (~key: 'a, ~data: 'b, 'c) => 'c, Hashtbl.t<'a, 'b>, ~init: 'c) => 'c", + "docstrings": [] + }, + { + "id": "HashtblLabels.statistics", + "kind": "type", + "name": "statistics", + "signature": "type statistics = Hashtbl.statistics = {\\n num_bindings: int,\\n num_buckets: int,\\n max_bucket_length: int,\\n bucket_histogram: array,\\n}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "num_bindings", + "docstrings": [], + "signature": "int" + }, + { + "fieldName": "num_buckets", + "docstrings": [], + "signature": "int" + }, + { + "fieldName": "max_bucket_length", + "docstrings": [], + "signature": "int" + }, + { + "fieldName": "bucket_histogram", + "docstrings": [], + "signature": "array" + } + ] + } + }, + { + "id": "HashtblLabels.Hashtbl.HashedType", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module HashedType = Hashtbl.HashedType" + }, + { + "id": "HashtblLabels.Hashtbl.SeededHashedType", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module SeededHashedType = Hashtbl.SeededHashedType" + }, + { + "id": "S.HashtblLabels", + "kind": "module", + "item": { + "name": "S", + "docstrings": [], + "items": [ + { + "id": "HashtblLabels.S.key", + "kind": "type", + "name": "key", + "signature": "type key", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.create", + "kind": "value", + "name": "create", + "signature": "let create: int => t<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a> => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.reset", + "kind": "value", + "name": "reset", + "signature": "let reset: t<'a> => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'a>, ~key: key, ~data: 'a) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a>, key) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.find", + "kind": "value", + "name": "find", + "signature": "let find: (t<'a>, key) => 'a", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.find_opt", + "kind": "value", + "name": "find_opt", + "signature": "let find_opt: (t<'a>, key) => option<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.find_all", + "kind": "value", + "name": "find_all", + "signature": "let find_all: (t<'a>, key) => list<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.replace", + "kind": "value", + "name": "replace", + "signature": "let replace: (t<'a>, ~key: key, ~data: 'a) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.mem", + "kind": "value", + "name": "mem", + "signature": "let mem: (t<'a>, key) => bool", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (~f: (~key: key, ~data: 'a) => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.filter_map_inplace", + "kind": "value", + "name": "filter_map_inplace", + "signature": "let filter_map_inplace: (~f: (~key: key, ~data: 'a) => option<'a>, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.fold", + "kind": "value", + "name": "fold", + "signature": "let fold: (~f: (~key: key, ~data: 'a, 'b) => 'b, t<'a>, ~init: 'b) => 'b", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.length", + "kind": "value", + "name": "length", + "signature": "let length: t<'a> => int", + "docstrings": [] + }, + { + "id": "HashtblLabels.S.stats", + "kind": "value", + "name": "stats", + "signature": "let stats: t<'a> => statistics", + "docstrings": [] + } + ] + } + }, + { + "id": "SeededS.HashtblLabels", + "kind": "module", + "item": { + "name": "SeededS", + "docstrings": [], + "items": [ + { + "id": "HashtblLabels.SeededS.key", + "kind": "type", + "name": "key", + "signature": "type key", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.create", + "kind": "value", + "name": "create", + "signature": "let create: (~random: bool=?, int) => t<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.clear", + "kind": "value", + "name": "clear", + "signature": "let clear: t<'a> => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.reset", + "kind": "value", + "name": "reset", + "signature": "let reset: t<'a> => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.add", + "kind": "value", + "name": "add", + "signature": "let add: (t<'a>, ~key: key, ~data: 'a) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.remove", + "kind": "value", + "name": "remove", + "signature": "let remove: (t<'a>, key) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.find", + "kind": "value", + "name": "find", + "signature": "let find: (t<'a>, key) => 'a", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.find_opt", + "kind": "value", + "name": "find_opt", + "signature": "let find_opt: (t<'a>, key) => option<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.find_all", + "kind": "value", + "name": "find_all", + "signature": "let find_all: (t<'a>, key) => list<'a>", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.replace", + "kind": "value", + "name": "replace", + "signature": "let replace: (t<'a>, ~key: key, ~data: 'a) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.mem", + "kind": "value", + "name": "mem", + "signature": "let mem: (t<'a>, key) => bool", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (~f: (~key: key, ~data: 'a) => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.filter_map_inplace", + "kind": "value", + "name": "filter_map_inplace", + "signature": "let filter_map_inplace: (~f: (~key: key, ~data: 'a) => option<'a>, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.fold", + "kind": "value", + "name": "fold", + "signature": "let fold: (~f: (~key: key, ~data: 'a, 'b) => 'b, t<'a>, ~init: 'b) => 'b", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.length", + "kind": "value", + "name": "length", + "signature": "let length: t<'a> => int", + "docstrings": [] + }, + { + "id": "HashtblLabels.SeededS.stats", + "kind": "value", + "name": "stats", + "signature": "let stats: t<'a> => statistics", + "docstrings": [] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/index_data/api/Int32.json b/index_data/api/Int32.json new file mode 100644 index 000000000..0c725b734 --- /dev/null +++ b/index_data/api/Int32.json @@ -0,0 +1,312 @@ +{ + "name": "Int32", + "docstrings": [], + "items": [ + { + "id": "Int32.t", + "kind": "type", + "name": "t", + "signature": "type t = int", + "docstrings": [ + "32-bit integers.\n\n This module provides operations on the type [t]\n of signed 32-bit integers. Unlike the built-in [int] type,\n the type [t] is guaranteed to be exactly 32-bit wide on all\n platforms. All arithmetic operations over [t] are taken\n modulo 2{^32}.\n\n Performance notice: values of type [t] occupy more memory\n space than values of type [int], and arithmetic operations on\n [t] are generally slower than those on [int]. Use [t]\n only when the application requires exact 32-bit arithmetic." + ] + }, + { + "id": "Int32.zero", + "kind": "value", + "name": "zero", + "signature": "let zero: t", + "docstrings": [ + "The 32-bit integer 0." + ] + }, + { + "id": "Int32.one", + "kind": "value", + "name": "one", + "signature": "let one: t", + "docstrings": [ + "The 32-bit integer 1." + ] + }, + { + "id": "Int32.minus_one", + "kind": "value", + "name": "minus_one", + "signature": "let minus_one: t", + "docstrings": [ + "The 32-bit integer -1." + ] + }, + { + "id": "Int32.neg", + "kind": "value", + "name": "neg", + "signature": "let neg: t => t", + "docstrings": [ + "Unary negation." + ] + }, + { + "id": "Int32.add", + "kind": "value", + "name": "add", + "signature": "let add: (t, t) => t", + "docstrings": [ + "Addition." + ] + }, + { + "id": "Int32.sub", + "kind": "value", + "name": "sub", + "signature": "let sub: (t, t) => t", + "docstrings": [ + "Subtraction." + ] + }, + { + "id": "Int32.mul", + "kind": "value", + "name": "mul", + "signature": "let mul: (t, t) => t", + "docstrings": [ + "Multiplication." + ] + }, + { + "id": "Int32.div", + "kind": "value", + "name": "div", + "signature": "let div: (t, t) => t", + "docstrings": [ + "Integer division. Raise [Division_by_zero] if the second\n argument is zero. This division rounds the real quotient of\n its arguments towards zero, as specified for {!Pervasives.(/)}." + ] + }, + { + "id": "Int32.rem", + "kind": "value", + "name": "rem", + "signature": "let rem: (t, t) => t", + "docstrings": [ + "Integer remainder. If [y] is not zero, the result\n of [Int32.rem x y] satisfies the following property:\n [x = Int32.add (Int32.mul (Int32.div x y) y) (Int32.rem x y)].\n If [y = 0], [Int32.rem x y] raises [Division_by_zero]." + ] + }, + { + "id": "Int32.succ", + "kind": "value", + "name": "succ", + "signature": "let succ: t => t", + "docstrings": [ + "Successor. [Int32.succ x] is [Int32.add x Int32.one]." + ] + }, + { + "id": "Int32.pred", + "kind": "value", + "name": "pred", + "signature": "let pred: t => t", + "docstrings": [ + "Predecessor. [Int32.pred x] is [Int32.sub x Int32.one]." + ] + }, + { + "id": "Int32.abs", + "kind": "value", + "name": "abs", + "signature": "let abs: t => t", + "docstrings": [ + "Return the absolute value of its argument." + ] + }, + { + "id": "Int32.max_int", + "kind": "value", + "name": "max_int", + "signature": "let max_int: t", + "docstrings": [ + "The greatest representable 32-bit integer, 2{^31} - 1." + ] + }, + { + "id": "Int32.min_int", + "kind": "value", + "name": "min_int", + "signature": "let min_int: t", + "docstrings": [ + "The smallest representable 32-bit integer, -2{^31}." + ] + }, + { + "id": "Int32.logand", + "kind": "value", + "name": "logand", + "signature": "let logand: (t, t) => t", + "docstrings": [ + "Bitwise logical and." + ] + }, + { + "id": "Int32.logor", + "kind": "value", + "name": "logor", + "signature": "let logor: (t, t) => t", + "docstrings": [ + "Bitwise logical or." + ] + }, + { + "id": "Int32.logxor", + "kind": "value", + "name": "logxor", + "signature": "let logxor: (t, t) => t", + "docstrings": [ + "Bitwise logical exclusive or." + ] + }, + { + "id": "Int32.lognot", + "kind": "value", + "name": "lognot", + "signature": "let lognot: t => t", + "docstrings": [ + "Bitwise logical negation." + ] + }, + { + "id": "Int32.shift_left", + "kind": "value", + "name": "shift_left", + "signature": "let shift_left: (t, int) => t", + "docstrings": [ + "[Int32.shift_left x y] shifts [x] to the left by [y] bits.\n The result is unspecified if [y < 0] or [y >= 32]." + ] + }, + { + "id": "Int32.shift_right", + "kind": "value", + "name": "shift_right", + "signature": "let shift_right: (t, int) => t", + "docstrings": [ + "[Int32.shift_right x y] shifts [x] to the right by [y] bits.\n This is an arithmetic shift: the sign bit of [x] is replicated\n and inserted in the vacated bits.\n The result is unspecified if [y < 0] or [y >= 32]." + ] + }, + { + "id": "Int32.shift_right_logical", + "kind": "value", + "name": "shift_right_logical", + "signature": "let shift_right_logical: (t, int) => t", + "docstrings": [ + "[Int32.shift_right_logical x y] shifts [x] to the right by [y] bits.\n This is a logical shift: zeroes are inserted in the vacated bits\n regardless of the sign of [x].\n The result is unspecified if [y < 0] or [y >= 32]." + ] + }, + { + "id": "Int32.of_int", + "kind": "value", + "name": "of_int", + "signature": "let of_int: int => t", + "docstrings": [ + "Convert the given integer (type [int]) to a 32-bit integer\n (type [t])." + ] + }, + { + "id": "Int32.to_int", + "kind": "value", + "name": "to_int", + "signature": "let to_int: t => int", + "docstrings": [ + "Convert the given 32-bit integer (type [t]) to an\n integer (type [int]). On 32-bit platforms, the 32-bit integer\n is taken modulo 2{^31}, i.e. the high-order bit is lost\n during the conversion. On 64-bit platforms, the conversion\n is exact." + ] + }, + { + "id": "Int32.of_float", + "kind": "value", + "name": "of_float", + "signature": "let of_float: float => t", + "docstrings": [ + "Convert the given floating-point number to a 32-bit integer,\n discarding the fractional part (truncate towards 0).\n The result of the conversion is undefined if, after truncation,\n the number is outside the range \\[{!Int32.min_int}, {!Int32.max_int}\\]." + ] + }, + { + "id": "Int32.to_float", + "kind": "value", + "name": "to_float", + "signature": "let to_float: t => float", + "docstrings": [ + "Convert the given 32-bit integer to a floating-point number." + ] + }, + { + "id": "Int32.of_string", + "kind": "value", + "name": "of_string", + "signature": "let of_string: string => t", + "docstrings": [ + "Convert the given string to a 32-bit integer.\n The string is read in decimal (by default, or if the string \n begins with [0u]) or in hexadecimal, octal or binary if the\n string begins with [0x], [0o] or [0b] respectively.\n\n The [0u] prefix reads the input as an unsigned integer in the range\n [[0, 2*Int32.max_int+1]]. If the input exceeds {!Int32.max_int}\n it is converted to the signed integer\n [Int32.min_int + input - Int32.max_int - 1].\n\n The [_] (underscore) character can appear anywhere in the string\n and is ignored.\n Raise [Failure \"Int32.of_string\"] if the given string is not\n a valid representation of an integer, or if the integer represented\n exceeds the range of integers representable in type [t]." + ] + }, + { + "id": "Int32.of_string_opt", + "kind": "value", + "name": "of_string_opt", + "signature": "let of_string_opt: string => option", + "docstrings": [ + "Same as [of_string], but return [None] instead of raising.\n @since 4.05" + ] + }, + { + "id": "Int32.to_string", + "kind": "value", + "name": "to_string", + "signature": "let to_string: t => string", + "docstrings": [ + "Return the string representation of its argument, in signed decimal." + ] + }, + { + "id": "Int32.bits_of_float", + "kind": "value", + "name": "bits_of_float", + "signature": "let bits_of_float: float => t", + "docstrings": [ + "Return the internal representation of the given float according\n to the IEEE 754 floating-point 'single format' bit layout.\n Bit 31 of the result represents the sign of the float;\n bits 30 to 23 represent the (biased) exponent; bits 22 to 0\n represent the mantissa." + ] + }, + { + "id": "Int32.float_of_bits", + "kind": "value", + "name": "float_of_bits", + "signature": "let float_of_bits: t => float", + "docstrings": [ + "Return the floating-point number whose internal representation,\n according to the IEEE 754 floating-point 'single format' bit layout,\n is the given [t]." + ] + }, + { + "id": "Int32.compare", + "kind": "value", + "name": "compare", + "signature": "let compare: (t, t) => int", + "docstrings": [ + "The comparison function for 32-bit integers, with the same specification as\n {!Pervasives.compare}. Along with the type [t], this function [compare]\n allows the module [Int32] to be passed as argument to the functors\n {!Set.Make} and {!Map.Make}." + ] + }, + { + "id": "Int32.equal", + "kind": "value", + "name": "equal", + "signature": "let equal: (t, t) => bool", + "docstrings": [ + "The equal function for int32s.\n @since 4.03.0" + ] + }, + { + "id": "Int32.format", + "kind": "value", + "name": "format", + "signature": "let format: (string, t) => string", + "docstrings": [ + "Do not use this deprecated function. Instead,\n used {!Printf.sprintf} with a [%l...] format." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Int64.json b/index_data/api/Int64.json new file mode 100644 index 000000000..1edd3a99f --- /dev/null +++ b/index_data/api/Int64.json @@ -0,0 +1,330 @@ +{ + "name": "Int64", + "docstrings": [], + "items": [ + { + "id": "Int64.zero", + "kind": "value", + "name": "zero", + "signature": "let zero: int64", + "docstrings": [ + "The 64-bit integer 0." + ] + }, + { + "id": "Int64.one", + "kind": "value", + "name": "one", + "signature": "let one: int64", + "docstrings": [ + "The 64-bit integer 1." + ] + }, + { + "id": "Int64.minus_one", + "kind": "value", + "name": "minus_one", + "signature": "let minus_one: int64", + "docstrings": [ + "The 64-bit integer -1." + ] + }, + { + "id": "Int64.neg", + "kind": "value", + "name": "neg", + "signature": "let neg: int64 => int64", + "docstrings": [ + "Unary negation." + ] + }, + { + "id": "Int64.add", + "kind": "value", + "name": "add", + "signature": "let add: (int64, int64) => int64", + "docstrings": [ + "Addition." + ] + }, + { + "id": "Int64.sub", + "kind": "value", + "name": "sub", + "signature": "let sub: (int64, int64) => int64", + "docstrings": [ + "Subtraction." + ] + }, + { + "id": "Int64.mul", + "kind": "value", + "name": "mul", + "signature": "let mul: (int64, int64) => int64", + "docstrings": [ + "Multiplication." + ] + }, + { + "id": "Int64.div", + "kind": "value", + "name": "div", + "signature": "let div: (int64, int64) => int64", + "docstrings": [ + "Integer division. Raise [Division_by_zero] if the second\n argument is zero. This division rounds the real quotient of\n its arguments towards zero, as specified for {!Pervasives.(/)}." + ] + }, + { + "id": "Int64.rem", + "kind": "value", + "name": "rem", + "signature": "let rem: (int64, int64) => int64", + "docstrings": [ + "Integer remainder. If [y] is not zero, the result\n of [Int64.rem x y] satisfies the following property:\n [x = Int64.add (Int64.mul (Int64.div x y) y) (Int64.rem x y)].\n If [y = 0], [Int64.rem x y] raises [Division_by_zero]." + ] + }, + { + "id": "Int64.succ", + "kind": "value", + "name": "succ", + "signature": "let succ: int64 => int64", + "docstrings": [ + "Successor. [Int64.succ x] is [Int64.add x Int64.one]." + ] + }, + { + "id": "Int64.pred", + "kind": "value", + "name": "pred", + "signature": "let pred: int64 => int64", + "docstrings": [ + "Predecessor. [Int64.pred x] is [Int64.sub x Int64.one]." + ] + }, + { + "id": "Int64.abs", + "kind": "value", + "name": "abs", + "signature": "let abs: int64 => int64", + "docstrings": [ + "Return the absolute value of its argument." + ] + }, + { + "id": "Int64.max_int", + "kind": "value", + "name": "max_int", + "signature": "let max_int: int64", + "docstrings": [ + "The greatest representable 64-bit integer, 2{^63} - 1." + ] + }, + { + "id": "Int64.min_int", + "kind": "value", + "name": "min_int", + "signature": "let min_int: int64", + "docstrings": [ + "The smallest representable 64-bit integer, -2{^63}." + ] + }, + { + "id": "Int64.logand", + "kind": "value", + "name": "logand", + "signature": "let logand: (int64, int64) => int64", + "docstrings": [ + "Bitwise logical and." + ] + }, + { + "id": "Int64.logor", + "kind": "value", + "name": "logor", + "signature": "let logor: (int64, int64) => int64", + "docstrings": [ + "Bitwise logical or." + ] + }, + { + "id": "Int64.logxor", + "kind": "value", + "name": "logxor", + "signature": "let logxor: (int64, int64) => int64", + "docstrings": [ + "Bitwise logical exclusive or." + ] + }, + { + "id": "Int64.lognot", + "kind": "value", + "name": "lognot", + "signature": "let lognot: int64 => int64", + "docstrings": [ + "Bitwise logical negation." + ] + }, + { + "id": "Int64.shift_left", + "kind": "value", + "name": "shift_left", + "signature": "let shift_left: (int64, int) => int64", + "docstrings": [ + "[Int64.shift_left x y] shifts [x] to the left by [y] bits.\n The result is unspecified if [y < 0] or [y >= 64]." + ] + }, + { + "id": "Int64.shift_right", + "kind": "value", + "name": "shift_right", + "signature": "let shift_right: (int64, int) => int64", + "docstrings": [ + "[Int64.shift_right x y] shifts [x] to the right by [y] bits.\n This is an arithmetic shift: the sign bit of [x] is replicated\n and inserted in the vacated bits.\n The result is unspecified if [y < 0] or [y >= 64]." + ] + }, + { + "id": "Int64.shift_right_logical", + "kind": "value", + "name": "shift_right_logical", + "signature": "let shift_right_logical: (int64, int) => int64", + "docstrings": [ + "[Int64.shift_right_logical x y] shifts [x] to the right by [y] bits.\n This is a logical shift: zeroes are inserted in the vacated bits\n regardless of the sign of [x].\n The result is unspecified if [y < 0] or [y >= 64]." + ] + }, + { + "id": "Int64.of_int", + "kind": "value", + "name": "of_int", + "signature": "let of_int: int => int64", + "docstrings": [ + "Convert the given integer (type [int]) to a 64-bit integer\n (type [int64])." + ] + }, + { + "id": "Int64.to_int", + "kind": "value", + "name": "to_int", + "signature": "let to_int: int64 => int", + "docstrings": [ + "Convert the given 64-bit integer (type [int64]) to an\n integer (type [int]). On 64-bit platforms, the 64-bit integer\n is taken modulo 2{^63}, i.e. the high-order bit is lost\n during the conversion. On 32-bit platforms, the 64-bit integer\n is taken modulo 2{^31}, i.e. the top 33 bits are lost\n during the conversion." + ] + }, + { + "id": "Int64.of_float", + "kind": "value", + "name": "of_float", + "signature": "let of_float: float => int64", + "docstrings": [ + "Convert the given floating-point number to a 64-bit integer,\n discarding the fractional part (truncate towards 0).\n The result of the conversion is undefined if, after truncation,\n the number is outside the range \\[{!Int64.min_int}, {!Int64.max_int}\\]." + ] + }, + { + "id": "Int64.to_float", + "kind": "value", + "name": "to_float", + "signature": "let to_float: int64 => float", + "docstrings": [ + "Convert the given 64-bit integer to a floating-point number." + ] + }, + { + "id": "Int64.of_int32", + "kind": "value", + "name": "of_int32", + "signature": "let of_int32: int => int64", + "docstrings": [ + "Convert the given 32-bit integer (type [int])\n to a 64-bit integer (type [int64])." + ] + }, + { + "id": "Int64.to_int32", + "kind": "value", + "name": "to_int32", + "signature": "let to_int32: int64 => int", + "docstrings": [ + "Convert the given 64-bit integer (type [int64]) to a\n 32-bit integer (type [int]). The 64-bit integer\n is taken modulo 2{^32}, i.e. the top 32 bits are lost\n during the conversion." + ] + }, + { + "id": "Int64.of_string", + "kind": "value", + "name": "of_string", + "signature": "let of_string: string => int64", + "docstrings": [ + "Convert the given string to a 64-bit integer.\n The string is read in decimal (by default, or if the string \n begins with [0u]) or in hexadecimal, octal or binary if the\n string begins with [0x], [0o] or [0b] respectively.\n\n The [0u] prefix reads the input as an unsigned integer in the range\n [[0, 2*Int64.max_int+1]]. If the input exceeds {!Int64.max_int}\n it is converted to the signed integer\n [Int64.min_int + input - Int64.max_int - 1].\n\n The [_] (underscore) character can appear anywhere in the string\n and is ignored.\n Raise [Failure \"Int64.of_string\"] if the given string is not\n a valid representation of an integer, or if the integer represented\n exceeds the range of integers representable in type [int64]." + ] + }, + { + "id": "Int64.of_string_opt", + "kind": "value", + "name": "of_string_opt", + "signature": "let of_string_opt: string => option", + "docstrings": [ + "Same as [of_string], but return [None] instead of raising.\n @since 4.05" + ] + }, + { + "id": "Int64.to_string", + "kind": "value", + "name": "to_string", + "signature": "let to_string: int64 => string", + "docstrings": [ + "Return the string representation of its argument, in decimal." + ] + }, + { + "id": "Int64.bits_of_float", + "kind": "value", + "name": "bits_of_float", + "signature": "let bits_of_float: float => int64", + "docstrings": [ + "Return the internal representation of the given float according\n to the IEEE 754 floating-point 'double format' bit layout.\n Bit 63 of the result represents the sign of the float;\n bits 62 to 52 represent the (biased) exponent; bits 51 to 0\n represent the mantissa." + ] + }, + { + "id": "Int64.float_of_bits", + "kind": "value", + "name": "float_of_bits", + "signature": "let float_of_bits: int64 => float", + "docstrings": [ + "Return the floating-point number whose internal representation,\n according to the IEEE 754 floating-point 'double format' bit layout,\n is the given [int64]." + ] + }, + { + "id": "Int64.t", + "kind": "type", + "name": "t", + "signature": "type t = int64", + "docstrings": [ + "An alias for the type of 64-bit integers." + ] + }, + { + "id": "Int64.compare", + "kind": "value", + "name": "compare", + "signature": "let compare: (t, t) => int", + "docstrings": [ + "The comparison function for 64-bit integers, with the same specification as\n {!Pervasives.compare}. Along with the type [t], this function [compare]\n allows the module [Int64] to be passed as argument to the functors\n {!Set.Make} and {!Map.Make}." + ] + }, + { + "id": "Int64.equal", + "kind": "value", + "name": "equal", + "signature": "let equal: (t, t) => bool", + "docstrings": [ + "The equal function for int64s.\n @since 4.03.0" + ] + }, + { + "id": "Int64.format", + "kind": "value", + "name": "format", + "signature": "let format: (string, int64) => string", + "docstrings": [ + "Do not use this deprecated function. Instead,\n used {!Printf.sprintf} with a [%L...] format." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js.json b/index_data/api/Js.json new file mode 100644 index 000000000..e48e218c1 --- /dev/null +++ b/index_data/api/Js.json @@ -0,0 +1,579 @@ +{ + "name": "Js", + "docstrings": [], + "items": [ + { + "id": "Js.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = 'a constraint 'a = {..}", + "docstrings": [ + "JS object type" + ] + }, + { + "id": "Js.Js_mapperRt", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module MapperRt = Js_mapperRt" + }, + { + "id": "Internal.Js", + "kind": "module", + "item": { + "name": "Internal", + "docstrings": [], + "items": [ + { + "id": "Js.Internal.opaqueFullApply", + "kind": "value", + "name": "opaqueFullApply", + "signature": "let opaqueFullApply: 'a => 'a", + "docstrings": [] + }, + { + "id": "Js.Internal.run", + "kind": "value", + "name": "run", + "signature": "let run: (. unit) => 'a => 'a", + "docstrings": [] + }, + { + "id": "Js.Internal.opaque", + "kind": "value", + "name": "opaque", + "signature": "let opaque: 'a => 'a", + "docstrings": [] + } + ] + } + }, + { + "id": "Js.null", + "kind": "type", + "name": "null", + "signature": "type null<'a> = Value('a) | Null", + "docstrings": [ + "Nullable value of this type can be either null or 'a. This type is equivalent to Js.Null.t." + ], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Value", + "docstrings": [], + "signature": "Value('a)" + }, + { + "constructorName": "Null", + "docstrings": [], + "signature": "Null" + } + ] + } + }, + { + "id": "Js.undefined", + "kind": "type", + "name": "undefined", + "signature": "type undefined<+'a>", + "docstrings": [ + "A value of this type can be either undefined or 'a. This type is equivalent to Js.Undefined.t." + ] + }, + { + "id": "Js.nullable", + "kind": "type", + "name": "nullable", + "signature": "type nullable<'a> = Value('a) | Null | Undefined", + "docstrings": [], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Value", + "docstrings": [], + "signature": "Value('a)" + }, + { + "constructorName": "Null", + "docstrings": [], + "signature": "Null" + }, + { + "constructorName": "Undefined", + "docstrings": [], + "signature": "Undefined" + } + ] + } + }, + { + "id": "Js.null_undefined", + "kind": "type", + "name": "null_undefined", + "signature": "type null_undefined<'a> = nullable<'a>", + "docstrings": [], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Value", + "docstrings": [], + "signature": "Value('a)" + }, + { + "constructorName": "Null", + "docstrings": [], + "signature": "Null" + }, + { + "constructorName": "Undefined", + "docstrings": [], + "signature": "Undefined" + } + ] + } + }, + { + "id": "Js.toOption", + "kind": "value", + "name": "toOption", + "signature": "let toOption: nullable<'a> => option<'a>", + "docstrings": [] + }, + { + "id": "Js.undefinedToOption", + "kind": "value", + "name": "undefinedToOption", + "signature": "let undefinedToOption: undefined<'a> => option<'a>", + "docstrings": [] + }, + { + "id": "Js.nullToOption", + "kind": "value", + "name": "nullToOption", + "signature": "let nullToOption: null<'a> => option<'a>", + "docstrings": [] + }, + { + "id": "Js.isNullable", + "kind": "value", + "name": "isNullable", + "signature": "let isNullable: nullable<'a> => bool", + "docstrings": [] + }, + { + "id": "Js.import", + "kind": "value", + "name": "import", + "signature": "let import: 'a => promise<'a>", + "docstrings": [] + }, + { + "id": "Js.testAny", + "kind": "value", + "name": "testAny", + "signature": "let testAny: 'a => bool", + "docstrings": [ + "The same as {!test} except that it is more permissive on the types of input" + ] + }, + { + "id": "Js.promise", + "kind": "type", + "name": "promise", + "signature": "type promise<+'a, +'e>", + "docstrings": [ + "The promise type, defined here for interoperation across packages.\n @deprecated please use `Js.Promise`." + ] + }, + { + "id": "Js.null", + "kind": "value", + "name": "null", + "signature": "let null: null<'a>", + "docstrings": [ + "The same as empty in `Js.Null`. Compiles to `null`." + ] + }, + { + "id": "Js.undefined", + "kind": "value", + "name": "undefined", + "signature": "let undefined: undefined<'a>", + "docstrings": [ + "The same as empty `Js.Undefined`. Compiles to `undefined`." + ] + }, + { + "id": "Js.typeof", + "kind": "value", + "name": "typeof", + "signature": "let typeof: 'a => string", + "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." + ] + }, + { + "id": "Js.log", + "kind": "value", + "name": "log", + "signature": "let log: 'a => unit", + "docstrings": [ + "Equivalent to console.log any value." + ] + }, + { + "id": "Js.log2", + "kind": "value", + "name": "log2", + "signature": "let log2: ('a, 'b) => unit", + "docstrings": [] + }, + { + "id": "Js.log3", + "kind": "value", + "name": "log3", + "signature": "let log3: ('a, 'b, 'c) => unit", + "docstrings": [] + }, + { + "id": "Js.log4", + "kind": "value", + "name": "log4", + "signature": "let log4: ('a, 'b, 'c, 'd) => unit", + "docstrings": [] + }, + { + "id": "Js.logMany", + "kind": "value", + "name": "logMany", + "signature": "let logMany: array<'a> => unit", + "docstrings": [ + "A convenience function to console.log more than 4 arguments" + ] + }, + { + "id": "Js.eqNull", + "kind": "value", + "name": "eqNull", + "signature": "let eqNull: ('a, null<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js.eqUndefined", + "kind": "value", + "name": "eqUndefined", + "signature": "let eqUndefined: ('a, undefined<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js.eqNullable", + "kind": "value", + "name": "eqNullable", + "signature": "let eqNullable: ('a, nullable<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js.unsafe_lt", + "kind": "value", + "name": "unsafe_lt", + "signature": "let unsafe_lt: ('a, 'a) => bool", + "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" + ] + }, + { + "id": "Js.unsafe_le", + "kind": "value", + "name": "unsafe_le", + "signature": "let unsafe_le: ('a, 'a) => bool", + "docstrings": [ + "`unsafe_le(a, b) will be compiled as `a <= b`.\n See also `Js.unsafe_lt`." + ] + }, + { + "id": "Js.unsafe_gt", + "kind": "value", + "name": "unsafe_gt", + "signature": "let unsafe_gt: ('a, 'a) => bool", + "docstrings": [ + "`unsafe_gt(a, b)` will be compiled as `a > b`.\n See also `Js.unsafe_lt`." + ] + }, + { + "id": "Js.unsafe_ge", + "kind": "value", + "name": "unsafe_ge", + "signature": "let unsafe_ge: ('a, 'a) => bool", + "docstrings": [ + "`unsafe_ge(a, b)` will be compiled as `a >= b`.\n See also `Js.unsafe_lt`." + ] + }, + { + "id": "Js.Js_null", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for `Js.null<'a>`" + ], + "signature": "module Null = Js_null" + }, + { + "id": "Js.Js_undefined", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for `Js.undefined<'a>`" + ], + "signature": "module Undefined = Js_undefined" + }, + { + "id": "Js.Js_null_undefined", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for `Js.null_undefined`" + ], + "signature": "module Nullable = Js_null_undefined" + }, + { + "id": "Js.Js_null_undefined", + "kind": "moduleAlias", + "docstrings": [ + "@deprecated please use `Js.Nullable`" + ], + "signature": "module Null_undefined = Js_null_undefined" + }, + { + "id": "Js.Js_exn", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for dealing with Js exceptions" + ], + "signature": "module Exn = Js_exn" + }, + { + "id": "Js.Js_array", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings to JS array" + ], + "signature": "module Array = Js_array" + }, + { + "id": "Js.Js_array2", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings to JS array" + ], + "signature": "module Array2 = Js_array2" + }, + { + "id": "Js.Js_string", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings to JS string" + ], + "signature": "module String = Js_string" + }, + { + "id": "Js.Js_string2", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings to JS string" + ], + "signature": "module String2 = Js_string2" + }, + { + "id": "Js.Js_re", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings to JS regex expression" + ], + "signature": "module Re = Js_re" + }, + { + "id": "Js.Js_promise", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings to JS Promise" + ], + "signature": "module Promise = Js_promise" + }, + { + "id": "Js.Js_promise2", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings to JS Promise" + ], + "signature": "module Promise2 = Js_promise2" + }, + { + "id": "Js.Js_date", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings for JS Date" + ], + "signature": "module Date = Js_date" + }, + { + "id": "Js.Js_dict", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for JS dictionary object" + ], + "signature": "module Dict = Js_dict" + }, + { + "id": "Js.Js_global", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings to JS global functions in global namespace" + ], + "signature": "module Global = Js_global" + }, + { + "id": "Js.Js_json", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for json" + ], + "signature": "module Json = Js_json" + }, + { + "id": "Js.Js_math", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings for JS `Math` object" + ], + "signature": "module Math = Js_math" + }, + { + "id": "Js.Js_obj", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for `Js.t`" + ], + "signature": "module Obj = Js_obj" + }, + { + "id": "Js.Js_typed_array", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings for JS typed array" + ], + "signature": "module Typed_array = Js_typed_array" + }, + { + "id": "Js.Js_typed_array2", + "kind": "moduleAlias", + "docstrings": [ + "Provide bindings for JS typed array" + ], + "signature": "module TypedArray2 = Js_typed_array2" + }, + { + "id": "Js.Js_types", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for manipulating JS types" + ], + "signature": "module Types = Js_types" + }, + { + "id": "Js.Js_float", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for JS float" + ], + "signature": "module Float = Js_float" + }, + { + "id": "Js.Js_int", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for int" + ], + "signature": "module Int = Js_int" + }, + { + "id": "Js.Js_bigint", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for bigint" + ], + "signature": "module Bigint = Js_bigint" + }, + { + "id": "Js.Js_option", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for option" + ], + "signature": "module Option = Js_option" + }, + { + "id": "Js.Js_result", + "kind": "moduleAlias", + "docstrings": [ + "Define the interface for result" + ], + "signature": "module Result = Js_result" + }, + { + "id": "Js.Js_list", + "kind": "moduleAlias", + "docstrings": [ + "Provide utilities for list" + ], + "signature": "module List = Js_list" + }, + { + "id": "Js.Js_vector", + "kind": "moduleAlias", + "docstrings": [ + "Provides bindings for JS Vector" + ], + "signature": "module Vector = Js_vector" + }, + { + "id": "Js.Js_console", + "kind": "moduleAlias", + "docstrings": [ + "Provides bindings for console" + ], + "signature": "module Console = Js_console" + }, + { + "id": "Js.Js_set", + "kind": "moduleAlias", + "docstrings": [ + "Provides bindings for ES6 Set" + ], + "signature": "module Set = Js_set" + }, + { + "id": "Js.Js_weakset", + "kind": "moduleAlias", + "docstrings": [ + "Provides bindings for ES6 WeakSet" + ], + "signature": "module WeakSet = Js_weakset" + }, + { + "id": "Js.Js_map", + "kind": "moduleAlias", + "docstrings": [ + "Provides bindings for ES6 Map" + ], + "signature": "module Map = Js_map" + }, + { + "id": "Js.Js_weakmap", + "kind": "moduleAlias", + "docstrings": [ + "Provides bindings for ES6 WeakMap" + ], + "signature": "module WeakMap = Js_weakmap" + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_OO.json b/index_data/api/Js_OO.json new file mode 100644 index 000000000..5499398d4 --- /dev/null +++ b/index_data/api/Js_OO.json @@ -0,0 +1,397 @@ +{ + "name": "Js_OO", + "docstrings": [], + "items": [ + { + "id": "Js_OO.unsafe_to_method", + "kind": "value", + "name": "unsafe_to_method", + "signature": "let unsafe_to_method: 'a => 'a", + "docstrings": [] + }, + { + "id": "Callback.Js_OO", + "kind": "module", + "item": { + "name": "Callback", + "docstrings": [], + "items": [ + { + "id": "Js_OO.Callback.arity1", + "kind": "type", + "name": "arity1", + "signature": "@unboxed @unboxed type arity1<'a> = {\\\\\\\"I1\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I1", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity2", + "kind": "type", + "name": "arity2", + "signature": "@unboxed @unboxed type arity2<'a> = {\\\\\\\"I2\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I2", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity3", + "kind": "type", + "name": "arity3", + "signature": "@unboxed @unboxed type arity3<'a> = {\\\\\\\"I3\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I3", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity4", + "kind": "type", + "name": "arity4", + "signature": "@unboxed @unboxed type arity4<'a> = {\\\\\\\"I4\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I4", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity5", + "kind": "type", + "name": "arity5", + "signature": "@unboxed @unboxed type arity5<'a> = {\\\\\\\"I5\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I5", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity6", + "kind": "type", + "name": "arity6", + "signature": "@unboxed @unboxed type arity6<'a> = {\\\\\\\"I6\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I6", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity7", + "kind": "type", + "name": "arity7", + "signature": "@unboxed @unboxed type arity7<'a> = {\\\\\\\"I7\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I7", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity8", + "kind": "type", + "name": "arity8", + "signature": "@unboxed @unboxed type arity8<'a> = {\\\\\\\"I8\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I8", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity9", + "kind": "type", + "name": "arity9", + "signature": "@unboxed @unboxed type arity9<'a> = {\\\\\\\"I9\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I9", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity10", + "kind": "type", + "name": "arity10", + "signature": "@unboxed @unboxed type arity10<'a> = {\\\\\\\"I10\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I10", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity11", + "kind": "type", + "name": "arity11", + "signature": "@unboxed @unboxed type arity11<'a> = {\\\\\\\"I11\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I11", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity12", + "kind": "type", + "name": "arity12", + "signature": "@unboxed @unboxed type arity12<'a> = {\\\\\\\"I12\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I12", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity13", + "kind": "type", + "name": "arity13", + "signature": "@unboxed @unboxed type arity13<'a> = {\\\\\\\"I13\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I13", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity14", + "kind": "type", + "name": "arity14", + "signature": "@unboxed @unboxed type arity14<'a> = {\\\\\\\"I14\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I14", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity15", + "kind": "type", + "name": "arity15", + "signature": "@unboxed @unboxed type arity15<'a> = {\\\\\\\"I15\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I15", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity16", + "kind": "type", + "name": "arity16", + "signature": "@unboxed @unboxed type arity16<'a> = {\\\\\\\"I16\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I16", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity17", + "kind": "type", + "name": "arity17", + "signature": "@unboxed @unboxed type arity17<'a> = {\\\\\\\"I17\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I17", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity18", + "kind": "type", + "name": "arity18", + "signature": "@unboxed @unboxed type arity18<'a> = {\\\\\\\"I18\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I18", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity19", + "kind": "type", + "name": "arity19", + "signature": "@unboxed @unboxed type arity19<'a> = {\\\\\\\"I19\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I19", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity20", + "kind": "type", + "name": "arity20", + "signature": "@unboxed @unboxed type arity20<'a> = {\\\\\\\"I20\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I20", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity21", + "kind": "type", + "name": "arity21", + "signature": "@unboxed @unboxed type arity21<'a> = {\\\\\\\"I21\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I21", + "docstrings": [], + "signature": "'a" + } + ] + } + }, + { + "id": "Js_OO.Callback.arity22", + "kind": "type", + "name": "arity22", + "signature": "@unboxed @unboxed type arity22<'a> = {\\\\\\\"I22\\\": 'a}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "I22", + "docstrings": [], + "signature": "'a" + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_array.json b/index_data/api/Js_array.json new file mode 100644 index 000000000..79b7c2835 --- /dev/null +++ b/index_data/api/Js_array.json @@ -0,0 +1,444 @@ +{ + "name": "Js_array", + "docstrings": [ + "Provides bindings to JavaScript’s `Array` functions. These bindings are\n optimized for pipe-last (`|>`), where the array to be processed is the last\n parameter in the function.\n\n Here is an example to find the sum of squares of all even numbers in an array.\n Without pipe last, we must call the functions in reverse order:\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n let square = x => x * x\n let result = {\n open Js.Array\n reduce(\\\"+\", 0, map(square, filter(isEven, [5, 2, 3, 4, 1])))\n }\n ```\n\n With pipe last, we call the functions in the “natural” order:\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n let square = x => x * x\n let 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", + "signature": "type t<'a> = array<'a>", + "docstrings": [ + "The type used to describe a JavaScript array." + ] + }, + { + "id": "Js_array.array_like", + "kind": "type", + "name": "array_like", + "signature": "type array_like<'a> = Js_array2.array_like<'a>", + "docstrings": [ + "A type used to describe JavaScript objects that are like an array or are iterable." + ] + }, + { + "id": "Js_array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like<'a> => array<'a>", + "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 ```res example\n let strArr = Js.String.castToArrayLike(\"abcd\")\n Js.Array.from(strArr) == [\"a\", \"b\", \"c\", \"d\"]\n ```" + ] + }, + { + "id": "Js_array.fromMap", + "kind": "value", + "name": "fromMap", + "signature": "let fromMap: (array_like<'a>, 'a => 'b) => array<'b>", + "docstrings": [ + "Creates a new array by applying a function (the second argument) to each item\n in the `array_like` first argument. See\n [`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)\n on MDN.\n\n ```res example\n let strArr = Js.String.castToArrayLike(\"abcd\")\n let code = s => Js.String.charCodeAt(0, s)\n Js.Array.fromMap(strArr, code) == [97.0, 98.0, 99.0, 100.0]\n ```" + ] + }, + { + "id": "Js_array.isArray", + "kind": "value", + "name": "isArray", + "signature": "let isArray: 'a => bool", + "docstrings": [] + }, + { + "id": "Js_array.length", + "kind": "value", + "name": "length", + "signature": "let length: array<'a> => int", + "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." + ] + }, + { + "id": "Js_array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: ('a, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: ('a, ~from: int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: ('a, ~start: int, ~end_: int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.pop", + "kind": "value", + "name": "pop", + "signature": "let pop: t<'a> => option<'a>", + "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 ```res example\n let arr = [100, 101, 102, 103, 104]\n Js.Array.pop(arr) == Some(104)\n arr == [100, 101, 102, 103]\n\n let empty: array = []\n Js.Array.pop(empty) == None\n ```" + ] + }, + { + "id": "Js_array.push", + "kind": "value", + "name": "push", + "signature": "let push: ('a, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.pushMany", + "kind": "value", + "name": "pushMany", + "signature": "let pushMany: (array<'a>, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t<'a> => t<'a>", + "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 ```res example\n let arr = [\"ant\", \"bee\", \"cat\"]\n Js.Array.reverseInPlace(arr) == [\"cat\", \"bee\", \"ant\"]\n arr == [\"cat\", \"bee\", \"ant\"]\n ```" + ] + }, + { + "id": "Js_array.shift", + "kind": "value", + "name": "shift", + "signature": "let shift: t<'a> => option<'a>", + "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 ```res example\n let arr = [100, 101, 102, 103, 104]\n Js.Array.shift(arr) == Some(100)\n arr == [101, 102, 103, 104]\n\n let empty: array = []\n Js.Array.shift(empty) == None\n ```" + ] + }, + { + "id": "Js_array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t<'a> => t<'a>", + "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 ```res example\n let words = [\"bee\", \"dog\", \"ant\", \"cat\"]\n Js.Array.sortInPlace(words) == [\"ant\", \"bee\", \"cat\", \"dog\"]\n words == [\"ant\", \"bee\", \"cat\", \"dog\"]\n\n let numbers = [3, 30, 10, 1, 20, 2]\n Js.Array.sortInPlace(numbers) == [1, 10, 2, 20, 3, 30]\n numbers == [1, 10, 2, 20, 3, 30]\n ```" + ] + }, + { + "id": "Js_array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (('a, 'a) => int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.spliceInPlace", + "kind": "value", + "name": "spliceInPlace", + "signature": "let spliceInPlace: (~pos: int, ~remove: int, ~add: array<'a>, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.removeFromInPlace", + "kind": "value", + "name": "removeFromInPlace", + "signature": "let removeFromInPlace: (~pos: int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.removeCountInPlace", + "kind": "value", + "name": "removeCountInPlace", + "signature": "let removeCountInPlace: (~pos: int, ~count: int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.unshift", + "kind": "value", + "name": "unshift", + "signature": "let unshift: ('a, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.unshiftMany", + "kind": "value", + "name": "unshiftMany", + "signature": "let unshiftMany: (array<'a>, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (t<'a>, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.concatMany", + "kind": "value", + "name": "concatMany", + "signature": "let concatMany: (array>, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: ('a, t<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js_array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: ('a, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: ('a, ~from: int, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.join", + "kind": "value", + "name": "join", + "signature": "let join: t<'a> => string", + "docstrings": [ + "@deprecated: Use `joinWith` instead." + ] + }, + { + "id": "Js_array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t<'a>) => string", + "docstrings": [] + }, + { + "id": "Js_array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: ('a, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: ('a, ~from: int, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [ + "Returns a copy of the entire array. Same as `Js.Array.Slice(~start=0,\n ~end_=Js.Array.length(arr), arr)`. See\n [`Array.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)\n on MDN." + ] + }, + { + "id": "Js_array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t<'a> => string", + "docstrings": [ + "Converts the array to a string. Each element is converted to a string using\n JavaScript. Unlike the JavaScript `Array.toString()`, all elements in a\n ReasonML array must have the same type. See\n [`Array.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString)\n on MDN.\n\n ```res example\n Js.Array.toString([3.5, 4.6, 7.8]) == \"3.5,4.6,7.8\"\n Js.Array.toString([\"a\", \"b\", \"c\"]) == \"a,b,c\"\n ```" + ] + }, + { + "id": "Js_array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t<'a> => string", + "docstrings": [ + "Converts the array to a string using the conventions of the current locale.\n Each element is converted to a string using JavaScript. Unlike the JavaScript\n `Array.toLocaleString()`, all elements in a ReasonML array must have the same\ntype. See\n[`Array.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString)\non MDN.\n\n ```res example\n Js.Array.toLocaleString([Js.Date.make()])\n // returns \"3/19/2020, 10:52:11 AM\" for locale en_US.utf8\n // returns \"2020-3-19 10:52:11\" for locale de_DE.utf8\n ```" + ] + }, + { + "id": "Js_array.every", + "kind": "value", + "name": "every", + "signature": "let every: ('a => bool, t<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js_array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (('a, int) => bool, t<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js_array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ('a => bool, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (('a, int) => bool, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array.find", + "kind": "value", + "name": "find", + "signature": "let find: ('a => bool, t<'a>) => option<'a>", + "docstrings": [] + }, + { + "id": "Js_array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (('a, int) => bool, t<'a>) => option<'a>", + "docstrings": [] + }, + { + "id": "Js_array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ('a => bool, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (('a, int) => bool, t<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ('a => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Js_array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (('a, int) => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Js_array.map", + "kind": "value", + "name": "map", + "signature": "let map: ('a => 'b, t<'a>) => t<'b>", + "docstrings": [] + }, + { + "id": "Js_array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (('a, int) => 'b, t<'a>) => t<'b>", + "docstrings": [] + }, + { + "id": "Js_array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (('a, 'b) => 'a, 'a, t<'b>) => 'a", + "docstrings": [] + }, + { + "id": "Js_array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (('a, 'b, int) => 'a, 'a, t<'b>) => 'a", + "docstrings": [] + }, + { + "id": "Js_array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (('a, 'b) => 'a, 'a, t<'b>) => 'a", + "docstrings": [] + }, + { + "id": "Js_array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (('a, 'b, int) => 'a, 'a, t<'b>) => 'a", + "docstrings": [] + }, + { + "id": "Js_array.some", + "kind": "value", + "name": "some", + "signature": "let some: ('a => bool, t<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js_array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (('a, int) => bool, t<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js_array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (array<'a>, int) => 'a", + "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```res example\nlet arr = [100, 101, 102, 103]\nJs.Array.unsafe_get(arr, 3) == 103\nJs.Array.unsafe_get(arr, 4) // returns undefined\n```" + ] + }, + { + "id": "Js_array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (array<'a>, int, 'a) => unit", + "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```res example\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```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_array2.json b/index_data/api/Js_array2.json new file mode 100644 index 000000000..e02ba5496 --- /dev/null +++ b/index_data/api/Js_array2.json @@ -0,0 +1,528 @@ +{ + "name": "Js_array2", + "docstrings": [ + "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\n Here is an example to find the sum of squares of all even numbers in an array.\n Without pipe first, we must call the functions in reverse order:\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n let square = x => x * x\n let result = {\n open Js.Array2\n reduce(map(filter([5, 2, 3, 4, 1], isEven), square), \"+\", 0)\n }\n ```\n\n With pipe first, we call the functions in the “natural” order:\n\n ```res example\n let isEven = x => mod(x, 2) == 0\n let square = x => x * x\n let 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", + "signature": "type t<'a> = array<'a>", + "docstrings": [ + "The type used to describe a JavaScript array." + ] + }, + { + "id": "Js_array2.array_like", + "kind": "type", + "name": "array_like", + "signature": "type array_like<'a>", + "docstrings": [ + "A type used to describe JavaScript objects that are like an array or are iterable." + ] + }, + { + "id": "Js_array2.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like<'a> => array<'a>", + "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```res example\nlet strArr = Js.String.castToArrayLike(\"abcd\")\nJs.Array2.from(strArr) == [\"a\", \"b\", \"c\", \"d\"]\n```" + ] + }, + { + "id": "Js_array2.fromMap", + "kind": "value", + "name": "fromMap", + "signature": "let fromMap: (array_like<'a>, 'a => 'b) => array<'b>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.isArray", + "kind": "value", + "name": "isArray", + "signature": "let isArray: 'a => bool", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.length", + "kind": "value", + "name": "length", + "signature": "let length: array<'a> => int", + "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." + ] + }, + { + "id": "Js_array2.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t<'a>, ~to_: int) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t<'a>, ~to_: int, ~from: int) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t<'a>, ~to_: int, ~start: int, ~end_: int) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t<'a>, 'a) => t<'a>", + "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```res example\nlet arr = [100, 101, 102, 103, 104]\nJs.Array2.fillInPlace(arr, 99) == [99, 99, 99, 99, 99]\narr == [99, 99, 99, 99, 99]\n```" + ] + }, + { + "id": "Js_array2.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t<'a>, 'a, ~from: int) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t<'a>, 'a, ~start: int, ~end_: int) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.pop", + "kind": "value", + "name": "pop", + "signature": "let pop: t<'a> => option<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.push", + "kind": "value", + "name": "push", + "signature": "let push: (t<'a>, 'a) => int", + "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```res example\nlet arr = [\"ant\", \"bee\", \"cat\"]\nJs.Array2.push(arr, \"dog\") == 4\narr == [\"ant\", \"bee\", \"cat\", \"dog\"]\n```" + ] + }, + { + "id": "Js_array2.pushMany", + "kind": "value", + "name": "pushMany", + "signature": "let pushMany: (t<'a>, array<'a>) => int", + "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```res example\nlet arr = [\"ant\", \"bee\", \"cat\"]\nJs.Array2.pushMany(arr, [\"dog\", \"elk\"]) == 5\narr == [\"ant\", \"bee\", \"cat\", \"dog\", \"elk\"]\n```" + ] + }, + { + "id": "Js_array2.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t<'a> => t<'a>", + "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```res example\nlet arr = [\"ant\", \"bee\", \"cat\"]\nJs.Array2.reverseInPlace(arr) == [\"cat\", \"bee\", \"ant\"]\narr == [\"cat\", \"bee\", \"ant\"]\n```" + ] + }, + { + "id": "Js_array2.shift", + "kind": "value", + "name": "shift", + "signature": "let shift: t<'a> => option<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t<'a> => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t<'a>, ('a, 'a) => int) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.spliceInPlace", + "kind": "value", + "name": "spliceInPlace", + "signature": "let spliceInPlace: (t<'a>, ~pos: int, ~remove: int, ~add: array<'a>) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.removeFromInPlace", + "kind": "value", + "name": "removeFromInPlace", + "signature": "let removeFromInPlace: (t<'a>, ~pos: int) => t<'a>", + "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```res example\nlet arr = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\nJs.Array2.removeFromInPlace(arr, ~pos=4) == [\"e\", \"f\"]\narr == [\"a\", \"b\", \"c\", \"d\"]\n```" + ] + }, + { + "id": "Js_array2.removeCountInPlace", + "kind": "value", + "name": "removeCountInPlace", + "signature": "let removeCountInPlace: (t<'a>, ~pos: int, ~count: int) => t<'a>", + "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```res example\nlet arr = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\nJs.Array2.removeCountInPlace(arr, ~pos=2, ~count=3) == [\"c\", \"d\", \"e\"]\narr == [\"a\", \"b\", \"f\"]\n```" + ] + }, + { + "id": "Js_array2.unshift", + "kind": "value", + "name": "unshift", + "signature": "let unshift: (t<'a>, 'a) => int", + "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```res example\nlet arr = [\"b\", \"c\", \"d\"]\nJs.Array2.unshift(arr, \"a\") == 4\narr == [\"a\", \"b\", \"c\", \"d\"]\n```" + ] + }, + { + "id": "Js_array2.unshiftMany", + "kind": "value", + "name": "unshiftMany", + "signature": "let unshiftMany: (t<'a>, array<'a>) => int", + "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```res example\nlet arr = [\"d\", \"e\"]\nJs.Array2.unshiftMany(arr, [\"a\", \"b\", \"c\"]) == 5\narr == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```" + ] + }, + { + "id": "Js_array2.append", + "kind": "value", + "name": "append", + "signature": "let append: (t<'a>, 'a) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_array2.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (t<'a>, t<'a>) => t<'a>", + "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```res example\nJs.Array2.concat([\"a\", \"b\"], [\"c\", \"d\", \"e\"]) == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```" + ] + }, + { + "id": "Js_array2.concatMany", + "kind": "value", + "name": "concatMany", + "signature": "let concatMany: (t<'a>, array>) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t<'a>, 'a) => bool", + "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```res example\nJs.Array2.includes([\"a\", \"b\", \"c\"], \"b\") == true\nJs.Array2.includes([\"a\", \"b\", \"c\"], \"x\") == false\n```" + ] + }, + { + "id": "Js_array2.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t<'a>, 'a) => int", + "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```res example\nJs.Array2.indexOf([100, 101, 102, 103], 102) == 2\nJs.Array2.indexOf([100, 101, 102, 103], 999) == -1\n```" + ] + }, + { + "id": "Js_array2.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t<'a>, 'a, ~from: int) => int", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t<'a>, string) => string", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t<'a>, 'a) => int", + "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```res example\nJs.Array2.lastIndexOf([\"a\", \"b\", \"a\", \"c\"], \"a\") == 2\nJs.Array2.lastIndexOf([\"a\", \"b\", \"a\", \"c\"], \"x\") == -1\n```" + ] + }, + { + "id": "Js_array2.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t<'a>, 'a, ~from: int) => int", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t<'a>, ~start: int, ~end_: int) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "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." + ] + }, + { + "id": "Js_array2.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t<'a>, int) => t<'a>", + "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." + ] + }, + { + "id": "Js_array2.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t<'a> => string", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t<'a> => string", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.every", + "kind": "value", + "name": "every", + "signature": "let every: (t<'a>, 'a => bool) => bool", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t<'a>, ('a, int) => bool) => bool", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t<'a>, 'a => bool) => t<'a>", + "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```res example\nlet nonEmpty = s => s != \"\"\nJs.Array2.filter([\"abc\", \"\", \"\", \"def\", \"ghi\"], nonEmpty) == [\"abc\", \"def\", \"ghi\"]\n```" + ] + }, + { + "id": "Js_array2.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t<'a>, ('a, int) => bool) => t<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.find", + "kind": "value", + "name": "find", + "signature": "let find: (t<'a>, 'a => bool) => option<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t<'a>, ('a, int) => bool) => option<'a>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t<'a>, 'a => bool) => int", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t<'a>, ('a, int) => bool) => int", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t<'a>, 'a => unit) => unit", + "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```res example\n// display all elements in an array\nJs.Array2.forEach([\"a\", \"b\", \"c\"], x => Js.log(x)) == ()\n```" + ] + }, + { + "id": "Js_array2.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t<'a>, ('a, int) => unit) => unit", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.map", + "kind": "value", + "name": "map", + "signature": "let map: (t<'a>, 'a => 'b) => t<'b>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t<'a>, ('a, int) => 'b) => t<'b>", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.some", + "kind": "value", + "name": "some", + "signature": "let some: (t<'a>, 'a => bool) => bool", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t<'a>, ('a, int) => bool) => bool", + "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```res example\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```" + ] + }, + { + "id": "Js_array2.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (array<'a>, int) => 'a", + "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```res example\nlet arr = [100, 101, 102, 103]\nJs.Array2.unsafe_get(arr, 3) == 103\nJs.Array2.unsafe_get(arr, 4) // returns undefined\n```" + ] + }, + { + "id": "Js_array2.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (array<'a>, int, 'a) => unit", + "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```res example\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```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_bigint.json b/index_data/api/Js_bigint.json new file mode 100644 index 000000000..c14a4bf9a --- /dev/null +++ b/index_data/api/Js_bigint.json @@ -0,0 +1,15 @@ +{ + "name": "Js_bigint", + "docstrings": [ + "JavaScript BigInt API" + ], + "items": [ + { + "id": "Js_bigint.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_cast.json b/index_data/api/Js_cast.json new file mode 100644 index 000000000..3ad614739 --- /dev/null +++ b/index_data/api/Js_cast.json @@ -0,0 +1,26 @@ +{ + "name": "Js_cast", + "docstrings": [ + "Safe cast between OCaml values which share the same\n runtime representation\n\n Different OCaml types might share the same represention in the\n ReScript runtime; while this is a compiler internal knowledge,\n applications might benefit from having a safe and zero cost\n conversion between those types.\n\n This modules acts as the **single place** for such conversion.\n\n If for any reason, the runtime representation changes, those function\n will be modified accordingly." + ], + "items": [ + { + "id": "Js_cast.intOfBool", + "kind": "value", + "name": "intOfBool", + "signature": "let intOfBool: bool => int", + "docstrings": [ + "`intOfBool b` returns `1` for when `b` is `true` and `0` when `b` is\n `false`" + ] + }, + { + "id": "Js_cast.floatOfInt", + "kind": "value", + "name": "floatOfInt", + "signature": "let floatOfInt: int => float", + "docstrings": [ + "`floatOfInt i` returns the float value of `i`" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_console.json b/index_data/api/Js_console.json new file mode 100644 index 000000000..21a56d85f --- /dev/null +++ b/index_data/api/Js_console.json @@ -0,0 +1,167 @@ +{ + "name": "Js_console", + "docstrings": [], + "items": [ + { + "id": "Js_console.log", + "kind": "value", + "name": "log", + "signature": "let log: 'a => unit", + "docstrings": [] + }, + { + "id": "Js_console.log2", + "kind": "value", + "name": "log2", + "signature": "let log2: ('a, 'b) => unit", + "docstrings": [] + }, + { + "id": "Js_console.log3", + "kind": "value", + "name": "log3", + "signature": "let log3: ('a, 'b, 'c) => unit", + "docstrings": [] + }, + { + "id": "Js_console.log4", + "kind": "value", + "name": "log4", + "signature": "let log4: ('a, 'b, 'c, 'd) => unit", + "docstrings": [] + }, + { + "id": "Js_console.logMany", + "kind": "value", + "name": "logMany", + "signature": "let logMany: array<'a> => unit", + "docstrings": [] + }, + { + "id": "Js_console.info", + "kind": "value", + "name": "info", + "signature": "let info: 'a => unit", + "docstrings": [] + }, + { + "id": "Js_console.info2", + "kind": "value", + "name": "info2", + "signature": "let info2: ('a, 'b) => unit", + "docstrings": [] + }, + { + "id": "Js_console.info3", + "kind": "value", + "name": "info3", + "signature": "let info3: ('a, 'b, 'c) => unit", + "docstrings": [] + }, + { + "id": "Js_console.info4", + "kind": "value", + "name": "info4", + "signature": "let info4: ('a, 'b, 'c, 'd) => unit", + "docstrings": [] + }, + { + "id": "Js_console.infoMany", + "kind": "value", + "name": "infoMany", + "signature": "let infoMany: array<'a> => unit", + "docstrings": [] + }, + { + "id": "Js_console.warn", + "kind": "value", + "name": "warn", + "signature": "let warn: 'a => unit", + "docstrings": [] + }, + { + "id": "Js_console.warn2", + "kind": "value", + "name": "warn2", + "signature": "let warn2: ('a, 'b) => unit", + "docstrings": [] + }, + { + "id": "Js_console.warn3", + "kind": "value", + "name": "warn3", + "signature": "let warn3: ('a, 'b, 'c) => unit", + "docstrings": [] + }, + { + "id": "Js_console.warn4", + "kind": "value", + "name": "warn4", + "signature": "let warn4: ('a, 'b, 'c, 'd) => unit", + "docstrings": [] + }, + { + "id": "Js_console.warnMany", + "kind": "value", + "name": "warnMany", + "signature": "let warnMany: array<'a> => unit", + "docstrings": [] + }, + { + "id": "Js_console.error", + "kind": "value", + "name": "error", + "signature": "let error: 'a => unit", + "docstrings": [] + }, + { + "id": "Js_console.error2", + "kind": "value", + "name": "error2", + "signature": "let error2: ('a, 'b) => unit", + "docstrings": [] + }, + { + "id": "Js_console.error3", + "kind": "value", + "name": "error3", + "signature": "let error3: ('a, 'b, 'c) => unit", + "docstrings": [] + }, + { + "id": "Js_console.error4", + "kind": "value", + "name": "error4", + "signature": "let error4: ('a, 'b, 'c, 'd) => unit", + "docstrings": [] + }, + { + "id": "Js_console.errorMany", + "kind": "value", + "name": "errorMany", + "signature": "let errorMany: array<'a> => unit", + "docstrings": [] + }, + { + "id": "Js_console.trace", + "kind": "value", + "name": "trace", + "signature": "let trace: unit => unit", + "docstrings": [] + }, + { + "id": "Js_console.timeStart", + "kind": "value", + "name": "timeStart", + "signature": "let timeStart: string => unit", + "docstrings": [] + }, + { + "id": "Js_console.timeEnd", + "kind": "value", + "name": "timeEnd", + "signature": "let timeEnd: string => unit", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_date.json b/index_data/api/Js_date.json new file mode 100644 index 000000000..903b4a5b4 --- /dev/null +++ b/index_data/api/Js_date.json @@ -0,0 +1,743 @@ +{ + "name": "Js_date", + "docstrings": [ + "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", + "signature": "type t", + "docstrings": [] + }, + { + "id": "Js_date.valueOf", + "kind": "value", + "name": "valueOf", + "signature": "let valueOf: t => float", + "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```res example\nJs.Date.valueOf(exampleDate) == 123456654321.0\n```" + ] + }, + { + "id": "Js_date.make", + "kind": "value", + "name": "make", + "signature": "let make: unit => t", + "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```res example\nlet now = Js.Date.make()\n```" + ] + }, + { + "id": "Js_date.fromFloat", + "kind": "value", + "name": "fromFloat", + "signature": "let fromFloat: float => t", + "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```res example\nJs.Date.fromFloat(123456654321.0) == exampleDate\n```" + ] + }, + { + "id": "Js_date.fromString", + "kind": "value", + "name": "fromString", + "signature": "let fromString: string => t", + "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```res example\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```" + ] + }, + { + "id": "Js_date.makeWithYM", + "kind": "value", + "name": "makeWithYM", + "signature": "let makeWithYM: (~year: float, ~month: float, unit) => t", + "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```res example\nlet november1 = Js.Date.makeWithYM(~year=2020.0, ~month=10.0, ())\n```" + ] + }, + { + "id": "Js_date.makeWithYMD", + "kind": "value", + "name": "makeWithYMD", + "signature": "let makeWithYMD: (~year: float, ~month: float, ~date: float, unit) => t", + "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." + ] + }, + { + "id": "Js_date.makeWithYMDH", + "kind": "value", + "name": "makeWithYMDH", + "signature": "let makeWithYMDH: (~year: float, ~month: float, ~date: float, ~hours: float, unit) => t", + "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." + ] + }, + { + "id": "Js_date.makeWithYMDHM", + "kind": "value", + "name": "makeWithYMDHM", + "signature": "let makeWithYMDHM: (\\n ~year: float,\\n ~month: float,\\n ~date: float,\\n ~hours: float,\\n ~minutes: float,\\n unit,\\n) => t", + "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." + ] + }, + { + "id": "Js_date.makeWithYMDHMS", + "kind": "value", + "name": "makeWithYMDHMS", + "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", + "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```res example\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```" + ] + }, + { + "id": "Js_date.utcWithYM", + "kind": "value", + "name": "utcWithYM", + "signature": "let utcWithYM: (~year: float, ~month: float, unit) => float", + "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```res example\nlet november1 = Js.Date.utcWithYM(~year=2020.0, ~month=10.0, ())\n```" + ] + }, + { + "id": "Js_date.utcWithYMD", + "kind": "value", + "name": "utcWithYMD", + "signature": "let utcWithYMD: (~year: float, ~month: float, ~date: float, unit) => float", + "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." + ] + }, + { + "id": "Js_date.utcWithYMDH", + "kind": "value", + "name": "utcWithYMDH", + "signature": "let utcWithYMDH: (~year: float, ~month: float, ~date: float, ~hours: float, unit) => float", + "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." + ] + }, + { + "id": "Js_date.utcWithYMDHM", + "kind": "value", + "name": "utcWithYMDHM", + "signature": "let utcWithYMDHM: (\\n ~year: float,\\n ~month: float,\\n ~date: float,\\n ~hours: float,\\n ~minutes: float,\\n unit,\\n) => float", + "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." + ] + }, + { + "id": "Js_date.utcWithYMDHMS", + "kind": "value", + "name": "utcWithYMDHMS", + "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", + "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." + ] + }, + { + "id": "Js_date.now", + "kind": "value", + "name": "now", + "signature": "let now: unit => float", + "docstrings": [ + "Returns the current time as number of milliseconds since Unix epoch." + ] + }, + { + "id": "Js_date.parse", + "kind": "value", + "name": "parse", + "signature": "let parse: string => t", + "docstrings": [] + }, + { + "id": "Js_date.parseAsFloat", + "kind": "value", + "name": "parseAsFloat", + "signature": "let parseAsFloat: string => float", + "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." + ] + }, + { + "id": "Js_date.getDate", + "kind": "value", + "name": "getDate", + "signature": "let getDate: t => float", + "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```res example\nJs.Date.getDate(exampleDate) == 29.0\n```" + ] + }, + { + "id": "Js_date.getDay", + "kind": "value", + "name": "getDay", + "signature": "let getDay: t => float", + "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```res example\nJs.Date.getDay(exampleDate) == 4.0\n```" + ] + }, + { + "id": "Js_date.getFullYear", + "kind": "value", + "name": "getFullYear", + "signature": "let getFullYear: t => float", + "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```res example\nJs.Date.getFullYear(exampleDate) == 1973.0\n```" + ] + }, + { + "id": "Js_date.getHours", + "kind": "value", + "name": "getHours", + "signature": "let getHours: t => float", + "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```res example\nJs.Date.getHours(exampleDate) == 22.0 // Vienna is in GMT+01:00\n```" + ] + }, + { + "id": "Js_date.getMilliseconds", + "kind": "value", + "name": "getMilliseconds", + "signature": "let getMilliseconds: t => float", + "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```res example\nJs.Date.getMilliseconds(exampleDate) == 321.0\n```" + ] + }, + { + "id": "Js_date.getMinutes", + "kind": "value", + "name": "getMinutes", + "signature": "let getMinutes: t => float", + "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```res example\nJs.Date.getMinutes(exampleDate) == 30.0\n```" + ] + }, + { + "id": "Js_date.getMonth", + "kind": "value", + "name": "getMonth", + "signature": "let getMonth: t => float", + "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```res example\nJs.Date.getMonth(exampleDate) == 10.0\n```" + ] + }, + { + "id": "Js_date.getSeconds", + "kind": "value", + "name": "getSeconds", + "signature": "let getSeconds: t => float", + "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```res example\nJs.Date.getSeconds(exampleDate) == 54.0\n```" + ] + }, + { + "id": "Js_date.getTime", + "kind": "value", + "name": "getTime", + "signature": "let getTime: t => float", + "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```res example\nJs.Date.getTime(exampleDate) == 123456654321.0\n```" + ] + }, + { + "id": "Js_date.getTimezoneOffset", + "kind": "value", + "name": "getTimezoneOffset", + "signature": "let getTimezoneOffset: t => float", + "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```res example\nJs.Date.getTimezoneOffset(exampleDate) == -60.0\n```" + ] + }, + { + "id": "Js_date.getUTCDate", + "kind": "value", + "name": "getUTCDate", + "signature": "let getUTCDate: t => float", + "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```res example\nJs.Date.getUTCDate(exampleDate) == 29.0\n```" + ] + }, + { + "id": "Js_date.getUTCDay", + "kind": "value", + "name": "getUTCDay", + "signature": "let getUTCDay: t => float", + "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```res example\nJs.Date.getUTCDay(exampleDate) == 4.0\n```" + ] + }, + { + "id": "Js_date.getUTCFullYear", + "kind": "value", + "name": "getUTCFullYear", + "signature": "let getUTCFullYear: t => float", + "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```res example\nJs.Date.getUTCFullYear(exampleDate) == 1973.0\n```" + ] + }, + { + "id": "Js_date.getUTCHours", + "kind": "value", + "name": "getUTCHours", + "signature": "let getUTCHours: t => float", + "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```res example\nJs.Date.getUTCHours(exampleDate) == 21.0\n```" + ] + }, + { + "id": "Js_date.getUTCMilliseconds", + "kind": "value", + "name": "getUTCMilliseconds", + "signature": "let getUTCMilliseconds: t => float", + "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```res example\nJs.Date.getUTCMilliseconds(exampleDate) == 321.0\n```" + ] + }, + { + "id": "Js_date.getUTCMinutes", + "kind": "value", + "name": "getUTCMinutes", + "signature": "let getUTCMinutes: t => float", + "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```res example\nJs.Date.getUTCMinutes(exampleDate) == 30.0\n```" + ] + }, + { + "id": "Js_date.getUTCMonth", + "kind": "value", + "name": "getUTCMonth", + "signature": "let getUTCMonth: t => float", + "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```res example\nJs.Date.getUTCMonth(exampleDate) == 10.0\n```" + ] + }, + { + "id": "Js_date.getUTCSeconds", + "kind": "value", + "name": "getUTCSeconds", + "signature": "let getUTCSeconds: t => float", + "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```res example\nJs.Date.getUTCSeconds(exampleDate) == 54.0\n```" + ] + }, + { + "id": "Js_date.getYear", + "kind": "value", + "name": "getYear", + "signature": "let getYear: t => float", + "docstrings": [] + }, + { + "id": "Js_date.setDate", + "kind": "value", + "name": "setDate", + "signature": "let setDate: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setFullYear", + "kind": "value", + "name": "setFullYear", + "signature": "let setFullYear: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setFullYearM", + "kind": "value", + "name": "setFullYearM", + "signature": "let setFullYearM: (t, ~year: float, ~month: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setFullYearMD", + "kind": "value", + "name": "setFullYearMD", + "signature": "let setFullYearMD: (t, ~year: float, ~month: float, ~date: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setHours", + "kind": "value", + "name": "setHours", + "signature": "let setHours: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setHoursM", + "kind": "value", + "name": "setHoursM", + "signature": "let setHoursM: (t, ~hours: float, ~minutes: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setHoursMS", + "kind": "value", + "name": "setHoursMS", + "signature": "let setHoursMS: (t, ~hours: float, ~minutes: float, ~seconds: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setHoursMSMs", + "kind": "value", + "name": "setHoursMSMs", + "signature": "let setHoursMSMs: (\\n t,\\n ~hours: float,\\n ~minutes: float,\\n ~seconds: float,\\n ~milliseconds: float,\\n unit,\\n) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setMilliseconds", + "kind": "value", + "name": "setMilliseconds", + "signature": "let setMilliseconds: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setMinutes", + "kind": "value", + "name": "setMinutes", + "signature": "let setMinutes: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setMinutesS", + "kind": "value", + "name": "setMinutesS", + "signature": "let setMinutesS: (t, ~minutes: float, ~seconds: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setMinutesSMs", + "kind": "value", + "name": "setMinutesSMs", + "signature": "let setMinutesSMs: (t, ~minutes: float, ~seconds: float, ~milliseconds: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setMonth", + "kind": "value", + "name": "setMonth", + "signature": "let setMonth: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setMonthD", + "kind": "value", + "name": "setMonthD", + "signature": "let setMonthD: (t, ~month: float, ~date: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setSeconds", + "kind": "value", + "name": "setSeconds", + "signature": "let setSeconds: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setSecondsMs", + "kind": "value", + "name": "setSecondsMs", + "signature": "let setSecondsMs: (t, ~seconds: float, ~milliseconds: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setTime", + "kind": "value", + "name": "setTime", + "signature": "let setTime: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCDate", + "kind": "value", + "name": "setUTCDate", + "signature": "let setUTCDate: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCFullYear", + "kind": "value", + "name": "setUTCFullYear", + "signature": "let setUTCFullYear: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCFullYearM", + "kind": "value", + "name": "setUTCFullYearM", + "signature": "let setUTCFullYearM: (t, ~year: float, ~month: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCFullYearMD", + "kind": "value", + "name": "setUTCFullYearMD", + "signature": "let setUTCFullYearMD: (t, ~year: float, ~month: float, ~date: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCHours", + "kind": "value", + "name": "setUTCHours", + "signature": "let setUTCHours: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCHoursM", + "kind": "value", + "name": "setUTCHoursM", + "signature": "let setUTCHoursM: (t, ~hours: float, ~minutes: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCHoursMS", + "kind": "value", + "name": "setUTCHoursMS", + "signature": "let setUTCHoursMS: (t, ~hours: float, ~minutes: float, ~seconds: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCHoursMSMs", + "kind": "value", + "name": "setUTCHoursMSMs", + "signature": "let setUTCHoursMSMs: (\\n t,\\n ~hours: float,\\n ~minutes: float,\\n ~seconds: float,\\n ~milliseconds: float,\\n unit,\\n) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCMilliseconds", + "kind": "value", + "name": "setUTCMilliseconds", + "signature": "let setUTCMilliseconds: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCMinutes", + "kind": "value", + "name": "setUTCMinutes", + "signature": "let setUTCMinutes: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCMinutesS", + "kind": "value", + "name": "setUTCMinutesS", + "signature": "let setUTCMinutesS: (t, ~minutes: float, ~seconds: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCMinutesSMs", + "kind": "value", + "name": "setUTCMinutesSMs", + "signature": "let setUTCMinutesSMs: (t, ~minutes: float, ~seconds: float, ~milliseconds: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCMonth", + "kind": "value", + "name": "setUTCMonth", + "signature": "let setUTCMonth: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCMonthD", + "kind": "value", + "name": "setUTCMonthD", + "signature": "let setUTCMonthD: (t, ~month: float, ~date: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCSeconds", + "kind": "value", + "name": "setUTCSeconds", + "signature": "let setUTCSeconds: (t, float) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCSecondsMs", + "kind": "value", + "name": "setUTCSecondsMs", + "signature": "let setUTCSecondsMs: (t, ~seconds: float, ~milliseconds: float, unit) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_date.setUTCTime", + "kind": "value", + "name": "setUTCTime", + "signature": "let setUTCTime: (t, float) => float", + "docstrings": [ + "Same as [`setTime()`](#settime)." + ] + }, + { + "id": "Js_date.setYear", + "kind": "value", + "name": "setYear", + "signature": "let setYear: (t, float) => float", + "docstrings": [] + }, + { + "id": "Js_date.toDateString", + "kind": "value", + "name": "toDateString", + "signature": "let toDateString: t => string", + "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```res example\nJs.Date.toDateString(exampleDate) == \"Thu Nov 29 1973\"\n```" + ] + }, + { + "id": "Js_date.toGMTString", + "kind": "value", + "name": "toGMTString", + "signature": "let toGMTString: t => string", + "docstrings": [] + }, + { + "id": "Js_date.toISOString", + "kind": "value", + "name": "toISOString", + "signature": "let toISOString: t => string", + "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```res example\nJs.Date.toISOString(exampleDate) == \"1973-11-29T21:30:54.321Z\"\n```" + ] + }, + { + "id": "Js_date.toJSON", + "kind": "value", + "name": "toJSON", + "signature": "let toJSON: t => string", + "docstrings": [] + }, + { + "id": "Js_date.toJSONUnsafe", + "kind": "value", + "name": "toJSONUnsafe", + "signature": "let toJSONUnsafe: t => string", + "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." + ] + }, + { + "id": "Js_date.toLocaleDateString", + "kind": "value", + "name": "toLocaleDateString", + "signature": "let toLocaleDateString: t => string", + "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```res example\nJs.Date.toLocaleDateString(exampleDate) == \"11/29/1973\" // for en_US.utf8\nJs.Date.toLocaleDateString(exampleDate) == \"29.11.73\" // for de_DE.utf8\n```" + ] + }, + { + "id": "Js_date.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "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```res example\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```" + ] + }, + { + "id": "Js_date.toLocaleTimeString", + "kind": "value", + "name": "toLocaleTimeString", + "signature": "let toLocaleTimeString: t => string", + "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```res example\nJs.Date.toLocaleString(exampleDate) == \"10:30:54 PM\" // for en_US.utf8\nJs.Date.toLocaleString(exampleDate) == \"22:30:54\" // for de_DE.utf8\n```" + ] + }, + { + "id": "Js_date.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "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```res example\nJs.Date.toString(\n exampleDate,\n) == \"Thu Nov 29 1973 22:30:54 GMT+0100 (Central European Standard Time)\"\n```" + ] + }, + { + "id": "Js_date.toTimeString", + "kind": "value", + "name": "toTimeString", + "signature": "let toTimeString: t => string", + "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```res example\nJs.Date.toTimeString(exampleDate) == \"22:30:54 GMT+0100 (Central European Standard Time)\"\n```" + ] + }, + { + "id": "Js_date.toUTCString", + "kind": "value", + "name": "toUTCString", + "signature": "let toUTCString: t => string", + "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```res example\nJs.Date.toUTCString(exampleDate) == \"Thu, 29 Nov 1973 21:30:54 GMT\"\n```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_dict.json b/index_data/api/Js_dict.json new file mode 100644 index 000000000..ebe8c2920 --- /dev/null +++ b/index_data/api/Js_dict.json @@ -0,0 +1,123 @@ +{ + "name": "Js_dict", + "docstrings": [], + "items": [ + { + "id": "Js_dict.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [ + "Dictionary type (ie an '{ }' JS object). However it is restricted to hold a\nsingle type; therefore values must have the same type. This Dictionary type is\nmostly used with the Js_json.t type." + ] + }, + { + "id": "Js_dict.key", + "kind": "type", + "name": "key", + "signature": "type key = string", + "docstrings": [ + "The type for dictionary keys. This means that dictionaries *must* use `string`s as their keys." + ] + }, + { + "id": "Js_dict.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a>, key) => option<'a>", + "docstrings": [ + "`Js.Dict.get(key)` returns `None` if the key is not found in the dictionary,\n`Some(value)` otherwise.\n\n```res example\nJs.Dict.get(ages, \"Vinh\") == Some(22)\nJs.Dict.get(ages, \"Paul\") == None\n```" + ] + }, + { + "id": "Js_dict.unsafeGet", + "kind": "value", + "name": "unsafeGet", + "signature": "let unsafeGet: (t<'a>, key) => 'a", + "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```res example\nJs.Dict.unsafeGet(ages, \"Fred\") == 49\nJs.Dict.unsafeGet(ages, \"Paul\") // returns undefined\n```" + ] + }, + { + "id": "Js_dict.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'a>, key, 'a) => unit", + "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```res example\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```" + ] + }, + { + "id": "Js_dict.keys", + "kind": "value", + "name": "keys", + "signature": "let keys: t<'a> => array", + "docstrings": [ + "Returns all the keys in the dictionary `dict`.\n\n```res example\nJs.Dict.keys(ages) == [\"Maria\", \"Vinh\", \"Fred\"]\n```" + ] + }, + { + "id": "Js_dict.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: unit => t<'a>", + "docstrings": [ + "Returns an empty dictionary." + ] + }, + { + "id": "Js_dict.unsafeDeleteKey", + "kind": "value", + "name": "unsafeDeleteKey", + "signature": "let unsafeDeleteKey: (. t, string) => unit", + "docstrings": [ + "Experimental internal function" + ] + }, + { + "id": "Js_dict.entries", + "kind": "value", + "name": "entries", + "signature": "let entries: t<'a> => array<(key, 'a)>", + "docstrings": [ + "Returns an array of key/value pairs in the given dictionary (ES2017).\n\n```res example\nJs.Dict.entries(ages) == [(\"Maria\", 30), (\"Vinh\", 22), (\"Fred\", 49)]\n```" + ] + }, + { + "id": "Js_dict.values", + "kind": "value", + "name": "values", + "signature": "let values: t<'a> => array<'a>", + "docstrings": [ + "Returns the values in the given dictionary (ES2017).\n\n```res example\nJs.Dict.values(ages) == [30, 22, 49]\n```" + ] + }, + { + "id": "Js_dict.fromList", + "kind": "value", + "name": "fromList", + "signature": "let fromList: list<(key, 'a)> => t<'a>", + "docstrings": [ + "Creates a new dictionary containing each (key, value) pair in its list\nargument.\n\n```res example\nlet capitals = Js.Dict.fromList(list{(\"Japan\", \"Tokyo\"), (\"France\", \"Paris\"), (\"Egypt\", \"Cairo\")})\n```" + ] + }, + { + "id": "Js_dict.fromArray", + "kind": "value", + "name": "fromArray", + "signature": "let fromArray: array<(key, 'a)> => t<'a>", + "docstrings": [ + "Creates a new dictionary containing each (key, value) pair in its array\nargument.\n\n```res example\nlet capitals2 = Js.Dict.fromArray([(\"Germany\", \"Berlin\"), (\"Burkina Faso\", \"Ouagadougou\")])\n```" + ] + }, + { + "id": "Js_dict.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. 'a) => 'b, t<'a>) => t<'b>", + "docstrings": [ + "`map(f, dict)` maps `dict` to a new dictionary with the same keys, using the\nfunction `f` to map each value.\n\n```res example\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```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_exn.json b/index_data/api/Js_exn.json new file mode 100644 index 000000000..163956e41 --- /dev/null +++ b/index_data/api/Js_exn.json @@ -0,0 +1,121 @@ +{ + "name": "Js_exn", + "docstrings": [ + "Provide utilities for dealing with JS exceptions." + ], + "items": [ + { + "id": "Js_exn.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [ + "Represents a JS exception" + ] + }, + { + "id": "Js_exn.asJsExn", + "kind": "value", + "name": "asJsExn", + "signature": "let asJsExn: exn => option", + "docstrings": [] + }, + { + "id": "Js_exn.stack", + "kind": "value", + "name": "stack", + "signature": "let stack: t => option", + "docstrings": [] + }, + { + "id": "Js_exn.message", + "kind": "value", + "name": "message", + "signature": "let message: t => option", + "docstrings": [] + }, + { + "id": "Js_exn.name", + "kind": "value", + "name": "name", + "signature": "let name: t => option", + "docstrings": [] + }, + { + "id": "Js_exn.fileName", + "kind": "value", + "name": "fileName", + "signature": "let fileName: t => option", + "docstrings": [] + }, + { + "id": "Js_exn.isCamlExceptionOrOpenVariant", + "kind": "value", + "name": "isCamlExceptionOrOpenVariant", + "signature": "let isCamlExceptionOrOpenVariant: 'a => bool", + "docstrings": [ + "internal use only" + ] + }, + { + "id": "Js_exn.anyToExnInternal", + "kind": "value", + "name": "anyToExnInternal", + "signature": "let anyToExnInternal: 'a => exn", + "docstrings": [ + "`anyToExnInternal obj` will take any value `obj` and wrap it\n in a Js.Exn.Error if given value is not an exn already. If\n `obj` is an exn, it will return `obj` without any changes.\n\n This function is mostly useful for cases where you want to unify a type of a value\n that potentially is either exn, a JS error, or any other JS value really (e.g. for\n a value passed to a Promise.catch callback)\n\n **IMPORTANT**: This is an internal API and may be changed / removed any time in the future.\n\n ```\n switch (Js.Exn.unsafeAnyToExn(\"test\")) {\n | Js.Exn.Error(v) =>\n switch(Js.Exn.message(v)) {\n | Some(str) => Js.log(\"We won't end up here\")\n | None => Js.log2(\"We will land here: \", v)\n }\n }\n ```" + ] + }, + { + "id": "Js_exn.raiseError", + "kind": "value", + "name": "raiseError", + "signature": "let raiseError: string => 'a", + "docstrings": [ + "Raise Js exception Error object with stacktrace" + ] + }, + { + "id": "Js_exn.raiseEvalError", + "kind": "value", + "name": "raiseEvalError", + "signature": "let raiseEvalError: string => 'a", + "docstrings": [] + }, + { + "id": "Js_exn.raiseRangeError", + "kind": "value", + "name": "raiseRangeError", + "signature": "let raiseRangeError: string => 'a", + "docstrings": [] + }, + { + "id": "Js_exn.raiseReferenceError", + "kind": "value", + "name": "raiseReferenceError", + "signature": "let raiseReferenceError: string => 'a", + "docstrings": [] + }, + { + "id": "Js_exn.raiseSyntaxError", + "kind": "value", + "name": "raiseSyntaxError", + "signature": "let raiseSyntaxError: string => 'a", + "docstrings": [] + }, + { + "id": "Js_exn.raiseTypeError", + "kind": "value", + "name": "raiseTypeError", + "signature": "let raiseTypeError: string => 'a", + "docstrings": [] + }, + { + "id": "Js_exn.raiseUriError", + "kind": "value", + "name": "raiseUriError", + "signature": "let raiseUriError: string => 'a", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_float.json b/index_data/api/Js_float.json new file mode 100644 index 000000000..9419dab89 --- /dev/null +++ b/index_data/api/Js_float.json @@ -0,0 +1,116 @@ +{ + "name": "Js_float", + "docstrings": [ + "Provide utilities for JS float." + ], + "items": [ + { + "id": "Js_float._NaN", + "kind": "value", + "name": "_NaN", + "signature": "let _NaN: float", + "docstrings": [ + "The special value \"Not a Number\"\n\n **See:** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN)" + ] + }, + { + "id": "Js_float.isNaN", + "kind": "value", + "name": "isNaN", + "signature": "let isNaN: float => bool", + "docstrings": [ + "Tests if the given value is `_NaN`\n\n Note that both `_NaN = _NaN` and `_NaN == _NaN` will return `false`. `isNaN` is\n therefore necessary to test for `_NaN`.\n\n **return** `true` if the given value is `_NaN`, `false` otherwise\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN)" + ] + }, + { + "id": "Js_float.isFinite", + "kind": "value", + "name": "isFinite", + "signature": "let isFinite: float => bool", + "docstrings": [ + "Tests if the given value is finite\n\n **return** `true` if the given value is a finite number, `false` otherwise\n\n ```res example\n /* returns [false] */\n Js.Float.isFinite(infinity)\n\n /* returns [false] */\n Js.Float.isFinite(neg_infinity)\n\n /* returns [false] */\n Js.Float.isFinite(Js.Float._NaN)\n\n /* returns [true] */\n Js.Float.isFinite(1234.)\n ```\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite)" + ] + }, + { + "id": "Js_float.toExponential", + "kind": "value", + "name": "toExponential", + "signature": "let toExponential: float => string", + "docstrings": [ + "Formats a `float` using exponential (scientific) notation\n\n **return** a `string` representing the given value in exponential notation\n\n **raise** RangeError if digits is not in the range [0, 20] (inclusive)\n\n ```res example\n /* prints \"7.71234e+1\" */\n Js.Float.toExponential(77.1234)->Js.log\n\n /* prints \"7.7e+1\" */\n Js.Float.toExponential(77.)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)" + ] + }, + { + "id": "Js_float.toExponentialWithPrecision", + "kind": "value", + "name": "toExponentialWithPrecision", + "signature": "let toExponentialWithPrecision: (float, ~digits: int) => string", + "docstrings": [ + "Formats a `float` using exponential (scientific) notation\n\n **digits** specifies how many digits should appear after the decimal point. The\n value must be in the range [0, 20] (inclusive).\n\n **return** a `string` representing the given value in exponential notation\n\n The output will be rounded or padded with zeroes if necessary.\n\n **raise** RangeError if digits is not in the range [0, 20] (inclusive)\n\n ```res example\n /* prints \"7.71e+1\" */\n Js.Float.toExponentialWithPrecision(77.1234, ~digits=2)->Js.log\n ```\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)" + ] + }, + { + "id": "Js_float.toFixed", + "kind": "value", + "name": "toFixed", + "signature": "let toFixed: float => string", + "docstrings": [ + "Formats a `float` using fixed point notation\n\n **return** a `string` representing the given value in fixed-point notation (usually)\n\n **raise** RangeError if digits is not in the range [0, 20] (inclusive)\n\n ```res example\n /* prints \"12346\" (note the rounding) */\n Js.Float.toFixed(12345.6789)->Js.log\n\n /* print \"1.2e+21\" */\n Js.Float.toFixed(1.2e21)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)" + ] + }, + { + "id": "Js_float.toFixedWithPrecision", + "kind": "value", + "name": "toFixedWithPrecision", + "signature": "let toFixedWithPrecision: (float, ~digits: int) => string", + "docstrings": [ + "Formats a `float` using fixed point notation\n\n **digits** specifies how many digits should appear after the decimal point. The\n value must be in the range [0, 20] (inclusive). Defaults to `0`.\n\n **return** a `string` representing the given value in fixed-point notation (usually)\n\n The output will be rounded or padded with zeroes if necessary.\n\n **raise** RangeError if digits is not in the range [0, 20] (inclusive)\n\n ```res example\n /* prints \"12345.7\" (note the rounding) */\n Js.Float.toFixedWithPrecision(12345.6789, ~digits=1)->Js.log\n\n /* prints \"0.00\" (note the added zeroes) */\n Js.Float.toFixedWithPrecision(0., ~digits=2)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)" + ] + }, + { + "id": "Js_float.toPrecision", + "kind": "value", + "name": "toPrecision", + "signature": "let toPrecision: float => string", + "docstrings": [ + "Formats a `float` using some fairly arbitrary rules\n\n **return** a `string` representing the given value in fixed-point (usually)\n\n `toPrecision` differs from `toFixed` in that the former will format the number\n with full precision, while the latter will not output any digits after the\n decimal point.\n\n **raise** RangeError if digits is not in the range accepted by this function (what do you mean \"vague\"?)\n\n ```res example\n /* prints \"12345.6789\" */\n Js.Float.toPrecision(12345.6789)->Js.log\n\n /* print \"1.2e+21\" */\n Js.Float.toPrecision(1.2e21)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)" + ] + }, + { + "id": "Js_float.toPrecisionWithPrecision", + "kind": "value", + "name": "toPrecisionWithPrecision", + "signature": "let toPrecisionWithPrecision: (float, ~digits: int) => string", + "docstrings": [ + "Formats a `float` using some fairly arbitrary rules\n\n **digits** specifies how many digits should appear in total. The\n value must between 0 and some arbitrary number that's hopefully at least larger\n than 20 (for Node it's 21. Why? Who knows).\n\n **return** a `string` representing the given value in fixed-point or scientific notation\n\n The output will be rounded or padded with zeroes if necessary.\n\n `toPrecisionWithPrecision` differs from `toFixedWithPrecision` in that the former\n will count all digits against the precision, while the latter will count only\n the digits after the decimal point. `toPrecisionWithPrecision` will also use\n scientific notation if the specified precision is less than the number for digits\n before the decimal point.\n\n **raise** RangeError if digits is not in the range accepted by this function (what do you mean \"vague\"?)\n\n ```res example\n /* prints \"1e+4\" */\n Js.Float.toPrecisionWithPrecision(12345.6789, ~digits=1)->Js.log\n\n /* prints \"0.0\" */\n Js.Float.toPrecisionWithPrecision(0., ~digits=2)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)" + ] + }, + { + "id": "Js_float.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: float => string", + "docstrings": [ + "Formats a `float` as a string\n\n **return** a `string` representing the given value in fixed-point (usually)\n\n ```res example\n /* prints \"12345.6789\" */\n Js.Float.toString(12345.6789)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)" + ] + }, + { + "id": "Js_float.toStringWithRadix", + "kind": "value", + "name": "toStringWithRadix", + "signature": "let toStringWithRadix: (float, ~radix: int) => string", + "docstrings": [ + "Formats a `float` as a string\n\n **radix** specifies the radix base to use for the formatted number. The\n value must be in the range [2, 36] (inclusive).\n\n **return** a `string` representing the given value in fixed-point (usually)\n\n **raise** RangeError if radix is not in the range [2, 36] (inclusive)\n\n ```res example\n /* prints \"110\" */\n Js.Float.toStringWithRadix(6., ~radix=2)->Js.log\n\n /* prints \"11.001000111101011100001010001111010111000010100011111\" */\n Js.Float.toStringWithRadix(3.14, ~radix=2)->Js.log\n\n /* prints \"deadbeef\" */\n Js.Float.toStringWithRadix(3735928559., ~radix=16)->Js.log\n\n /* prints \"3f.gez4w97ry0a18ymf6qadcxr\" */\n Js.Float.toStringWithRadix(123.456, ~radix=36)->Js.log\n ```\n\n **See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)" + ] + }, + { + "id": "Js_float.fromString", + "kind": "value", + "name": "fromString", + "signature": "let fromString: string => float", + "docstrings": [ + "Parses the given `string` into a `float` using JavaScript semantics\n\n **return** the number as a `float` if successfully parsed, `_NaN` otherwise.\n\n ```res example\n /* returns 123 */\n Js.Float.fromString(\"123\")\n\n /* returns 12.3 */\n Js.Float.fromString(\"12.3\")\n\n /* returns 0 */\n Js.Float.fromString(\"\")\n\n /* returns 17 */\n Js.Float.fromString(\"0x11\")\n\n /* returns 3 */\n Js.Float.fromString(\"0b11\")\n\n /* returns 9 */\n Js.Float.fromString(\"0o11\")\n\n /* returns [_NaN] */\n Js.Float.fromString(\"hello\")\n\n /* returns [_NaN] */\n Js.Float.fromString(\"100a\")\n ```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_global.json b/index_data/api/Js_global.json new file mode 100644 index 000000000..4bdf652dd --- /dev/null +++ b/index_data/api/Js_global.json @@ -0,0 +1,116 @@ +{ + "name": "Js_global", + "docstrings": [ + "Contains functions available in the global scope\n (`window` in a browser context)" + ], + "items": [ + { + "id": "Js_global.intervalId", + "kind": "type", + "name": "intervalId", + "signature": "type intervalId", + "docstrings": [ + "Identify an interval started by `Js.Global.setInterval`." + ] + }, + { + "id": "Js_global.timeoutId", + "kind": "type", + "name": "timeoutId", + "signature": "type timeoutId", + "docstrings": [ + "Identify timeout started by `Js.Global.setTimeout`." + ] + }, + { + "id": "Js_global.clearInterval", + "kind": "value", + "name": "clearInterval", + "signature": "let clearInterval: intervalId => unit", + "docstrings": [ + "Clear an interval started by `Js.Global.setInterval`\n\n```res example\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```" + ] + }, + { + "id": "Js_global.clearTimeout", + "kind": "value", + "name": "clearTimeout", + "signature": "let clearTimeout: timeoutId => unit", + "docstrings": [ + "Clear a timeout started by `Js.Global.setTimeout`.\n\n```res example\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```" + ] + }, + { + "id": "Js_global.setInterval", + "kind": "value", + "name": "setInterval", + "signature": "let setInterval: (unit => unit, int) => intervalId", + "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```res example\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```" + ] + }, + { + "id": "Js_global.setIntervalFloat", + "kind": "value", + "name": "setIntervalFloat", + "signature": "let setIntervalFloat: (unit => unit, float) => intervalId", + "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```res example\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```" + ] + }, + { + "id": "Js_global.setTimeout", + "kind": "value", + "name": "setTimeout", + "signature": "let setTimeout: (unit => unit, int) => timeoutId", + "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```res example\n/* Prints \"Timed out!\" in the console after one second */\n\nlet message = \"Timed out!\"\n\nJs.Global.setTimeout(() => Js.log(message), 1000)\n```" + ] + }, + { + "id": "Js_global.setTimeoutFloat", + "kind": "value", + "name": "setTimeoutFloat", + "signature": "let setTimeoutFloat: (unit => unit, float) => timeoutId", + "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```res example\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```" + ] + }, + { + "id": "Js_global.encodeURI", + "kind": "value", + "name": "encodeURI", + "signature": "let encodeURI: string => string", + "docstrings": [ + "URL-encodes a string.\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI)" + ] + }, + { + "id": "Js_global.decodeURI", + "kind": "value", + "name": "decodeURI", + "signature": "let decodeURI: string => string", + "docstrings": [ + "Decodes a URL-enmcoded string produced by `encodeURI`\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI)" + ] + }, + { + "id": "Js_global.encodeURIComponent", + "kind": "value", + "name": "encodeURIComponent", + "signature": "let encodeURIComponent: string => string", + "docstrings": [ + "URL-encodes a string, including characters with special meaning in a URI.\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)" + ] + }, + { + "id": "Js_global.decodeURIComponent", + "kind": "value", + "name": "decodeURIComponent", + "signature": "let decodeURIComponent: string => string", + "docstrings": [ + "Decodes a URL-enmcoded string produced by `encodeURIComponent`\n\n **see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent)" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_int.json b/index_data/api/Js_int.json new file mode 100644 index 000000000..fab4e29bd --- /dev/null +++ b/index_data/api/Js_int.json @@ -0,0 +1,90 @@ +{ + "name": "Js_int", + "docstrings": [ + "Provide utilities for handling `int`." + ], + "items": [ + { + "id": "Js_int.toExponential", + "kind": "value", + "name": "toExponential", + "signature": "let toExponential: int => string", + "docstrings": [ + "Formats an `int` using exponential (scientific) notation.\nReturns a `string` representing the given value in exponential notation.\nRaises `RangeError` if digits is not in the range \\[0, 20\\] (inclusive).\n\n**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n```res example\n/* prints \"7.7e+1\" */\nJs.log(Js.Int.toExponential(77))\n```" + ] + }, + { + "id": "Js_int.toExponentialWithPrecision", + "kind": "value", + "name": "toExponentialWithPrecision", + "signature": "let toExponentialWithPrecision: (int, ~digits: int) => string", + "docstrings": [ + "Formats an `int` using exponential (scientific) notation.\n`digits` specifies how many digits should appear after the decimal point. The value must be in the range \\[0, 20\\] (inclusive).\n\nReturns a `string` representing the given value in exponential notation.\n\nThe output will be rounded or padded with zeroes if necessary.\nRaises `RangeError` if `digits` is not in the range \\[0, 20\\] (inclusive).\n\n**see** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential)\n\n```res example\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```" + ] + }, + { + "id": "Js_int.toPrecision", + "kind": "value", + "name": "toPrecision", + "signature": "let toPrecision: int => string", + "docstrings": [ + "Formats an `int` using some fairly arbitrary rules.\nReturns a `string` representing the given value in fixed-point (usually).\n\n`toPrecision` differs from `toFixed` in that the former will format the number with full precision, while the latter will not output any digits after the decimal point.\nRaises `RangeError` if `digits` is not in the range accepted by this function.\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)\n\n```res example\n/* prints \"123456789\" */\nJs.log(Js.Int.toPrecision(123456789))\n```" + ] + }, + { + "id": "Js_int.toPrecisionWithPrecision", + "kind": "value", + "name": "toPrecisionWithPrecision", + "signature": "let toPrecisionWithPrecision: (int, ~digits: int) => string", + "docstrings": [ + "Formats an `int` using some fairly arbitrary rules.\n`digits` specifies how many digits should appear in total. The value must between 0 and some arbitrary number that's hopefully at least larger than 20 (for Node it's 21. Why? Who knows).\n\nReturns a `string` representing the given value in fixed-point or scientific notation.\n\nThe output will be rounded or padded with zeroes if necessary.\n\n`toPrecisionWithPrecision` differs from `toFixedWithPrecision` in that the former will count all digits against the precision, while the latter will count only the digits after the decimal point.\n`toPrecisionWithPrecision` will also use scientific notation if the specified precision is less than the number of digits before the decimal point.\nRaises `RangeError` if `digits` is not in the range accepted by this function.\n\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision)\n\n```res example\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```" + ] + }, + { + "id": "Js_int.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: int => string", + "docstrings": [ + "Formats an `int` as a `string`. Returns a `string` representing the given value\nin fixed-point (usually).\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)\n\n```res example\n/* prints \"123456789\" */\nJs.log(Js.Int.toString(123456789))\n```" + ] + }, + { + "id": "Js_int.toStringWithRadix", + "kind": "value", + "name": "toStringWithRadix", + "signature": "let toStringWithRadix: (int, ~radix: int) => string", + "docstrings": [ + "Formats an `int` as a `string`. `radix` specifies the radix base to use for the\nformatted number. The value must be in the range \\[2, 36\\] (inclusive). Returns\na `string` representing the given value in fixed-point (usually). Raises\n`RangeError` if `radix` is not in the range \\[2, 36\\] (inclusive).\n\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)\n\n```res example\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```" + ] + }, + { + "id": "Js_int.toFloat", + "kind": "value", + "name": "toFloat", + "signature": "let toFloat: int => float", + "docstrings": [] + }, + { + "id": "Js_int.equal", + "kind": "value", + "name": "equal", + "signature": "let equal: (int, int) => bool", + "docstrings": [] + }, + { + "id": "Js_int.max", + "kind": "value", + "name": "max", + "signature": "let max: int", + "docstrings": [] + }, + { + "id": "Js_int.min", + "kind": "value", + "name": "min", + "signature": "let min: int", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_json.json b/index_data/api/Js_json.json new file mode 100644 index 000000000..fc4e78625 --- /dev/null +++ b/index_data/api/Js_json.json @@ -0,0 +1,419 @@ +{ + "name": "Js_json", + "docstrings": [ + "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", + "signature": "type t =\\n | False\\n | True\\n | Null\\n | String(string)\\n | Number(float)\\n | Object(Js.Dict.t)\\n | Array(array)", + "docstrings": [ + "The JSON data structure" + ], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "False", + "docstrings": [], + "signature": "False" + }, + { + "constructorName": "True", + "docstrings": [], + "signature": "True" + }, + { + "constructorName": "Null", + "docstrings": [], + "signature": "Null" + }, + { + "constructorName": "String", + "docstrings": [], + "signature": "String(string)" + }, + { + "constructorName": "Number", + "docstrings": [], + "signature": "Number(float)" + }, + { + "constructorName": "Object", + "docstrings": [], + "signature": "Object(Js.Dict.t)" + }, + { + "constructorName": "Array", + "docstrings": [], + "signature": "Array(array)" + } + ] + } + }, + { + "id": "Kind.Js_json", + "kind": "module", + "item": { + "name": "Kind", + "docstrings": [], + "items": [ + { + "id": "Js_json.Kind.json", + "kind": "type", + "name": "json", + "signature": "type json = t", + "docstrings": [], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "False", + "docstrings": [], + "signature": "False" + }, + { + "constructorName": "True", + "docstrings": [], + "signature": "True" + }, + { + "constructorName": "Null", + "docstrings": [], + "signature": "Null" + }, + { + "constructorName": "String", + "docstrings": [], + "signature": "String(string)" + }, + { + "constructorName": "Number", + "docstrings": [], + "signature": "Number(float)" + }, + { + "constructorName": "Object", + "docstrings": [], + "signature": "Object(Js.Dict.t)" + }, + { + "constructorName": "Array", + "docstrings": [], + "signature": "Array(array)" + } + ] + } + }, + { + "id": "Js_json.Kind.t", + "kind": "type", + "name": "t", + "signature": "type t<_> =\\n | String: t\\n | Number: t\\n | Object: t>\\n | Array: t>\\n | Boolean: t\\n | Null: t", + "docstrings": [ + "Underlying type of a JSON value" + ], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "String", + "docstrings": [], + "signature": "String\nt" + }, + { + "constructorName": "Number", + "docstrings": [], + "signature": "Number\nt" + }, + { + "constructorName": "Object", + "docstrings": [], + "signature": "Object\nt>" + }, + { + "constructorName": "Array", + "docstrings": [], + "signature": "Array\nt>" + }, + { + "constructorName": "Boolean", + "docstrings": [], + "signature": "Boolean\nt" + }, + { + "constructorName": "Null", + "docstrings": [], + "signature": "Null\nt" + } + ] + } + } + ] + } + }, + { + "id": "Js_json.tagged_t", + "kind": "type", + "name": "tagged_t", + "signature": "type tagged_t =\\n | JSONFalse\\n | JSONTrue\\n | JSONNull\\n | JSONString(string)\\n | JSONNumber(float)\\n | JSONObject(Js_dict.t)\\n | JSONArray(array)", + "docstrings": [], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "JSONFalse", + "docstrings": [], + "signature": "JSONFalse" + }, + { + "constructorName": "JSONTrue", + "docstrings": [], + "signature": "JSONTrue" + }, + { + "constructorName": "JSONNull", + "docstrings": [], + "signature": "JSONNull" + }, + { + "constructorName": "JSONString", + "docstrings": [], + "signature": "JSONString(string)" + }, + { + "constructorName": "JSONNumber", + "docstrings": [], + "signature": "JSONNumber(float)" + }, + { + "constructorName": "JSONObject", + "docstrings": [], + "signature": "JSONObject(Js_dict.t)" + }, + { + "constructorName": "JSONArray", + "docstrings": [], + "signature": "JSONArray(array)" + } + ] + } + }, + { + "id": "Js_json.classify", + "kind": "value", + "name": "classify", + "signature": "let classify: t => tagged_t", + "docstrings": [] + }, + { + "id": "Js_json.test", + "kind": "value", + "name": "test", + "signature": "let test: ('a, Kind.t<'b>) => bool", + "docstrings": [ + "`test(v, kind)` returns `true` if `v` is of `kind`." + ] + }, + { + "id": "Js_json.decodeString", + "kind": "value", + "name": "decodeString", + "signature": "let decodeString: t => option", + "docstrings": [ + "`decodeString(json)` returns `Some(s)` if `json` is a `string`, `None` otherwise." + ] + }, + { + "id": "Js_json.decodeNumber", + "kind": "value", + "name": "decodeNumber", + "signature": "let decodeNumber: t => option", + "docstrings": [ + "`decodeNumber(json)` returns `Some(n)` if `json` is a `number`, `None` otherwise." + ] + }, + { + "id": "Js_json.decodeObject", + "kind": "value", + "name": "decodeObject", + "signature": "let decodeObject: t => option>", + "docstrings": [ + "`decodeObject(json)` returns `Some(o)` if `json` is an `object`, `None` otherwise." + ] + }, + { + "id": "Js_json.decodeArray", + "kind": "value", + "name": "decodeArray", + "signature": "let decodeArray: t => option>", + "docstrings": [ + "`decodeArray(json)` returns `Some(a)` if `json` is an `array`, `None` otherwise." + ] + }, + { + "id": "Js_json.decodeBoolean", + "kind": "value", + "name": "decodeBoolean", + "signature": "let decodeBoolean: t => option", + "docstrings": [ + "`decodeBoolean(json)` returns `Some(b)` if `json` is a `boolean`, `None` otherwise." + ] + }, + { + "id": "Js_json.decodeNull", + "kind": "value", + "name": "decodeNull", + "signature": "let decodeNull: t => option>", + "docstrings": [ + "`decodeNull(json)` returns `Some(null)` if `json` is a `null`, `None` otherwise." + ] + }, + { + "id": "Js_json.null", + "kind": "value", + "name": "null", + "signature": "let null: t", + "docstrings": [ + "`null` is the singleton null JSON value." + ] + }, + { + "id": "Js_json.string", + "kind": "value", + "name": "string", + "signature": "let string: string => t", + "docstrings": [ + "`string(s)` makes a JSON string of the `string` `s`." + ] + }, + { + "id": "Js_json.number", + "kind": "value", + "name": "number", + "signature": "let number: float => t", + "docstrings": [ + "`number(n)` makes a JSON number of the `float` `n`." + ] + }, + { + "id": "Js_json.boolean", + "kind": "value", + "name": "boolean", + "signature": "let boolean: bool => t", + "docstrings": [ + "`boolean(b)` makes a JSON boolean of the `bool` `b`." + ] + }, + { + "id": "Js_json.object_", + "kind": "value", + "name": "object_", + "signature": "let object_: Js_dict.t => t", + "docstrings": [ + "`object_(dict)` makes a JSON object of the `Js.Dict.t` `dict`." + ] + }, + { + "id": "Js_json.array", + "kind": "value", + "name": "array", + "signature": "let array: array => t", + "docstrings": [ + "`array_(a)` makes a JSON array of the `Js.Json.t` array `a`." + ] + }, + { + "id": "Js_json.stringArray", + "kind": "value", + "name": "stringArray", + "signature": "let stringArray: array => t", + "docstrings": [ + "`stringArray(a)` makes a JSON array of the `string` array `a`." + ] + }, + { + "id": "Js_json.numberArray", + "kind": "value", + "name": "numberArray", + "signature": "let numberArray: array => t", + "docstrings": [ + "`numberArray(a)` makes a JSON array of the `float` array `a`." + ] + }, + { + "id": "Js_json.booleanArray", + "kind": "value", + "name": "booleanArray", + "signature": "let booleanArray: array => t", + "docstrings": [ + "`booleanArray(a)` makes a JSON array of the `bool` array `a`." + ] + }, + { + "id": "Js_json.objectArray", + "kind": "value", + "name": "objectArray", + "signature": "let objectArray: array> => t", + "docstrings": [ + "`objectArray(a) makes a JSON array of the `JsDict.t` array `a`." + ] + }, + { + "id": "Js_json.parseExn", + "kind": "value", + "name": "parseExn", + "signature": "let parseExn: string => t", + "docstrings": [ + "`parseExn(s)` parses the `string` `s` into a JSON data structure.\nReturns a JSON data structure.\nRaises `SyntaxError` if the given string is not a valid JSON. Note: `SyntaxError` is a JavaScript exception.\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)\n\n```res example\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```res example\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```" + ] + }, + { + "id": "Js_json.stringify", + "kind": "value", + "name": "stringify", + "signature": "let stringify: t => string", + "docstrings": [ + "`stringify(json)` formats the JSON data structure as a `string`.\nReturns the string representation of a given JSON data structure.\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n```res example\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([\"bucklescript\", \"ocaml\", \"js\"]))\n\nJs.log(Js.Json.stringify(Js.Json.object_(dict)))\n```" + ] + }, + { + "id": "Js_json.stringifyWithSpace", + "kind": "value", + "name": "stringifyWithSpace", + "signature": "let stringifyWithSpace: (t, int) => string", + "docstrings": [ + "`stringifyWithSpace(json)` formats the JSON data structure as a `string`.\nReturns the string representation of a given JSON data structure with spacing.\n\n**See** [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n```res example\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([\"bucklescript\", \"ocaml\", \"js\"]))\n\nJs.log(Js.Json.stringifyWithSpace(Js.Json.object_(dict), 2))\n```" + ] + }, + { + "id": "Js_json.stringifyAny", + "kind": "value", + "name": "stringifyAny", + "signature": "let stringifyAny: 'a => option", + "docstrings": [ + "`stringifyAny(value)` formats any value into a JSON string.\n\n```res example\n/* prints `[\"hello\", \"world\"]` */\nJs.log(Js.Json.stringifyAny([\"hello\", \"world\"]))\n```" + ] + }, + { + "id": "Js_json.deserializeUnsafe", + "kind": "value", + "name": "deserializeUnsafe", + "signature": "let deserializeUnsafe: string => 'a", + "docstrings": [ + "Best-effort serialization, it tries to seralize as\n many objects as possible and deserialize it back\n\n It is unsafe in two aspects\n - It may throw during parsing\n - when you cast it to a specific type, it may have a type mismatch" + ] + }, + { + "id": "Js_json.serializeExn", + "kind": "value", + "name": "serializeExn", + "signature": "let serializeExn: 'a => string", + "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" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_list.json b/index_data/api/Js_list.json new file mode 100644 index 000000000..056b4eaf0 --- /dev/null +++ b/index_data/api/Js_list.json @@ -0,0 +1,164 @@ +{ + "name": "Js_list", + "docstrings": [], + "items": [ + { + "id": "Js_list.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = list<'a>", + "docstrings": [] + }, + { + "id": "Js_list.length", + "kind": "value", + "name": "length", + "signature": "let length: t<'a> => int", + "docstrings": [] + }, + { + "id": "Js_list.cons", + "kind": "value", + "name": "cons", + "signature": "let cons: ('a, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_list.isEmpty", + "kind": "value", + "name": "isEmpty", + "signature": "let isEmpty: t<'a> => bool", + "docstrings": [] + }, + { + "id": "Js_list.hd", + "kind": "value", + "name": "hd", + "signature": "let hd: t<'a> => option<'a>", + "docstrings": [] + }, + { + "id": "Js_list.tl", + "kind": "value", + "name": "tl", + "signature": "let tl: t<'a> => option>", + "docstrings": [] + }, + { + "id": "Js_list.nth", + "kind": "value", + "name": "nth", + "signature": "let nth: (t<'a>, int) => option<'a>", + "docstrings": [] + }, + { + "id": "Js_list.revAppend", + "kind": "value", + "name": "revAppend", + "signature": "let revAppend: (t<'a>, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_list.rev", + "kind": "value", + "name": "rev", + "signature": "let rev: t<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Js_list.mapRev", + "kind": "value", + "name": "mapRev", + "signature": "let mapRev: ((. 'a) => 'b, t<'a>) => t<'b>", + "docstrings": [] + }, + { + "id": "Js_list.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. 'a) => 'b, t<'a>) => t<'b>", + "docstrings": [] + }, + { + "id": "Js_list.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: ((. 'a) => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Js_list.iteri", + "kind": "value", + "name": "iteri", + "signature": "let iteri: ((. int, 'a) => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Js_list.foldLeft", + "kind": "value", + "name": "foldLeft", + "signature": "let foldLeft: ((. 'a, 'b) => 'a, 'a, list<'b>) => 'a", + "docstrings": [ + "Application order is left to right, tail recurisve" + ] + }, + { + "id": "Js_list.foldRight", + "kind": "value", + "name": "foldRight", + "signature": "let foldRight: ((. 'a, 'b) => 'b, list<'a>, 'b) => 'b", + "docstrings": [ + "Application order is right to left\n tail-recursive." + ] + }, + { + "id": "Js_list.flatten", + "kind": "value", + "name": "flatten", + "signature": "let flatten: t> => t<'a>", + "docstrings": [] + }, + { + "id": "Js_list.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. 'a) => bool, t<'a>) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_list.filterMap", + "kind": "value", + "name": "filterMap", + "signature": "let filterMap: ((. 'a) => option<'b>, t<'a>) => t<'b>", + "docstrings": [] + }, + { + "id": "Js_list.countBy", + "kind": "value", + "name": "countBy", + "signature": "let countBy: ((. 'a) => bool, list<'a>) => int", + "docstrings": [] + }, + { + "id": "Js_list.init", + "kind": "value", + "name": "init", + "signature": "let init: (int, (. int) => 'a) => t<'a>", + "docstrings": [] + }, + { + "id": "Js_list.toVector", + "kind": "value", + "name": "toVector", + "signature": "let toVector: t<'a> => array<'a>", + "docstrings": [] + }, + { + "id": "Js_list.equal", + "kind": "value", + "name": "equal", + "signature": "let equal: ((. 'a, 'a) => bool, list<'a>, list<'a>) => bool", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_map.json b/index_data/api/Js_map.json new file mode 100644 index 000000000..31984bf15 --- /dev/null +++ b/index_data/api/Js_map.json @@ -0,0 +1,15 @@ +{ + "name": "Js_map", + "docstrings": [ + "ES6 Map API" + ], + "items": [ + { + "id": "Js_map.t", + "kind": "type", + "name": "t", + "signature": "type t<'k, 'v>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_mapperRt.json b/index_data/api/Js_mapperRt.json new file mode 100644 index 000000000..1dfb20246 --- /dev/null +++ b/index_data/api/Js_mapperRt.json @@ -0,0 +1,29 @@ +{ + "name": "Js_mapperRt", + "docstrings": [], + "items": [ + { + "id": "Js_mapperRt.raiseWhenNotFound", + "kind": "value", + "name": "raiseWhenNotFound", + "signature": "let raiseWhenNotFound: 'a => 'a", + "docstrings": [] + }, + { + "id": "Js_mapperRt.fromInt", + "kind": "value", + "name": "fromInt", + "signature": "let fromInt: (int, array, int) => option", + "docstrings": [ + "`fromInt len array int`\n return the mapped `enum`" + ] + }, + { + "id": "Js_mapperRt.fromIntAssert", + "kind": "value", + "name": "fromIntAssert", + "signature": "let fromIntAssert: (int, array, int) => int", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_math.json b/index_data/api/Js_math.json new file mode 100644 index 000000000..cedb1d894 --- /dev/null +++ b/index_data/api/Js_math.json @@ -0,0 +1,582 @@ +{ + "name": "Js_math", + "docstrings": [], + "items": [ + { + "id": "Js_math._E", + "kind": "value", + "name": "_E", + "signature": "let _E: float", + "docstrings": [ + "Euler's number; ≈ 2.718281828459045. See\n [`Math.E`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/E)\n on MDN." + ] + }, + { + "id": "Js_math._LN2", + "kind": "value", + "name": "_LN2", + "signature": "let _LN2: float", + "docstrings": [ + "Natural logarithm of 2; ≈ 0.6931471805599453. See\n [`Math.LN2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN2)\n on MDN." + ] + }, + { + "id": "Js_math._LN10", + "kind": "value", + "name": "_LN10", + "signature": "let _LN10: float", + "docstrings": [ + "Natural logarithm of 10; ≈ 2.302585092994046. See\n [`Math.LN10`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LN10)\n on MDN." + ] + }, + { + "id": "Js_math._LOG2E", + "kind": "value", + "name": "_LOG2E", + "signature": "let _LOG2E: float", + "docstrings": [ + "Base 2 logarithm of E; ≈ 1.4426950408889634. See\n [`Math.LOG2E`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG2E)\n on MDN." + ] + }, + { + "id": "Js_math._LOG10E", + "kind": "value", + "name": "_LOG10E", + "signature": "let _LOG10E: float", + "docstrings": [ + "Base 10 logarithm of E; ≈ 0.4342944819032518. See\n [`Math.LOG10E`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/LOG10E)\n on MDN." + ] + }, + { + "id": "Js_math._PI", + "kind": "value", + "name": "_PI", + "signature": "let _PI: float", + "docstrings": [ + "Pi - ratio of the circumference to the diameter of a circle; ≈ 3.141592653589793. See\n [`Math.PI`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/PI)\n on MDN." + ] + }, + { + "id": "Js_math._SQRT1_2", + "kind": "value", + "name": "_SQRT1_2", + "signature": "let _SQRT1_2: float", + "docstrings": [ + "Square root of 1/2; ≈ 0.7071067811865476. See\n [`Math.SQRT1_2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT1_2)\n on MDN." + ] + }, + { + "id": "Js_math._SQRT2", + "kind": "value", + "name": "_SQRT2", + "signature": "let _SQRT2: float", + "docstrings": [ + "Square root of 2; ≈ 1.4142135623730951. See\n [`Math.SQRT2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/SQRT2)\n on MDN." + ] + }, + { + "id": "Js_math.abs_int", + "kind": "value", + "name": "abs_int", + "signature": "let abs_int: int => int", + "docstrings": [ + "Absolute value for integer argument. See\n [`Math.abs`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs)\n on MDN." + ] + }, + { + "id": "Js_math.abs_float", + "kind": "value", + "name": "abs_float", + "signature": "let abs_float: float => float", + "docstrings": [ + "Absolute value for float argument. See\n [`Math.abs`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs)\n on MDN." + ] + }, + { + "id": "Js_math.acos", + "kind": "value", + "name": "acos", + "signature": "let acos: float => float", + "docstrings": [ + "Arccosine (in radians) of argument; returns `NaN` if the argument is outside\n the range [-1.0, 1.0]. See\n [`Math.acos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acos)\n on MDN." + ] + }, + { + "id": "Js_math.acosh", + "kind": "value", + "name": "acosh", + "signature": "let acosh: float => float", + "docstrings": [ + "Hyperbolic arccosine (in radians) of argument; returns `NaN` if the argument\n is less than 1.0. See\n [`Math.acosh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acosh)\n on MDN." + ] + }, + { + "id": "Js_math.asin", + "kind": "value", + "name": "asin", + "signature": "let asin: float => float", + "docstrings": [ + "Arcsine (in radians) of argument; returns `NaN` if the argument is outside\n the range [-1.0, 1.0]. See\n [`Math.asin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asin)\n on MDN." + ] + }, + { + "id": "Js_math.asinh", + "kind": "value", + "name": "asinh", + "signature": "let asinh: float => float", + "docstrings": [ + "Hyperbolic arcsine (in radians) of argument. See\n [`Math.asinh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asinh)\n on MDN." + ] + }, + { + "id": "Js_math.atan", + "kind": "value", + "name": "atan", + "signature": "let atan: float => float", + "docstrings": [ + "Arctangent (in radians) of argument. See\n [`Math.atan`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan)\n on MDN." + ] + }, + { + "id": "Js_math.atanh", + "kind": "value", + "name": "atanh", + "signature": "let atanh: float => float", + "docstrings": [ + "Hyperbolic arctangent (in radians) of argument; returns `NaN` if the argument\n is is outside the range [-1.0, 1.0]. Returns `-Infinity` and `Infinity` for\n arguments -1.0 and 1.0. See\n [`Math.atanh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh)\n on MDN." + ] + }, + { + "id": "Js_math.atan2", + "kind": "value", + "name": "atan2", + "signature": "let atan2: (~y: float, ~x: float, unit) => float", + "docstrings": [ + "Returns the angle (in radians) of the quotient `y /. x`. It is also the angle\n between the *x*-axis and point (*x*, *y*). See\n [`Math.atan2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2)\n on MDN.\n\n ```res example\n Js.Math.atan2(~y=0.0, ~x=10.0, ()) == 0.0\n Js.Math.atan2(~x=5.0, ~y=5.0, ()) == Js.Math._PI /. 4.0\n Js.Math.atan2(~x=-5.0, ~y=5.0, ())\n Js.Math.atan2(~x=-5.0, ~y=5.0, ()) == 3.0 *. Js.Math._PI /. 4.0\n Js.Math.atan2(~x=-0.0, ~y=-5.0, ()) == -.Js.Math._PI /. 2.0\n ```" + ] + }, + { + "id": "Js_math.cbrt", + "kind": "value", + "name": "cbrt", + "signature": "let cbrt: float => float", + "docstrings": [ + "Cube root. See\n [`Math.cbrt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cbrt)\n on MDN" + ] + }, + { + "id": "Js_math.unsafe_ceil_int", + "kind": "value", + "name": "unsafe_ceil_int", + "signature": "let unsafe_ceil_int: float => int", + "docstrings": [ + "Returns the smallest integer greater than or equal to the argument. This\n function may return values not representable by `int`, whose range is\n -2147483648 to 2147483647. This is because, in JavaScript, there are only\n 64-bit floating point numbers, which can represent integers in the range\n ±(253-1) exactly. See\n [`Math.ceil`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil)\n on MDN.\n\n ```res example\n Js.Math.unsafe_ceil_int(3.1) == 4\n Js.Math.unsafe_ceil_int(3.0) == 3\n Js.Math.unsafe_ceil_int(-3.1) == -3\n Js.Math.unsafe_ceil_int(1.0e15) // result is outside range of int datatype\n ```" + ] + }, + { + "id": "Js_math.unsafe_ceil", + "kind": "value", + "name": "unsafe_ceil", + "signature": "let unsafe_ceil: float => int", + "docstrings": [ + "Deprecated; please use [`unsafe_ceil_int`](#unsafe_ceil_int) instead." + ] + }, + { + "id": "Js_math.ceil_int", + "kind": "value", + "name": "ceil_int", + "signature": "let ceil_int: float => int", + "docstrings": [ + "Returns the smallest `int` greater than or equal to the argument; the result\n is pinned to the range of the `int` data type: -2147483648 to 2147483647. See\n [`Math.ceil`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil)\n on MDN.\n\n ```res example\n Js.Math.ceil_int(3.1) == 4\n Js.Math.ceil_int(3.0) == 3\n Js.Math.ceil_int(-3.1) == -3\n Js.Math.ceil_int(-1.0e15) == -2147483648\n Js.Math.ceil_int(1.0e15) == 2147483647\n ```" + ] + }, + { + "id": "Js_math.ceil", + "kind": "value", + "name": "ceil", + "signature": "let ceil: float => int", + "docstrings": [ + "Deprecated; please use [`ceil_int`](#ceil_int) instead." + ] + }, + { + "id": "Js_math.ceil_float", + "kind": "value", + "name": "ceil_float", + "signature": "let ceil_float: float => float", + "docstrings": [ + "Returns the smallest integral value greater than or equal to the argument.\n The result is a `float` and is not restricted to the `int` data type range.\n See\n [`Math.ceil`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil)\n on MDN.\n\n ```res example\n Js.Math.ceil_float(3.1) == 4.0\n Js.Math.ceil_float(3.0) == 3.0\n Js.Math.ceil_float(-3.1) == -3.0\n Js.Math.ceil_float(2_150_000_000.3) == 2_150_000_001.0\n ```" + ] + }, + { + "id": "Js_math.clz32", + "kind": "value", + "name": "clz32", + "signature": "let clz32: int => int", + "docstrings": [ + "Number of leading zero bits of the argument's 32 bit int representation. See\n [`Math.clz32`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32)\n on MDN.\n\n ```res example\n Js.Math.clz32(0) == 32\n Js.Math.clz32(-1) == 0\n Js.Math.clz32(255) == 24\n ```" + ] + }, + { + "id": "Js_math.cos", + "kind": "value", + "name": "cos", + "signature": "let cos: float => float", + "docstrings": [ + "Cosine of argument, which must be specified in radians. See\n [`Math.cos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos)\n on MDN." + ] + }, + { + "id": "Js_math.cosh", + "kind": "value", + "name": "cosh", + "signature": "let cosh: float => float", + "docstrings": [ + "Hyperbolic cosine of argument, which must be specified in radians. See\n [`Math.cosh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cosh)\n on MDN." + ] + }, + { + "id": "Js_math.exp", + "kind": "value", + "name": "exp", + "signature": "let exp: float => float", + "docstrings": [ + "Natural exponentional; returns *e* (the base of natural logarithms) to the\n power of the given argument. See\n [`Math.exp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/exp)\n on MDN." + ] + }, + { + "id": "Js_math.expm1", + "kind": "value", + "name": "expm1", + "signature": "let expm1: float => float", + "docstrings": [ + "Returns *e* (the base of natural logarithms) to the power of the given\n argument minus 1. See\n [`Math.expm1`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/expm1)\n on MDN." + ] + }, + { + "id": "Js_math.unsafe_floor_int", + "kind": "value", + "name": "unsafe_floor_int", + "signature": "let unsafe_floor_int: float => int", + "docstrings": [ + "Returns the largest integer less than or equal to the argument. This function\n may return values not representable by `int`, whose range is -2147483648 to\n 2147483647. This is because, in JavaScript, there are only 64-bit floating\n point numbers, which can represent integers in the range\n ±(253-1) exactly. See\n [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ```res example\n Js.Math.unsafe_floor_int(3.7) == 3\n Js.Math.unsafe_floor_int(3.0) == 3\n Js.Math.unsafe_floor_int(-3.7) == -4\n Js.Math.unsafe_floor_int(1.0e15) // result is outside range of int datatype\n ```" + ] + }, + { + "id": "Js_math.unsafe_floor", + "kind": "value", + "name": "unsafe_floor", + "signature": "let unsafe_floor: float => int", + "docstrings": [ + "Deprecated; please use [`unsafe_floor_int`](#unsafe_floor_int) instead." + ] + }, + { + "id": "Js_math.floor_int", + "kind": "value", + "name": "floor_int", + "signature": "let floor_int: float => int", + "docstrings": [ + "Returns the largest `int` less than or equal to the argument; the result is\n pinned to the range of the `int` data type: -2147483648 to 2147483647. See\n [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ```res example\n Js.Math.floor_int(3.7) == 3\n Js.Math.floor_int(3.0) == 3\n Js.Math.floor_int(-3.1) == -4\n Js.Math.floor_int(-1.0e15) == -2147483648\n Js.Math.floor_int(1.0e15) == 2147483647\n ```" + ] + }, + { + "id": "Js_math.floor", + "kind": "value", + "name": "floor", + "signature": "let floor: float => int", + "docstrings": [ + "Deprecated; please use [`floor_int`](#floor_int) instead." + ] + }, + { + "id": "Js_math.floor_float", + "kind": "value", + "name": "floor_float", + "signature": "let floor_float: float => float", + "docstrings": [ + "Returns the largest integral value less than or equal to the argument. The\n result is a `float` and is not restricted to the `int` data type range. See\n [`Math.floor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor)\n on MDN.\n\n ```res example\n Js.Math.floor_float(3.7) == 3.0\n Js.Math.floor_float(3.0) == 3.0\n Js.Math.floor_float(-3.1) == -4.0\n Js.Math.floor_float(2_150_000_000.3) == 2_150_000_000.0\n ```" + ] + }, + { + "id": "Js_math.fround", + "kind": "value", + "name": "fround", + "signature": "let fround: float => float", + "docstrings": [ + "Round to nearest single precision float. See\n [`Math.fround`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround)\n on MDN.\n\n ```res example\n Js.Math.fround(5.5) == 5.5\n Js.Math.fround(5.05) == 5.050000190734863\n ```" + ] + }, + { + "id": "Js_math.hypot", + "kind": "value", + "name": "hypot", + "signature": "let hypot: (float, float) => float", + "docstrings": [ + "Returns the square root of the sum of squares of its two arguments (the\n Pythagorean formula). See\n [`Math.hypot`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot)\n on MDN." + ] + }, + { + "id": "Js_math.hypotMany", + "kind": "value", + "name": "hypotMany", + "signature": "let hypotMany: array => float", + "docstrings": [ + "Returns the square root of the sum of squares of the numbers in the array\n argument (generalized Pythagorean equation). Using an array allows you to\n have more than two items. See\n [`Math.hypot`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot)\n on MDN.\n\n ```res example\n Js.Math.hypotMany([3.0, 4.0, 12.0]) == 13.0\n ```" + ] + }, + { + "id": "Js_math.imul", + "kind": "value", + "name": "imul", + "signature": "let imul: (int, int) => int", + "docstrings": [ + "32-bit integer multiplication. Use this only when you need to optimize\n performance of multiplication of numbers stored as 32-bit integers. See\n [`Math.imul`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul)\n on MDN." + ] + }, + { + "id": "Js_math.log", + "kind": "value", + "name": "log", + "signature": "let log: float => float", + "docstrings": [ + "Returns the natural logarithm of its argument; this is the number *x* such\n that *e**x* equals the argument. Returns `NaN` for negative\n arguments. See\n [`Math.log`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log)\n on MDN.\n\n ```res example\n Js.Math.log(Js.Math._E) == 1.0\n Js.Math.log(100.0) == 4.605170185988092\n ```" + ] + }, + { + "id": "Js_math.log1p", + "kind": "value", + "name": "log1p", + "signature": "let log1p: float => float", + "docstrings": [ + "Returns the natural logarithm of one plus the argument. Returns `NaN` for\n arguments less than -1. See\n [`Math.log1p`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log1p)\n on MDN.\n\n ```res example\n Js.Math.log1p(Js.Math._E -. 1.0) == 1.0\n Js.Math.log1p(99.0) == 4.605170185988092\n ```" + ] + }, + { + "id": "Js_math.log10", + "kind": "value", + "name": "log10", + "signature": "let log10: float => float", + "docstrings": [ + "Returns the base 10 logarithm of its argument. Returns `NaN` for negative\n arguments. See\n [`Math.log10`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log10)\n on MDN.\n\n ```res example\n Js.Math.log10(1000.0) == 3.0\n Js.Math.log10(0.01) == -2.0\n Js.Math.log10(Js.Math.sqrt(10.0)) == 0.5\n ```" + ] + }, + { + "id": "Js_math.log2", + "kind": "value", + "name": "log2", + "signature": "let log2: float => float", + "docstrings": [ + "Returns the base 2 logarithm of its argument. Returns `NaN` for negative\n arguments. See\n [`Math.log2`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log2)\n on MDN.\n\n ```res example\n Js.Math.log2(512.0) == 9.0\n Js.Math.log2(0.125) == -3.0\n Js.Math.log2(Js.Math._SQRT2) == 0.5000000000000001 // due to precision\n ```" + ] + }, + { + "id": "Js_math.max_int", + "kind": "value", + "name": "max_int", + "signature": "let max_int: (int, int) => int", + "docstrings": [ + "Returns the maximum of its two integer arguments. See\n [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max)\n on MDN." + ] + }, + { + "id": "Js_math.maxMany_int", + "kind": "value", + "name": "maxMany_int", + "signature": "let maxMany_int: array => int", + "docstrings": [ + "Returns the maximum of the integers in the given array. See\n [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max)\n on MDN." + ] + }, + { + "id": "Js_math.max_float", + "kind": "value", + "name": "max_float", + "signature": "let max_float: (float, float) => float", + "docstrings": [ + "Returns the maximum of its two floating point arguments. See\n [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max)\n on MDN." + ] + }, + { + "id": "Js_math.maxMany_float", + "kind": "value", + "name": "maxMany_float", + "signature": "let maxMany_float: array => float", + "docstrings": [ + "Returns the maximum of the floating point values in the given array. See\n [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max)\n on MDN." + ] + }, + { + "id": "Js_math.min_int", + "kind": "value", + "name": "min_int", + "signature": "let min_int: (int, int) => int", + "docstrings": [ + "Returns the minimum of its two integer arguments. See\n [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min)\n on MDN." + ] + }, + { + "id": "Js_math.minMany_int", + "kind": "value", + "name": "minMany_int", + "signature": "let minMany_int: array => int", + "docstrings": [ + "Returns the minimum of the integers in the given array. See\n [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min)\n on MDN." + ] + }, + { + "id": "Js_math.min_float", + "kind": "value", + "name": "min_float", + "signature": "let min_float: (float, float) => float", + "docstrings": [ + "Returns the minimum of its two floating point arguments. See\n [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min)\n on MDN." + ] + }, + { + "id": "Js_math.minMany_float", + "kind": "value", + "name": "minMany_float", + "signature": "let minMany_float: array => float", + "docstrings": [ + "Returns the minimum of the floating point values in the given array. See\n [`Math.min`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min)\n on MDN." + ] + }, + { + "id": "Js_math.pow_int", + "kind": "value", + "name": "pow_int", + "signature": "let pow_int: (~base: int, ~exp: int) => int", + "docstrings": [ + "Raises the given base to the given exponent. (Arguments and result are\n integers.) See\n [`Math.pow`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow)\n on MDN.\n\n ```res example\n Js.Math.pow_int(~base=3, ~exp=4) == 81\n ```" + ] + }, + { + "id": "Js_math.pow_float", + "kind": "value", + "name": "pow_float", + "signature": "let pow_float: (~base: float, ~exp: float) => float", + "docstrings": [ + "Raises the given base to the given exponent. (Arguments and result are\n floats.) Returns `NaN` if the result would be imaginary. See\n [`Math.pow`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow)\n on MDN.\n\n ```res example\n Js.Math.pow_float(~base=3.0, ~exp=4.0) == 81.0\n Js.Math.pow_float(~base=4.0, ~exp=-2.0) == 0.0625\n Js.Math.pow_float(~base=625.0, ~exp=0.5) == 25.0\n Js.Math.pow_float(~base=625.0, ~exp=-0.5) == 0.04\n Js.Float.isNaN(Js.Math.pow_float(~base=-2.0, ~exp=0.5)) == true\n ```" + ] + }, + { + "id": "Js_math.random", + "kind": "value", + "name": "random", + "signature": "let random: unit => float", + "docstrings": [ + "Returns a random number in the half-closed interval [0,1). See\n [`Math.random`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random)\n on MDN." + ] + }, + { + "id": "Js_math.random_int", + "kind": "value", + "name": "random_int", + "signature": "let random_int: (int, int) => int", + "docstrings": [ + "A call to `random_int(minVal, maxVal)` returns a random number in the\n half-closed interval [minVal, maxVal). See\n [`Math.random`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random)\n on MDN." + ] + }, + { + "id": "Js_math.unsafe_round", + "kind": "value", + "name": "unsafe_round", + "signature": "let unsafe_round: float => int", + "docstrings": [ + "Rounds its argument to nearest integer. For numbers with a fractional portion\n of exactly 0.5, the argument is rounded to the next integer in the direction\n of positive infinity. This function may return values not representable by\n `int`, whose range is -2147483648 to 2147483647. This is because, in\n JavaScript, there are only 64-bit floating point numbers, which can represent\n integers in the range ±(253-1) exactly. See\n [`Math.round`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round)\n on MDN.\n\n ```res example\n Js.Math.unsafe_round(3.7) == 4\n Js.Math.unsafe_round(-3.5) == -3\n Js.Math.unsafe_round(2_150_000_000_000.3) // out of range for int\n ```" + ] + }, + { + "id": "Js_math.round", + "kind": "value", + "name": "round", + "signature": "let round: float => float", + "docstrings": [ + "Rounds to nearest integral value (expressed as a float). See\n [`Math.round`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round)\n on MDN." + ] + }, + { + "id": "Js_math.sign_int", + "kind": "value", + "name": "sign_int", + "signature": "let sign_int: int => int", + "docstrings": [ + "Returns the sign of its integer argument: -1 if negative, 0 if zero, 1 if\n positive. See\n [`Math.sign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign)\n on MDN." + ] + }, + { + "id": "Js_math.sign_float", + "kind": "value", + "name": "sign_float", + "signature": "let sign_float: float => float", + "docstrings": [ + "Returns the sign of its float argument: -1.0 if negative, 0.0 if zero, 1.0 if\n positive. See\n [`Math.sign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign)\n on MDN." + ] + }, + { + "id": "Js_math.sin", + "kind": "value", + "name": "sin", + "signature": "let sin: float => float", + "docstrings": [ + "Sine of argument, which must be specified in radians. See\n [`Math.sin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sin)\n on MDN." + ] + }, + { + "id": "Js_math.sinh", + "kind": "value", + "name": "sinh", + "signature": "let sinh: float => float", + "docstrings": [ + "Hyperbolic sine of argument, which must be specified in radians. See\n [`Math.sinh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sinh)\n on MDN." + ] + }, + { + "id": "Js_math.sqrt", + "kind": "value", + "name": "sqrt", + "signature": "let sqrt: float => float", + "docstrings": [ + "Square root. If the argument is negative, this function returns `NaN`. See\n [`Math.sqrt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt)\n on MDN." + ] + }, + { + "id": "Js_math.tan", + "kind": "value", + "name": "tan", + "signature": "let tan: float => float", + "docstrings": [ + "Tangent of argument, which must be specified in radians. Returns `NaN` if the\n argument is positive infinity or negative infinity. See\n [`Math.cos`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos)\n on MDN." + ] + }, + { + "id": "Js_math.tanh", + "kind": "value", + "name": "tanh", + "signature": "let tanh: float => float", + "docstrings": [ + "Hyperbolic tangent of argument, which must be specified in radians. See\n [`Math.tanh`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tanh)\n on MDN." + ] + }, + { + "id": "Js_math.unsafe_trunc", + "kind": "value", + "name": "unsafe_trunc", + "signature": "let unsafe_trunc: float => int", + "docstrings": [ + "Truncates its argument; i.e., removes fractional digits. This function may\n return values not representable by `int`, whose range is -2147483648 to\n 2147483647. This is because, in JavaScript, there are only 64-bit floating\n point numbers, which can represent integers in the range ±(253-1)\n exactly. See\n [`Math.trunc`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc)\n on MDN." + ] + }, + { + "id": "Js_math.trunc", + "kind": "value", + "name": "trunc", + "signature": "let trunc: float => float", + "docstrings": [ + "Truncates its argument; i.e., removes fractional digits. See\n [`Math.trunc`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc)\n on MDN." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_null.json b/index_data/api/Js_null.json new file mode 100644 index 000000000..0e1bc84ea --- /dev/null +++ b/index_data/api/Js_null.json @@ -0,0 +1,123 @@ +{ + "name": "Js_null", + "docstrings": [ + "Provides functionality for dealing with the `Js.null<'a>` type" + ], + "items": [ + { + "id": "Js_null.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = Js.null<'a> = Value('a) | Null", + "docstrings": [ + "Local alias for `Js.null('a)`" + ], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Value", + "docstrings": [], + "signature": "Value('a)" + }, + { + "constructorName": "Null", + "docstrings": [], + "signature": "Null" + } + ] + } + }, + { + "id": "Js_null.return", + "kind": "value", + "name": "return", + "signature": "let return: 'a => t<'a>", + "docstrings": [ + "Constructs a value of `Js.null('a)` containing a value of `'a`." + ] + }, + { + "id": "Js_null.test", + "kind": "value", + "name": "test", + "signature": "let test: t<'a> => bool", + "docstrings": [ + "Returns `true` if the given value is empty (`null`), `false` otherwise." + ] + }, + { + "id": "Js_null.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: t<'a>", + "docstrings": [ + "The empty value, `null`" + ] + }, + { + "id": "Js_null.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "signature": "let getUnsafe: t<'a> => 'a", + "docstrings": [] + }, + { + "id": "Js_null.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: t<'a> => 'a", + "docstrings": [] + }, + { + "id": "Js_null.bind", + "kind": "value", + "name": "bind", + "signature": "let bind: (t<'a>, (. 'a) => 'b) => t<'b>", + "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```res example\nlet maybeGreetWorld = (maybeGreeting: Js.null) =>\n Js.Null.bind(maybeGreeting, (. greeting) => greeting ++ \" world!\")\n```" + ] + }, + { + "id": "Js_null.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (t<'a>, (. 'a) => unit) => unit", + "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```res example\nlet maybeSay = (maybeMessage: Js.null) =>\n Js.Null.iter(maybeMessage, (. message) => Js.log(message))\n```" + ] + }, + { + "id": "Js_null.fromOption", + "kind": "value", + "name": "fromOption", + "signature": "let fromOption: option<'a> => t<'a>", + "docstrings": [ + "Maps `option('a)` to `Js.null('a)`.\n`Some(a)` => `a`\n`None` => `empty`" + ] + }, + { + "id": "Js_null.from_opt", + "kind": "value", + "name": "from_opt", + "signature": "let from_opt: option<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Js_null.toOption", + "kind": "value", + "name": "toOption", + "signature": "let toOption: t<'a> => option<'a>", + "docstrings": [ + "Maps `Js.null('a)` to `option('a)`.\n`a` => `Some(a)`\n`empty` => `None`" + ] + }, + { + "id": "Js_null.to_opt", + "kind": "value", + "name": "to_opt", + "signature": "let to_opt: t<'a> => option<'a>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_null_undefined.json b/index_data/api/Js_null_undefined.json new file mode 100644 index 000000000..3ed1b2a5f --- /dev/null +++ b/index_data/api/Js_null_undefined.json @@ -0,0 +1,123 @@ +{ + "name": "Js_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", + "signature": "type t<'a> = Js.nullable<'a> = Value('a) | Null | Undefined", + "docstrings": [ + "Local alias for `Js.null_undefined('a)`." + ], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Value", + "docstrings": [], + "signature": "Value('a)" + }, + { + "constructorName": "Null", + "docstrings": [], + "signature": "Null" + }, + { + "constructorName": "Undefined", + "docstrings": [], + "signature": "Undefined" + } + ] + } + }, + { + "id": "Js_null_undefined.return", + "kind": "value", + "name": "return", + "signature": "let return: 'a => t<'a>", + "docstrings": [ + "Constructs a value of `Js.null_undefined('a)` containing a value of `'a`." + ] + }, + { + "id": "Js_null_undefined.isNullable", + "kind": "value", + "name": "isNullable", + "signature": "let isNullable: t<'a> => bool", + "docstrings": [ + "Returns `true` if the given value is null or undefined, `false` otherwise." + ] + }, + { + "id": "Js_null_undefined.null", + "kind": "value", + "name": "null", + "signature": "let null: t<'a>", + "docstrings": [ + "The null value of type `Js.null_undefined('a)`." + ] + }, + { + "id": "Js_null_undefined.undefined", + "kind": "value", + "name": "undefined", + "signature": "let undefined: t<'a>", + "docstrings": [ + "The undefined value of type `Js.null_undefined('a)`." + ] + }, + { + "id": "Js_null_undefined.bind", + "kind": "value", + "name": "bind", + "signature": "let bind: (t<'a>, (. 'a) => 'b) => t<'b>", + "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```res example\nlet maybeGreetWorld = (maybeGreeting: Js.null_undefined) =>\n Js.Null_undefined.bind(maybeGreeting, (. greeting) => greeting ++ \" world!\")\n```" + ] + }, + { + "id": "Js_null_undefined.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (t<'a>, (. 'a) => unit) => unit", + "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```res example\nlet maybeSay = (maybeMessage: Js.null_undefined) =>\n Js.Null_undefined.iter(maybeMessage, (. message) => Js.log(message))\n```" + ] + }, + { + "id": "Js_null_undefined.fromOption", + "kind": "value", + "name": "fromOption", + "signature": "let fromOption: option<'a> => t<'a>", + "docstrings": [ + "Maps `option('a)` to `Js.null_undefined('a)`.\n`Some(a)` => `a`\n`None` => `undefined`" + ] + }, + { + "id": "Js_null_undefined.from_opt", + "kind": "value", + "name": "from_opt", + "signature": "let from_opt: option<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Js_null_undefined.toOption", + "kind": "value", + "name": "toOption", + "signature": "let toOption: t<'a> => option<'a>", + "docstrings": [ + "Maps `Js.null_undefined('a)` to `option('a)`.\n`a` => `Some(a)`\n`undefined` => `None`\n`null` => `None`" + ] + }, + { + "id": "Js_null_undefined.to_opt", + "kind": "value", + "name": "to_opt", + "signature": "let to_opt: t<'a> => option<'a>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_obj.json b/index_data/api/Js_obj.json new file mode 100644 index 000000000..723ce33ec --- /dev/null +++ b/index_data/api/Js_obj.json @@ -0,0 +1,35 @@ +{ + "name": "Js_obj", + "docstrings": [ + "Provides functions for inspecting and manipulating native JavaScript objects" + ], + "items": [ + { + "id": "Js_obj.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: unit => {..}", + "docstrings": [ + "`empty()` returns the empty object `{}`" + ] + }, + { + "id": "Js_obj.assign", + "kind": "value", + "name": "assign", + "signature": "let 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```res example\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```" + ] + }, + { + "id": "Js_obj.keys", + "kind": "value", + "name": "keys", + "signature": "let keys: {..} => array", + "docstrings": [ + "`keys(obj)` returns an `array` of the keys of `obj`'s own enumerable properties." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_option.json b/index_data/api/Js_option.json new file mode 100644 index 000000000..22d5b8b51 --- /dev/null +++ b/index_data/api/Js_option.json @@ -0,0 +1,97 @@ +{ + "name": "Js_option", + "docstrings": [], + "items": [ + { + "id": "Js_option.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = option<'a>", + "docstrings": [] + }, + { + "id": "Js_option.some", + "kind": "value", + "name": "some", + "signature": "let some: 'a => option<'a>", + "docstrings": [] + }, + { + "id": "Js_option.isSome", + "kind": "value", + "name": "isSome", + "signature": "let isSome: option<'a> => bool", + "docstrings": [] + }, + { + "id": "Js_option.isSomeValue", + "kind": "value", + "name": "isSomeValue", + "signature": "let isSomeValue: ((. 'a, 'a) => bool, 'a, option<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js_option.isNone", + "kind": "value", + "name": "isNone", + "signature": "let isNone: option<'a> => bool", + "docstrings": [] + }, + { + "id": "Js_option.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: option<'a> => 'a", + "docstrings": [] + }, + { + "id": "Js_option.equal", + "kind": "value", + "name": "equal", + "signature": "let equal: ((. 'a, 'b) => bool, option<'a>, option<'b>) => bool", + "docstrings": [] + }, + { + "id": "Js_option.andThen", + "kind": "value", + "name": "andThen", + "signature": "let andThen: ((. 'a) => option<'b>, option<'a>) => option<'b>", + "docstrings": [] + }, + { + "id": "Js_option.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. 'a) => 'b, option<'a>) => option<'b>", + "docstrings": [] + }, + { + "id": "Js_option.getWithDefault", + "kind": "value", + "name": "getWithDefault", + "signature": "let getWithDefault: ('a, option<'a>) => 'a", + "docstrings": [] + }, + { + "id": "Js_option.default", + "kind": "value", + "name": "default", + "signature": "let default: ('a, option<'a>) => 'a", + "docstrings": [] + }, + { + "id": "Js_option.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. 'a) => bool, option<'a>) => option<'a>", + "docstrings": [] + }, + { + "id": "Js_option.firstSome", + "kind": "value", + "name": "firstSome", + "signature": "let firstSome: (option<'a>, option<'a>) => option<'a>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_promise.json b/index_data/api/Js_promise.json new file mode 100644 index 000000000..656837904 --- /dev/null +++ b/index_data/api/Js_promise.json @@ -0,0 +1,120 @@ +{ + "name": "Js_promise", + "docstrings": [ + "Deprecation note: These bindings are pretty outdated and cannot be used\n properly with the `->` operator.\n\n More details on proper Promise usage can be found here:\n https://rescript-lang.org/docs/manual/latest/promise#promise-legacy" + ], + "items": [ + { + "id": "Js_promise.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise.error", + "kind": "type", + "name": "error", + "signature": "type error = Js_promise2.error", + "docstrings": [] + }, + { + "id": "Js_promise.make", + "kind": "value", + "name": "make", + "signature": "let make: ((~resolve: (. 'a) => unit, ~reject: (. exn) => unit) => unit) => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise.resolve", + "kind": "value", + "name": "resolve", + "signature": "let resolve: 'a => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise.reject", + "kind": "value", + "name": "reject", + "signature": "let reject: exn => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise.all", + "kind": "value", + "name": "all", + "signature": "let all: array> => promise>", + "docstrings": [] + }, + { + "id": "Js_promise.all2", + "kind": "value", + "name": "all2", + "signature": "let all2: ((promise<'a0>, promise<'a1>)) => promise<('a0, 'a1)>", + "docstrings": [] + }, + { + "id": "Js_promise.all3", + "kind": "value", + "name": "all3", + "signature": "let all3: ((promise<'a0>, promise<'a1>, promise<'a2>)) => promise<('a0, 'a1, 'a2)>", + "docstrings": [] + }, + { + "id": "Js_promise.all4", + "kind": "value", + "name": "all4", + "signature": "let all4: ((promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>)) => promise<(\\n 'a0,\\n 'a1,\\n 'a2,\\n 'a3,\\n)>", + "docstrings": [] + }, + { + "id": "Js_promise.all5", + "kind": "value", + "name": "all5", + "signature": "let all5: ((promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>, promise<'a4>)) => promise<(\\n 'a0,\\n 'a1,\\n 'a2,\\n 'a3,\\n 'a4,\\n)>", + "docstrings": [] + }, + { + "id": "Js_promise.all6", + "kind": "value", + "name": "all6", + "signature": "let all6: (\\n (promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>, promise<'a4>, promise<'a5>)\\n) => promise<('a0, 'a1, 'a2, 'a3, 'a4, 'a5)>", + "docstrings": [] + }, + { + "id": "Js_promise.race", + "kind": "value", + "name": "race", + "signature": "let race: array> => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise.then_", + "kind": "value", + "name": "then_", + "signature": "let then_: ('a => promise<'b>, promise<'a>) => promise<'b>", + "docstrings": [] + }, + { + "id": "Js_promise.catch", + "kind": "value", + "name": "catch", + "signature": "let catch: (error => promise<'a>, promise<'a>) => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise.unsafe_async", + "kind": "value", + "name": "unsafe_async", + "signature": "let unsafe_async: 'a => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise.unsafe_await", + "kind": "value", + "name": "unsafe_await", + "signature": "let unsafe_await: promise<'a> => 'a", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_promise2.json b/index_data/api/Js_promise2.json new file mode 100644 index 000000000..8811a9cfb --- /dev/null +++ b/index_data/api/Js_promise2.json @@ -0,0 +1,122 @@ +{ + "name": "Js_promise2", + "docstrings": [], + "items": [ + { + "id": "Js_promise2.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise2.error", + "kind": "type", + "name": "error", + "signature": "type error", + "docstrings": [] + }, + { + "id": "Js_promise2.then", + "kind": "value", + "name": "then", + "signature": "let then: (promise<'a>, 'a => promise<'b>) => promise<'b>", + "docstrings": [ + "Type-safe t-first then" + ] + }, + { + "id": "Js_promise2.catch", + "kind": "value", + "name": "catch", + "signature": "let catch: (promise<'a>, error => promise<'a>) => promise<'a>", + "docstrings": [ + "Type-safe t-first catch" + ] + }, + { + "id": "Js_promise2.make", + "kind": "value", + "name": "make", + "signature": "let make: ((~resolve: (. 'a) => unit, ~reject: (. exn) => unit) => unit) => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise2.resolve", + "kind": "value", + "name": "resolve", + "signature": "let resolve: 'a => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise2.reject", + "kind": "value", + "name": "reject", + "signature": "let reject: exn => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise2.all", + "kind": "value", + "name": "all", + "signature": "let all: array> => promise>", + "docstrings": [] + }, + { + "id": "Js_promise2.all2", + "kind": "value", + "name": "all2", + "signature": "let all2: ((promise<'a0>, promise<'a1>)) => promise<('a0, 'a1)>", + "docstrings": [] + }, + { + "id": "Js_promise2.all3", + "kind": "value", + "name": "all3", + "signature": "let all3: ((promise<'a0>, promise<'a1>, promise<'a2>)) => promise<('a0, 'a1, 'a2)>", + "docstrings": [] + }, + { + "id": "Js_promise2.all4", + "kind": "value", + "name": "all4", + "signature": "let all4: ((promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>)) => promise<(\\n 'a0,\\n 'a1,\\n 'a2,\\n 'a3,\\n)>", + "docstrings": [] + }, + { + "id": "Js_promise2.all5", + "kind": "value", + "name": "all5", + "signature": "let all5: ((promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>, promise<'a4>)) => promise<(\\n 'a0,\\n 'a1,\\n 'a2,\\n 'a3,\\n 'a4,\\n)>", + "docstrings": [] + }, + { + "id": "Js_promise2.all6", + "kind": "value", + "name": "all6", + "signature": "let all6: (\\n (promise<'a0>, promise<'a1>, promise<'a2>, promise<'a3>, promise<'a4>, promise<'a5>)\\n) => promise<('a0, 'a1, 'a2, 'a3, 'a4, 'a5)>", + "docstrings": [] + }, + { + "id": "Js_promise2.race", + "kind": "value", + "name": "race", + "signature": "let race: array> => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise2.unsafe_async", + "kind": "value", + "name": "unsafe_async", + "signature": "let unsafe_async: 'a => promise<'a>", + "docstrings": [] + }, + { + "id": "Js_promise2.unsafe_await", + "kind": "value", + "name": "unsafe_await", + "signature": "let unsafe_await: promise<'a> => 'a", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_re.json b/index_data/api/Js_re.json new file mode 100644 index 000000000..777fd2ac1 --- /dev/null +++ b/index_data/api/Js_re.json @@ -0,0 +1,179 @@ +{ + "name": "Js_re", + "docstrings": [ + "Provide bindings to JS regular expressions (RegExp).\n\n **Note:** This is not an immutable API. A RegExp object with the `global` (\"g\")\n flag set will modify the [`lastIndex`]() property when the RegExp object is used,\n and subsequent uses will continue the search from the previous [`lastIndex`]()." + ], + "items": [ + { + "id": "Js_re.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [ + "The RegExp object." + ] + }, + { + "id": "Js_re.result", + "kind": "type", + "name": "result", + "signature": "type result", + "docstrings": [ + "The result of a executing a RegExp on a string." + ] + }, + { + "id": "Js_re.captures", + "kind": "value", + "name": "captures", + "signature": "let captures: result => array>", + "docstrings": [ + "An `array` of the match and captures, the first is the full match and the\n remaining are the substring captures." + ] + }, + { + "id": "Js_re.matches", + "kind": "value", + "name": "matches", + "signature": "let matches: result => array", + "docstrings": [ + "Deprecated. Use `captures` instead." + ] + }, + { + "id": "Js_re.index", + "kind": "value", + "name": "index", + "signature": "let index: result => int", + "docstrings": [ + "0-based index of the match in the input string." + ] + }, + { + "id": "Js_re.input", + "kind": "value", + "name": "input", + "signature": "let input: result => string", + "docstrings": [ + "The original input string." + ] + }, + { + "id": "Js_re.fromString", + "kind": "value", + "name": "fromString", + "signature": "let fromString: string => t", + "docstrings": [ + "Constructs a RegExp object (Js.Re.t) from a `string`.\n Regex literals `%re(\"/.../\")` should generally be preferred, but `fromString`\n is useful when you need to dynamically construct a regex using strings,\n exactly like when you do so in JavaScript.\n\n ```res example\n let firstReScriptFileExtension = (filename, content) => {\n let result = Js.Re.fromString(filename ++ \"\\.(res|resi)\")->Js.Re.exec_(content)\n switch result {\n | Some(r) => Js.Nullable.toOption(Js.Re.captures(r)[1])\n | None => None\n }\n }\n\n // outputs \"res\"\n firstReScriptFileExtension(\"School\", \"School.res School.resi Main.js School.bs.js\")\n ```" + ] + }, + { + "id": "Js_re.fromStringWithFlags", + "kind": "value", + "name": "fromStringWithFlags", + "signature": "let fromStringWithFlags: (string, ~flags: string) => t", + "docstrings": [ + "Constructs a RegExp object (`Js.Re.t`) from a string with the given flags.\n See `Js.Re.fromString`.\n\n Valid flags:\n\n - **g** global\n - **i** ignore case\n - **m** multiline\n - **u** unicode (es2015)\n - **y** sticky (es2015)" + ] + }, + { + "id": "Js_re.flags", + "kind": "value", + "name": "flags", + "signature": "let flags: t => string", + "docstrings": [ + "Returns the enabled flags as a string." + ] + }, + { + "id": "Js_re.global", + "kind": "value", + "name": "global", + "signature": "let global: t => bool", + "docstrings": [ + "Returns a `bool` indicating whether the global flag is set." + ] + }, + { + "id": "Js_re.ignoreCase", + "kind": "value", + "name": "ignoreCase", + "signature": "let ignoreCase: t => bool", + "docstrings": [ + "Returns a `bool` indicating whether the ignoreCase flag is set." + ] + }, + { + "id": "Js_re.lastIndex", + "kind": "value", + "name": "lastIndex", + "signature": "let lastIndex: t => int", + "docstrings": [ + "Returns the index where the next match will start its search. This property\n will be modified when the RegExp object is used, if the global (\"g\") flag is\n set.\n\n ```res example\n let re = %re(\"/ab*TODO/g\")\n let str = \"abbcdefabh\"\n\n let break = ref(false)\n while !break.contents {\n switch Js.Re.exec_(re, str) {\n | Some(result) => Js.Nullable.iter(Js.Re.captures(result)[0], (. match_) => {\n let next = Belt.Int.toString(Js.Re.lastIndex(re))\n Js.log(\"Found \" ++ (match_ ++ (\". Next match starts at \" ++ next)))\n })\n | None => break := true\n }\n }\n ```\n\n See\n [`RegExp: lastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex)\n on MDN." + ] + }, + { + "id": "Js_re.setLastIndex", + "kind": "value", + "name": "setLastIndex", + "signature": "let setLastIndex: (t, int) => unit", + "docstrings": [ + "Sets the index at which the next match will start its search from." + ] + }, + { + "id": "Js_re.multiline", + "kind": "value", + "name": "multiline", + "signature": "let multiline: t => bool", + "docstrings": [ + "Returns a `bool` indicating whether the multiline flag is set." + ] + }, + { + "id": "Js_re.source", + "kind": "value", + "name": "source", + "signature": "let source: t => string", + "docstrings": [ + "Returns the pattern as a `string`." + ] + }, + { + "id": "Js_re.sticky", + "kind": "value", + "name": "sticky", + "signature": "let sticky: t => bool", + "docstrings": [ + "Returns a `bool` indicating whether the sticky flag is set." + ] + }, + { + "id": "Js_re.unicode", + "kind": "value", + "name": "unicode", + "signature": "let unicode: t => bool", + "docstrings": [ + "Returns a `bool` indicating whether the unicode flag is set." + ] + }, + { + "id": "Js_re.exec_", + "kind": "value", + "name": "exec_", + "signature": "let exec_: (t, string) => option", + "docstrings": [ + "Executes a search on a given string using the given RegExp object.\n Returns `Some(Js.Re.result)` if a match is found, `None` otherwise.\n\n ```res example\n /* Match \"quick brown\" followed by \"jumps\", ignoring characters in between\n * Remember \"brown\" and \"jumps\"\n * Ignore case\n */\n\n let re = %re(\"/quick\\s(brown).+?(jumps)/ig\")\n let result = Js.Re.exec_(re, \"The Quick Brown Fox Jumps Over The Lazy Dog\")\n ```\n\n See\n [`RegExp.prototype.exec()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec)\n on MDN." + ] + }, + { + "id": "Js_re.test_", + "kind": "value", + "name": "test_", + "signature": "let test_: (t, string) => bool", + "docstrings": [ + "Tests whether the given RegExp object will match a given `string`.\n Returns true if a match is found, false otherwise.\n\n ```res example\n /* A simple implementation of Js.String.startsWith */\n\n let str = \"hello world!\"\n\n let startsWith = (target, substring) =>\n Js.Re.fromString(\"^\" ++ substring)->Js.Re.test_(target)\n\n Js.log(str->startsWith(\"hello\")) /* prints \"true\" */\n ```\n\n See\n [`RegExp.prototype.test()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n on MDN." + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_result.json b/index_data/api/Js_result.json new file mode 100644 index 000000000..60e964237 --- /dev/null +++ b/index_data/api/Js_result.json @@ -0,0 +1,28 @@ +{ + "name": "Js_result", + "docstrings": [], + "items": [ + { + "id": "Js_result.t", + "kind": "type", + "name": "t", + "signature": "type t<'good, 'bad> = Ok('good) | Error('bad)", + "docstrings": [], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Ok", + "docstrings": [], + "signature": "Ok('good)" + }, + { + "constructorName": "Error", + "docstrings": [], + "signature": "Error('bad)" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_set.json b/index_data/api/Js_set.json new file mode 100644 index 000000000..bbf26e0ac --- /dev/null +++ b/index_data/api/Js_set.json @@ -0,0 +1,15 @@ +{ + "name": "Js_set", + "docstrings": [ + "ES6 Set API" + ], + "items": [ + { + "id": "Js_set.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_string.json b/index_data/api/Js_string.json new file mode 100644 index 000000000..92cfba49f --- /dev/null +++ b/index_data/api/Js_string.json @@ -0,0 +1,405 @@ +{ + "name": "Js_string", + "docstrings": [], + "items": [ + { + "id": "Js_string.t", + "kind": "type", + "name": "t", + "signature": "type t = string", + "docstrings": [] + }, + { + "id": "Js_string.make", + "kind": "value", + "name": "make", + "signature": "let make: 'a => t", + "docstrings": [ + "`make(value)` converts the given value to a `string`.\n\n```res example\nJs.String2.make(3.5) == \"3.5\"\nJs.String2.make([1, 2, 3]) == \"1,2,3\"\n```" + ] + }, + { + "id": "Js_string.fromCharCode", + "kind": "value", + "name": "fromCharCode", + "signature": "let fromCharCode: int => t", + "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```res example\nJs.String2.fromCharCode(65) == \"A\"\nJs.String2.fromCharCode(0x3c8) == `ψ`\nJs.String2.fromCharCode(0xd55c) == `한`\nJs.String2.fromCharCode(-64568) == `ψ`\n```" + ] + }, + { + "id": "Js_string.fromCharCodeMany", + "kind": "value", + "name": "fromCharCodeMany", + "signature": "let fromCharCodeMany: array => t", + "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." + ] + }, + { + "id": "Js_string.fromCodePoint", + "kind": "value", + "name": "fromCodePoint", + "signature": "let fromCodePoint: int => t", + "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```res example\nJs.String2.fromCodePoint(65) == \"A\"\nJs.String2.fromCodePoint(0x3c8) == `ψ`\nJs.String2.fromCodePoint(0xd55c) == `한`\nJs.String2.fromCodePoint(0x1f63a) == `😺`\n```" + ] + }, + { + "id": "Js_string.fromCodePointMany", + "kind": "value", + "name": "fromCodePointMany", + "signature": "let fromCodePointMany: array => t", + "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```res example\nJs.String2.fromCodePointMany([0xd55c, 0xae00, 0x1f63a]) == `한글😺`\n```" + ] + }, + { + "id": "Js_string.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "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```res example\nJs.String2.length(\"abcd\") == 4\n```" + ] + }, + { + "id": "Js_string.get", + "kind": "value", + "name": "get", + "signature": "let get: (t, int) => t", + "docstrings": [ + "`get(s, n)` returns as a `string` the character at the given index number. If\n`n` is out of range, this function returns `undefined`, so at some point this\nfunction may be modified to return `option(string)`.\n\n```res example\nJs.String2.get(\"Reason\", 0) == \"R\"\nJs.String2.get(\"Reason\", 4) == \"o\"\nJs.String2.get(`Rẽasöń`, 5) == `ń`\n```" + ] + }, + { + "id": "Js_string.charAt", + "kind": "value", + "name": "charAt", + "signature": "let charAt: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.charCodeAt", + "kind": "value", + "name": "charCodeAt", + "signature": "let charCodeAt: (int, t) => float", + "docstrings": [] + }, + { + "id": "Js_string.codePointAt", + "kind": "value", + "name": "codePointAt", + "signature": "let codePointAt: (int, t) => option", + "docstrings": [] + }, + { + "id": "Js_string.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.concatMany", + "kind": "value", + "name": "concatMany", + "signature": "let concatMany: (array, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.endsWith", + "kind": "value", + "name": "endsWith", + "signature": "let endsWith: (t, t) => bool", + "docstrings": [] + }, + { + "id": "Js_string.endsWithFrom", + "kind": "value", + "name": "endsWithFrom", + "signature": "let endsWithFrom: (t, int, t) => bool", + "docstrings": [] + }, + { + "id": "Js_string.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, t) => bool", + "docstrings": [] + }, + { + "id": "Js_string.includesFrom", + "kind": "value", + "name": "includesFrom", + "signature": "let includesFrom: (t, int, t) => bool", + "docstrings": [] + }, + { + "id": "Js_string.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, t) => int", + "docstrings": [] + }, + { + "id": "Js_string.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, int, t) => int", + "docstrings": [] + }, + { + "id": "Js_string.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, t) => int", + "docstrings": [] + }, + { + "id": "Js_string.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, int, t) => int", + "docstrings": [] + }, + { + "id": "Js_string.localeCompare", + "kind": "value", + "name": "localeCompare", + "signature": "let localeCompare: (t, t) => float", + "docstrings": [] + }, + { + "id": "Js_string.match_", + "kind": "value", + "name": "match_", + "signature": "let match_: (Js_re.t, t) => option>>", + "docstrings": [] + }, + { + "id": "Js_string.normalize", + "kind": "value", + "name": "normalize", + "signature": "let normalize: t => t", + "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." + ] + }, + { + "id": "Js_string.normalizeByForm", + "kind": "value", + "name": "normalizeByForm", + "signature": "let normalizeByForm: (t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.repeat", + "kind": "value", + "name": "repeat", + "signature": "let repeat: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.replace", + "kind": "value", + "name": "replace", + "signature": "let replace: (t, t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.replaceByRe", + "kind": "value", + "name": "replaceByRe", + "signature": "let replaceByRe: (Js_re.t, t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.unsafeReplaceBy0", + "kind": "value", + "name": "unsafeReplaceBy0", + "signature": "let unsafeReplaceBy0: (Js_re.t, (t, int, t) => t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.unsafeReplaceBy1", + "kind": "value", + "name": "unsafeReplaceBy1", + "signature": "let unsafeReplaceBy1: (Js_re.t, (t, t, int, t) => t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.unsafeReplaceBy2", + "kind": "value", + "name": "unsafeReplaceBy2", + "signature": "let unsafeReplaceBy2: (Js_re.t, (t, t, t, int, t) => t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.unsafeReplaceBy3", + "kind": "value", + "name": "unsafeReplaceBy3", + "signature": "let unsafeReplaceBy3: (Js_re.t, (t, t, t, t, int, t) => t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.search", + "kind": "value", + "name": "search", + "signature": "let search: (Js_re.t, t) => int", + "docstrings": [] + }, + { + "id": "Js_string.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~from: int, ~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "signature": "let sliceToEnd: (~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.split", + "kind": "value", + "name": "split", + "signature": "let split: (t, t) => array", + "docstrings": [] + }, + { + "id": "Js_string.splitAtMost", + "kind": "value", + "name": "splitAtMost", + "signature": "let splitAtMost: (t, ~limit: int, t) => array", + "docstrings": [] + }, + { + "id": "Js_string.splitByRe", + "kind": "value", + "name": "splitByRe", + "signature": "let splitByRe: (Js_re.t, t) => array>", + "docstrings": [] + }, + { + "id": "Js_string.splitByReAtMost", + "kind": "value", + "name": "splitByReAtMost", + "signature": "let splitByReAtMost: (Js_re.t, ~limit: int, t) => array>", + "docstrings": [] + }, + { + "id": "Js_string.startsWith", + "kind": "value", + "name": "startsWith", + "signature": "let startsWith: (t, t) => bool", + "docstrings": [] + }, + { + "id": "Js_string.startsWithFrom", + "kind": "value", + "name": "startsWithFrom", + "signature": "let startsWithFrom: (t, int, t) => bool", + "docstrings": [] + }, + { + "id": "Js_string.substr", + "kind": "value", + "name": "substr", + "signature": "let substr: (~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.substrAtMost", + "kind": "value", + "name": "substrAtMost", + "signature": "let substrAtMost: (~from: int, ~length: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.substring", + "kind": "value", + "name": "substring", + "signature": "let substring: (~from: int, ~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.substringToEnd", + "kind": "value", + "name": "substringToEnd", + "signature": "let substringToEnd: (~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.toLowerCase", + "kind": "value", + "name": "toLowerCase", + "signature": "let toLowerCase: t => t", + "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```res example\nJs.String.toLowerCase(\"ABC\") == \"abc\"\nJs.String.toLowerCase(`ΣΠ`) == `σπ`\nJs.String.toLowerCase(`ΠΣ`) == `πς`\n```" + ] + }, + { + "id": "Js_string.toLocaleLowerCase", + "kind": "value", + "name": "toLocaleLowerCase", + "signature": "let toLocaleLowerCase: t => t", + "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." + ] + }, + { + "id": "Js_string.toUpperCase", + "kind": "value", + "name": "toUpperCase", + "signature": "let toUpperCase: t => t", + "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```res example\nJs.String.toUpperCase(\"abc\") == \"ABC\"\nJs.String.toUpperCase(`Straße`) == `STRASSE`\nJs.String.toUpperCase(`πς`) == `ΠΣ`\n```" + ] + }, + { + "id": "Js_string.toLocaleUpperCase", + "kind": "value", + "name": "toLocaleUpperCase", + "signature": "let toLocaleUpperCase: t => t", + "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." + ] + }, + { + "id": "Js_string.trim", + "kind": "value", + "name": "trim", + "signature": "let trim: t => t", + "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```res example\nJs.String.trim(\" abc def \") == \"abc def\"\nJs.String.trim(\"\\n\\r\\t abc def \\n\\n\\t\\r \") == \"abc def\"\n```" + ] + }, + { + "id": "Js_string.anchor", + "kind": "value", + "name": "anchor", + "signature": "let anchor: (t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.link", + "kind": "value", + "name": "link", + "signature": "let link: (t, t) => t", + "docstrings": [] + }, + { + "id": "Js_string.castToArrayLike", + "kind": "value", + "name": "castToArrayLike", + "signature": "let castToArrayLike: t => Js_array2.array_like", + "docstrings": [ + "Casts its argument to an `array_like` entity that can be processed by functions\nsuch as `Js.Array2.fromMap()`\n\n```res example\nlet s = \"abcde\"\nlet arr = Js.Array2.fromMap(Js.String.castToArrayLike(s), x => x)\narr == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_string2.json b/index_data/api/Js_string2.json new file mode 100644 index 000000000..0921f0e3c --- /dev/null +++ b/index_data/api/Js_string2.json @@ -0,0 +1,483 @@ +{ + "name": "Js_string2", + "docstrings": [ + "Provide bindings to JS string. Optimized for pipe-first." + ], + "items": [ + { + "id": "Js_string2.t", + "kind": "type", + "name": "t", + "signature": "type t = string", + "docstrings": [] + }, + { + "id": "Js_string2.make", + "kind": "value", + "name": "make", + "signature": "let make: 'a => t", + "docstrings": [ + "`make(value)` converts the given value to a `string`.\n\n```res example\nJs.String2.make(3.5) == \"3.5\"\nJs.String2.make([1, 2, 3]) == \"1,2,3\"\n```" + ] + }, + { + "id": "Js_string2.fromCharCode", + "kind": "value", + "name": "fromCharCode", + "signature": "let fromCharCode: int => t", + "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```res example\nJs.String2.fromCharCode(65) == \"A\"\nJs.String2.fromCharCode(0x3c8) == `ψ`\nJs.String2.fromCharCode(0xd55c) == `한`\nJs.String2.fromCharCode(-64568) == `ψ`\n```" + ] + }, + { + "id": "Js_string2.fromCharCodeMany", + "kind": "value", + "name": "fromCharCodeMany", + "signature": "let fromCharCodeMany: array => t", + "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." + ] + }, + { + "id": "Js_string2.fromCodePoint", + "kind": "value", + "name": "fromCodePoint", + "signature": "let fromCodePoint: int => t", + "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```res example\nJs.String2.fromCodePoint(65) == \"A\"\nJs.String2.fromCodePoint(0x3c8) == `ψ`\nJs.String2.fromCodePoint(0xd55c) == `한`\nJs.String2.fromCodePoint(0x1f63a) == `😺`\n```" + ] + }, + { + "id": "Js_string2.fromCodePointMany", + "kind": "value", + "name": "fromCodePointMany", + "signature": "let fromCodePointMany: array => t", + "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```res example\nJs.String2.fromCodePointMany([0xd55c, 0xae00, 0x1f63a]) == `한글😺`\n```" + ] + }, + { + "id": "Js_string2.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "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```res example\nJs.String2.length(\"abcd\") == 4\n```" + ] + }, + { + "id": "Js_string2.get", + "kind": "value", + "name": "get", + "signature": "let get: (t, int) => t", + "docstrings": [ + "`get(s, n)` returns as a `string` the character at the given index number. If\n`n` is out of range, this function returns `undefined`,so at some point this\nfunction may be modified to return `option(string)`.\n\n```res example\nJs.String2.get(\"Reason\", 0) == \"R\"\nJs.String2.get(\"Reason\", 4) == \"o\"\nJs.String2.get(`Rẽasöń`, 5) == `ń`\n```" + ] + }, + { + "id": "Js_string2.charAt", + "kind": "value", + "name": "charAt", + "signature": "let charAt: (t, int) => t", + "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```res example\nJs.String2.charAt(\"Reason\", 0) == \"R\"\nJs.String2.charAt(\"Reason\", 12) == \"\"\nJs.String2.charAt(`Rẽasöń`, 5) == `ń`\n```" + ] + }, + { + "id": "Js_string2.charCodeAt", + "kind": "value", + "name": "charCodeAt", + "signature": "let charCodeAt: (t, int) => float", + "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```res example\nJs.String2.charCodeAt(`😺`, 0) == 0xd83d->Belt.Int.toFloat\nJs.String2.codePointAt(`😺`, 0) == Some(0x1f63a)\n```" + ] + }, + { + "id": "Js_string2.codePointAt", + "kind": "value", + "name": "codePointAt", + "signature": "let codePointAt: (t, int) => option", + "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```res example\nJs.String2.codePointAt(`¿😺?`, 1) == Some(0x1f63a)\nJs.String2.codePointAt(\"abc\", 5) == None\n```" + ] + }, + { + "id": "Js_string2.concat", + "kind": "value", + "name": "concat", + "signature": "let concat: (t, t) => t", + "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```res example\nJs.String2.concat(\"cow\", \"bell\") == \"cowbell\"\n```" + ] + }, + { + "id": "Js_string2.concatMany", + "kind": "value", + "name": "concatMany", + "signature": "let concatMany: (t, array) => t", + "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```res example\nJs.String2.concatMany(\"1st\", [\"2nd\", \"3rd\", \"4th\"]) == \"1st2nd3rd4th\"\n```" + ] + }, + { + "id": "Js_string2.endsWith", + "kind": "value", + "name": "endsWith", + "signature": "let endsWith: (t, t) => bool", + "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```res example\nJs.String2.endsWith(\"BuckleScript\", \"Script\") == true\nJs.String2.endsWith(\"BuckleShoes\", \"Script\") == false\n```" + ] + }, + { + "id": "Js_string2.endsWithFrom", + "kind": "value", + "name": "endsWithFrom", + "signature": "let endsWithFrom: (t, t, int) => bool", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, t) => bool", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.includesFrom", + "kind": "value", + "name": "includesFrom", + "signature": "let includesFrom: (t, t, int) => bool", + "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```res example\nJs.String2.includesFrom(\"programmer\", \"gram\", 1) == true\nJs.String2.includesFrom(\"programmer\", \"gram\", 4) == false\nJs.String2.includesFrom(`대한민국`, `한`, 1) == true\n```" + ] + }, + { + "id": "Js_string2.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, t) => int", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, t, int) => int", + "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```res example\nJs.String2.indexOfFrom(\"bookseller\", \"ok\", 1) == 2\nJs.String2.indexOfFrom(\"bookseller\", \"sell\", 2) == 4\nJs.String2.indexOfFrom(\"bookseller\", \"sell\", 5) == -1\n```" + ] + }, + { + "id": "Js_string2.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, t) => int", + "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```res example\nJs.String2.lastIndexOf(\"bookseller\", \"ok\") == 2\nJs.String2.lastIndexOf(\"beekeeper\", \"ee\") == 4\nJs.String2.lastIndexOf(\"abcdefg\", \"xyz\") == -1\n```" + ] + }, + { + "id": "Js_string2.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, t, int) => int", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.localeCompare", + "kind": "value", + "name": "localeCompare", + "signature": "let localeCompare: (t, t) => float", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.match_", + "kind": "value", + "name": "match_", + "signature": "let match_: (t, Js_re.t) => option>>", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.normalize", + "kind": "value", + "name": "normalize", + "signature": "let normalize: t => t", + "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." + ] + }, + { + "id": "Js_string2.normalizeByForm", + "kind": "value", + "name": "normalizeByForm", + "signature": "let normalizeByForm: (t, t) => t", + "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." + ] + }, + { + "id": "Js_string2.repeat", + "kind": "value", + "name": "repeat", + "signature": "let repeat: (t, int) => t", + "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```res example\nJs.String2.repeat(\"ha\", 3) == \"hahaha\"\nJs.String2.repeat(\"empty\", 0) == \"\"\n```" + ] + }, + { + "id": "Js_string2.replace", + "kind": "value", + "name": "replace", + "signature": "let replace: (t, t, t) => t", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.replaceByRe", + "kind": "value", + "name": "replaceByRe", + "signature": "let replaceByRe: (t, Js_re.t, t) => t", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.unsafeReplaceBy0", + "kind": "value", + "name": "unsafeReplaceBy0", + "signature": "let unsafeReplaceBy0: (t, Js_re.t, (t, int, t) => t) => t", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.unsafeReplaceBy1", + "kind": "value", + "name": "unsafeReplaceBy1", + "signature": "let unsafeReplaceBy1: (t, Js_re.t, (t, t, int, t) => t) => t", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.unsafeReplaceBy2", + "kind": "value", + "name": "unsafeReplaceBy2", + "signature": "let unsafeReplaceBy2: (t, Js_re.t, (t, t, t, int, t) => t) => t", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.unsafeReplaceBy3", + "kind": "value", + "name": "unsafeReplaceBy3", + "signature": "let unsafeReplaceBy3: (t, Js_re.t, (t, t, t, t, int, t) => t) => t", + "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." + ] + }, + { + "id": "Js_string2.search", + "kind": "value", + "name": "search", + "signature": "let search: (t, Js_re.t) => int", + "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```res example\nJs.String2.search(\"testing 1 2 3\", %re(\"/\\d+/\")) == 8\nJs.String2.search(\"no numbers\", %re(\"/\\d+/\")) == -1\n```" + ] + }, + { + "id": "Js_string2.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~from: int, ~to_: int) => t", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.sliceToEnd", + "kind": "value", + "name": "sliceToEnd", + "signature": "let sliceToEnd: (t, ~from: int) => t", + "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```res example\nJs.String2.sliceToEnd(\"abcdefg\", ~from=4) == \"efg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=-2) == \"fg\"\nJs.String2.sliceToEnd(\"abcdefg\", ~from=7) == \"\"\n```" + ] + }, + { + "id": "Js_string2.split", + "kind": "value", + "name": "split", + "signature": "let split: (t, t) => array", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.splitAtMost", + "kind": "value", + "name": "splitAtMost", + "signature": "let splitAtMost: (t, t, ~limit: int) => array", + "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```" + ] + }, + { + "id": "Js_string2.splitByRe", + "kind": "value", + "name": "splitByRe", + "signature": "let splitByRe: (t, Js_re.t) => array>", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.splitByReAtMost", + "kind": "value", + "name": "splitByReAtMost", + "signature": "let splitByReAtMost: (t, Js_re.t, ~limit: int) => array>", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.startsWith", + "kind": "value", + "name": "startsWith", + "signature": "let startsWith: (t, t) => bool", + "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```res example\nJs.String2.startsWith(\"BuckleScript\", \"Buckle\") == true\nJs.String2.startsWith(\"BuckleScript\", \"\") == true\nJs.String2.startsWith(\"JavaScript\", \"Buckle\") == false\n```" + ] + }, + { + "id": "Js_string2.startsWithFrom", + "kind": "value", + "name": "startsWithFrom", + "signature": "let startsWithFrom: (t, t, int) => bool", + "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```res example\nJs.String2.startsWithFrom(\"BuckleScript\", \"kle\", 3) == true\nJs.String2.startsWithFrom(\"BuckleScript\", \"\", 3) == true\nJs.String2.startsWithFrom(\"JavaScript\", \"Buckle\", 2) == false\n```" + ] + }, + { + "id": "Js_string2.substr", + "kind": "value", + "name": "substr", + "signature": "let substr: (t, ~from: int) => t", + "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```res example\nJs.String2.substr(\"abcdefghij\", ~from=3) == \"defghij\"\nJs.String2.substr(\"abcdefghij\", ~from=-3) == \"hij\"\nJs.String2.substr(\"abcdefghij\", ~from=12) == \"\"\n```" + ] + }, + { + "id": "Js_string2.substrAtMost", + "kind": "value", + "name": "substrAtMost", + "signature": "let substrAtMost: (t, ~from: int, ~length: int) => t", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.substring", + "kind": "value", + "name": "substring", + "signature": "let substring: (t, ~from: int, ~to_: int) => t", + "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```res example\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```" + ] + }, + { + "id": "Js_string2.substringToEnd", + "kind": "value", + "name": "substringToEnd", + "signature": "let substringToEnd: (t, ~from: int) => t", + "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```res example\nJs.String2.substringToEnd(\"playground\", ~from=4) == \"ground\"\nJs.String2.substringToEnd(\"playground\", ~from=-3) == \"playground\"\nJs.String2.substringToEnd(\"playground\", ~from=12) == \"\"\n```" + ] + }, + { + "id": "Js_string2.toLowerCase", + "kind": "value", + "name": "toLowerCase", + "signature": "let toLowerCase: t => t", + "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```res example\nJs.String2.toLowerCase(\"ABC\") == \"abc\"\nJs.String2.toLowerCase(`ΣΠ`) == `σπ`\nJs.String2.toLowerCase(`ΠΣ`) == `πς`\n```" + ] + }, + { + "id": "Js_string2.toLocaleLowerCase", + "kind": "value", + "name": "toLocaleLowerCase", + "signature": "let toLocaleLowerCase: t => t", + "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." + ] + }, + { + "id": "Js_string2.toUpperCase", + "kind": "value", + "name": "toUpperCase", + "signature": "let toUpperCase: t => t", + "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```res example\nJs.String2.toUpperCase(\"abc\") == \"ABC\"\nJs.String2.toUpperCase(`Straße`) == `STRASSE`\nJs.String2.toUpperCase(`πς`) == `ΠΣ`\n```" + ] + }, + { + "id": "Js_string2.toLocaleUpperCase", + "kind": "value", + "name": "toLocaleUpperCase", + "signature": "let toLocaleUpperCase: t => t", + "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." + ] + }, + { + "id": "Js_string2.trim", + "kind": "value", + "name": "trim", + "signature": "let trim: t => t", + "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```res example\nJs.String2.trim(\" abc def \") == \"abc def\"\nJs.String2.trim(\"\\n\\r\\t abc def \\n\\n\\t\\r \") == \"abc def\"\n```" + ] + }, + { + "id": "Js_string2.anchor", + "kind": "value", + "name": "anchor", + "signature": "let anchor: (t, t) => t", + "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```res example\nJs.String2.anchor(\"Page One\", \"page1\") == \"Page One\"\n```" + ] + }, + { + "id": "Js_string2.link", + "kind": "value", + "name": "link", + "signature": "let link: (t, t) => t", + "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```res example\nJs.String2.link(\"Go to page two\", \"page2.html\") == \"Go to page two\"\n```" + ] + }, + { + "id": "Js_string2.castToArrayLike", + "kind": "value", + "name": "castToArrayLike", + "signature": "let castToArrayLike: t => Js_array2.array_like", + "docstrings": [ + "Casts its argument to an `array_like` entity that can be processed by functions\nsuch as `Js.Array2.fromMap()`\n\n```res example\nlet s = \"abcde\"\nlet arr = Js.Array2.fromMap(Js.String2.castToArrayLike(s), x => x)\narr == [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```" + ] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_typed_array.json b/index_data/api/Js_typed_array.json new file mode 100644 index 000000000..57413f733 --- /dev/null +++ b/index_data/api/Js_typed_array.json @@ -0,0 +1,4663 @@ +{ + "name": "Js_typed_array", + "docstrings": [ + "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", + "signature": "type array_buffer = Js_typed_array2.array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.array_like", + "kind": "type", + "name": "array_like", + "signature": "type array_like<'a> = Js_typed_array2.array_like<'a>", + "docstrings": [] + }, + { + "id": "Type.Js_typed_array", + "kind": "module", + "item": { + "name": "Type", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Type.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [] + } + ] + } + }, + { + "id": "ArrayBuffer.Js_typed_array", + "kind": "module", + "item": { + "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", + "signature": "type t = array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.ArrayBuffer.make", + "kind": "value", + "name": "make", + "signature": "let make: int => t", + "docstrings": [ + "takes length. initializes elements to 0" + ] + }, + { + "id": "Js_typed_array.ArrayBuffer.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.ArrayBuffer.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.ArrayBuffer.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => array_buffer", + "docstrings": [] + } + ] + } + }, + { + "id": "S.Js_typed_array", + "kind": "module", + "item": { + "name": "S", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.S.elt", + "kind": "type", + "name": "elt", + "signature": "type elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'b, t) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'b, t) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'b, elt) => 'b, 'b, t) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'b, elt, int) => 'b, 'b, t) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'b, elt) => 'b, 'b, t) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'b, elt, int) => 'b, 'b, t) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.S.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + } + ] + } + }, + { + "id": "Int8Array.Js_typed_array", + "kind": "module", + "item": { + "name": "Int8Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Int8Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array.Int8Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a> = Js_typed_array2.Int8Array.typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array.Int8Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array.Int8Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array.Int8Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int8Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Uint8Array.Js_typed_array", + "kind": "module", + "item": { + "name": "Uint8Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Uint8Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array.Uint8Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a> = Js_typed_array2.Uint8Array.typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array.Uint8Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array.Uint8Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array.Uint8Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Uint8ClampedArray.Js_typed_array", + "kind": "module", + "item": { + "name": "Uint8ClampedArray", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Uint8ClampedArray.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a> = Js_typed_array2.Uint8ClampedArray.typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint8ClampedArray.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Int16Array.Js_typed_array", + "kind": "module", + "item": { + "name": "Int16Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Int16Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array.Int16Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a> = Js_typed_array2.Int16Array.typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array.Int16Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array.Int16Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array.Int16Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int16Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Uint16Array.Js_typed_array", + "kind": "module", + "item": { + "name": "Uint16Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Uint16Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array.Uint16Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a> = Js_typed_array2.Uint16Array.typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array.Uint16Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array.Uint16Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array.Uint16Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint16Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Int32Array.Js_typed_array", + "kind": "module", + "item": { + "name": "Int32Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Int32Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array.Int32Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a> = Js_typed_array2.Int32Array.typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array.Int32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array.Int32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array.Int32Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.create", + "kind": "value", + "name": "create", + "signature": "let create: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Int32Array.of_buffer", + "kind": "value", + "name": "of_buffer", + "signature": "let of_buffer: array_buffer => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Js_typed_array.Int32Array", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module Int32_array = Int32Array" + }, + { + "id": "Uint32Array.Js_typed_array", + "kind": "module", + "item": { + "name": "Uint32Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Uint32Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array.Uint32Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a> = Js_typed_array2.Uint32Array.typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array.Uint32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array.Uint32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array.Uint32Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Uint32Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Float32Array.Js_typed_array", + "kind": "module", + "item": { + "name": "Float32Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Float32Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = float", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array.Float32Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a> = Js_typed_array2.Float32Array.typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array.Float32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array.Float32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array.Float32Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.create", + "kind": "value", + "name": "create", + "signature": "let create: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float32Array.of_buffer", + "kind": "value", + "name": "of_buffer", + "signature": "let of_buffer: array_buffer => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Js_typed_array.Float32Array", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module Float32_array = Float32Array" + }, + { + "id": "Float64Array.Js_typed_array", + "kind": "module", + "item": { + "name": "Float64Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.Float64Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = float", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array.Float64Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a> = Js_typed_array2.Float64Array.typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (array, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (array, int, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (~to_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (~to_: int, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (elt, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (elt, ~from: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: ((. elt, elt) => int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (elt, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (string, t) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (elt, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (elt, ~from: int, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (~start: int, ~end_: int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (int, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.every", + "kind": "value", + "name": "every", + "signature": "let every: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: ((. elt) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: ((. elt, int) => bool, t) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.find", + "kind": "value", + "name": "find", + "signature": "let find: ((. elt) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: ((. elt, int) => bool, t) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: ((. elt) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: ((. elt, int) => bool, t) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: ((. elt) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: ((. elt, int) => unit, t) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. elt) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. elt, int) => 'a, t) => typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: ((. 'a, elt) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: ((. 'a, elt, int) => 'a, 'a, t) => 'a", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.some", + "kind": "value", + "name": "some", + "signature": "let some: ((. elt) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: ((. elt, int) => bool, t) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array.Float64Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array.Float64Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array.Float64Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.create", + "kind": "value", + "name": "create", + "signature": "let create: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.Float64Array.of_buffer", + "kind": "value", + "name": "of_buffer", + "signature": "let of_buffer: array_buffer => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Js_typed_array.Float64Array", + "kind": "moduleAlias", + "docstrings": [], + "signature": "module Float64_array = Float64Array" + }, + { + "id": "DataView.Js_typed_array", + "kind": "module", + "item": { + "name": "DataView", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array.DataView.t", + "kind": "type", + "name": "t", + "signature": "type t = Js_typed_array2.DataView.t", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.make", + "kind": "value", + "name": "make", + "signature": "let make: array_buffer => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getInt8", + "kind": "value", + "name": "getInt8", + "signature": "let getInt8: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getUint8", + "kind": "value", + "name": "getUint8", + "signature": "let getUint8: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getInt16", + "kind": "value", + "name": "getInt16", + "signature": "let getInt16: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getInt16LittleEndian", + "kind": "value", + "name": "getInt16LittleEndian", + "signature": "let getInt16LittleEndian: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getUint16", + "kind": "value", + "name": "getUint16", + "signature": "let getUint16: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getUint16LittleEndian", + "kind": "value", + "name": "getUint16LittleEndian", + "signature": "let getUint16LittleEndian: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getInt32", + "kind": "value", + "name": "getInt32", + "signature": "let getInt32: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getInt32LittleEndian", + "kind": "value", + "name": "getInt32LittleEndian", + "signature": "let getInt32LittleEndian: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getUint32", + "kind": "value", + "name": "getUint32", + "signature": "let getUint32: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getUint32LittleEndian", + "kind": "value", + "name": "getUint32LittleEndian", + "signature": "let getUint32LittleEndian: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getFloat32", + "kind": "value", + "name": "getFloat32", + "signature": "let getFloat32: (t, int) => float", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getFloat32LittleEndian", + "kind": "value", + "name": "getFloat32LittleEndian", + "signature": "let getFloat32LittleEndian: (t, int) => float", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getFloat64", + "kind": "value", + "name": "getFloat64", + "signature": "let getFloat64: (t, int) => float", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.getFloat64LittleEndian", + "kind": "value", + "name": "getFloat64LittleEndian", + "signature": "let getFloat64LittleEndian: (t, int) => float", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setInt8", + "kind": "value", + "name": "setInt8", + "signature": "let setInt8: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setUint8", + "kind": "value", + "name": "setUint8", + "signature": "let setUint8: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setInt16", + "kind": "value", + "name": "setInt16", + "signature": "let setInt16: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setInt16LittleEndian", + "kind": "value", + "name": "setInt16LittleEndian", + "signature": "let setInt16LittleEndian: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setUint16", + "kind": "value", + "name": "setUint16", + "signature": "let setUint16: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setUint16LittleEndian", + "kind": "value", + "name": "setUint16LittleEndian", + "signature": "let setUint16LittleEndian: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setInt32", + "kind": "value", + "name": "setInt32", + "signature": "let setInt32: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setInt32LittleEndian", + "kind": "value", + "name": "setInt32LittleEndian", + "signature": "let setInt32LittleEndian: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setUint32", + "kind": "value", + "name": "setUint32", + "signature": "let setUint32: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setUint32LittleEndian", + "kind": "value", + "name": "setUint32LittleEndian", + "signature": "let setUint32LittleEndian: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setFloat32", + "kind": "value", + "name": "setFloat32", + "signature": "let setFloat32: (t, int, float) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setFloat32LittleEndian", + "kind": "value", + "name": "setFloat32LittleEndian", + "signature": "let setFloat32LittleEndian: (t, int, float) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setFloat64", + "kind": "value", + "name": "setFloat64", + "signature": "let setFloat64: (t, int, float) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array.DataView.setFloat64LittleEndian", + "kind": "value", + "name": "setFloat64LittleEndian", + "signature": "let setFloat64LittleEndian: (t, int, float) => unit", + "docstrings": [] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_typed_array2.json b/index_data/api/Js_typed_array2.json new file mode 100644 index 000000000..a9746f51d --- /dev/null +++ b/index_data/api/Js_typed_array2.json @@ -0,0 +1,4248 @@ +{ + "name": "Js_typed_array2", + "docstrings": [ + "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_array2.array_buffer", + "kind": "type", + "name": "array_buffer", + "signature": "type array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.array_like", + "kind": "type", + "name": "array_like", + "signature": "type array_like<'a>", + "docstrings": [] + }, + { + "id": "ArrayBuffer.Js_typed_array2", + "kind": "module", + "item": { + "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_array2.ArrayBuffer.t", + "kind": "type", + "name": "t", + "signature": "type t = array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.ArrayBuffer.make", + "kind": "value", + "name": "make", + "signature": "let make: int => t", + "docstrings": [ + "takes length. initializes elements to 0" + ] + }, + { + "id": "Js_typed_array2.ArrayBuffer.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.ArrayBuffer.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.ArrayBuffer.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => array_buffer", + "docstrings": [] + } + ] + } + }, + { + "id": "Int8Array.Js_typed_array2", + "kind": "module", + "item": { + "name": "Int8Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.Int8Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array2.Int8Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (t, array, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t, ~to_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t, elt) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, elt) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t, string) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Int8Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Int8Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t, (. elt) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t, (. elt, int) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.find", + "kind": "value", + "name": "find", + "signature": "let find: (t, (. elt) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t, (. elt) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t, (. elt, int) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, (. elt) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t, (. elt, int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.map", + "kind": "value", + "name": "map", + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array2.Int8Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array2.Int8Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array2.Int8Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int8Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Uint8Array.Js_typed_array2", + "kind": "module", + "item": { + "name": "Uint8Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.Uint8Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array2.Uint8Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (t, array, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t, ~to_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t, elt) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, elt) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t, string) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Uint8Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Uint8Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t, (. elt) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t, (. elt, int) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.find", + "kind": "value", + "name": "find", + "signature": "let find: (t, (. elt) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t, (. elt) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t, (. elt, int) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, (. elt) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t, (. elt, int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.map", + "kind": "value", + "name": "map", + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array2.Uint8Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array2.Uint8Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array2.Uint8Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Uint8ClampedArray.Js_typed_array2", + "kind": "module", + "item": { + "name": "Uint8ClampedArray", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.Uint8ClampedArray.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (t, array, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t, ~to_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t, elt) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, elt) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t, string) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t, (. elt) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t, (. elt, int) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.find", + "kind": "value", + "name": "find", + "signature": "let find: (t, (. elt) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t, (. elt) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t, (. elt, int) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, (. elt) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t, (. elt, int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.map", + "kind": "value", + "name": "map", + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint8ClampedArray.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Int16Array.Js_typed_array2", + "kind": "module", + "item": { + "name": "Int16Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.Int16Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array2.Int16Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (t, array, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t, ~to_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t, elt) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, elt) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t, string) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Int16Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Int16Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t, (. elt) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t, (. elt, int) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.find", + "kind": "value", + "name": "find", + "signature": "let find: (t, (. elt) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t, (. elt) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t, (. elt, int) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, (. elt) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t, (. elt, int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.map", + "kind": "value", + "name": "map", + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array2.Int16Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array2.Int16Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array2.Int16Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int16Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Uint16Array.Js_typed_array2", + "kind": "module", + "item": { + "name": "Uint16Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.Uint16Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array2.Uint16Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (t, array, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t, ~to_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t, elt) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, elt) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t, string) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Uint16Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Uint16Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t, (. elt) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t, (. elt, int) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.find", + "kind": "value", + "name": "find", + "signature": "let find: (t, (. elt) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t, (. elt) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t, (. elt, int) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, (. elt) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t, (. elt, int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.map", + "kind": "value", + "name": "map", + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array2.Uint16Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array2.Uint16Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array2.Uint16Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint16Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Int32Array.Js_typed_array2", + "kind": "module", + "item": { + "name": "Int32Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.Int32Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array2.Int32Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (t, array, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t, ~to_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t, elt) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, elt) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t, string) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Int32Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Int32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t, (. elt) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t, (. elt, int) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.find", + "kind": "value", + "name": "find", + "signature": "let find: (t, (. elt) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t, (. elt) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t, (. elt, int) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, (. elt) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t, (. elt, int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.map", + "kind": "value", + "name": "map", + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array2.Int32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array2.Int32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array2.Int32Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Int32Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Uint32Array.Js_typed_array2", + "kind": "module", + "item": { + "name": "Uint32Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.Uint32Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = int", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array2.Uint32Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (t, array, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t, ~to_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t, elt) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, elt) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t, string) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Uint32Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Uint32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t, (. elt) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t, (. elt, int) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.find", + "kind": "value", + "name": "find", + "signature": "let find: (t, (. elt) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t, (. elt) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t, (. elt, int) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, (. elt) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t, (. elt, int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.map", + "kind": "value", + "name": "map", + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array2.Uint32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array2.Uint32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array2.Uint32Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Uint32Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Float32Array.Js_typed_array2", + "kind": "module", + "item": { + "name": "Float32Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.Float32Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = float", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array2.Float32Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (t, array, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t, ~to_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t, elt) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, elt) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t, string) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Float32Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Float32Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t, (. elt) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t, (. elt, int) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.find", + "kind": "value", + "name": "find", + "signature": "let find: (t, (. elt) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t, (. elt) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t, (. elt, int) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, (. elt) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t, (. elt, int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.map", + "kind": "value", + "name": "map", + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array2.Float32Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array2.Float32Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array2.Float32Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float32Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "Float64Array.Js_typed_array2", + "kind": "module", + "item": { + "name": "Float64Array", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.Float64Array.elt", + "kind": "type", + "name": "elt", + "signature": "type elt = float", + "docstrings": [ + "" + ] + }, + { + "id": "Js_typed_array2.Float64Array.typed_array", + "kind": "type", + "name": "typed_array", + "signature": "type typed_array<'a>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.t", + "kind": "type", + "name": "t", + "signature": "type t = typed_array", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t, int) => elt", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t, int, elt) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.setArray", + "kind": "value", + "name": "setArray", + "signature": "let setArray: (t, array) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.setArrayOffset", + "kind": "value", + "name": "setArrayOffset", + "signature": "let setArrayOffset: (t, array, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.length", + "kind": "value", + "name": "length", + "signature": "let length: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.copyWithin", + "kind": "value", + "name": "copyWithin", + "signature": "let copyWithin: (t, ~to_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.copyWithinFrom", + "kind": "value", + "name": "copyWithinFrom", + "signature": "let copyWithinFrom: (t, ~to_: int, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.copyWithinFromRange", + "kind": "value", + "name": "copyWithinFromRange", + "signature": "let copyWithinFromRange: (t, ~to_: int, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.fillInPlace", + "kind": "value", + "name": "fillInPlace", + "signature": "let fillInPlace: (t, elt) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.fillFromInPlace", + "kind": "value", + "name": "fillFromInPlace", + "signature": "let fillFromInPlace: (t, elt, ~from: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.fillRangeInPlace", + "kind": "value", + "name": "fillRangeInPlace", + "signature": "let fillRangeInPlace: (t, elt, ~start: int, ~end_: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.reverseInPlace", + "kind": "value", + "name": "reverseInPlace", + "signature": "let reverseInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.sortInPlace", + "kind": "value", + "name": "sortInPlace", + "signature": "let sortInPlace: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.sortInPlaceWith", + "kind": "value", + "name": "sortInPlaceWith", + "signature": "let sortInPlaceWith: (t, (. elt, elt) => int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.includes", + "kind": "value", + "name": "includes", + "signature": "let includes: (t, elt) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.indexOf", + "kind": "value", + "name": "indexOf", + "signature": "let indexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.indexOfFrom", + "kind": "value", + "name": "indexOfFrom", + "signature": "let indexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.join", + "kind": "value", + "name": "join", + "signature": "let join: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.joinWith", + "kind": "value", + "name": "joinWith", + "signature": "let joinWith: (t, string) => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.lastIndexOf", + "kind": "value", + "name": "lastIndexOf", + "signature": "let lastIndexOf: (t, elt) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.lastIndexOfFrom", + "kind": "value", + "name": "lastIndexOfFrom", + "signature": "let lastIndexOfFrom: (t, elt, ~from: int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.slice", + "kind": "value", + "name": "slice", + "signature": "let slice: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Float64Array.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.sliceFrom", + "kind": "value", + "name": "sliceFrom", + "signature": "let sliceFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.subarray", + "kind": "value", + "name": "subarray", + "signature": "let subarray: (t, ~start: int, ~end_: int) => t", + "docstrings": [ + "`start` is inclusive, `end_` exclusive" + ] + }, + { + "id": "Js_typed_array2.Float64Array.subarrayFrom", + "kind": "value", + "name": "subarrayFrom", + "signature": "let subarrayFrom: (t, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.toString", + "kind": "value", + "name": "toString", + "signature": "let toString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.toLocaleString", + "kind": "value", + "name": "toLocaleString", + "signature": "let toLocaleString: t => string", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.every", + "kind": "value", + "name": "every", + "signature": "let every: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.everyi", + "kind": "value", + "name": "everyi", + "signature": "let everyi: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.filter", + "kind": "value", + "name": "filter", + "signature": "let filter: (t, (. elt) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.filteri", + "kind": "value", + "name": "filteri", + "signature": "let filteri: (t, (. elt, int) => bool) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.find", + "kind": "value", + "name": "find", + "signature": "let find: (t, (. elt) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.findi", + "kind": "value", + "name": "findi", + "signature": "let findi: (t, (. elt, int) => bool) => Js.undefined", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.findIndex", + "kind": "value", + "name": "findIndex", + "signature": "let findIndex: (t, (. elt) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.findIndexi", + "kind": "value", + "name": "findIndexi", + "signature": "let findIndexi: (t, (. elt, int) => bool) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.forEach", + "kind": "value", + "name": "forEach", + "signature": "let forEach: (t, (. elt) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.forEachi", + "kind": "value", + "name": "forEachi", + "signature": "let forEachi: (t, (. elt, int) => unit) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.map", + "kind": "value", + "name": "map", + "signature": "let map: (t, (. elt) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: (t, (. elt, int) => 'b) => typed_array<'b>", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.reduce", + "kind": "value", + "name": "reduce", + "signature": "let reduce: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.reducei", + "kind": "value", + "name": "reducei", + "signature": "let reducei: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.reduceRight", + "kind": "value", + "name": "reduceRight", + "signature": "let reduceRight: (t, (. 'b, elt) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.reduceRighti", + "kind": "value", + "name": "reduceRighti", + "signature": "let reduceRighti: (t, (. 'b, elt, int) => 'b, 'b) => 'b", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.some", + "kind": "value", + "name": "some", + "signature": "let some: (t, (. elt) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.somei", + "kind": "value", + "name": "somei", + "signature": "let somei: (t, (. elt, int) => bool) => bool", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array._BYTES_PER_ELEMENT", + "kind": "value", + "name": "_BYTES_PER_ELEMENT", + "signature": "let _BYTES_PER_ELEMENT: int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.make", + "kind": "value", + "name": "make", + "signature": "let make: array => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [ + "can throw" + ] + }, + { + "id": "Js_typed_array2.Float64Array.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raise Js exception\n\n **param** offset is in bytes" + ] + }, + { + "id": "Js_typed_array2.Float64Array.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [ + "**raise** Js.Exn.Error raises Js exception\n\n **param** offset is in bytes, length in elements" + ] + }, + { + "id": "Js_typed_array2.Float64Array.fromLength", + "kind": "value", + "name": "fromLength", + "signature": "let fromLength: int => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.Float64Array.from", + "kind": "value", + "name": "from", + "signature": "let from: array_like => t", + "docstrings": [] + } + ] + } + }, + { + "id": "DataView.Js_typed_array2", + "kind": "module", + "item": { + "name": "DataView", + "docstrings": [], + "items": [ + { + "id": "Js_typed_array2.DataView.t", + "kind": "type", + "name": "t", + "signature": "type t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.make", + "kind": "value", + "name": "make", + "signature": "let make: array_buffer => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.fromBuffer", + "kind": "value", + "name": "fromBuffer", + "signature": "let fromBuffer: array_buffer => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.fromBufferOffset", + "kind": "value", + "name": "fromBufferOffset", + "signature": "let fromBufferOffset: (array_buffer, int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.fromBufferRange", + "kind": "value", + "name": "fromBufferRange", + "signature": "let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.buffer", + "kind": "value", + "name": "buffer", + "signature": "let buffer: t => array_buffer", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.byteLength", + "kind": "value", + "name": "byteLength", + "signature": "let byteLength: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.byteOffset", + "kind": "value", + "name": "byteOffset", + "signature": "let byteOffset: t => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getInt8", + "kind": "value", + "name": "getInt8", + "signature": "let getInt8: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getUint8", + "kind": "value", + "name": "getUint8", + "signature": "let getUint8: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getInt16", + "kind": "value", + "name": "getInt16", + "signature": "let getInt16: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getInt16LittleEndian", + "kind": "value", + "name": "getInt16LittleEndian", + "signature": "let getInt16LittleEndian: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getUint16", + "kind": "value", + "name": "getUint16", + "signature": "let getUint16: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getUint16LittleEndian", + "kind": "value", + "name": "getUint16LittleEndian", + "signature": "let getUint16LittleEndian: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getInt32", + "kind": "value", + "name": "getInt32", + "signature": "let getInt32: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getInt32LittleEndian", + "kind": "value", + "name": "getInt32LittleEndian", + "signature": "let getInt32LittleEndian: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getUint32", + "kind": "value", + "name": "getUint32", + "signature": "let getUint32: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getUint32LittleEndian", + "kind": "value", + "name": "getUint32LittleEndian", + "signature": "let getUint32LittleEndian: (t, int) => int", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getFloat32", + "kind": "value", + "name": "getFloat32", + "signature": "let getFloat32: (t, int) => float", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getFloat32LittleEndian", + "kind": "value", + "name": "getFloat32LittleEndian", + "signature": "let getFloat32LittleEndian: (t, int) => float", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getFloat64", + "kind": "value", + "name": "getFloat64", + "signature": "let getFloat64: (t, int) => float", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.getFloat64LittleEndian", + "kind": "value", + "name": "getFloat64LittleEndian", + "signature": "let getFloat64LittleEndian: (t, int) => float", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setInt8", + "kind": "value", + "name": "setInt8", + "signature": "let setInt8: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setUint8", + "kind": "value", + "name": "setUint8", + "signature": "let setUint8: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setInt16", + "kind": "value", + "name": "setInt16", + "signature": "let setInt16: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setInt16LittleEndian", + "kind": "value", + "name": "setInt16LittleEndian", + "signature": "let setInt16LittleEndian: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setUint16", + "kind": "value", + "name": "setUint16", + "signature": "let setUint16: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setUint16LittleEndian", + "kind": "value", + "name": "setUint16LittleEndian", + "signature": "let setUint16LittleEndian: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setInt32", + "kind": "value", + "name": "setInt32", + "signature": "let setInt32: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setInt32LittleEndian", + "kind": "value", + "name": "setInt32LittleEndian", + "signature": "let setInt32LittleEndian: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setUint32", + "kind": "value", + "name": "setUint32", + "signature": "let setUint32: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setUint32LittleEndian", + "kind": "value", + "name": "setUint32LittleEndian", + "signature": "let setUint32LittleEndian: (t, int, int) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setFloat32", + "kind": "value", + "name": "setFloat32", + "signature": "let setFloat32: (t, int, float) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setFloat32LittleEndian", + "kind": "value", + "name": "setFloat32LittleEndian", + "signature": "let setFloat32LittleEndian: (t, int, float) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setFloat64", + "kind": "value", + "name": "setFloat64", + "signature": "let setFloat64: (t, int, float) => unit", + "docstrings": [] + }, + { + "id": "Js_typed_array2.DataView.setFloat64LittleEndian", + "kind": "value", + "name": "setFloat64LittleEndian", + "signature": "let setFloat64LittleEndian: (t, int, float) => unit", + "docstrings": [] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_types.json b/index_data/api/Js_types.json new file mode 100644 index 000000000..e66325c9b --- /dev/null +++ b/index_data/api/Js_types.json @@ -0,0 +1,193 @@ +{ + "name": "Js_types", + "docstrings": [ + "Provide utilities for manipulating JS types." + ], + "items": [ + { + "id": "Js_types.symbol", + "kind": "type", + "name": "symbol", + "signature": "type symbol", + "docstrings": [ + "Js symbol type (only available in ES6)" + ] + }, + { + "id": "Js_types.bigint_val", + "kind": "type", + "name": "bigint_val", + "signature": "type bigint_val", + "docstrings": [ + "Js bigint type only available in ES2020" + ] + }, + { + "id": "Js_types.obj_val", + "kind": "type", + "name": "obj_val", + "signature": "type obj_val", + "docstrings": [] + }, + { + "id": "Js_types.undefined_val", + "kind": "type", + "name": "undefined_val", + "signature": "type undefined_val", + "docstrings": [ + "This type has only one value `undefined`" + ] + }, + { + "id": "Js_types.null_val", + "kind": "type", + "name": "null_val", + "signature": "type null_val", + "docstrings": [ + "This type has only one value `null`" + ] + }, + { + "id": "Js_types.function_val", + "kind": "type", + "name": "function_val", + "signature": "type function_val", + "docstrings": [] + }, + { + "id": "Js_types.t", + "kind": "type", + "name": "t", + "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", + "docstrings": [], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "Undefined", + "docstrings": [], + "signature": "Undefined\nt" + }, + { + "constructorName": "Null", + "docstrings": [], + "signature": "Null\nt" + }, + { + "constructorName": "Boolean", + "docstrings": [], + "signature": "Boolean\nt" + }, + { + "constructorName": "Number", + "docstrings": [], + "signature": "Number\nt" + }, + { + "constructorName": "String", + "docstrings": [], + "signature": "String\nt" + }, + { + "constructorName": "Function", + "docstrings": [], + "signature": "Function\nt" + }, + { + "constructorName": "Object", + "docstrings": [], + "signature": "Object\nt" + }, + { + "constructorName": "Symbol", + "docstrings": [], + "signature": "Symbol\nt" + }, + { + "constructorName": "BigInt", + "docstrings": [], + "signature": "BigInt\nt" + } + ] + } + }, + { + "id": "Js_types.test", + "kind": "value", + "name": "test", + "signature": "let test: ('a, t<'b>) => bool", + "docstrings": [ + "`test(value, t)` returns `true` if `value` is `typeof t`, otherwise `false`.\n This is useful for doing runtime reflection on any given value.\n\n ```res example\n test(\"test\", String) == true\n test(() => true, Function) == true\n test(\"test\", Boolean) == false\n ```" + ] + }, + { + "id": "Js_types.tagged_t", + "kind": "type", + "name": "tagged_t", + "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)", + "docstrings": [], + "detail": { + "kind": "variant", + "constructorDocs": [ + { + "constructorName": "JSFalse", + "docstrings": [], + "signature": "JSFalse" + }, + { + "constructorName": "JSTrue", + "docstrings": [], + "signature": "JSTrue" + }, + { + "constructorName": "JSNull", + "docstrings": [], + "signature": "JSNull" + }, + { + "constructorName": "JSUndefined", + "docstrings": [], + "signature": "JSUndefined" + }, + { + "constructorName": "JSNumber", + "docstrings": [], + "signature": "JSNumber(float)" + }, + { + "constructorName": "JSString", + "docstrings": [], + "signature": "JSString(string)" + }, + { + "constructorName": "JSFunction", + "docstrings": [], + "signature": "JSFunction(function_val)" + }, + { + "constructorName": "JSObject", + "docstrings": [], + "signature": "JSObject(obj_val)" + }, + { + "constructorName": "JSSymbol", + "docstrings": [], + "signature": "JSSymbol(symbol)" + }, + { + "constructorName": "JSBigInt", + "docstrings": [], + "signature": "JSBigInt(bigint_val)" + } + ] + } + }, + { + "id": "Js_types.classify", + "kind": "value", + "name": "classify", + "signature": "let classify: 'a => tagged_t", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_undefined.json b/index_data/api/Js_undefined.json new file mode 100644 index 000000000..ee887038b --- /dev/null +++ b/index_data/api/Js_undefined.json @@ -0,0 +1,117 @@ +{ + "name": "Js_undefined", + "docstrings": [ + "Provides functionality for dealing with the `Js.undefined('a)` type" + ], + "items": [ + { + "id": "Js_undefined.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = Js.undefined<'a>", + "docstrings": [ + "Local alias for `Js.undefined('a)`" + ] + }, + { + "id": "Js_undefined.return", + "kind": "value", + "name": "return", + "signature": "let return: 'a => t<'a>", + "docstrings": [ + "Constructs a value of `Js.undefined('a)` containing a value of `'a`." + ] + }, + { + "id": "Js_undefined.test", + "kind": "value", + "name": "test", + "signature": "let test: t<'a> => bool", + "docstrings": [ + "Returns `true` if the given value is empty (undefined), `false` otherwise." + ] + }, + { + "id": "Js_undefined.testAny", + "kind": "value", + "name": "testAny", + "signature": "let testAny: 'a => bool", + "docstrings": [ + "Returns `true` if the given value is empty (undefined).\n\n**since 1.6.1**" + ] + }, + { + "id": "Js_undefined.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: t<'a>", + "docstrings": [ + "The empty value, `undefined`" + ] + }, + { + "id": "Js_undefined.getUnsafe", + "kind": "value", + "name": "getUnsafe", + "signature": "let getUnsafe: t<'a> => 'a", + "docstrings": [] + }, + { + "id": "Js_undefined.getExn", + "kind": "value", + "name": "getExn", + "signature": "let getExn: t<'a> => 'a", + "docstrings": [] + }, + { + "id": "Js_undefined.bind", + "kind": "value", + "name": "bind", + "signature": "let bind: (t<'a>, (. 'a) => 'b) => t<'b>", + "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```res example\nlet maybeGreetWorld = (maybeGreeting: Js.undefined) =>\n Js.Undefined.bind(maybeGreeting, (. greeting) => greeting ++ \" world!\")\n```" + ] + }, + { + "id": "Js_undefined.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: (t<'a>, (. 'a) => unit) => unit", + "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```res example\nlet maybeSay = (maybeMessage: Js.undefined) =>\n Js.Undefined.iter(maybeMessage, (. message) => Js.log(message))\n```" + ] + }, + { + "id": "Js_undefined.fromOption", + "kind": "value", + "name": "fromOption", + "signature": "let fromOption: option<'a> => t<'a>", + "docstrings": [ + "Maps `option('a)` to `Js.undefined('a)`.\n`Some(a)` => `a`\n`None` => `empty`" + ] + }, + { + "id": "Js_undefined.from_opt", + "kind": "value", + "name": "from_opt", + "signature": "let from_opt: option<'a> => t<'a>", + "docstrings": [] + }, + { + "id": "Js_undefined.toOption", + "kind": "value", + "name": "toOption", + "signature": "let toOption: t<'a> => option<'a>", + "docstrings": [ + "Maps `Js.undefined('a)` to `option('a)`\n`a` => `Some(a)`\n`empty` => `None`" + ] + }, + { + "id": "Js_undefined.to_opt", + "kind": "value", + "name": "to_opt", + "signature": "let to_opt: t<'a> => option<'a>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_vector.json b/index_data/api/Js_vector.json new file mode 100644 index 000000000..4c1dec59a --- /dev/null +++ b/index_data/api/Js_vector.json @@ -0,0 +1,167 @@ +{ + "name": "Js_vector", + "docstrings": [], + "items": [ + { + "id": "Js_vector.t", + "kind": "type", + "name": "t", + "signature": "type t<'a> = array<'a>", + "docstrings": [] + }, + { + "id": "Js_vector.filterInPlace", + "kind": "value", + "name": "filterInPlace", + "signature": "let filterInPlace: ((. 'a) => bool, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Js_vector.empty", + "kind": "value", + "name": "empty", + "signature": "let empty: t<'a> => unit", + "docstrings": [] + }, + { + "id": "Js_vector.pushBack", + "kind": "value", + "name": "pushBack", + "signature": "let pushBack: ('a, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Js_vector.copy", + "kind": "value", + "name": "copy", + "signature": "let copy: t<'a> => t<'a>", + "docstrings": [ + "shallow copy" + ] + }, + { + "id": "Js_vector.memByRef", + "kind": "value", + "name": "memByRef", + "signature": "let memByRef: ('a, t<'a>) => bool", + "docstrings": [] + }, + { + "id": "Js_vector.iter", + "kind": "value", + "name": "iter", + "signature": "let iter: ((. 'a) => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Js_vector.iteri", + "kind": "value", + "name": "iteri", + "signature": "let iteri: ((. int, 'a) => unit, t<'a>) => unit", + "docstrings": [] + }, + { + "id": "Js_vector.toList", + "kind": "value", + "name": "toList", + "signature": "let toList: t<'a> => list<'a>", + "docstrings": [] + }, + { + "id": "Js_vector.map", + "kind": "value", + "name": "map", + "signature": "let map: ((. 'a) => 'b, t<'a>) => t<'b>", + "docstrings": [] + }, + { + "id": "Js_vector.mapi", + "kind": "value", + "name": "mapi", + "signature": "let mapi: ((. int, 'a) => 'b, t<'a>) => t<'b>", + "docstrings": [] + }, + { + "id": "Js_vector.foldLeft", + "kind": "value", + "name": "foldLeft", + "signature": "let foldLeft: ((. 'a, 'b) => 'a, 'a, t<'b>) => 'a", + "docstrings": [] + }, + { + "id": "Js_vector.foldRight", + "kind": "value", + "name": "foldRight", + "signature": "let foldRight: ((. 'b, 'a) => 'a, t<'b>, 'a) => 'a", + "docstrings": [] + }, + { + "id": "Js_vector.length", + "kind": "value", + "name": "length", + "signature": "let length: t<'a> => int", + "docstrings": [ + "Return the length (number of elements) of the given array." + ] + }, + { + "id": "Js_vector.get", + "kind": "value", + "name": "get", + "signature": "let get: (t<'a>, int) => 'a", + "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`)." + ] + }, + { + "id": "Js_vector.set", + "kind": "value", + "name": "set", + "signature": "let set: (t<'a>, int, 'a) => unit", + "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`." + ] + }, + { + "id": "Js_vector.make", + "kind": "value", + "name": "make", + "signature": "let make: (int, 'a) => t<'a>", + "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`." + ] + }, + { + "id": "Js_vector.init", + "kind": "value", + "name": "init", + "signature": "let init: (int, (. int) => 'a) => t<'a>", + "docstrings": [ + "Raises `RangeError` when n is negative.\nn : size" + ] + }, + { + "id": "Js_vector.append", + "kind": "value", + "name": "append", + "signature": "let append: ('a, t<'a>) => t<'a>", + "docstrings": [ + "`append(x, a)` returns a fresh vector with `x` appended to `a`." + ] + }, + { + "id": "Js_vector.unsafe_get", + "kind": "value", + "name": "unsafe_get", + "signature": "let unsafe_get: (t<'a>, int) => 'a", + "docstrings": [] + }, + { + "id": "Js_vector.unsafe_set", + "kind": "value", + "name": "unsafe_set", + "signature": "let unsafe_set: (t<'a>, int, 'a) => unit", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_weakmap.json b/index_data/api/Js_weakmap.json new file mode 100644 index 000000000..cd75fd44e --- /dev/null +++ b/index_data/api/Js_weakmap.json @@ -0,0 +1,15 @@ +{ + "name": "Js_weakmap", + "docstrings": [ + "ES6 WeakMap API" + ], + "items": [ + { + "id": "Js_weakmap.t", + "kind": "type", + "name": "t", + "signature": "type t<'k, 'v>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/Js_weakset.json b/index_data/api/Js_weakset.json new file mode 100644 index 000000000..ecf503a53 --- /dev/null +++ b/index_data/api/Js_weakset.json @@ -0,0 +1,15 @@ +{ + "name": "Js_weakset", + "docstrings": [ + "ES6 WeakSet API" + ], + "items": [ + { + "id": "Js_weakset.t", + "kind": "type", + "name": "t", + "signature": "type t<'a>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/JsxC.json b/index_data/api/JsxC.json new file mode 100644 index 000000000..4bdb34dea --- /dev/null +++ b/index_data/api/JsxC.json @@ -0,0 +1,78 @@ +{ + "name": "JsxC", + "docstrings": [ + "Internal: use Jsx directly." + ], + "items": [ + { + "id": "JsxC.element", + "kind": "type", + "name": "element", + "signature": "type element", + "docstrings": [] + }, + { + "id": "JsxC.ref", + "kind": "type", + "name": "ref", + "signature": "type ref", + "docstrings": [] + }, + { + "id": "JsxC.null", + "kind": "value", + "name": "null", + "signature": "let null: element", + "docstrings": [] + }, + { + "id": "JsxC.float", + "kind": "value", + "name": "float", + "signature": "let float: float => element", + "docstrings": [] + }, + { + "id": "JsxC.int", + "kind": "value", + "name": "int", + "signature": "let int: int => element", + "docstrings": [] + }, + { + "id": "JsxC.string", + "kind": "value", + "name": "string", + "signature": "let string: string => element", + "docstrings": [] + }, + { + "id": "JsxC.array", + "kind": "value", + "name": "array", + "signature": "let array: array => element", + "docstrings": [] + }, + { + "id": "JsxC.componentLike", + "kind": "type", + "name": "componentLike", + "signature": "type componentLike<'props, 'return> = 'props => 'return", + "docstrings": [] + }, + { + "id": "JsxC.component", + "kind": "type", + "name": "component", + "signature": "type component<'props> = componentLike<'props, element>", + "docstrings": [] + }, + { + "id": "JsxC.component", + "kind": "value", + "name": "component", + "signature": "let component: componentLike<'props, element> => component<'props>", + "docstrings": [] + } + ] +} \ No newline at end of file diff --git a/index_data/api/JsxDOMC.json b/index_data/api/JsxDOMC.json new file mode 100644 index 000000000..ac205d5c7 --- /dev/null +++ b/index_data/api/JsxDOMC.json @@ -0,0 +1,4289 @@ +{ + "name": "JsxDOMC", + "docstrings": [ + "Internal: use JsxDOM directly." + ], + "items": [ + { + "id": "JsxDOMC.style", + "kind": "type", + "name": "style", + "signature": "type style = JsxDOMStyle.t", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "azimuth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backdropFilter", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "background", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backgroundAttachment", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backgroundColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backgroundImage", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backgroundPosition", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backgroundRepeat", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "border", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderCollapse", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderSpacing", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderTop", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderRight", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderBottom", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderLeft", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderTopColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderRightColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderBottomColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderLeftColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderTopStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderRightStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderBottomStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderLeftStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderTopWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderRightWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderBottomWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderLeftWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "bottom", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "captionSide", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "clear", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "clip", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "color", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "content", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "counterIncrement", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "counterReset", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "cue", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "cueAfter", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "cueBefore", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "cursor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "direction", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "display", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "elevation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "emptyCells", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "float", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "font", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontFamily", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontSize", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontSizeAdjust", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontStretch", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontVariant", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontWeight", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "height", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "left", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "letterSpacing", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "lineHeight", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "listStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "listStyleImage", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "listStylePosition", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "listStyleType", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "margin", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "marginTop", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "marginRight", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "marginBottom", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "marginLeft", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "markerOffset", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "marks", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maxHeight", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maxWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "minHeight", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "minWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "orphans", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "outline", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "outlineColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "outlineStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "outlineWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "overflow", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "overflowX", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "overflowY", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "padding", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "paddingTop", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "paddingRight", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "paddingBottom", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "paddingLeft", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "page", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "pageBreakAfter", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "pageBreakBefore", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "pageBreakInside", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "pause", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "pauseAfter", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "pauseBefore", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "pitch", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "pitchRange", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "playDuring", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "position", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "quotes", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "richness", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "right", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "size", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "speak", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "speakHeader", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "speakNumeral", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "speakPunctuation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "speechRate", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "stress", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "tableLayout", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textAlign", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textDecoration", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textIndent", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textShadow", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textTransform", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "top", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "unicodeBidi", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "verticalAlign", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "visibility", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "voiceFamily", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "volume", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "whiteSpace", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "widows", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "width", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "wordSpacing", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "zIndex", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "opacity", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backgroundOrigin", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backgroundSize", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backgroundClip", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderRadius", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderTopLeftRadius", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderTopRightRadius", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderBottomLeftRadius", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderBottomRightRadius", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderImage", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderImageSource", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderImageSlice", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderImageWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderImageOutset", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "borderImageRepeat", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "boxShadow", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columns", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columnCount", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columnFill", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columnGap", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columnRule", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columnRuleColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columnRuleStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columnRuleWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columnSpan", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "columnWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "breakAfter", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "breakBefore", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "breakInside", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "rest", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "restAfter", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "restBefore", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "speakAs", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "voiceBalance", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "voiceDuration", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "voicePitch", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "voiceRange", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "voiceRate", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "voiceStress", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "voiceVolume", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "objectFit", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "objectPosition", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "imageResolution", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "imageOrientation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "alignContent", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "alignItems", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "alignSelf", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "flex", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "flexBasis", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "flexDirection", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "flexFlow", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "flexGrow", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "flexShrink", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "flexWrap", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "justifyContent", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "order", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gap", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textDecorationColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textDecorationLine", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textDecorationSkip", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textDecorationStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textEmphasis", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textEmphasisColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textEmphasisPosition", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textEmphasisStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textUnderlinePosition", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontFeatureSettings", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontKerning", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontLanguageOverride", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontSynthesis", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "forntVariantAlternates", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontVariantCaps", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontVariantEastAsian", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontVariantLigatures", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontVariantNumeric", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fontVariantPosition", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "all", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "glyphOrientationVertical", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textCombineUpright", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textOrientation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "writingMode", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "shapeImageThreshold", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "shapeMargin", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "shapeOutside", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "clipPath", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "clipRule", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "mask", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskBorder", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskBorderMode", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskBorderOutset", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskBorderRepeat", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskBorderSlice", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskBorderSource", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskBorderWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskClip", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskComposite", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskImage", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskMode", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskOrigin", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskPosition", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskRepeat", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskSize", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maskType", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backgroundBlendMode", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "isolation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "mixBlendMode", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "boxDecorationBreak", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "boxSizing", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "caretColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "navDown", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "navLeft", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "navRight", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "navUp", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "outlineOffset", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "resize", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textOverflow", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "grid", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridArea", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridAutoColumns", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridAutoFlow", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridAutoRows", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridColumn", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridColumnEnd", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridColumnGap", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridColumnStart", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridGap", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridRow", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridRowEnd", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridRowGap", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridRowStart", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridTemplate", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridTemplateAreas", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridTemplateColumns", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "gridTemplateRows", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "willChange", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "hangingPunctuation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "hyphens", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "lineBreak", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "overflowWrap", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "tabSize", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textAlignLast", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textJustify", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "wordBreak", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "wordWrap", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "animation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "animationDelay", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "animationDirection", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "animationDuration", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "animationFillMode", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "animationIterationCount", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "animationName", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "animationPlayState", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "animationTimingFunction", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "transition", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "transitionDelay", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "transitionDuration", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "transitionProperty", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "transitionTimingFunction", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "backfaceVisibility", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "perspective", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "perspectiveOrigin", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "transform", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "transformOrigin", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "transformStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "justifyItems", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "justifySelf", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "placeContent", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "placeItems", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "placeSelf", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "appearance", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "caret", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "caretAnimation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "caretShape", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "userSelect", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "maxLines", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "marqueeDirection", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "marqueeLoop", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "marqueeSpeed", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "marqueeStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "overflowStyle", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "rotation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "rotationPoint", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "alignmentBaseline", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "baselineShift", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "colorInterpolation", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "colorInterpolationFilters", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "colorProfile", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "colorRendering", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "dominantBaseline", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fill", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fillOpacity", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "fillRule", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "filter", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "floodColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "floodOpacity", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "glyphOrientationHorizontal", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "imageRendering", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "kerning", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "lightingColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "markerEnd", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "markerMid", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "markerStart", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "pointerEvents", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "shapeRendering", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "stopColor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "stopOpacity", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "stroke", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "strokeDasharray", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "strokeDashoffset", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "strokeLinecap", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "strokeLinejoin", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "strokeMiterlimit", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "strokeOpacity", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "strokeWidth", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textAnchor", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "textRendering", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "rubyAlign", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "rubyMerge", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "rubyPosition", + "docstrings": [], + "signature": "option" + } + ] + } + }, + { + "id": "JsxDOMC.domRef", + "kind": "type", + "name": "domRef", + "signature": "type domRef", + "docstrings": [] + }, + { + "id": "JsxDOMC.domProps", + "kind": "type", + "name": "domProps", + "signature": "type domProps = {\\n key?: string,\\n children?: JsxC.element,\\n ref?: domRef,\\n ariaCurrent?: [\\n | #date\\n | #\\\"false\\\"\\n | #location\\n | #page\\n | #step\\n | #time\\n | #\\\"true\\\"\\n ],\\n ariaDetails?: string,\\n ariaDisabled?: bool,\\n ariaHidden?: bool,\\n ariaInvalid?: [#\\\"false\\\" | #grammar | #spelling | #\\\"true\\\"],\\n ariaKeyshortcuts?: string,\\n ariaLabel?: string,\\n ariaRoledescription?: string,\\n ariaAutocomplete?: [#both | #inline | #list | #none],\\n ariaChecked?: [#\\\"false\\\" | #mixed | #\\\"true\\\"],\\n ariaExpanded?: bool,\\n ariaHaspopup?: [\\n | #dialog\\n | #\\\"false\\\"\\n | #grid\\n | #listbox\\n | #menu\\n | #tree\\n | #\\\"true\\\"\\n ],\\n ariaLevel?: int,\\n ariaModal?: bool,\\n ariaMultiline?: bool,\\n ariaMultiselectable?: bool,\\n ariaOrientation?: [#horizontal | #undefined | #vertical],\\n ariaPlaceholder?: string,\\n ariaPressed?: [#\\\"false\\\" | #mixed | #\\\"true\\\"],\\n ariaReadonly?: bool,\\n ariaRequired?: bool,\\n ariaSelected?: bool,\\n ariaSort?: string,\\n ariaValuemax?: float,\\n ariaValuemin?: float,\\n ariaValuenow?: float,\\n ariaValuetext?: string,\\n ariaAtomic?: bool,\\n ariaBusy?: bool,\\n ariaLive?: [#assertive | #off | #polite | #rude],\\n ariaRelevant?: string,\\n ariaDropeffect?: [\\n | #copy\\n | #execute\\n | #link\\n | #move\\n | #none\\n | #popup\\n ],\\n ariaGrabbed?: bool,\\n ariaActivedescendant?: string,\\n ariaColcount?: int,\\n ariaColindex?: int,\\n ariaColspan?: int,\\n ariaControls?: string,\\n ariaDescribedby?: string,\\n ariaErrormessage?: string,\\n ariaFlowto?: string,\\n ariaLabelledby?: string,\\n ariaOwns?: string,\\n ariaPosinset?: int,\\n ariaRowcount?: int,\\n ariaRowindex?: int,\\n ariaRowspan?: int,\\n ariaSetsize?: int,\\n defaultChecked?: bool,\\n defaultValue?: string,\\n accessKey?: string,\\n className?: string,\\n contentEditable?: bool,\\n contextMenu?: string,\\n dataTestId?: string,\\n dir?: string,\\n draggable?: bool,\\n hidden?: bool,\\n id?: string,\\n lang?: string,\\n role?: string,\\n style?: style,\\n spellCheck?: bool,\\n tabIndex?: int,\\n title?: string,\\n itemID?: string,\\n itemProp?: string,\\n itemRef?: string,\\n itemScope?: bool,\\n itemType?: string,\\n accept?: string,\\n acceptCharset?: string,\\n action?: string,\\n allowFullScreen?: bool,\\n alt?: string,\\n as_?: string,\\n async?: bool,\\n autoComplete?: string,\\n autoCapitalize?: string,\\n autoFocus?: bool,\\n autoPlay?: bool,\\n challenge?: string,\\n charSet?: string,\\n checked?: bool,\\n cite?: string,\\n crossOrigin?: string,\\n cols?: int,\\n colSpan?: int,\\n content?: string,\\n controls?: bool,\\n coords?: string,\\n data?: string,\\n dateTime?: string,\\n default?: bool,\\n defer?: bool,\\n disabled?: bool,\\n download?: string,\\n encType?: string,\\n form?: string,\\n formAction?: string,\\n formTarget?: string,\\n formMethod?: string,\\n headers?: string,\\n height?: string,\\n high?: int,\\n href?: string,\\n hrefLang?: string,\\n htmlFor?: string,\\n httpEquiv?: string,\\n icon?: string,\\n inputMode?: string,\\n integrity?: string,\\n keyType?: string,\\n kind?: string,\\n label?: string,\\n list?: string,\\n loading?: [#eager | #\\\"lazy\\\"],\\n loop?: bool,\\n low?: int,\\n manifest?: string,\\n max?: string,\\n maxLength?: int,\\n media?: string,\\n mediaGroup?: string,\\n method?: string,\\n min?: string,\\n minLength?: int,\\n multiple?: bool,\\n muted?: bool,\\n name?: string,\\n nonce?: string,\\n noValidate?: bool,\\n open_?: bool,\\n optimum?: int,\\n pattern?: string,\\n placeholder?: string,\\n playsInline?: bool,\\n poster?: string,\\n preload?: string,\\n radioGroup?: string,\\n readOnly?: bool,\\n rel?: string,\\n required?: bool,\\n reversed?: bool,\\n rows?: int,\\n rowSpan?: int,\\n sandbox?: string,\\n scope?: string,\\n scoped?: bool,\\n scrolling?: string,\\n selected?: bool,\\n shape?: string,\\n size?: int,\\n sizes?: string,\\n span?: int,\\n src?: string,\\n srcDoc?: string,\\n srcLang?: string,\\n srcSet?: string,\\n start?: int,\\n step?: float,\\n summary?: string,\\n target?: string,\\n type_?: string,\\n useMap?: string,\\n value?: string,\\n width?: string,\\n wrap?: string,\\n onCopy?: JsxEventC.Clipboard.t => unit,\\n onCut?: JsxEventC.Clipboard.t => unit,\\n onPaste?: JsxEventC.Clipboard.t => unit,\\n onCompositionEnd?: JsxEventC.Composition.t => unit,\\n onCompositionStart?: JsxEventC.Composition.t => unit,\\n onCompositionUpdate?: JsxEventC.Composition.t => unit,\\n onKeyDown?: JsxEventC.Keyboard.t => unit,\\n onKeyPress?: JsxEventC.Keyboard.t => unit,\\n onKeyUp?: JsxEventC.Keyboard.t => unit,\\n onFocus?: JsxEventC.Focus.t => unit,\\n onBlur?: JsxEventC.Focus.t => unit,\\n onBeforeInput?: JsxEventC.Form.t => unit,\\n onChange?: JsxEventC.Form.t => unit,\\n onInput?: JsxEventC.Form.t => unit,\\n onReset?: JsxEventC.Form.t => unit,\\n onSubmit?: JsxEventC.Form.t => unit,\\n onInvalid?: JsxEventC.Form.t => unit,\\n onClick?: JsxEventC.Mouse.t => unit,\\n onContextMenu?: JsxEventC.Mouse.t => unit,\\n onDoubleClick?: JsxEventC.Mouse.t => unit,\\n onDrag?: JsxEventC.Mouse.t => unit,\\n onDragEnd?: JsxEventC.Mouse.t => unit,\\n onDragEnter?: JsxEventC.Mouse.t => unit,\\n onDragExit?: JsxEventC.Mouse.t => unit,\\n onDragLeave?: JsxEventC.Mouse.t => unit,\\n onDragOver?: JsxEventC.Mouse.t => unit,\\n onDragStart?: JsxEventC.Mouse.t => unit,\\n onDrop?: JsxEventC.Mouse.t => unit,\\n onMouseDown?: JsxEventC.Mouse.t => unit,\\n onMouseEnter?: JsxEventC.Mouse.t => unit,\\n onMouseLeave?: JsxEventC.Mouse.t => unit,\\n onMouseMove?: JsxEventC.Mouse.t => unit,\\n onMouseOut?: JsxEventC.Mouse.t => unit,\\n onMouseOver?: JsxEventC.Mouse.t => unit,\\n onMouseUp?: JsxEventC.Mouse.t => unit,\\n onSelect?: JsxEventC.Selection.t => unit,\\n onTouchCancel?: JsxEventC.Touch.t => unit,\\n onTouchEnd?: JsxEventC.Touch.t => unit,\\n onTouchMove?: JsxEventC.Touch.t => unit,\\n onTouchStart?: JsxEventC.Touch.t => unit,\\n onPointerOver?: JsxEventC.Pointer.t => unit,\\n onPointerEnter?: JsxEventC.Pointer.t => unit,\\n onPointerDown?: JsxEventC.Pointer.t => unit,\\n onPointerMove?: JsxEventC.Pointer.t => unit,\\n onPointerUp?: JsxEventC.Pointer.t => unit,\\n onPointerCancel?: JsxEventC.Pointer.t => unit,\\n onPointerOut?: JsxEventC.Pointer.t => unit,\\n onPointerLeave?: JsxEventC.Pointer.t => unit,\\n onGotPointerCapture?: JsxEventC.Pointer.t => unit,\\n onLostPointerCapture?: JsxEventC.Pointer.t => unit,\\n onScroll?: JsxEventC.UI.t => unit,\\n onWheel?: JsxEventC.Wheel.t => unit,\\n onAbort?: JsxEventC.Media.t => unit,\\n onCanPlay?: JsxEventC.Media.t => unit,\\n onCanPlayThrough?: JsxEventC.Media.t => unit,\\n onDurationChange?: JsxEventC.Media.t => unit,\\n onEmptied?: JsxEventC.Media.t => unit,\\n onEncrypted?: JsxEventC.Media.t => unit,\\n onEnded?: JsxEventC.Media.t => unit,\\n onError?: JsxEventC.Media.t => unit,\\n onLoadedData?: JsxEventC.Media.t => unit,\\n onLoadedMetadata?: JsxEventC.Media.t => unit,\\n onLoadStart?: JsxEventC.Media.t => unit,\\n onPause?: JsxEventC.Media.t => unit,\\n onPlay?: JsxEventC.Media.t => unit,\\n onPlaying?: JsxEventC.Media.t => unit,\\n onProgress?: JsxEventC.Media.t => unit,\\n onRateChange?: JsxEventC.Media.t => unit,\\n onSeeked?: JsxEventC.Media.t => unit,\\n onSeeking?: JsxEventC.Media.t => unit,\\n onStalled?: JsxEventC.Media.t => unit,\\n onSuspend?: JsxEventC.Media.t => unit,\\n onTimeUpdate?: JsxEventC.Media.t => unit,\\n onVolumeChange?: JsxEventC.Media.t => unit,\\n onWaiting?: JsxEventC.Media.t => unit,\\n onLoad?: JsxEventC.Image.t => unit,\\n onAnimationStart?: JsxEventC.Animation.t => unit,\\n onAnimationEnd?: JsxEventC.Animation.t => unit,\\n onAnimationIteration?: JsxEventC.Animation.t => unit,\\n onTransitionEnd?: JsxEventC.Transition.t => unit,\\n accentHeight?: string,\\n accumulate?: string,\\n additive?: string,\\n alignmentBaseline?: string,\\n allowReorder?: string,\\n alphabetic?: string,\\n amplitude?: string,\\n arabicForm?: string,\\n ascent?: string,\\n attributeName?: string,\\n attributeType?: string,\\n autoReverse?: string,\\n azimuth?: string,\\n baseFrequency?: string,\\n baseProfile?: string,\\n baselineShift?: string,\\n bbox?: string,\\n begin?: string,\\n begin_?: string,\\n bias?: string,\\n by?: string,\\n calcMode?: string,\\n capHeight?: string,\\n clip?: string,\\n clipPath?: string,\\n clipPathUnits?: string,\\n clipRule?: string,\\n colorInterpolation?: string,\\n colorInterpolationFilters?: string,\\n colorProfile?: string,\\n colorRendering?: string,\\n contentScriptType?: string,\\n contentStyleType?: string,\\n cursor?: string,\\n cx?: string,\\n cy?: string,\\n d?: string,\\n decelerate?: string,\\n descent?: string,\\n diffuseConstant?: string,\\n direction?: string,\\n display?: string,\\n divisor?: string,\\n dominantBaseline?: string,\\n dur?: string,\\n dx?: string,\\n dy?: string,\\n edgeMode?: string,\\n elevation?: string,\\n enableBackground?: string,\\n end?: string,\\n end_?: string,\\n exponent?: string,\\n externalResourcesRequired?: string,\\n fill?: string,\\n fillOpacity?: string,\\n fillRule?: string,\\n filter?: string,\\n filterRes?: string,\\n filterUnits?: string,\\n floodColor?: string,\\n floodOpacity?: string,\\n focusable?: string,\\n fontFamily?: string,\\n fontSize?: string,\\n fontSizeAdjust?: string,\\n fontStretch?: string,\\n fontStyle?: string,\\n fontVariant?: string,\\n fontWeight?: string,\\n fomat?: string,\\n from?: string,\\n fx?: string,\\n fy?: string,\\n g1?: string,\\n g2?: string,\\n glyphName?: string,\\n glyphOrientationHorizontal?: string,\\n glyphOrientationVertical?: string,\\n glyphRef?: string,\\n gradientTransform?: string,\\n gradientUnits?: string,\\n hanging?: string,\\n horizAdvX?: string,\\n horizOriginX?: string,\\n ideographic?: string,\\n imageRendering?: string,\\n in_?: string,\\n in2?: string,\\n intercept?: string,\\n k?: string,\\n k1?: string,\\n k2?: string,\\n k3?: string,\\n k4?: string,\\n kernelMatrix?: string,\\n kernelUnitLength?: string,\\n kerning?: string,\\n keyPoints?: string,\\n keySplines?: string,\\n keyTimes?: string,\\n lengthAdjust?: string,\\n letterSpacing?: string,\\n lightingColor?: string,\\n limitingConeAngle?: string,\\n local?: string,\\n markerEnd?: string,\\n markerHeight?: string,\\n markerMid?: string,\\n markerStart?: string,\\n markerUnits?: string,\\n markerWidth?: string,\\n mask?: string,\\n maskContentUnits?: string,\\n maskUnits?: string,\\n mathematical?: string,\\n mode?: string,\\n numOctaves?: string,\\n offset?: string,\\n opacity?: string,\\n operator?: string,\\n order?: string,\\n orient?: string,\\n orientation?: string,\\n origin?: string,\\n overflow?: string,\\n overflowX?: string,\\n overflowY?: string,\\n overlinePosition?: string,\\n overlineThickness?: string,\\n paintOrder?: string,\\n panose1?: string,\\n pathLength?: string,\\n patternContentUnits?: string,\\n patternTransform?: string,\\n patternUnits?: string,\\n pointerEvents?: string,\\n points?: string,\\n pointsAtX?: string,\\n pointsAtY?: string,\\n pointsAtZ?: string,\\n preserveAlpha?: string,\\n preserveAspectRatio?: string,\\n primitiveUnits?: string,\\n r?: string,\\n radius?: string,\\n refX?: string,\\n refY?: string,\\n renderingIntent?: string,\\n repeatCount?: string,\\n repeatDur?: string,\\n requiredExtensions?: string,\\n requiredFeatures?: string,\\n restart?: string,\\n result?: string,\\n rotate?: string,\\n rx?: string,\\n ry?: string,\\n scale?: string,\\n seed?: string,\\n shapeRendering?: string,\\n slope?: string,\\n spacing?: string,\\n specularConstant?: string,\\n specularExponent?: string,\\n speed?: string,\\n spreadMethod?: string,\\n startOffset?: string,\\n stdDeviation?: string,\\n stemh?: string,\\n stemv?: string,\\n stitchTiles?: string,\\n stopColor?: string,\\n stopOpacity?: string,\\n strikethroughPosition?: string,\\n strikethroughThickness?: string,\\n string?: string,\\n stroke?: string,\\n strokeDasharray?: string,\\n strokeDashoffset?: string,\\n strokeLinecap?: string,\\n strokeLinejoin?: string,\\n strokeMiterlimit?: string,\\n strokeOpacity?: string,\\n strokeWidth?: string,\\n surfaceScale?: string,\\n systemLanguage?: string,\\n tableValues?: string,\\n targetX?: string,\\n targetY?: string,\\n textAnchor?: string,\\n textDecoration?: string,\\n textLength?: string,\\n textRendering?: string,\\n to?: string,\\n to_?: string,\\n transform?: string,\\n u1?: string,\\n u2?: string,\\n underlinePosition?: string,\\n underlineThickness?: string,\\n unicode?: string,\\n unicodeBidi?: string,\\n unicodeRange?: string,\\n unitsPerEm?: string,\\n vAlphabetic?: string,\\n vHanging?: string,\\n vIdeographic?: string,\\n vMathematical?: string,\\n values?: string,\\n vectorEffect?: string,\\n version?: string,\\n vertAdvX?: string,\\n vertAdvY?: string,\\n vertOriginX?: string,\\n vertOriginY?: string,\\n viewBox?: string,\\n viewTarget?: string,\\n visibility?: string,\\n widths?: string,\\n wordSpacing?: string,\\n writingMode?: string,\\n x?: string,\\n x1?: string,\\n x2?: string,\\n xChannelSelector?: string,\\n xHeight?: string,\\n xlinkActuate?: string,\\n xlinkArcrole?: string,\\n xlinkHref?: string,\\n xlinkRole?: string,\\n xlinkShow?: string,\\n xlinkTitle?: string,\\n xlinkType?: string,\\n xmlns?: string,\\n xmlnsXlink?: string,\\n xmlBase?: string,\\n xmlLang?: string,\\n xmlSpace?: string,\\n y?: string,\\n y1?: string,\\n y2?: string,\\n yChannelSelector?: string,\\n z?: string,\\n zoomAndPan?: string,\\n about?: string,\\n datatype?: string,\\n inlist?: string,\\n prefix?: string,\\n property?: string,\\n resource?: string,\\n typeof?: string,\\n vocab?: string,\\n dangerouslySetInnerHTML?: {\\\"__html\\\": string},\\n suppressContentEditableWarning?: bool,\\n}", + "docstrings": [], + "detail": { + "kind": "record", + "fieldDocs": [ + { + "fieldName": "key", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "children", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ref", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaCurrent", + "docstrings": [], + "signature": "option<\n [\n | #page\n | #\"false\"\n | #time\n | #location\n | #\"true\"\n | #step\n | #date\n ],\n>" + }, + { + "fieldName": "ariaDetails", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaDisabled", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaHidden", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaInvalid", + "docstrings": [], + "signature": "option<[#\"false\" | #spelling | #grammar | #\"true\"]>" + }, + { + "fieldName": "ariaKeyshortcuts", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaLabel", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaRoledescription", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaAutocomplete", + "docstrings": [], + "signature": "option<[#none | #inline | #both | #list]>" + }, + { + "fieldName": "ariaChecked", + "docstrings": [], + "signature": "option<[#\"false\" | #mixed | #\"true\"]>" + }, + { + "fieldName": "ariaExpanded", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaHaspopup", + "docstrings": [], + "signature": "option<\n [\n | #tree\n | #dialog\n | #listbox\n | #\"false\"\n | #\"true\"\n | #menu\n | #grid\n ],\n>" + }, + { + "fieldName": "ariaLevel", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaModal", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaMultiline", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaMultiselectable", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaOrientation", + "docstrings": [], + "signature": "option<[#undefined | #horizontal | #vertical]>" + }, + { + "fieldName": "ariaPlaceholder", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaPressed", + "docstrings": [], + "signature": "option<[#\"false\" | #mixed | #\"true\"]>" + }, + { + "fieldName": "ariaReadonly", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaRequired", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaSelected", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaSort", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaValuemax", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaValuemin", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaValuenow", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaValuetext", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaAtomic", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaBusy", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaLive", + "docstrings": [], + "signature": "option<[#assertive | #rude | #polite | #off]>" + }, + { + "fieldName": "ariaRelevant", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaDropeffect", + "docstrings": [], + "signature": "option<[#none | #popup | #execute | #link | #move | #copy]>" + }, + { + "fieldName": "ariaGrabbed", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaActivedescendant", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaColcount", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaColindex", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaColspan", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaControls", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaDescribedby", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaErrormessage", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaFlowto", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaLabelledby", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaOwns", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaPosinset", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaRowcount", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaRowindex", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaRowspan", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "ariaSetsize", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "defaultChecked", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "defaultValue", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "accessKey", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "className", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "contentEditable", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "contextMenu", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "dataTestId", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "dir", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "draggable", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "hidden", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "id", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "lang", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "role", + "docstrings": [], + "signature": "option" + }, + { + "fieldName": "style", + "docstrings": [], + "signature": "option