diff --git a/changes/typed-arrays-private.breaking.md b/changes/typed-arrays-private.breaking.md new file mode 100644 index 00000000000..d7184f599b1 --- /dev/null +++ b/changes/typed-arrays-private.breaking.md @@ -0,0 +1,2 @@ +- Typed arrays are distinct types: `Int8Array.t` and the others are private abbreviations of `TypedArray.t<_>`, so an untagged variant can no longer take one typed array for another. Use each module's own functions, such as `Int8Array.get`, or upcast with `(view :> TypedArray.t)` to call the `TypedArray` functions. +- `@instanceOf` that introduces a class on an abbreviation of an abstract type requires a private abbreviation: write `@instanceOf("Element") type element = private node`. diff --git a/compiler/ml/UntaggedVariants.md b/compiler/ml/UntaggedVariants.md index cd1a7093c84..2040c5e0cc9 100644 --- a/compiler/ml/UntaggedVariants.md +++ b/compiler/ml/UntaggedVariants.md @@ -181,6 +181,16 @@ type hierarchy (`type dogLike<'a> = private animalLike<_dog<'a>>`). A public would `type dog = animal` or `type dog = phantom` with `type phantom<'a> = animal`. +A class introduced on an abbreviation of a type the compiler does not see is +private too: `@instanceOf("Element") type element = private node`. A public +abbreviation would make every `node` an `element`, and a second one could +declare the same values instances of another class while the type checker +treats both as one type. The stdlib's typed arrays are such private +abbreviations of `TypedArray.t<_>`, so `Int8Array.t` and `Uint8Array.t` are +different types, upcast to `TypedArray.t` with `:>`. Each typed array +module has the functions of `TypedArray` for its own type, through the +`TypedArray.Impl` functor. + | Declaration | Error | Fixture | | --- | --- | --- | | `@typeOf("string") type t = option`, `type t<'a> = 'a`, an abbreviation of `unit`, `list<_>` or a variant | @typeOf on a type abbreviation must describe an abstract type, ... | `runtime_annotation_on_option.res`, `runtime_annotation_on_type_variable.res` | @@ -188,6 +198,7 @@ would `type dog = animal` or `type dog = phantom` with | `@typeOf("number") type t = sym` with `@typeOf("symbol") type sym`, `@typeOf("string") type t = int`, or an abbreviation of a function type, a record or a tuple | This annotation, @typeOf("number"), contradicts the abbreviated type, whose values are recognized by @typeOf("symbol"). An array or tuple is recognized by Array.isArray. | `runtime_annotation_contradicts_manifest.res`, `runtime_annotation_contradicts_builtin.res`, `runtime_annotation_contradicts_function.res`, `runtime_annotation_contradicts_tuple.res` | | `@instanceOf("Date") type date = X.t` in a functor of `X`, or over `(type a)`; `@notUndefined type t = X.t` | @instanceOf cannot describe the type of a functor parameter, ... | `instance_of_functor_parameter.res`, `type_of_locally_abstract_type.res`, `not_undefined_on_functor_parameter_type.res` | | `@instanceOf("Dog") type dog = animal`, `= animal`, or `= phantom` with `type phantom<'a> = animal` | A subclass must be a private abbreviation ... | `instance_of_public_subclass.res`, `instance_of_public_subclass_instance.res`, `instance_of_public_subclass_through_alias.res` | +| `@instanceOf("Element") type element = node` with `type node` | A class must be declared on an abstract type or a private abbreviation ... | `instance_of_public_abbreviation.res`; `typed_array_cases_distinct.res` (typed arrays are distinct types) | | `@instanceOf("Animal") type t = private dog` | Animal appears twice in this chain of abbreviations ... | `instance_of_class_twice_in_chain.res` | | `@instanceOf("MyList") type t = private array` | @instanceOf("MyList") cannot describe the values of an array type: ... subclasses of Array are not supported. | `instance_of_array_subclass.res` | | any of the three on a record or variant | @instanceOf can only be used on abstract types and type abbreviations ... | `runtime_annotation_on_record.res`, `invalid_attribute_not_undefined.res` | @@ -271,7 +282,7 @@ written (Known bugs). `Cross_runtime_annotation_functor_argument`, `Cross_not_undefined_option_implementation`. - Shaped by #6296, #6383, #6396, #7458, #7464, #7788, #8009, #8950, #8948, - #8949, #8964. Related: #7147. + #8949, #8955, #8964. Related: #7147. ### 6. Well-formedness diff --git a/compiler/ml/ast_untagged_variants.ml b/compiler/ml/ast_untagged_variants.ml index 12622de7d4d..2b43fdd6fe4 100644 --- a/compiler/ml/ast_untagged_variants.ml +++ b/compiler/ml/ast_untagged_variants.ml @@ -35,6 +35,7 @@ type error = | RuntimeAnnotationContradictsManifest of string * string | SubclassOfArray of string | SubclassOfPublicAbbreviation of string * string + | ClassOnPublicAbbreviation of string | ClassTwiceInChain of string exception Error of Location.t * error @@ -169,6 +170,13 @@ let report_error ppf = are recognized by Array.isArray, and subclasses of Array are not \ supported." name + | ClassOnPublicAbbreviation name -> + fprintf ppf + "A class must be declared on an abstract type or a private abbreviation: \ + write `= private ...`, so that values of the abbreviated type are not \ + instances of %s without a coercion, and another abbreviation cannot \ + declare them instances of another class." + name | SubclassOfPublicAbbreviation (name, ancestor) -> fprintf ppf "A subclass must be a private abbreviation: write `= private ...` so \ diff --git a/compiler/ml/typedecl.ml b/compiler/ml/typedecl.ml index 56d40da5907..a042baa65d6 100644 --- a/compiler/ml/typedecl.ml +++ b/compiler/ml/typedecl.ml @@ -367,7 +367,14 @@ let check_manifest_annotation ~loc ~env (decl : Types.type_declaration) = | Can_be_undefined -> unrelated ()) | (Instance_of _ | Type_of _), None -> ( match Typeopt.abstractness env manifest with - | Opaque -> () + | Opaque -> ( + (* Two public abbreviations of one type would declare its values + instances of two classes, and the type checker would not tell + them apart *) + match outer with + | Instance_of name when decl.type_private = Public -> + error (ClassOnPublicAbbreviation name) + | Not_undefined | Instance_of _ | Type_of _ -> ()) | Stands_for_another -> stands_for_another () | Not_abstract -> unrelated ()) | Type_of block_type, Some inner when block_type = inner -> () diff --git a/packages/@rescript/runtime/Stdlib_BigInt64Array.res b/packages/@rescript/runtime/Stdlib_BigInt64Array.res index adfafe3275f..6a637606e3a 100644 --- a/packages/@rescript/runtime/Stdlib_BigInt64Array.res +++ b/packages/@rescript/runtime/Stdlib_BigInt64Array.res @@ -1,7 +1,12 @@ /** The `BigInt64Array` typed array represents an array of 64-bit signed integers in platform byte order. See [BigInt64Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("BigInt64Array") -type t = Stdlib_TypedArray.t +@instanceOf("BigInt64Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = bigint +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_BigUint64Array.res b/packages/@rescript/runtime/Stdlib_BigUint64Array.res index d1df29b60f3..2a6ff49a5df 100644 --- a/packages/@rescript/runtime/Stdlib_BigUint64Array.res +++ b/packages/@rescript/runtime/Stdlib_BigUint64Array.res @@ -1,7 +1,12 @@ /** The `BigUint64Array` typed array represents an array of 64-bit unsigned integers in platform byte order. See [BigUint64Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigUint64Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("BigUint64Array") -type t = Stdlib_TypedArray.t +@instanceOf("BigUint64Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = bigint +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_Float32Array.res b/packages/@rescript/runtime/Stdlib_Float32Array.res index 4b87ad539c2..1874ad8ec28 100644 --- a/packages/@rescript/runtime/Stdlib_Float32Array.res +++ b/packages/@rescript/runtime/Stdlib_Float32Array.res @@ -1,7 +1,12 @@ /** The `Float32Array` typed array represents an array of 32-bit floating point numbers in platform byte order. See [Float32Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("Float32Array") -type t = Stdlib_TypedArray.t +@instanceOf("Float32Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = float +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_Float64Array.res b/packages/@rescript/runtime/Stdlib_Float64Array.res index 29cdd62dae6..255b0601b9b 100644 --- a/packages/@rescript/runtime/Stdlib_Float64Array.res +++ b/packages/@rescript/runtime/Stdlib_Float64Array.res @@ -1,7 +1,12 @@ /** The `Float64Array` typed array represents an array of 64-bit floating point numbers in platform byte order. See [Float64Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("Float64Array") -type t = Stdlib_TypedArray.t +@instanceOf("Float64Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = float +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_Int16Array.res b/packages/@rescript/runtime/Stdlib_Int16Array.res index 8a07291437d..4c77496b4ff 100644 --- a/packages/@rescript/runtime/Stdlib_Int16Array.res +++ b/packages/@rescript/runtime/Stdlib_Int16Array.res @@ -1,7 +1,12 @@ /** The `Int16Array` typed array represents an array of twos-complement 16-bit signed integers in platform byte order. See [Int16Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("Int16Array") -type t = Stdlib_TypedArray.t +@instanceOf("Int16Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = int +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_Int32Array.res b/packages/@rescript/runtime/Stdlib_Int32Array.res index 70ac9e3089e..98e8f69d062 100644 --- a/packages/@rescript/runtime/Stdlib_Int32Array.res +++ b/packages/@rescript/runtime/Stdlib_Int32Array.res @@ -1,7 +1,12 @@ /** The `Int32Array` typed array represents an array of twos-complemenet 32-bit signed integers in platform byte order. See [Int32Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("Int32Array") -type t = Stdlib_TypedArray.t +@instanceOf("Int32Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = int +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_Int8Array.res b/packages/@rescript/runtime/Stdlib_Int8Array.res index b03b30369c7..6a5bb59208a 100644 --- a/packages/@rescript/runtime/Stdlib_Int8Array.res +++ b/packages/@rescript/runtime/Stdlib_Int8Array.res @@ -1,7 +1,12 @@ /** The `Int8Array` typed array represents an array of twos-complement 8-bit signed integers. See [Int8Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("Int8Array") -type t = Stdlib_TypedArray.t +@instanceOf("Int8Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = int +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_TypedArray.res b/packages/@rescript/runtime/Stdlib_TypedArray.res index c851e80f9a3..00fceea6ead 100644 --- a/packages/@rescript/runtime/Stdlib_TypedArray.res +++ b/packages/@rescript/runtime/Stdlib_TypedArray.res @@ -8,7 +8,7 @@ Returns `None` if the index does not exist in the typed array. Equivalent to doi ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3]) +let view = (Int32Array.fromArray([1, 2, 3]) :> TypedArray.t) TypedArray.get(view, 0) == Some(1) TypedArray.get(view, 10) == None ``` @@ -24,7 +24,7 @@ Beware this will *mutate* the array. ## Examples ```rescript -let view = Int32Array.fromArray([1, 2]) +let view = (Int32Array.fromArray([1, 2]) :> TypedArray.t) TypedArray.set(view, 1, 5) TypedArray.get(view, 1) == Some(5) ``` @@ -48,7 +48,7 @@ See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs ## Examples ```rescript -let view = Int32Array.fromArray([1, 2]) +let view = (Int32Array.fromArray([1, 2]) :> TypedArray.t) TypedArray.byteLength(view) == 8 ``` */ @@ -71,7 +71,7 @@ See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/Ja ## Examples ```rescript -let view = Int32Array.fromArray([0, 0]) +let view = (Int32Array.fromArray([0, 0]) :> TypedArray.t) TypedArray.setArray(view, [1, 2]) TypedArray.toString(view) == "1,2" ``` @@ -87,7 +87,7 @@ See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/Ja ## Examples ```rescript -let view = Int32Array.fromArray([0, 0, 0]) +let view = (Int32Array.fromArray([0, 0, 0]) :> TypedArray.t) TypedArray.setArrayFrom(view, [5, 6], 1) TypedArray.toString(view) == "0,5,6" ``` @@ -103,7 +103,7 @@ See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3]) +let view = (Int32Array.fromArray([1, 2, 3]) :> TypedArray.t) TypedArray.length(view) == 3 ``` */ @@ -120,7 +120,7 @@ See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs ## Examples ```rescript -let view = Int32Array.fromArray([10, 20, 30]) +let view = (Int32Array.fromArray([10, 20, 30]) :> TypedArray.t) let _ = TypedArray.copyAllWithin(view, ~target=1) TypedArray.toString(view) == "10,10,20" ``` @@ -136,7 +136,7 @@ See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3, 4]) +let view = (Int32Array.fromArray([1, 2, 3, 4]) :> TypedArray.t) let _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2) TypedArray.toString(view) == "3,4,3,4" ``` @@ -158,7 +158,7 @@ See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3, 4]) +let view = (Int32Array.fromArray([1, 2, 3, 4]) :> TypedArray.t) let _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4) TypedArray.toString(view) == "1,3,4,4" ``` @@ -176,7 +176,7 @@ See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/J ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3]) +let view = (Int32Array.fromArray([1, 2, 3]) :> TypedArray.t) let _ = TypedArray.fillAll(view, 9) TypedArray.toString(view) == "9,9,9" ``` @@ -205,7 +205,7 @@ See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/J ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3, 4]) +let view = (Int32Array.fromArray([1, 2, 3, 4]) :> TypedArray.t) let _ = TypedArray.fill(view, 0, ~start=1, ~end=3) TypedArray.toString(view) == "1,0,0,4" ``` @@ -229,7 +229,7 @@ See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3]) +let view = (Int32Array.fromArray([1, 2, 3]) :> TypedArray.t) let reversed = TypedArray.toReversed(view) TypedArray.toString(reversed) == "3,2,1" TypedArray.toString(view) == "1,2,3" @@ -253,7 +253,7 @@ See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/W ## Examples ```rescript -let view = Int32Array.fromArray([3, 1, 2]) +let view = (Int32Array.fromArray([3, 1, 2]) :> TypedArray.t) let sorted = TypedArray.toSorted(view, Int.compare) TypedArray.toString(sorted) == "1,2,3" TypedArray.toString(view) == "3,1,2" @@ -269,7 +269,7 @@ See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/J ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3]) +let view = (Int32Array.fromArray([1, 2, 3]) :> TypedArray.t) let updated = TypedArray.with(view, 1, 10) TypedArray.toString(updated) == "1,10,3" TypedArray.toString(view) == "1,2,3" @@ -285,7 +285,7 @@ See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/W ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3]) +let view = (Int32Array.fromArray([1, 2, 3]) :> TypedArray.t) TypedArray.includes(view, 2) == true TypedArray.includes(view, 10) == false ``` @@ -311,7 +311,7 @@ See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/J ## Examples ```rescript -let view = Int32Array.fromArray([1, 2, 3]) +let view = (Int32Array.fromArray([1, 2, 3]) :> TypedArray.t) TypedArray.joinWith(view, "-") == "1-2-3" ``` */ @@ -372,7 +372,7 @@ See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/W ## Examples ```rescript -Int32Array.fromArray([1, 2])->TypedArray.toString == "1,2" +(Int32Array.fromArray([1, 2]) :> TypedArray.t)->TypedArray.toString == "1,2" ``` */ @send external toString: t<'a> => string = "toString" @@ -511,3 +511,533 @@ See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/J without having to store or process it further. */ external ignore: t<'a> => unit = "%ignore" + +/** +The functions above for one typed array type, such as `Int8Array.t`. Each +typed array module includes them, so `Int8Array.get(view, 0)` works on an +`Int8Array.t`. A typed array reaches the functions above with a coercion, +such as `(view :> TypedArray.t)`. +*/ +module Impl = ( + T: { + type t + type elt + }, +) => { + /** + `get(typedArray, index)` returns the element at `index` of `typedArray`. + Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2, 3]) + Int32Array.get(view, 0) == Some(1) + Int32Array.get(view, 10) == None + ``` + */ + @get_index + external get: (T.t, int) => option = "" + + /** + `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`. + + Beware this will *mutate* the array. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2]) + Int32Array.set(view, 1, 5) + Int32Array.get(view, 1) == Some(5) + ``` + */ + @set_index + external set: (T.t, int, T.elt) => unit = "" + + /** + `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view. + + See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN. + */ + @get + external buffer: T.t => Stdlib_ArrayBuffer.t = "buffer" + + /** + `byteLength(typedArray)` returns the length in bytes of the view. + + See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2]) + Int32Array.byteLength(view) == 8 + ``` + */ + @get + external byteLength: T.t => int = "byteLength" + + /** + `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer. + + See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN. + */ + @get + external byteOffset: T.t => int = "byteOffset" + + /** + `setArray(target, source)` copies the values from `source` into `target`, mutating it. + + See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([0, 0]) + Int32Array.setArray(view, [1, 2]) + Int32Array.toString(view) == "1,2" + ``` + */ + @send + external setArray: (T.t, array) => unit = "set" + + /** + `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`. + + See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([0, 0, 0]) + Int32Array.setArrayFrom(view, [5, 6], 1) + Int32Array.toString(view) == "0,5,6" + ``` + */ + @send + external setArrayFrom: (T.t, array, int) => unit = "set" + + /** + `length(typedArray)` returns the number of elements. + + See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2, 3]) + Int32Array.length(view) == 3 + ``` + */ + @get + external length: T.t => int = "length" + + /** + `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`. + + Beware this will *mutate* the typed array. + + See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([10, 20, 30]) + let _ = Int32Array.copyAllWithin(view, ~target=1) + Int32Array.toString(view) == "10,10,20" + ``` + */ + @send + external copyAllWithin: (T.t, ~target: int) => array = "copyWithin" + + /** + `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`. + + Beware this will *mutate* the typed array. + + See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2, 3, 4]) + let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4) + Int32Array.toString(view) == "1,3,4,4" + ``` + */ + @send + external copyWithin: (T.t, ~target: int, ~start: int, ~end: int=?) => array = "copyWithin" + + /** + `fillAll(typedArray, value)` fills every element with `value`. + + Beware this will *mutate* the typed array. + + See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2, 3]) + let _ = Int32Array.fillAll(view, 9) + Int32Array.toString(view) == "9,9,9" + ``` + */ + @send + external fillAll: (T.t, T.elt) => T.t = "fill" + + /** + `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`. + + Beware this will *mutate* the typed array. + + See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2, 3, 4]) + let _ = Int32Array.fill(view, 0, ~start=1, ~end=3) + Int32Array.toString(view) == "1,0,0,4" + ``` + */ + @send + external fill: (T.t, T.elt, ~start: int, ~end: int=?) => T.t = "fill" + + /** + `reverse(typedArray)` reverses the elements of the view in place. + + Beware this will *mutate* the typed array. + + See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN. + */ + @send + external reverse: T.t => unit = "reverse" + + /** + `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched. + + See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2, 3]) + let reversed = Int32Array.toReversed(view) + Int32Array.toString(reversed) == "3,2,1" + Int32Array.toString(view) == "1,2,3" + ``` + */ + @send + external toReversed: T.t => T.t = "toReversed" + + /** + `sort(typedArray, comparator)` sorts the values in place using `comparator`. + + Beware this will *mutate* the typed array. + + See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN. + */ + @send + external sort: (T.t, (T.elt, T.elt) => Stdlib_Ordering.t) => unit = "sort" + + /** + `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched. + + See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([3, 1, 2]) + let sorted = Int32Array.toSorted(view, Int.compare) + Int32Array.toString(sorted) == "1,2,3" + Int32Array.toString(view) == "3,1,2" + ``` + */ + @send + external toSorted: (T.t, (T.elt, T.elt) => Stdlib_Ordering.t) => T.t = "toSorted" + + /** + `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`. + + See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2, 3]) + let updated = Int32Array.with(view, 1, 10) + Int32Array.toString(updated) == "1,10,3" + Int32Array.toString(view) == "1,2,3" + ``` + */ + @send + external with: (T.t, int, T.elt) => T.t = "with" + + /** + `includes(typedArray, value)` returns `true` if `value` occurs in the typed array. + + See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2, 3]) + Int32Array.includes(view, 2) == true + Int32Array.includes(view, 10) == false + ``` + */ + @send + external includes: (T.t, T.elt) => bool = "includes" + + /** + `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found. + + See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN. + */ + @send + external indexOf: (T.t, T.elt) => int = "indexOf" + + /** + `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`. + */ + @send + external indexOfFrom: (T.t, T.elt, int) => int = "indexOf" + + /** + `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`. + + See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN. + + ## Examples + + ```rescript + let view = Int32Array.fromArray([1, 2, 3]) + Int32Array.joinWith(view, "-") == "1-2-3" + ``` + */ + @send + external joinWith: (T.t, string) => string = "join" + + /** + `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found. + + See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN. + */ + @send + external lastIndexOf: (T.t, T.elt) => int = "lastIndexOf" + + /** + `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`. + */ + @send + external lastIndexOfFrom: (T.t, T.elt, int) => int = "lastIndexOf" + + /** + `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`. + + See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN. + */ + @send + external slice: (T.t, ~start: int, ~end: int=?) => T.t = "slice" + + /** + `copy(typedArray)` produces a shallow copy of the typed array. + */ + @send + external copy: T.t => T.t = "slice" + + /** + `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`. + + See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN. + */ + @send + external subarray: (T.t, ~start: int, ~end: int=?) => T.t = "subarray" + + /** + `toString(typedArray)` returns a comma-separated string of the elements. + + See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN. + + ## Examples + + ```rescript + Int32Array.fromArray([1, 2])->Int32Array.toString == "1,2" + ``` + */ + @send + external toString: T.t => string = "toString" + + /** + `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting. + + See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN. + */ + @send + external toLocaleString: T.t => string = "toLocaleString" + + /** + `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element. + + See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN. + */ + @send + external every: (T.t, T.elt => bool) => bool = "every" + + /** + `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`. + */ + @send + external everyWithIndex: (T.t, (T.elt, int) => bool) => bool = "every" + + /** + `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`. + + See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN. + */ + @send + external filter: (T.t, T.elt => bool) => T.t = "filter" + + /** + `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`. + */ + @send + external filterWithIndex: (T.t, (T.elt, int) => bool) => T.t = "filter" + + /** + `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches. + + See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN. + */ + @send + external find: (T.t, T.elt => bool) => option = "find" + + /** + `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index. + */ + @send + external findWithIndex: (T.t, (T.elt, int) => bool) => option = "find" + + /** + `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`. + + See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN. + */ + @send + external findLast: (T.t, T.elt => bool) => option = "findLast" + + /** + `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`. + */ + @send + external findLastWithIndex: (T.t, (T.elt, int) => bool) => option = "findLast" + + /** + `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do. + + See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN. + */ + @send + external findIndex: (T.t, T.elt => bool) => int = "findIndex" + + /** + `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`. + */ + @send + external findIndexWithIndex: (T.t, (T.elt, int) => bool) => int = "findIndex" + + /** + `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do. + + See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN. + */ + @send + external findLastIndex: (T.t, T.elt => bool) => int = "findLastIndex" + + /** + `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`. + */ + @send + external findLastIndexWithIndex: (T.t, (T.elt, int) => bool) => int = "findLastIndex" + + /** + `forEach(typedArray, f)` runs `f` for every element in order. + + See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN. + */ + @send + external forEach: (T.t, T.elt => unit) => unit = "forEach" + + /** + `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index. + */ + @send + external forEachWithIndex: (T.t, (T.elt, int) => unit) => unit = "forEach" + + /** + `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element. + + See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN. + */ + @send + external map: (T.t, T.elt => T.elt) => T.t = "map" + + /** + `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index. + */ + @send + external mapWithIndex: (T.t, (T.elt, int) => T.elt) => T.t = "map" + + /** + `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`. + + See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN. + */ + @send + external reduce: (T.t, ('b, T.elt) => 'b, 'b) => 'b = "reduce" + + /** + `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`. + */ + @send + external reduceWithIndex: (T.t, ('b, T.elt, int) => 'b, 'b) => 'b = "reduce" + + /** + `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left. + + See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN. + */ + @send + external reduceRight: (T.t, ('b, T.elt) => 'b, 'b) => 'b = "reduceRight" + + /** + `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`. + */ + @send + external reduceRightWithIndex: (T.t, ('b, T.elt, int) => 'b, 'b) => 'b = "reduceRight" + + /** + `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element. + + See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN. + */ + @send + external some: (T.t, T.elt => bool) => bool = "some" + + /** + `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index. + */ + @send + external someWithIndex: (T.t, (T.elt, int) => bool) => bool = "some" + + /** + `ignore(typedArray)` ignores the provided typedArray and returns unit. + + This helper is useful when you want to discard a value (for example, the result of an operation with side effects) + without having to store or process it further. + */ + external ignore: T.t => unit = "%ignore" +} diff --git a/packages/@rescript/runtime/Stdlib_Uint16Array.res b/packages/@rescript/runtime/Stdlib_Uint16Array.res index feb4eae0c69..7bd234b7f7d 100644 --- a/packages/@rescript/runtime/Stdlib_Uint16Array.res +++ b/packages/@rescript/runtime/Stdlib_Uint16Array.res @@ -1,7 +1,12 @@ /** The `Uint16Array` typed array represents an array of 16-bit unsigned integers in platform byte order. See [Uint16Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("Uint16Array") -type t = Stdlib_TypedArray.t +@instanceOf("Uint16Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = int +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_Uint32Array.res b/packages/@rescript/runtime/Stdlib_Uint32Array.res index 41ca7c40ae9..5b8d5f7ac42 100644 --- a/packages/@rescript/runtime/Stdlib_Uint32Array.res +++ b/packages/@rescript/runtime/Stdlib_Uint32Array.res @@ -1,7 +1,12 @@ /** The `Uint32Array` typed array represents an array of 32-bit unsigned integers in platform byte order. See [Uint32Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("Uint32Array") -type t = Stdlib_TypedArray.t +@instanceOf("Uint32Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = int +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_Uint8Array.res b/packages/@rescript/runtime/Stdlib_Uint8Array.res index 66964e5a527..861a4b65541 100644 --- a/packages/@rescript/runtime/Stdlib_Uint8Array.res +++ b/packages/@rescript/runtime/Stdlib_Uint8Array.res @@ -1,7 +1,12 @@ /** The `Uint8Array` typed array represents an array of 8-bit unsigned integers. See [Uint8Array on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("Uint8Array") -type t = Stdlib_TypedArray.t +@instanceOf("Uint8Array") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = int +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/Stdlib_Uint8ClampedArray.res b/packages/@rescript/runtime/Stdlib_Uint8ClampedArray.res index 79959c9d05c..1c8fe85164c 100644 --- a/packages/@rescript/runtime/Stdlib_Uint8ClampedArray.res +++ b/packages/@rescript/runtime/Stdlib_Uint8ClampedArray.res @@ -1,7 +1,12 @@ /** The `Uint8ClampedArray` typed array represents an array of 8-bit unsigned integers clamped to 0-255. See [Uint8ClampedArray on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) */ -@editor.completeFrom(Stdlib.TypedArray) @instanceOf("Uint8ClampedArray") -type t = Stdlib_TypedArray.t +@instanceOf("Uint8ClampedArray") +type t = private Stdlib_TypedArray.t + +include Stdlib_TypedArray.Impl({ + type t = t + type elt = int +}) module Constants = { /**`bytesPerElement` returns the element size. See [BYTES_PER_ELEMENT on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/BYTES_PER_ELEMENT) diff --git a/packages/@rescript/runtime/lib/es6/Stdlib_TypedArray.mjs b/packages/@rescript/runtime/lib/es6/Stdlib_TypedArray.mjs index ae1b9f17e65..841058f3bd1 100644 --- a/packages/@rescript/runtime/lib/es6/Stdlib_TypedArray.mjs +++ b/packages/@rescript/runtime/lib/es6/Stdlib_TypedArray.mjs @@ -1 +1,11 @@ -/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ + + + +function Impl(T) { + return {}; +} + +export { + Impl, +} +/* No side effect */ diff --git a/packages/@rescript/runtime/lib/js/Stdlib_TypedArray.cjs b/packages/@rescript/runtime/lib/js/Stdlib_TypedArray.cjs index ae1b9f17e65..e05b0c6e699 100644 --- a/packages/@rescript/runtime/lib/js/Stdlib_TypedArray.cjs +++ b/packages/@rescript/runtime/lib/js/Stdlib_TypedArray.cjs @@ -1 +1,9 @@ -/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ +'use strict'; + + +function Impl(T) { + return {}; +} + +exports.Impl = Impl; +/* No side effect */ diff --git a/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt b/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt index a779c6118cc..fada75b0878 100644 --- a/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt +++ b/tests/analysis_tests/tests/src/expected/CompletionTypedArrays.res.txt @@ -12,7 +12,6 @@ ContextPath Value[bigInt64Array] Path bigInt64Array CPPipe path_from_env:Stdlib.BigInt64Array found:false Path Stdlib.BigInt64Array. -Path Stdlib.TypedArray. Path [ { @@ -25,35 +24,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(bigIntArray)` ignores the provided bigIntArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->BigInt64Array.ignore", - "kind": 12, - "label": "->BigInt64Array.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 17, "line": 1 }, - "start": { "character": 16, "line": 1 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (bigint, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->BigInt64Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->BigInt64Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -67,14 +45,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, bigint) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->BigInt64Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->BigInt64Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -88,14 +66,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (bigint, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->BigInt64Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->BigInt64Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -109,14 +87,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, bigint => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->BigInt64Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->BigInt64Array.findLast", "sortText": "findLast", "tags": [] }, @@ -130,14 +108,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, bigint => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->BigInt64Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->BigInt64Array.filter", "sortText": "filter", "tags": [] }, @@ -151,14 +129,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->BigInt64Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->BigInt64Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -172,14 +150,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(bigIntArray)` ignores the provided bigIntArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->BigInt64Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->BigInt64Array.ignore", "sortText": "ignore", "tags": [] }, @@ -193,14 +171,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, bigint, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->BigInt64Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->BigInt64Array.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -214,14 +192,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, bigint) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->BigInt64Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->BigInt64Array.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -235,14 +213,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->BigInt64Array.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->BigInt64Array.joinWith", "sortText": "joinWith", "tags": [] }, @@ -256,14 +234,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->BigInt64Array.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->BigInt64Array.buffer", "sortText": "buffer", "tags": [] }, @@ -277,14 +255,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, bigint) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->BigInt64Array.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->BigInt64Array.reduce", "sortText": "reduce", "tags": [] }, @@ -298,14 +276,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (bigint, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->BigInt64Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->BigInt64Array.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -319,14 +297,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->BigInt64Array.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->BigInt64Array.copy", "sortText": "copy", "tags": [] }, @@ -340,14 +318,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (bigint, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->BigInt64Array.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->BigInt64Array.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -361,14 +339,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (bigint, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->BigInt64Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->BigInt64Array.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -382,36 +360,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" - }, - "insertText": "->TypedArray.sliceToEnd", - "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 17, "line": 1 }, - "start": { "character": 16, "line": 1 } - } - } - ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->BigInt64Array.slice", "kind": 12, - "label": "->TypedArray.slice", + "label": "->BigInt64Array.slice", "sortText": "slice", "tags": [] }, @@ -425,14 +381,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, bigint => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->BigInt64Array.findLastIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", + "label": "->BigInt64Array.findLastIndex", "sortText": "findLastIndex", "tags": [] }, @@ -446,14 +402,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, bigint) => bool", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->BigInt64Array.includes", "kind": 12, - "label": "->TypedArray.includes", + "label": "->BigInt64Array.includes", "sortText": "includes", "tags": [] }, @@ -467,36 +423,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" - }, - "insertText": "->TypedArray.fillToEnd", - "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 17, "line": 1 }, - "start": { "character": 16, "line": 1 } - } - } - ], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(t, bigint) => t", "documentation": { "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.fillAll", + "insertText": "->BigInt64Array.fillAll", "kind": 12, - "label": "->TypedArray.fillAll", + "label": "->BigInt64Array.fillAll", "sortText": "fillAll", "tags": [] }, @@ -510,14 +444,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, bigint => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->BigInt64Array.find", "kind": 12, - "label": "->TypedArray.find", + "label": "->BigInt64Array.find", "sortText": "find", "tags": [] }, @@ -531,36 +465,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" - }, - "insertText": "->TypedArray.subarrayToEnd", - "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 17, "line": 1 }, - "start": { "character": 16, "line": 1 } - } - } - ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, int, bigint) => unit", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.set", + "insertText": "->BigInt64Array.set", "kind": 12, - "label": "->TypedArray.set", + "label": "->BigInt64Array.set", "sortText": "set", "tags": [] }, @@ -574,14 +486,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->BigInt64Array.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->BigInt64Array.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -595,14 +507,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, bigint, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->BigInt64Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->BigInt64Array.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -616,14 +528,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, bigint => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->BigInt64Array.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->BigInt64Array.findIndex", "sortText": "findIndex", "tags": [] }, @@ -637,14 +549,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (bigint, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->BigInt64Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->BigInt64Array.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -658,14 +570,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (bigint, bigint) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->BigInt64Array.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->BigInt64Array.sort", "sortText": "sort", "tags": [] }, @@ -679,14 +591,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (bigint, int) => bigint) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->BigInt64Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->BigInt64Array.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -700,14 +612,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, bigint => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->BigInt64Array.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->BigInt64Array.every", "sortText": "every", "tags": [] }, @@ -721,14 +633,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->BigInt64Array.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->BigInt64Array.length", "sortText": "length", "tags": [] }, @@ -742,14 +654,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, bigint) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->BigInt64Array.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->BigInt64Array.indexOf", "sortText": "indexOf", "tags": [] }, @@ -763,36 +675,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" - }, - "insertText": "->TypedArray.copyWithinToEnd", - "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 17, "line": 1 }, - "start": { "character": 16, "line": 1 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, bigint => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.some", + "insertText": "->BigInt64Array.some", "kind": 12, - "label": "->TypedArray.some", + "label": "->BigInt64Array.some", "sortText": "some", "tags": [] }, @@ -806,14 +696,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, bigint, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->BigInt64Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->BigInt64Array.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -827,14 +717,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, bigint => bigint) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->BigInt64Array.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->BigInt64Array.map", "sortText": "map", "tags": [] }, @@ -848,14 +738,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (bigint, bigint) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->BigInt64Array.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->BigInt64Array.toSorted", "sortText": "toSorted", "tags": [] }, @@ -869,14 +759,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->BigInt64Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->BigInt64Array.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -890,14 +780,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->BigInt64Array.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->BigInt64Array.subarray", "sortText": "subarray", "tags": [] }, @@ -911,14 +801,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->BigInt64Array.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->BigInt64Array.setArray", "sortText": "setArray", "tags": [] }, @@ -932,14 +822,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->BigInt64Array.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->BigInt64Array.get", "sortText": "get", "tags": [] }, @@ -953,14 +843,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, bigint) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->BigInt64Array.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->BigInt64Array.with", "sortText": "with", "tags": [] }, @@ -974,14 +864,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->BigInt64Array.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->BigInt64Array.toReversed", "sortText": "toReversed", "tags": [] }, @@ -995,14 +885,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->BigInt64Array.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->BigInt64Array.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -1016,14 +906,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (bigint, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->BigInt64Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->BigInt64Array.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -1037,14 +927,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->BigInt64Array.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->BigInt64Array.toString", "sortText": "toString", "tags": [] }, @@ -1058,14 +948,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->BigInt64Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->BigInt64Array.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -1079,14 +969,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, bigint => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->BigInt64Array.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->BigInt64Array.forEach", "sortText": "forEach", "tags": [] }, @@ -1100,14 +990,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (bigint, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->BigInt64Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->BigInt64Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -1121,14 +1011,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, bigint, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->BigInt64Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->BigInt64Array.fill", "sortText": "fill", "tags": [] }, @@ -1142,14 +1032,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, bigint, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->BigInt64Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->BigInt64Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -1163,14 +1053,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->BigInt64Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->BigInt64Array.reverse", "sortText": "reverse", "tags": [] }, @@ -1184,14 +1074,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->BigInt64Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->BigInt64Array.byteOffset", "sortText": "byteOffset", "tags": [] } @@ -1211,7 +1101,6 @@ ContextPath Value[bigUint64Array] Path bigUint64Array CPPipe path_from_env:Stdlib.BigUint64Array found:false Path Stdlib.BigUint64Array. -Path Stdlib.TypedArray. Path [ { @@ -1224,35 +1113,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(bigUintArray)` ignores the provided bigUintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->BigUint64Array.ignore", - "kind": 12, - "label": "->BigUint64Array.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 18, "line": 5 }, - "start": { "character": 17, "line": 5 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (bigint, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->BigUint64Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->BigUint64Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -1266,14 +1134,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, bigint) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->BigUint64Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->BigUint64Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -1287,14 +1155,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (bigint, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->BigUint64Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->BigUint64Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -1308,14 +1176,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, bigint => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->BigUint64Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->BigUint64Array.findLast", "sortText": "findLast", "tags": [] }, @@ -1329,14 +1197,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, bigint => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->BigUint64Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->BigUint64Array.filter", "sortText": "filter", "tags": [] }, @@ -1350,14 +1218,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->BigUint64Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->BigUint64Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -1371,14 +1239,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(bigUintArray)` ignores the provided bigUintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->BigUint64Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->BigUint64Array.ignore", "sortText": "ignore", "tags": [] }, @@ -1392,14 +1260,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, bigint, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->BigUint64Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->BigUint64Array.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -1413,14 +1281,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, bigint) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->BigUint64Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->BigUint64Array.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -1434,14 +1302,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->BigUint64Array.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->BigUint64Array.joinWith", "sortText": "joinWith", "tags": [] }, @@ -1455,14 +1323,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->BigUint64Array.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->BigUint64Array.buffer", "sortText": "buffer", "tags": [] }, @@ -1476,14 +1344,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, bigint) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->BigUint64Array.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->BigUint64Array.reduce", "sortText": "reduce", "tags": [] }, @@ -1497,14 +1365,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (bigint, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->BigUint64Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->BigUint64Array.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -1518,14 +1386,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->BigUint64Array.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->BigUint64Array.copy", "sortText": "copy", "tags": [] }, @@ -1539,14 +1407,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (bigint, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->BigUint64Array.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->BigUint64Array.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -1560,14 +1428,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (bigint, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->BigUint64Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->BigUint64Array.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -1581,36 +1449,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" - }, - "insertText": "->TypedArray.sliceToEnd", - "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 18, "line": 5 }, - "start": { "character": 17, "line": 5 } - } - } - ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->BigUint64Array.slice", "kind": 12, - "label": "->TypedArray.slice", + "label": "->BigUint64Array.slice", "sortText": "slice", "tags": [] }, @@ -1624,14 +1470,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, bigint => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->BigUint64Array.findLastIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", + "label": "->BigUint64Array.findLastIndex", "sortText": "findLastIndex", "tags": [] }, @@ -1645,14 +1491,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, bigint) => bool", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->BigUint64Array.includes", "kind": 12, - "label": "->TypedArray.includes", + "label": "->BigUint64Array.includes", "sortText": "includes", "tags": [] }, @@ -1666,36 +1512,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" - }, - "insertText": "->TypedArray.fillToEnd", - "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 18, "line": 5 }, - "start": { "character": 17, "line": 5 } - } - } - ], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(t, bigint) => t", "documentation": { "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.fillAll", + "insertText": "->BigUint64Array.fillAll", "kind": 12, - "label": "->TypedArray.fillAll", + "label": "->BigUint64Array.fillAll", "sortText": "fillAll", "tags": [] }, @@ -1709,14 +1533,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, bigint => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->BigUint64Array.find", "kind": 12, - "label": "->TypedArray.find", + "label": "->BigUint64Array.find", "sortText": "find", "tags": [] }, @@ -1730,36 +1554,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" - }, - "insertText": "->TypedArray.subarrayToEnd", - "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 18, "line": 5 }, - "start": { "character": 17, "line": 5 } - } - } - ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, int, bigint) => unit", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.set", + "insertText": "->BigUint64Array.set", "kind": 12, - "label": "->TypedArray.set", + "label": "->BigUint64Array.set", "sortText": "set", "tags": [] }, @@ -1773,14 +1575,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->BigUint64Array.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->BigUint64Array.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -1794,14 +1596,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, bigint, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->BigUint64Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->BigUint64Array.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -1815,14 +1617,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, bigint => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->BigUint64Array.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->BigUint64Array.findIndex", "sortText": "findIndex", "tags": [] }, @@ -1836,14 +1638,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (bigint, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->BigUint64Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->BigUint64Array.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -1857,14 +1659,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (bigint, bigint) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->BigUint64Array.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->BigUint64Array.sort", "sortText": "sort", "tags": [] }, @@ -1878,14 +1680,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (bigint, int) => bigint) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->BigUint64Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->BigUint64Array.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -1899,14 +1701,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, bigint => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->BigUint64Array.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->BigUint64Array.every", "sortText": "every", "tags": [] }, @@ -1920,14 +1722,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->BigUint64Array.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->BigUint64Array.length", "sortText": "length", "tags": [] }, @@ -1941,14 +1743,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, bigint) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->BigUint64Array.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->BigUint64Array.indexOf", "sortText": "indexOf", "tags": [] }, @@ -1962,36 +1764,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" - }, - "insertText": "->TypedArray.copyWithinToEnd", - "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 18, "line": 5 }, - "start": { "character": 17, "line": 5 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, bigint => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.some", + "insertText": "->BigUint64Array.some", "kind": 12, - "label": "->TypedArray.some", + "label": "->BigUint64Array.some", "sortText": "some", "tags": [] }, @@ -2005,14 +1785,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, bigint, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->BigUint64Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->BigUint64Array.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -2026,14 +1806,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, bigint => bigint) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->BigUint64Array.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->BigUint64Array.map", "sortText": "map", "tags": [] }, @@ -2047,14 +1827,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (bigint, bigint) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->BigUint64Array.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->BigUint64Array.toSorted", "sortText": "toSorted", "tags": [] }, @@ -2068,14 +1848,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->BigUint64Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->BigUint64Array.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -2089,14 +1869,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->BigUint64Array.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->BigUint64Array.subarray", "sortText": "subarray", "tags": [] }, @@ -2110,14 +1890,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->BigUint64Array.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->BigUint64Array.setArray", "sortText": "setArray", "tags": [] }, @@ -2131,14 +1911,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->BigUint64Array.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->BigUint64Array.get", "sortText": "get", "tags": [] }, @@ -2152,14 +1932,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, bigint) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->BigUint64Array.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->BigUint64Array.with", "sortText": "with", "tags": [] }, @@ -2173,14 +1953,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->BigUint64Array.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->BigUint64Array.toReversed", "sortText": "toReversed", "tags": [] }, @@ -2194,14 +1974,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->BigUint64Array.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->BigUint64Array.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -2215,14 +1995,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (bigint, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->BigUint64Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->BigUint64Array.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -2236,14 +2016,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->BigUint64Array.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->BigUint64Array.toString", "sortText": "toString", "tags": [] }, @@ -2257,14 +2037,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->BigUint64Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->BigUint64Array.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -2278,14 +2058,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, bigint => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->BigUint64Array.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->BigUint64Array.forEach", "sortText": "forEach", "tags": [] }, @@ -2299,14 +2079,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (bigint, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->BigUint64Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->BigUint64Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -2320,14 +2100,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, bigint, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->BigUint64Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->BigUint64Array.fill", "sortText": "fill", "tags": [] }, @@ -2341,14 +2121,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, bigint, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->BigUint64Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->BigUint64Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -2362,14 +2142,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->BigUint64Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->BigUint64Array.reverse", "sortText": "reverse", "tags": [] }, @@ -2383,14 +2163,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->BigUint64Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->BigUint64Array.byteOffset", "sortText": "byteOffset", "tags": [] } @@ -2410,7 +2190,6 @@ ContextPath Value[float32Array] Path float32Array CPPipe path_from_env:Stdlib.Float32Array found:false Path Stdlib.Float32Array. -Path Stdlib.TypedArray. Path [ { @@ -2423,35 +2202,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(floatArray)` ignores the provided floatArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->Float32Array.ignore", - "kind": 12, - "label": "->Float32Array.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 9 }, - "start": { "character": 15, "line": 9 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (float, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->Float32Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->Float32Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -2465,14 +2223,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, float) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->Float32Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->Float32Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -2486,14 +2244,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (float, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->Float32Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->Float32Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -2507,14 +2265,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, float => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->Float32Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->Float32Array.findLast", "sortText": "findLast", "tags": [] }, @@ -2528,14 +2286,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, float => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->Float32Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->Float32Array.filter", "sortText": "filter", "tags": [] }, @@ -2549,14 +2307,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->Float32Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->Float32Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -2570,14 +2328,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(floatArray)` ignores the provided floatArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->Float32Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->Float32Array.ignore", "sortText": "ignore", "tags": [] }, @@ -2591,14 +2349,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, float, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->Float32Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->Float32Array.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -2612,14 +2370,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, float) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->Float32Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->Float32Array.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -2633,14 +2391,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->Float32Array.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->Float32Array.joinWith", "sortText": "joinWith", "tags": [] }, @@ -2654,14 +2412,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->Float32Array.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->Float32Array.buffer", "sortText": "buffer", "tags": [] }, @@ -2675,14 +2433,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, float) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->Float32Array.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->Float32Array.reduce", "sortText": "reduce", "tags": [] }, @@ -2696,14 +2454,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (float, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->Float32Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->Float32Array.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -2717,14 +2475,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->Float32Array.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->Float32Array.copy", "sortText": "copy", "tags": [] }, @@ -2738,14 +2496,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (float, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->Float32Array.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->Float32Array.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -2759,14 +2517,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (float, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->Float32Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->Float32Array.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -2780,17 +2538,16 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.sliceToEnd", + "insertText": "->Float32Array.slice", "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] + "label": "->Float32Array.slice", + "sortText": "slice", + "tags": [] }, { "additionalTextEdits": [ @@ -2802,15 +2559,15 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, float => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->Float32Array.findLastIndex", "kind": 12, - "label": "->TypedArray.slice", - "sortText": "slice", + "label": "->Float32Array.findLastIndex", + "sortText": "findLastIndex", "tags": [] }, { @@ -2823,15 +2580,15 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, float) => bool", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->Float32Array.includes", "kind": 12, - "label": "->TypedArray.findLastIndex", - "sortText": "findLastIndex", + "label": "->Float32Array.includes", + "sortText": "includes", "tags": [] }, { @@ -2844,15 +2601,15 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, float) => t", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->Float32Array.fillAll", "kind": 12, - "label": "->TypedArray.includes", - "sortText": "includes", + "label": "->Float32Array.fillAll", + "sortText": "fillAll", "tags": [] }, { @@ -2865,17 +2622,16 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", + "detail": "(t, float => bool) => option", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.fillToEnd", + "insertText": "->Float32Array.find", "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] + "label": "->Float32Array.find", + "sortText": "find", + "tags": [] }, { "additionalTextEdits": [ @@ -2887,15 +2643,15 @@ Path } } ], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(t, int, float) => unit", "documentation": { "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.fillAll", + "insertText": "->Float32Array.set", "kind": 12, - "label": "->TypedArray.fillAll", - "sortText": "fillAll", + "label": "->Float32Array.set", + "sortText": "set", "tags": [] }, { @@ -2908,15 +2664,15 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->Float32Array.toLocaleString", "kind": 12, - "label": "->TypedArray.find", - "sortText": "find", + "label": "->Float32Array.toLocaleString", + "sortText": "toLocaleString", "tags": [] }, { @@ -2929,17 +2685,16 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", + "detail": "(t, float, int) => int", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.subarrayToEnd", + "insertText": "->Float32Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] + "label": "->Float32Array.lastIndexOfFrom", + "sortText": "lastIndexOfFrom", + "tags": [] }, { "additionalTextEdits": [ @@ -2951,15 +2706,15 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, float => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.set", + "insertText": "->Float32Array.findIndex", "kind": 12, - "label": "->TypedArray.set", - "sortText": "set", + "label": "->Float32Array.findIndex", + "sortText": "findIndex", "tags": [] }, { @@ -2972,15 +2727,15 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "(t, (float, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->Float32Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.toLocaleString", - "sortText": "toLocaleString", + "label": "->Float32Array.filterWithIndex", + "sortText": "filterWithIndex", "tags": [] }, { @@ -2993,15 +2748,15 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, (float, float) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->Float32Array.sort", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", - "sortText": "lastIndexOfFrom", + "label": "->Float32Array.sort", + "sortText": "sort", "tags": [] }, { @@ -3014,15 +2769,15 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, (float, int) => float) => t", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->Float32Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.findIndex", - "sortText": "findIndex", + "label": "->Float32Array.mapWithIndex", + "sortText": "mapWithIndex", "tags": [] }, { @@ -3035,15 +2790,15 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, float => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->Float32Array.every", "kind": 12, - "label": "->TypedArray.filterWithIndex", - "sortText": "filterWithIndex", + "label": "->Float32Array.every", + "sortText": "every", "tags": [] }, { @@ -3056,15 +2811,15 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->Float32Array.length", "kind": 12, - "label": "->TypedArray.sort", - "sortText": "sort", + "label": "->Float32Array.length", + "sortText": "length", "tags": [] }, { @@ -3077,15 +2832,15 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, float) => int", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->Float32Array.indexOf", "kind": 12, - "label": "->TypedArray.mapWithIndex", - "sortText": "mapWithIndex", + "label": "->Float32Array.indexOf", + "sortText": "indexOf", "tags": [] }, { @@ -3098,15 +2853,15 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, float => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->Float32Array.some", "kind": 12, - "label": "->TypedArray.every", - "sortText": "every", + "label": "->Float32Array.some", + "sortText": "some", "tags": [] }, { @@ -3119,15 +2874,15 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "(t, ('b, float, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.length", + "insertText": "->Float32Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.length", - "sortText": "length", + "label": "->Float32Array.reduceWithIndex", + "sortText": "reduceWithIndex", "tags": [] }, { @@ -3140,15 +2895,15 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, float => float) => t", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->Float32Array.map", "kind": 12, - "label": "->TypedArray.indexOf", - "sortText": "indexOf", + "label": "->Float32Array.map", + "sortText": "map", "tags": [] }, { @@ -3161,17 +2916,16 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", + "detail": "(t, (float, float) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.copyWithinToEnd", + "insertText": "->Float32Array.toSorted", "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] + "label": "->Float32Array.toSorted", + "sortText": "toSorted", + "tags": [] }, { "additionalTextEdits": [ @@ -3183,15 +2937,15 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.some", + "insertText": "->Float32Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.some", - "sortText": "some", + "label": "->Float32Array.copyAllWithin", + "sortText": "copyAllWithin", "tags": [] }, { @@ -3204,15 +2958,15 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->Float32Array.subarray", "kind": 12, - "label": "->TypedArray.reduceWithIndex", - "sortText": "reduceWithIndex", + "label": "->Float32Array.subarray", + "sortText": "subarray", "tags": [] }, { @@ -3225,15 +2979,15 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.map", + "insertText": "->Float32Array.setArray", "kind": 12, - "label": "->TypedArray.map", - "sortText": "map", + "label": "->Float32Array.setArray", + "sortText": "setArray", "tags": [] }, { @@ -3246,15 +3000,15 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->Float32Array.get", "kind": 12, - "label": "->TypedArray.toSorted", - "sortText": "toSorted", + "label": "->Float32Array.get", + "sortText": "get", "tags": [] }, { @@ -3267,15 +3021,15 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, int, float) => t", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->Float32Array.with", "kind": 12, - "label": "->TypedArray.copyAllWithin", - "sortText": "copyAllWithin", + "label": "->Float32Array.with", + "sortText": "with", "tags": [] }, { @@ -3288,15 +3042,15 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->Float32Array.toReversed", "kind": 12, - "label": "->TypedArray.subarray", - "sortText": "subarray", + "label": "->Float32Array.toReversed", + "sortText": "toReversed", "tags": [] }, { @@ -3309,15 +3063,15 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->Float32Array.copyWithin", "kind": 12, - "label": "->TypedArray.setArray", - "sortText": "setArray", + "label": "->Float32Array.copyWithin", + "sortText": "copyWithin", "tags": [] }, { @@ -3330,15 +3084,15 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, (float, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.get", + "insertText": "->Float32Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.get", - "sortText": "get", + "label": "->Float32Array.everyWithIndex", + "sortText": "everyWithIndex", "tags": [] }, { @@ -3351,15 +3105,15 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->Float32Array.toString", "kind": 12, - "label": "->TypedArray.with", - "sortText": "with", + "label": "->Float32Array.toString", + "sortText": "toString", "tags": [] }, { @@ -3372,15 +3126,15 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->Float32Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.toReversed", - "sortText": "toReversed", + "label": "->Float32Array.setArrayFrom", + "sortText": "setArrayFrom", "tags": [] }, { @@ -3393,98 +3147,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, float => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->Float32Array.forEach", "kind": 12, - "label": "->TypedArray.copyWithin", - "sortText": "copyWithin", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 9 }, - "start": { "character": 15, "line": 9 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => bool", - "documentation": { - "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" - }, - "insertText": "->TypedArray.everyWithIndex", - "kind": 12, - "label": "->TypedArray.everyWithIndex", - "sortText": "everyWithIndex", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 9 }, - "start": { "character": 15, "line": 9 } - } - } - ], - "detail": "t<'a> => string", - "documentation": { - "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" - }, - "insertText": "->TypedArray.toString", - "kind": 12, - "label": "->TypedArray.toString", - "sortText": "toString", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 9 }, - "start": { "character": 15, "line": 9 } - } - } - ], - "detail": "(t<'a>, array<'a>, int) => unit", - "documentation": { - "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" - }, - "insertText": "->TypedArray.setArrayFrom", - "kind": 12, - "label": "->TypedArray.setArrayFrom", - "sortText": "setArrayFrom", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 9 }, - "start": { "character": 15, "line": 9 } - } - } - ], - "detail": "(t<'a>, 'a => unit) => unit", - "documentation": { - "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" - }, - "insertText": "->TypedArray.forEach", - "kind": 12, - "label": "->TypedArray.forEach", + "label": "->Float32Array.forEach", "sortText": "forEach", "tags": [] }, @@ -3498,14 +3168,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (float, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->Float32Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->Float32Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -3519,14 +3189,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, float, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->Float32Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->Float32Array.fill", "sortText": "fill", "tags": [] }, @@ -3540,14 +3210,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, float, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->Float32Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->Float32Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -3561,14 +3231,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->Float32Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->Float32Array.reverse", "sortText": "reverse", "tags": [] }, @@ -3582,14 +3252,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->Float32Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->Float32Array.byteOffset", "sortText": "byteOffset", "tags": [] } @@ -3609,7 +3279,6 @@ ContextPath Value[float64Array] Path float64Array CPPipe path_from_env:Stdlib.Float64Array found:false Path Stdlib.Float64Array. -Path Stdlib.TypedArray. Path [ { @@ -3622,35 +3291,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(floatArray)` ignores the provided floatArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->Float64Array.ignore", - "kind": 12, - "label": "->Float64Array.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 13 }, - "start": { "character": 15, "line": 13 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (float, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->Float64Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->Float64Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -3664,14 +3312,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, float) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->Float64Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->Float64Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -3685,14 +3333,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (float, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->Float64Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->Float64Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -3706,14 +3354,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, float => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->Float64Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->Float64Array.findLast", "sortText": "findLast", "tags": [] }, @@ -3727,14 +3375,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, float => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->Float64Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->Float64Array.filter", "sortText": "filter", "tags": [] }, @@ -3748,14 +3396,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->Float64Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->Float64Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -3769,14 +3417,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(floatArray)` ignores the provided floatArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->Float64Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->Float64Array.ignore", "sortText": "ignore", "tags": [] }, @@ -3790,14 +3438,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, float, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->Float64Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->Float64Array.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -3811,14 +3459,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, float) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->Float64Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->Float64Array.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -3832,14 +3480,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->Float64Array.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->Float64Array.joinWith", "sortText": "joinWith", "tags": [] }, @@ -3853,14 +3501,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->Float64Array.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->Float64Array.buffer", "sortText": "buffer", "tags": [] }, @@ -3874,14 +3522,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, float) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->Float64Array.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->Float64Array.reduce", "sortText": "reduce", "tags": [] }, @@ -3895,14 +3543,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (float, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->Float64Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->Float64Array.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -3916,14 +3564,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->Float64Array.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->Float64Array.copy", "sortText": "copy", "tags": [] }, @@ -3937,14 +3585,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (float, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->Float64Array.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->Float64Array.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -3958,14 +3606,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (float, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->Float64Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->Float64Array.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -3979,36 +3627,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" - }, - "insertText": "->TypedArray.sliceToEnd", - "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 13 }, - "start": { "character": 15, "line": 13 } - } - } - ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->Float64Array.slice", "kind": 12, - "label": "->TypedArray.slice", + "label": "->Float64Array.slice", "sortText": "slice", "tags": [] }, @@ -4022,14 +3648,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, float => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->Float64Array.findLastIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", + "label": "->Float64Array.findLastIndex", "sortText": "findLastIndex", "tags": [] }, @@ -4043,14 +3669,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, float) => bool", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->Float64Array.includes", "kind": 12, - "label": "->TypedArray.includes", + "label": "->Float64Array.includes", "sortText": "includes", "tags": [] }, @@ -4064,36 +3690,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", + "detail": "(t, float) => t", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.fillToEnd", + "insertText": "->Float64Array.fillAll", "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 13 }, - "start": { "character": 15, "line": 13 } - } - } - ], - "detail": "(t<'a>, 'a) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" - }, - "insertText": "->TypedArray.fillAll", - "kind": 12, - "label": "->TypedArray.fillAll", + "label": "->Float64Array.fillAll", "sortText": "fillAll", "tags": [] }, @@ -4107,14 +3711,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, float => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->Float64Array.find", "kind": 12, - "label": "->TypedArray.find", + "label": "->Float64Array.find", "sortText": "find", "tags": [] }, @@ -4128,36 +3732,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" - }, - "insertText": "->TypedArray.subarrayToEnd", - "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 13 }, - "start": { "character": 15, "line": 13 } - } - } - ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, int, float) => unit", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.set", + "insertText": "->Float64Array.set", "kind": 12, - "label": "->TypedArray.set", + "label": "->Float64Array.set", "sortText": "set", "tags": [] }, @@ -4171,14 +3753,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->Float64Array.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->Float64Array.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -4192,14 +3774,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, float, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->Float64Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->Float64Array.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -4213,14 +3795,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, float => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->Float64Array.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->Float64Array.findIndex", "sortText": "findIndex", "tags": [] }, @@ -4234,14 +3816,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (float, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->Float64Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->Float64Array.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -4255,14 +3837,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (float, float) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->Float64Array.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->Float64Array.sort", "sortText": "sort", "tags": [] }, @@ -4276,14 +3858,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (float, int) => float) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->Float64Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->Float64Array.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -4297,14 +3879,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, float => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->Float64Array.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->Float64Array.every", "sortText": "every", "tags": [] }, @@ -4318,14 +3900,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->Float64Array.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->Float64Array.length", "sortText": "length", "tags": [] }, @@ -4339,14 +3921,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, float) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->Float64Array.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->Float64Array.indexOf", "sortText": "indexOf", "tags": [] }, @@ -4360,36 +3942,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", + "detail": "(t, float => bool) => bool", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.copyWithinToEnd", + "insertText": "->Float64Array.some", "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 16, "line": 13 }, - "start": { "character": 15, "line": 13 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", - "documentation": { - "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" - }, - "insertText": "->TypedArray.some", - "kind": 12, - "label": "->TypedArray.some", + "label": "->Float64Array.some", "sortText": "some", "tags": [] }, @@ -4403,14 +3963,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, float, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->Float64Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->Float64Array.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -4424,14 +3984,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, float => float) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->Float64Array.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->Float64Array.map", "sortText": "map", "tags": [] }, @@ -4445,14 +4005,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (float, float) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->Float64Array.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->Float64Array.toSorted", "sortText": "toSorted", "tags": [] }, @@ -4466,14 +4026,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->Float64Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->Float64Array.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -4487,14 +4047,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->Float64Array.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->Float64Array.subarray", "sortText": "subarray", "tags": [] }, @@ -4508,14 +4068,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->Float64Array.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->Float64Array.setArray", "sortText": "setArray", "tags": [] }, @@ -4529,14 +4089,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->Float64Array.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->Float64Array.get", "sortText": "get", "tags": [] }, @@ -4550,14 +4110,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, float) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->Float64Array.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->Float64Array.with", "sortText": "with", "tags": [] }, @@ -4571,14 +4131,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->Float64Array.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->Float64Array.toReversed", "sortText": "toReversed", "tags": [] }, @@ -4592,14 +4152,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->Float64Array.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->Float64Array.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -4613,14 +4173,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (float, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->Float64Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->Float64Array.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -4634,14 +4194,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->Float64Array.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->Float64Array.toString", "sortText": "toString", "tags": [] }, @@ -4655,14 +4215,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->Float64Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->Float64Array.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -4676,14 +4236,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, float => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->Float64Array.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->Float64Array.forEach", "sortText": "forEach", "tags": [] }, @@ -4697,14 +4257,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (float, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->Float64Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->Float64Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -4718,14 +4278,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, float, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->Float64Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->Float64Array.fill", "sortText": "fill", "tags": [] }, @@ -4739,14 +4299,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, float, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->Float64Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->Float64Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -4760,14 +4320,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->Float64Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->Float64Array.reverse", "sortText": "reverse", "tags": [] }, @@ -4781,14 +4341,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->Float64Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->Float64Array.byteOffset", "sortText": "byteOffset", "tags": [] } @@ -4808,7 +4368,6 @@ ContextPath Value[int16Array] Path int16Array CPPipe path_from_env:Stdlib.Int16Array found:false Path Stdlib.Int16Array. -Path Stdlib.TypedArray. Path [ { @@ -4821,35 +4380,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(intArray)` ignores the provided intArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->Int16Array.ignore", - "kind": 12, - "label": "->Int16Array.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 17 }, - "start": { "character": 13, "line": 17 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->Int16Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->Int16Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -4863,14 +4401,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->Int16Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->Int16Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -4884,14 +4422,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->Int16Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->Int16Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -4905,14 +4443,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->Int16Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->Int16Array.findLast", "sortText": "findLast", "tags": [] }, @@ -4926,14 +4464,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, int => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->Int16Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->Int16Array.filter", "sortText": "filter", "tags": [] }, @@ -4947,14 +4485,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->Int16Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->Int16Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -4968,14 +4506,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(intArray)` ignores the provided intArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->Int16Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->Int16Array.ignore", "sortText": "ignore", "tags": [] }, @@ -4989,14 +4527,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->Int16Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->Int16Array.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -5010,14 +4548,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->Int16Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->Int16Array.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -5031,14 +4569,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->Int16Array.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->Int16Array.joinWith", "sortText": "joinWith", "tags": [] }, @@ -5052,14 +4590,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->Int16Array.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->Int16Array.buffer", "sortText": "buffer", "tags": [] }, @@ -5073,14 +4611,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->Int16Array.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->Int16Array.reduce", "sortText": "reduce", "tags": [] }, @@ -5094,14 +4632,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (int, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->Int16Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->Int16Array.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -5115,14 +4653,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->Int16Array.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->Int16Array.copy", "sortText": "copy", "tags": [] }, @@ -5136,14 +4674,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->Int16Array.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->Int16Array.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -5157,14 +4695,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->Int16Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->Int16Array.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -5178,36 +4716,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" - }, - "insertText": "->TypedArray.sliceToEnd", - "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 17 }, - "start": { "character": 13, "line": 17 } - } - } - ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->Int16Array.slice", "kind": 12, - "label": "->TypedArray.slice", + "label": "->Int16Array.slice", "sortText": "slice", "tags": [] }, @@ -5221,14 +4737,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->Int16Array.findLastIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", + "label": "->Int16Array.findLastIndex", "sortText": "findLastIndex", "tags": [] }, @@ -5242,14 +4758,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, int) => bool", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->Int16Array.includes", "kind": 12, - "label": "->TypedArray.includes", + "label": "->Int16Array.includes", "sortText": "includes", "tags": [] }, @@ -5263,36 +4779,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", + "detail": "(t, int) => t", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.fillToEnd", + "insertText": "->Int16Array.fillAll", "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 17 }, - "start": { "character": 13, "line": 17 } - } - } - ], - "detail": "(t<'a>, 'a) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" - }, - "insertText": "->TypedArray.fillAll", - "kind": 12, - "label": "->TypedArray.fillAll", + "label": "->Int16Array.fillAll", "sortText": "fillAll", "tags": [] }, @@ -5306,14 +4800,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->Int16Array.find", "kind": 12, - "label": "->TypedArray.find", + "label": "->Int16Array.find", "sortText": "find", "tags": [] }, @@ -5327,36 +4821,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", + "detail": "(t, int, int) => unit", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.subarrayToEnd", + "insertText": "->Int16Array.set", "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 17 }, - "start": { "character": 13, "line": 17 } - } - } - ], - "detail": "(t<'a>, int, 'a) => unit", - "documentation": { - "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" - }, - "insertText": "->TypedArray.set", - "kind": 12, - "label": "->TypedArray.set", + "label": "->Int16Array.set", "sortText": "set", "tags": [] }, @@ -5370,14 +4842,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->Int16Array.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->Int16Array.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -5391,14 +4863,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->Int16Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->Int16Array.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -5412,14 +4884,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->Int16Array.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->Int16Array.findIndex", "sortText": "findIndex", "tags": [] }, @@ -5433,14 +4905,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (int, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->Int16Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->Int16Array.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -5454,14 +4926,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (int, int) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->Int16Array.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->Int16Array.sort", "sortText": "sort", "tags": [] }, @@ -5475,14 +4947,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (int, int) => int) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->Int16Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->Int16Array.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -5496,14 +4968,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->Int16Array.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->Int16Array.every", "sortText": "every", "tags": [] }, @@ -5517,14 +4989,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->Int16Array.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->Int16Array.length", "sortText": "length", "tags": [] }, @@ -5538,14 +5010,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->Int16Array.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->Int16Array.indexOf", "sortText": "indexOf", "tags": [] }, @@ -5559,36 +5031,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" - }, - "insertText": "->TypedArray.copyWithinToEnd", - "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 17 }, - "start": { "character": 13, "line": 17 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.some", + "insertText": "->Int16Array.some", "kind": 12, - "label": "->TypedArray.some", + "label": "->Int16Array.some", "sortText": "some", "tags": [] }, @@ -5602,14 +5052,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->Int16Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->Int16Array.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -5623,14 +5073,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, int => int) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->Int16Array.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->Int16Array.map", "sortText": "map", "tags": [] }, @@ -5644,14 +5094,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (int, int) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->Int16Array.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->Int16Array.toSorted", "sortText": "toSorted", "tags": [] }, @@ -5665,14 +5115,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->Int16Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->Int16Array.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -5686,14 +5136,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->Int16Array.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->Int16Array.subarray", "sortText": "subarray", "tags": [] }, @@ -5707,14 +5157,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->Int16Array.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->Int16Array.setArray", "sortText": "setArray", "tags": [] }, @@ -5728,14 +5178,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->Int16Array.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->Int16Array.get", "sortText": "get", "tags": [] }, @@ -5749,14 +5199,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, int) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->Int16Array.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->Int16Array.with", "sortText": "with", "tags": [] }, @@ -5770,14 +5220,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->Int16Array.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->Int16Array.toReversed", "sortText": "toReversed", "tags": [] }, @@ -5791,14 +5241,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->Int16Array.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->Int16Array.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -5812,14 +5262,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->Int16Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->Int16Array.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -5833,14 +5283,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->Int16Array.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->Int16Array.toString", "sortText": "toString", "tags": [] }, @@ -5854,14 +5304,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->Int16Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->Int16Array.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -5875,14 +5325,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, int => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->Int16Array.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->Int16Array.forEach", "sortText": "forEach", "tags": [] }, @@ -5896,14 +5346,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->Int16Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->Int16Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -5917,14 +5367,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, int, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->Int16Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->Int16Array.fill", "sortText": "fill", "tags": [] }, @@ -5938,14 +5388,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->Int16Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->Int16Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -5959,14 +5409,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->Int16Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->Int16Array.reverse", "sortText": "reverse", "tags": [] }, @@ -5980,14 +5430,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->Int16Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->Int16Array.byteOffset", "sortText": "byteOffset", "tags": [] } @@ -6007,7 +5457,6 @@ ContextPath Value[int32Array] Path int32Array CPPipe path_from_env:Stdlib.Int32Array found:false Path Stdlib.Int32Array. -Path Stdlib.TypedArray. Path [ { @@ -6020,35 +5469,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(intArray)` ignores the provided intArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->Int32Array.ignore", - "kind": 12, - "label": "->Int32Array.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 21 }, - "start": { "character": 13, "line": 21 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->Int32Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->Int32Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -6062,14 +5490,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->Int32Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->Int32Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -6083,14 +5511,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->Int32Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->Int32Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -6104,14 +5532,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->Int32Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->Int32Array.findLast", "sortText": "findLast", "tags": [] }, @@ -6125,14 +5553,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, int => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->Int32Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->Int32Array.filter", "sortText": "filter", "tags": [] }, @@ -6146,14 +5574,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->Int32Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->Int32Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -6167,14 +5595,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(intArray)` ignores the provided intArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->Int32Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->Int32Array.ignore", "sortText": "ignore", "tags": [] }, @@ -6188,78 +5616,15 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", - "documentation": { - "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" - }, - "insertText": "->TypedArray.reduceRightWithIndex", - "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", - "sortText": "reduceRightWithIndex", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 21 }, - "start": { "character": 13, "line": 21 } - } - } - ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", - "documentation": { - "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" - }, - "insertText": "->TypedArray.reduceRight", - "kind": 12, - "label": "->TypedArray.reduceRight", - "sortText": "reduceRight", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 21 }, - "start": { "character": 13, "line": 21 } - } - } - ], - "detail": "(t<'a>, string) => string", - "documentation": { - "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" - }, - "insertText": "->TypedArray.joinWith", - "kind": 12, - "label": "->TypedArray.joinWith", - "sortText": "joinWith", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 21 }, - "start": { "character": 13, "line": 21 } - } - } - ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->Int32Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.buffer", - "sortText": "buffer", + "label": "->Int32Array.reduceRightWithIndex", + "sortText": "reduceRightWithIndex", "tags": [] }, { @@ -6272,15 +5637,15 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->Int32Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduce", - "sortText": "reduce", + "label": "->Int32Array.reduceRight", + "sortText": "reduceRight", "tags": [] }, { @@ -6293,15 +5658,15 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->Int32Array.joinWith", "kind": 12, - "label": "->TypedArray.forEachWithIndex", - "sortText": "forEachWithIndex", + "label": "->Int32Array.joinWith", + "sortText": "joinWith", "tags": [] }, { @@ -6314,15 +5679,15 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->Int32Array.buffer", "kind": 12, - "label": "->TypedArray.copy", - "sortText": "copy", + "label": "->Int32Array.buffer", + "sortText": "buffer", "tags": [] }, { @@ -6335,15 +5700,15 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->Int32Array.reduce", "kind": 12, - "label": "->TypedArray.someWithIndex", - "sortText": "someWithIndex", + "label": "->Int32Array.reduce", + "sortText": "reduce", "tags": [] }, { @@ -6356,15 +5721,15 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->Int32Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", - "sortText": "findIndexWithIndex", + "label": "->Int32Array.forEachWithIndex", + "sortText": "forEachWithIndex", "tags": [] }, { @@ -6377,17 +5742,16 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.sliceToEnd", + "insertText": "->Int32Array.copy", "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] + "label": "->Int32Array.copy", + "sortText": "copy", + "tags": [] }, { "additionalTextEdits": [ @@ -6399,15 +5763,15 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->Int32Array.someWithIndex", "kind": 12, - "label": "->TypedArray.slice", - "sortText": "slice", + "label": "->Int32Array.someWithIndex", + "sortText": "someWithIndex", "tags": [] }, { @@ -6420,15 +5784,15 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->Int32Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", - "sortText": "findLastIndex", + "label": "->Int32Array.findIndexWithIndex", + "sortText": "findIndexWithIndex", "tags": [] }, { @@ -6441,15 +5805,15 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->Int32Array.slice", "kind": 12, - "label": "->TypedArray.includes", - "sortText": "includes", + "label": "->Int32Array.slice", + "sortText": "slice", "tags": [] }, { @@ -6462,17 +5826,16 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.fillToEnd", + "insertText": "->Int32Array.findLastIndex", "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] + "label": "->Int32Array.findLastIndex", + "sortText": "findLastIndex", + "tags": [] }, { "additionalTextEdits": [ @@ -6484,15 +5847,15 @@ Path } } ], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(t, int) => bool", "documentation": { "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.fillAll", + "insertText": "->Int32Array.includes", "kind": 12, - "label": "->TypedArray.fillAll", - "sortText": "fillAll", + "label": "->Int32Array.includes", + "sortText": "includes", "tags": [] }, { @@ -6505,15 +5868,15 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int) => t", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.find", + "insertText": "->Int32Array.fillAll", "kind": 12, - "label": "->TypedArray.find", - "sortText": "find", + "label": "->Int32Array.fillAll", + "sortText": "fillAll", "tags": [] }, { @@ -6526,17 +5889,16 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.subarrayToEnd", + "insertText": "->Int32Array.find", "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] + "label": "->Int32Array.find", + "sortText": "find", + "tags": [] }, { "additionalTextEdits": [ @@ -6548,14 +5910,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, int, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.set", + "insertText": "->Int32Array.set", "kind": 12, - "label": "->TypedArray.set", + "label": "->Int32Array.set", "sortText": "set", "tags": [] }, @@ -6569,14 +5931,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->Int32Array.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->Int32Array.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -6590,14 +5952,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->Int32Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->Int32Array.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -6611,14 +5973,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->Int32Array.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->Int32Array.findIndex", "sortText": "findIndex", "tags": [] }, @@ -6632,14 +5994,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (int, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->Int32Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->Int32Array.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -6653,14 +6015,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (int, int) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->Int32Array.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->Int32Array.sort", "sortText": "sort", "tags": [] }, @@ -6674,14 +6036,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (int, int) => int) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->Int32Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->Int32Array.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -6695,14 +6057,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->Int32Array.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->Int32Array.every", "sortText": "every", "tags": [] }, @@ -6716,14 +6078,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->Int32Array.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->Int32Array.length", "sortText": "length", "tags": [] }, @@ -6737,14 +6099,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->Int32Array.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->Int32Array.indexOf", "sortText": "indexOf", "tags": [] }, @@ -6758,36 +6120,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" - }, - "insertText": "->TypedArray.copyWithinToEnd", - "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 21 }, - "start": { "character": 13, "line": 21 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.some", + "insertText": "->Int32Array.some", "kind": 12, - "label": "->TypedArray.some", + "label": "->Int32Array.some", "sortText": "some", "tags": [] }, @@ -6801,14 +6141,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->Int32Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->Int32Array.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -6822,14 +6162,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, int => int) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->Int32Array.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->Int32Array.map", "sortText": "map", "tags": [] }, @@ -6843,14 +6183,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (int, int) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->Int32Array.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->Int32Array.toSorted", "sortText": "toSorted", "tags": [] }, @@ -6864,14 +6204,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->Int32Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->Int32Array.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -6885,14 +6225,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->Int32Array.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->Int32Array.subarray", "sortText": "subarray", "tags": [] }, @@ -6906,14 +6246,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->Int32Array.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->Int32Array.setArray", "sortText": "setArray", "tags": [] }, @@ -6927,14 +6267,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->Int32Array.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->Int32Array.get", "sortText": "get", "tags": [] }, @@ -6948,14 +6288,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, int) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->Int32Array.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->Int32Array.with", "sortText": "with", "tags": [] }, @@ -6969,14 +6309,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->Int32Array.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->Int32Array.toReversed", "sortText": "toReversed", "tags": [] }, @@ -6990,14 +6330,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->Int32Array.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->Int32Array.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -7011,14 +6351,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->Int32Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->Int32Array.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -7032,14 +6372,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->Int32Array.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->Int32Array.toString", "sortText": "toString", "tags": [] }, @@ -7053,14 +6393,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->Int32Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->Int32Array.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -7074,14 +6414,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, int => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->Int32Array.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->Int32Array.forEach", "sortText": "forEach", "tags": [] }, @@ -7095,14 +6435,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->Int32Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->Int32Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -7116,14 +6456,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, int, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->Int32Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->Int32Array.fill", "sortText": "fill", "tags": [] }, @@ -7137,14 +6477,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->Int32Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->Int32Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -7158,14 +6498,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->Int32Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->Int32Array.reverse", "sortText": "reverse", "tags": [] }, @@ -7179,14 +6519,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->Int32Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->Int32Array.byteOffset", "sortText": "byteOffset", "tags": [] } @@ -7206,7 +6546,6 @@ ContextPath Value[int8Array] Path int8Array CPPipe path_from_env:Stdlib.Int8Array found:false Path Stdlib.Int8Array. -Path Stdlib.TypedArray. Path [ { @@ -7219,35 +6558,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(intArray)` ignores the provided intArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->Int8Array.ignore", - "kind": 12, - "label": "->Int8Array.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 13, "line": 25 }, - "start": { "character": 12, "line": 25 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->Int8Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->Int8Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -7261,14 +6579,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->Int8Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->Int8Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -7282,14 +6600,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->Int8Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->Int8Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -7303,14 +6621,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->Int8Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->Int8Array.findLast", "sortText": "findLast", "tags": [] }, @@ -7324,14 +6642,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, int => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->Int8Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->Int8Array.filter", "sortText": "filter", "tags": [] }, @@ -7345,14 +6663,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->Int8Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->Int8Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -7366,14 +6684,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(intArray)` ignores the provided intArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->Int8Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->Int8Array.ignore", "sortText": "ignore", "tags": [] }, @@ -7387,14 +6705,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->Int8Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->Int8Array.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -7408,14 +6726,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->Int8Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->Int8Array.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -7429,14 +6747,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->Int8Array.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->Int8Array.joinWith", "sortText": "joinWith", "tags": [] }, @@ -7450,14 +6768,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->Int8Array.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->Int8Array.buffer", "sortText": "buffer", "tags": [] }, @@ -7471,14 +6789,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->Int8Array.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->Int8Array.reduce", "sortText": "reduce", "tags": [] }, @@ -7492,14 +6810,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (int, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->Int8Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->Int8Array.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -7513,14 +6831,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->Int8Array.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->Int8Array.copy", "sortText": "copy", "tags": [] }, @@ -7534,14 +6852,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->Int8Array.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->Int8Array.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -7555,14 +6873,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->Int8Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->Int8Array.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -7576,36 +6894,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" - }, - "insertText": "->TypedArray.sliceToEnd", - "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 13, "line": 25 }, - "start": { "character": 12, "line": 25 } - } - } - ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->Int8Array.slice", "kind": 12, - "label": "->TypedArray.slice", + "label": "->Int8Array.slice", "sortText": "slice", "tags": [] }, @@ -7619,14 +6915,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->Int8Array.findLastIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", + "label": "->Int8Array.findLastIndex", "sortText": "findLastIndex", "tags": [] }, @@ -7640,14 +6936,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, int) => bool", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->Int8Array.includes", "kind": 12, - "label": "->TypedArray.includes", + "label": "->Int8Array.includes", "sortText": "includes", "tags": [] }, @@ -7661,36 +6957,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" - }, - "insertText": "->TypedArray.fillToEnd", - "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 13, "line": 25 }, - "start": { "character": 12, "line": 25 } - } - } - ], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(t, int) => t", "documentation": { "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.fillAll", + "insertText": "->Int8Array.fillAll", "kind": 12, - "label": "->TypedArray.fillAll", + "label": "->Int8Array.fillAll", "sortText": "fillAll", "tags": [] }, @@ -7704,14 +6978,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->Int8Array.find", "kind": 12, - "label": "->TypedArray.find", + "label": "->Int8Array.find", "sortText": "find", "tags": [] }, @@ -7725,36 +6999,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" - }, - "insertText": "->TypedArray.subarrayToEnd", - "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 13, "line": 25 }, - "start": { "character": 12, "line": 25 } - } - } - ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, int, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.set", + "insertText": "->Int8Array.set", "kind": 12, - "label": "->TypedArray.set", + "label": "->Int8Array.set", "sortText": "set", "tags": [] }, @@ -7768,14 +7020,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->Int8Array.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->Int8Array.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -7789,14 +7041,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->Int8Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->Int8Array.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -7810,14 +7062,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->Int8Array.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->Int8Array.findIndex", "sortText": "findIndex", "tags": [] }, @@ -7831,14 +7083,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (int, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->Int8Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->Int8Array.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -7852,14 +7104,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (int, int) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->Int8Array.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->Int8Array.sort", "sortText": "sort", "tags": [] }, @@ -7873,14 +7125,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (int, int) => int) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->Int8Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->Int8Array.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -7894,14 +7146,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->Int8Array.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->Int8Array.every", "sortText": "every", "tags": [] }, @@ -7915,14 +7167,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->Int8Array.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->Int8Array.length", "sortText": "length", "tags": [] }, @@ -7936,14 +7188,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->Int8Array.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->Int8Array.indexOf", "sortText": "indexOf", "tags": [] }, @@ -7957,36 +7209,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" - }, - "insertText": "->TypedArray.copyWithinToEnd", - "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 13, "line": 25 }, - "start": { "character": 12, "line": 25 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.some", + "insertText": "->Int8Array.some", "kind": 12, - "label": "->TypedArray.some", + "label": "->Int8Array.some", "sortText": "some", "tags": [] }, @@ -8000,14 +7230,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->Int8Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->Int8Array.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -8021,14 +7251,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, int => int) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->Int8Array.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->Int8Array.map", "sortText": "map", "tags": [] }, @@ -8042,14 +7272,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (int, int) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->Int8Array.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->Int8Array.toSorted", "sortText": "toSorted", "tags": [] }, @@ -8063,14 +7293,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->Int8Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->Int8Array.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -8084,14 +7314,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->Int8Array.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->Int8Array.subarray", "sortText": "subarray", "tags": [] }, @@ -8105,14 +7335,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->Int8Array.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->Int8Array.setArray", "sortText": "setArray", "tags": [] }, @@ -8126,14 +7356,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->Int8Array.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->Int8Array.get", "sortText": "get", "tags": [] }, @@ -8147,14 +7377,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, int) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->Int8Array.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->Int8Array.with", "sortText": "with", "tags": [] }, @@ -8168,14 +7398,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->Int8Array.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->Int8Array.toReversed", "sortText": "toReversed", "tags": [] }, @@ -8189,14 +7419,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->Int8Array.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->Int8Array.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -8210,14 +7440,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->Int8Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->Int8Array.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -8231,14 +7461,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->Int8Array.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->Int8Array.toString", "sortText": "toString", "tags": [] }, @@ -8252,14 +7482,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->Int8Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->Int8Array.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -8273,14 +7503,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, int => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->Int8Array.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->Int8Array.forEach", "sortText": "forEach", "tags": [] }, @@ -8294,14 +7524,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->Int8Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->Int8Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -8315,14 +7545,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, int, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->Int8Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->Int8Array.fill", "sortText": "fill", "tags": [] }, @@ -8336,14 +7566,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->Int8Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->Int8Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -8357,14 +7587,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->Int8Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->Int8Array.reverse", "sortText": "reverse", "tags": [] }, @@ -8378,14 +7608,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->Int8Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->Int8Array.byteOffset", "sortText": "byteOffset", "tags": [] } @@ -8405,7 +7635,6 @@ ContextPath Value[uint16Array] Path uint16Array CPPipe path_from_env:Stdlib.Uint16Array found:false Path Stdlib.Uint16Array. -Path Stdlib.TypedArray. Path [ { @@ -8418,35 +7647,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(uintArray)` ignores the provided uintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->Uint16Array.ignore", - "kind": 12, - "label": "->Uint16Array.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 29 }, - "start": { "character": 14, "line": 29 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->Uint16Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->Uint16Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -8460,14 +7668,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->Uint16Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->Uint16Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -8481,14 +7689,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->Uint16Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->Uint16Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -8502,14 +7710,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->Uint16Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->Uint16Array.findLast", "sortText": "findLast", "tags": [] }, @@ -8523,14 +7731,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, int => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->Uint16Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->Uint16Array.filter", "sortText": "filter", "tags": [] }, @@ -8544,14 +7752,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->Uint16Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->Uint16Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -8565,14 +7773,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(uintArray)` ignores the provided uintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->Uint16Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->Uint16Array.ignore", "sortText": "ignore", "tags": [] }, @@ -8586,14 +7794,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->Uint16Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->Uint16Array.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -8607,14 +7815,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->Uint16Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->Uint16Array.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -8628,14 +7836,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->Uint16Array.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->Uint16Array.joinWith", "sortText": "joinWith", "tags": [] }, @@ -8649,14 +7857,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->Uint16Array.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->Uint16Array.buffer", "sortText": "buffer", "tags": [] }, @@ -8670,14 +7878,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->Uint16Array.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->Uint16Array.reduce", "sortText": "reduce", "tags": [] }, @@ -8691,14 +7899,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (int, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->Uint16Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->Uint16Array.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -8712,14 +7920,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->Uint16Array.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->Uint16Array.copy", "sortText": "copy", "tags": [] }, @@ -8733,14 +7941,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->Uint16Array.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->Uint16Array.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -8754,14 +7962,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->Uint16Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->Uint16Array.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -8775,36 +7983,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" - }, - "insertText": "->TypedArray.sliceToEnd", - "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 29 }, - "start": { "character": 14, "line": 29 } - } - } - ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->Uint16Array.slice", "kind": 12, - "label": "->TypedArray.slice", + "label": "->Uint16Array.slice", "sortText": "slice", "tags": [] }, @@ -8818,14 +8004,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->Uint16Array.findLastIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", + "label": "->Uint16Array.findLastIndex", "sortText": "findLastIndex", "tags": [] }, @@ -8839,14 +8025,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, int) => bool", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->Uint16Array.includes", "kind": 12, - "label": "->TypedArray.includes", + "label": "->Uint16Array.includes", "sortText": "includes", "tags": [] }, @@ -8860,36 +8046,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" - }, - "insertText": "->TypedArray.fillToEnd", - "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 29 }, - "start": { "character": 14, "line": 29 } - } - } - ], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(t, int) => t", "documentation": { "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.fillAll", + "insertText": "->Uint16Array.fillAll", "kind": 12, - "label": "->TypedArray.fillAll", + "label": "->Uint16Array.fillAll", "sortText": "fillAll", "tags": [] }, @@ -8903,14 +8067,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->Uint16Array.find", "kind": 12, - "label": "->TypedArray.find", + "label": "->Uint16Array.find", "sortText": "find", "tags": [] }, @@ -8924,36 +8088,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" - }, - "insertText": "->TypedArray.subarrayToEnd", - "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 29 }, - "start": { "character": 14, "line": 29 } - } - } - ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, int, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.set", + "insertText": "->Uint16Array.set", "kind": 12, - "label": "->TypedArray.set", + "label": "->Uint16Array.set", "sortText": "set", "tags": [] }, @@ -8967,14 +8109,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->Uint16Array.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->Uint16Array.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -8988,14 +8130,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->Uint16Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->Uint16Array.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -9009,14 +8151,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->Uint16Array.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->Uint16Array.findIndex", "sortText": "findIndex", "tags": [] }, @@ -9030,14 +8172,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (int, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->Uint16Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->Uint16Array.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -9051,14 +8193,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (int, int) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->Uint16Array.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->Uint16Array.sort", "sortText": "sort", "tags": [] }, @@ -9072,14 +8214,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (int, int) => int) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->Uint16Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->Uint16Array.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -9093,14 +8235,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->Uint16Array.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->Uint16Array.every", "sortText": "every", "tags": [] }, @@ -9114,14 +8256,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->Uint16Array.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->Uint16Array.length", "sortText": "length", "tags": [] }, @@ -9135,14 +8277,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->Uint16Array.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->Uint16Array.indexOf", "sortText": "indexOf", "tags": [] }, @@ -9156,36 +8298,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" - }, - "insertText": "->TypedArray.copyWithinToEnd", - "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 29 }, - "start": { "character": 14, "line": 29 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.some", + "insertText": "->Uint16Array.some", "kind": 12, - "label": "->TypedArray.some", + "label": "->Uint16Array.some", "sortText": "some", "tags": [] }, @@ -9199,14 +8319,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->Uint16Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->Uint16Array.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -9220,14 +8340,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, int => int) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->Uint16Array.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->Uint16Array.map", "sortText": "map", "tags": [] }, @@ -9241,14 +8361,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (int, int) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->Uint16Array.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->Uint16Array.toSorted", "sortText": "toSorted", "tags": [] }, @@ -9262,14 +8382,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->Uint16Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->Uint16Array.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -9283,14 +8403,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->Uint16Array.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->Uint16Array.subarray", "sortText": "subarray", "tags": [] }, @@ -9304,14 +8424,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->Uint16Array.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->Uint16Array.setArray", "sortText": "setArray", "tags": [] }, @@ -9325,14 +8445,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->Uint16Array.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->Uint16Array.get", "sortText": "get", "tags": [] }, @@ -9346,14 +8466,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, int) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->Uint16Array.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->Uint16Array.with", "sortText": "with", "tags": [] }, @@ -9367,14 +8487,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->Uint16Array.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->Uint16Array.toReversed", "sortText": "toReversed", "tags": [] }, @@ -9388,14 +8508,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->Uint16Array.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->Uint16Array.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -9409,14 +8529,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->Uint16Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->Uint16Array.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -9430,14 +8550,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->Uint16Array.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->Uint16Array.toString", "sortText": "toString", "tags": [] }, @@ -9451,14 +8571,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->Uint16Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->Uint16Array.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -9472,14 +8592,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, int => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->Uint16Array.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->Uint16Array.forEach", "sortText": "forEach", "tags": [] }, @@ -9493,14 +8613,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->Uint16Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->Uint16Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -9514,14 +8634,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, int, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->Uint16Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->Uint16Array.fill", "sortText": "fill", "tags": [] }, @@ -9535,14 +8655,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->Uint16Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->Uint16Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -9556,14 +8676,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->Uint16Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->Uint16Array.reverse", "sortText": "reverse", "tags": [] }, @@ -9577,57 +8697,35 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->Uint16Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->Uint16Array.byteOffset", "sortText": "byteOffset", "tags": [] - } -] - -Complete src/CompletionTypedArrays.res 33:15 -pos_cursor:[33:15] pos_no_white:[33:14] Found expr:[33:3->33:15] -Pexp_field [33:3->33:14] _:[36:0->33:15] -Completable: Cpath Value[uint32Array]."" -Package opens Stdlib.place holder Pervasives.JsxModules.place holder -Resolved opens 1 Stdlib -ContextPath Value[uint32Array]."" -ContextPath Value[uint32Array] -Path uint32Array -ContextPath Value[uint32Array]-> -ContextPath Value[uint32Array] -Path uint32Array -CPPipe path_from_env:Stdlib.Uint32Array found:false -Path Stdlib.Uint32Array. -Path Stdlib.TypedArray. -Path -[ - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 33 }, - "start": { "character": 14, "line": 33 } - } - } - ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(uintArray)` ignores the provided uintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->Uint32Array.ignore", - "kind": 12, - "label": "->Uint32Array.ignore", - "sortText": "ignore", - "tags": [] - }, + } +] + +Complete src/CompletionTypedArrays.res 33:15 +pos_cursor:[33:15] pos_no_white:[33:14] Found expr:[33:3->33:15] +Pexp_field [33:3->33:14] _:[36:0->33:15] +Completable: Cpath Value[uint32Array]."" +Package opens Stdlib.place holder Pervasives.JsxModules.place holder +Resolved opens 1 Stdlib +ContextPath Value[uint32Array]."" +ContextPath Value[uint32Array] +Path uint32Array +ContextPath Value[uint32Array]-> +ContextPath Value[uint32Array] +Path uint32Array +CPPipe path_from_env:Stdlib.Uint32Array found:false +Path Stdlib.Uint32Array. +Path +[ { "additionalTextEdits": [ { @@ -9638,14 +8736,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->Uint32Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->Uint32Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -9659,14 +8757,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->Uint32Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->Uint32Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -9680,14 +8778,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->Uint32Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->Uint32Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -9701,14 +8799,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->Uint32Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->Uint32Array.findLast", "sortText": "findLast", "tags": [] }, @@ -9722,14 +8820,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, int => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->Uint32Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->Uint32Array.filter", "sortText": "filter", "tags": [] }, @@ -9743,14 +8841,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->Uint32Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->Uint32Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -9764,14 +8862,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(uintArray)` ignores the provided uintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->Uint32Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->Uint32Array.ignore", "sortText": "ignore", "tags": [] }, @@ -9785,14 +8883,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->Uint32Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->Uint32Array.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -9806,14 +8904,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->Uint32Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->Uint32Array.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -9827,14 +8925,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->Uint32Array.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->Uint32Array.joinWith", "sortText": "joinWith", "tags": [] }, @@ -9848,14 +8946,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->Uint32Array.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->Uint32Array.buffer", "sortText": "buffer", "tags": [] }, @@ -9869,14 +8967,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->Uint32Array.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->Uint32Array.reduce", "sortText": "reduce", "tags": [] }, @@ -9890,14 +8988,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (int, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->Uint32Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->Uint32Array.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -9911,14 +9009,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->Uint32Array.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->Uint32Array.copy", "sortText": "copy", "tags": [] }, @@ -9932,14 +9030,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->Uint32Array.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->Uint32Array.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -9953,14 +9051,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->Uint32Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->Uint32Array.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -9974,36 +9072,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" - }, - "insertText": "->TypedArray.sliceToEnd", - "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 33 }, - "start": { "character": 14, "line": 33 } - } - } - ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->Uint32Array.slice", "kind": 12, - "label": "->TypedArray.slice", + "label": "->Uint32Array.slice", "sortText": "slice", "tags": [] }, @@ -10017,14 +9093,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->Uint32Array.findLastIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", + "label": "->Uint32Array.findLastIndex", "sortText": "findLastIndex", "tags": [] }, @@ -10038,14 +9114,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, int) => bool", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->Uint32Array.includes", "kind": 12, - "label": "->TypedArray.includes", + "label": "->Uint32Array.includes", "sortText": "includes", "tags": [] }, @@ -10059,36 +9135,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" - }, - "insertText": "->TypedArray.fillToEnd", - "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 33 }, - "start": { "character": 14, "line": 33 } - } - } - ], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(t, int) => t", "documentation": { "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.fillAll", + "insertText": "->Uint32Array.fillAll", "kind": 12, - "label": "->TypedArray.fillAll", + "label": "->Uint32Array.fillAll", "sortText": "fillAll", "tags": [] }, @@ -10102,14 +9156,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->Uint32Array.find", "kind": 12, - "label": "->TypedArray.find", + "label": "->Uint32Array.find", "sortText": "find", "tags": [] }, @@ -10123,36 +9177,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" - }, - "insertText": "->TypedArray.subarrayToEnd", - "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 33 }, - "start": { "character": 14, "line": 33 } - } - } - ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, int, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.set", + "insertText": "->Uint32Array.set", "kind": 12, - "label": "->TypedArray.set", + "label": "->Uint32Array.set", "sortText": "set", "tags": [] }, @@ -10166,14 +9198,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->Uint32Array.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->Uint32Array.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -10187,14 +9219,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->Uint32Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->Uint32Array.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -10208,14 +9240,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->Uint32Array.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->Uint32Array.findIndex", "sortText": "findIndex", "tags": [] }, @@ -10229,14 +9261,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (int, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->Uint32Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->Uint32Array.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -10250,14 +9282,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (int, int) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->Uint32Array.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->Uint32Array.sort", "sortText": "sort", "tags": [] }, @@ -10271,14 +9303,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (int, int) => int) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->Uint32Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->Uint32Array.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -10292,14 +9324,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->Uint32Array.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->Uint32Array.every", "sortText": "every", "tags": [] }, @@ -10313,14 +9345,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->Uint32Array.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->Uint32Array.length", "sortText": "length", "tags": [] }, @@ -10334,14 +9366,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->Uint32Array.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->Uint32Array.indexOf", "sortText": "indexOf", "tags": [] }, @@ -10355,36 +9387,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" - }, - "insertText": "->TypedArray.copyWithinToEnd", - "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 15, "line": 33 }, - "start": { "character": 14, "line": 33 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.some", + "insertText": "->Uint32Array.some", "kind": 12, - "label": "->TypedArray.some", + "label": "->Uint32Array.some", "sortText": "some", "tags": [] }, @@ -10398,14 +9408,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->Uint32Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->Uint32Array.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -10419,14 +9429,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, int => int) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->Uint32Array.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->Uint32Array.map", "sortText": "map", "tags": [] }, @@ -10440,14 +9450,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (int, int) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->Uint32Array.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->Uint32Array.toSorted", "sortText": "toSorted", "tags": [] }, @@ -10461,14 +9471,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->Uint32Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->Uint32Array.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -10482,14 +9492,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->Uint32Array.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->Uint32Array.subarray", "sortText": "subarray", "tags": [] }, @@ -10503,14 +9513,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->Uint32Array.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->Uint32Array.setArray", "sortText": "setArray", "tags": [] }, @@ -10524,14 +9534,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->Uint32Array.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->Uint32Array.get", "sortText": "get", "tags": [] }, @@ -10545,14 +9555,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, int) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->Uint32Array.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->Uint32Array.with", "sortText": "with", "tags": [] }, @@ -10566,14 +9576,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->Uint32Array.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->Uint32Array.toReversed", "sortText": "toReversed", "tags": [] }, @@ -10587,14 +9597,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->Uint32Array.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->Uint32Array.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -10608,14 +9618,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->Uint32Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->Uint32Array.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -10629,14 +9639,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->Uint32Array.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->Uint32Array.toString", "sortText": "toString", "tags": [] }, @@ -10650,14 +9660,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->Uint32Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->Uint32Array.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -10671,14 +9681,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, int => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->Uint32Array.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->Uint32Array.forEach", "sortText": "forEach", "tags": [] }, @@ -10692,14 +9702,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->Uint32Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->Uint32Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -10713,14 +9723,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, int, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->Uint32Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->Uint32Array.fill", "sortText": "fill", "tags": [] }, @@ -10734,14 +9744,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->Uint32Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->Uint32Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -10755,14 +9765,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->Uint32Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->Uint32Array.reverse", "sortText": "reverse", "tags": [] }, @@ -10776,14 +9786,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->Uint32Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->Uint32Array.byteOffset", "sortText": "byteOffset", "tags": [] } @@ -10803,7 +9813,6 @@ ContextPath Value[uint8Array] Path uint8Array CPPipe path_from_env:Stdlib.Uint8Array found:false Path Stdlib.Uint8Array. -Path Stdlib.TypedArray. Path [ { @@ -10816,35 +9825,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(uintArray)` ignores the provided uintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->Uint8Array.ignore", - "kind": 12, - "label": "->Uint8Array.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 37 }, - "start": { "character": 13, "line": 37 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->Uint8Array.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->Uint8Array.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -10858,14 +9846,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->Uint8Array.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->Uint8Array.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -10879,14 +9867,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->Uint8Array.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->Uint8Array.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -10900,14 +9888,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->Uint8Array.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->Uint8Array.findLast", "sortText": "findLast", "tags": [] }, @@ -10921,14 +9909,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, int => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->Uint8Array.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->Uint8Array.filter", "sortText": "filter", "tags": [] }, @@ -10942,14 +9930,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->Uint8Array.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->Uint8Array.byteLength", "sortText": "byteLength", "tags": [] }, @@ -10963,14 +9951,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(uintArray)` ignores the provided uintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->Uint8Array.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->Uint8Array.ignore", "sortText": "ignore", "tags": [] }, @@ -10984,14 +9972,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->Uint8Array.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->Uint8Array.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -11005,14 +9993,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->Uint8Array.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->Uint8Array.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -11026,14 +10014,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->Uint8Array.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->Uint8Array.joinWith", "sortText": "joinWith", "tags": [] }, @@ -11047,14 +10035,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->Uint8Array.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->Uint8Array.buffer", "sortText": "buffer", "tags": [] }, @@ -11068,14 +10056,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->Uint8Array.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->Uint8Array.reduce", "sortText": "reduce", "tags": [] }, @@ -11089,14 +10077,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (int, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->Uint8Array.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->Uint8Array.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -11110,14 +10098,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->Uint8Array.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->Uint8Array.copy", "sortText": "copy", "tags": [] }, @@ -11131,14 +10119,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->Uint8Array.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->Uint8Array.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -11152,14 +10140,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->Uint8Array.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->Uint8Array.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -11173,36 +10161,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" - }, - "insertText": "->TypedArray.sliceToEnd", - "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 37 }, - "start": { "character": 13, "line": 37 } - } - } - ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->Uint8Array.slice", "kind": 12, - "label": "->TypedArray.slice", + "label": "->Uint8Array.slice", "sortText": "slice", "tags": [] }, @@ -11216,14 +10182,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->Uint8Array.findLastIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", + "label": "->Uint8Array.findLastIndex", "sortText": "findLastIndex", "tags": [] }, @@ -11237,14 +10203,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, int) => bool", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->Uint8Array.includes", "kind": 12, - "label": "->TypedArray.includes", + "label": "->Uint8Array.includes", "sortText": "includes", "tags": [] }, @@ -11258,36 +10224,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" - }, - "insertText": "->TypedArray.fillToEnd", - "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 37 }, - "start": { "character": 13, "line": 37 } - } - } - ], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(t, int) => t", "documentation": { "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.fillAll", + "insertText": "->Uint8Array.fillAll", "kind": 12, - "label": "->TypedArray.fillAll", + "label": "->Uint8Array.fillAll", "sortText": "fillAll", "tags": [] }, @@ -11301,14 +10245,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->Uint8Array.find", "kind": 12, - "label": "->TypedArray.find", + "label": "->Uint8Array.find", "sortText": "find", "tags": [] }, @@ -11322,36 +10266,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" - }, - "insertText": "->TypedArray.subarrayToEnd", - "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 37 }, - "start": { "character": 13, "line": 37 } - } - } - ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, int, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.set", + "insertText": "->Uint8Array.set", "kind": 12, - "label": "->TypedArray.set", + "label": "->Uint8Array.set", "sortText": "set", "tags": [] }, @@ -11365,14 +10287,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->Uint8Array.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->Uint8Array.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -11386,14 +10308,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->Uint8Array.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->Uint8Array.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -11407,14 +10329,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->Uint8Array.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->Uint8Array.findIndex", "sortText": "findIndex", "tags": [] }, @@ -11428,14 +10350,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (int, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->Uint8Array.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->Uint8Array.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -11449,14 +10371,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (int, int) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->Uint8Array.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->Uint8Array.sort", "sortText": "sort", "tags": [] }, @@ -11470,14 +10392,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (int, int) => int) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->Uint8Array.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->Uint8Array.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -11491,14 +10413,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->Uint8Array.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->Uint8Array.every", "sortText": "every", "tags": [] }, @@ -11512,14 +10434,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->Uint8Array.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->Uint8Array.length", "sortText": "length", "tags": [] }, @@ -11533,14 +10455,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->Uint8Array.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->Uint8Array.indexOf", "sortText": "indexOf", "tags": [] }, @@ -11554,36 +10476,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" - }, - "insertText": "->TypedArray.copyWithinToEnd", - "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 14, "line": 37 }, - "start": { "character": 13, "line": 37 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.some", + "insertText": "->Uint8Array.some", "kind": 12, - "label": "->TypedArray.some", + "label": "->Uint8Array.some", "sortText": "some", "tags": [] }, @@ -11597,14 +10497,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->Uint8Array.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->Uint8Array.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -11618,14 +10518,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, int => int) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->Uint8Array.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->Uint8Array.map", "sortText": "map", "tags": [] }, @@ -11639,14 +10539,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (int, int) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->Uint8Array.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->Uint8Array.toSorted", "sortText": "toSorted", "tags": [] }, @@ -11660,14 +10560,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->Uint8Array.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->Uint8Array.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -11681,14 +10581,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->Uint8Array.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->Uint8Array.subarray", "sortText": "subarray", "tags": [] }, @@ -11702,14 +10602,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->Uint8Array.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->Uint8Array.setArray", "sortText": "setArray", "tags": [] }, @@ -11723,14 +10623,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->Uint8Array.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->Uint8Array.get", "sortText": "get", "tags": [] }, @@ -11744,14 +10644,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, int) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->Uint8Array.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->Uint8Array.with", "sortText": "with", "tags": [] }, @@ -11765,14 +10665,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->Uint8Array.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->Uint8Array.toReversed", "sortText": "toReversed", "tags": [] }, @@ -11786,14 +10686,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->Uint8Array.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->Uint8Array.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -11807,14 +10707,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->Uint8Array.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->Uint8Array.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -11828,14 +10728,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->Uint8Array.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->Uint8Array.toString", "sortText": "toString", "tags": [] }, @@ -11849,14 +10749,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->Uint8Array.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->Uint8Array.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -11870,14 +10770,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, int => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->Uint8Array.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->Uint8Array.forEach", "sortText": "forEach", "tags": [] }, @@ -11891,14 +10791,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->Uint8Array.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->Uint8Array.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -11912,14 +10812,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, int, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->Uint8Array.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->Uint8Array.fill", "sortText": "fill", "tags": [] }, @@ -11933,14 +10833,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->Uint8Array.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->Uint8Array.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -11954,14 +10854,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->Uint8Array.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->Uint8Array.reverse", "sortText": "reverse", "tags": [] }, @@ -11975,14 +10875,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->Uint8Array.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->Uint8Array.byteOffset", "sortText": "byteOffset", "tags": [] } @@ -12002,7 +10902,6 @@ ContextPath Value[uint8ClampedArray] Path uint8ClampedArray CPPipe path_from_env:Stdlib.Uint8ClampedArray found:false Path Stdlib.Uint8ClampedArray. -Path Stdlib.TypedArray. Path [ { @@ -12015,35 +10914,14 @@ Path } } ], - "detail": "t => unit", - "documentation": { - "kind": "markdown", - "value": "\n `ignore(uintArray)` ignores the provided uintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" - }, - "insertText": "->Uint8ClampedArray.ignore", - "kind": 12, - "label": "->Uint8ClampedArray.ignore", - "sortText": "ignore", - "tags": [] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 21, "line": 41 }, - "start": { "character": 20, "line": 41 } - } - } - ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n" + "value": "\n `findLastIndexWithIndex(typedArray, predicate)` is the indexed variant of `findLastIndex`.\n " }, - "insertText": "->TypedArray.findLastIndexWithIndex", + "insertText": "->Uint8ClampedArray.findLastIndexWithIndex", "kind": 12, - "label": "->TypedArray.findLastIndexWithIndex", + "label": "->Uint8ClampedArray.findLastIndexWithIndex", "sortText": "findLastIndexWithIndex", "tags": [] }, @@ -12057,14 +10935,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\nSee [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n" + "value": "\n `lastIndexOf(typedArray, value)` returns the last index of `value`, or `-1` if not found.\n\n See [`TypedArray.prototype.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf) on MDN.\n " }, - "insertText": "->TypedArray.lastIndexOf", + "insertText": "->Uint8ClampedArray.lastIndexOf", "kind": 12, - "label": "->TypedArray.lastIndexOf", + "label": "->Uint8ClampedArray.lastIndexOf", "sortText": "lastIndexOf", "tags": [] }, @@ -12078,14 +10956,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n" + "value": "\n `findLastWithIndex(typedArray, predicate)` is the indexed variant of `findLast`.\n " }, - "insertText": "->TypedArray.findLastWithIndex", + "insertText": "->Uint8ClampedArray.findLastWithIndex", "kind": 12, - "label": "->TypedArray.findLastWithIndex", + "label": "->Uint8ClampedArray.findLastWithIndex", "sortText": "findLastWithIndex", "tags": [] }, @@ -12099,14 +10977,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\nSee [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n" + "value": "\n `findLast(typedArray, predicate)` returns the last element that satisfies `predicate`.\n\n See [`TypedArray.prototype.findLast`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLast) on MDN.\n " }, - "insertText": "->TypedArray.findLast", + "insertText": "->Uint8ClampedArray.findLast", "kind": 12, - "label": "->TypedArray.findLast", + "label": "->Uint8ClampedArray.findLast", "sortText": "findLast", "tags": [] }, @@ -12120,14 +10998,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => t<'a>", + "detail": "(t, int => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\nSee [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n" + "value": "\n `filter(typedArray, predicate)` returns a new typed array containing only elements that satisfy `predicate`.\n\n See [`TypedArray.prototype.filter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter) on MDN.\n " }, - "insertText": "->TypedArray.filter", + "insertText": "->Uint8ClampedArray.filter", "kind": 12, - "label": "->TypedArray.filter", + "label": "->Uint8ClampedArray.filter", "sortText": "filter", "tags": [] }, @@ -12141,14 +11019,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteLength(typedArray)` returns the length in bytes of the view.\n\nSee [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.byteLength(view) == 8\n```\n" + "value": "\n `byteLength(typedArray)` returns the length in bytes of the view.\n\n See [`TypedArray.prototype.byteLength`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteLength) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.byteLength(view) == 8\n ```\n " }, - "insertText": "->TypedArray.byteLength", + "insertText": "->Uint8ClampedArray.byteLength", "kind": 12, - "label": "->TypedArray.byteLength", + "label": "->Uint8ClampedArray.byteLength", "sortText": "byteLength", "tags": [] }, @@ -12162,14 +11040,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n `ignore(typedArray)` ignores the provided typedArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" + "value": "\n `ignore(uintArray)` ignores the provided uintArray and returns unit.\n\n This helper is useful when you want to discard a value (for example, the result of an operation with side effects)\n without having to store or process it further.\n" }, - "insertText": "->TypedArray.ignore", + "insertText": "->Uint8ClampedArray.ignore", "kind": 12, - "label": "->TypedArray.ignore", + "label": "->Uint8ClampedArray.ignore", "sortText": "ignore", "tags": [] }, @@ -12183,14 +11061,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n" + "value": "\n `reduceRightWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduceRight`.\n " }, - "insertText": "->TypedArray.reduceRightWithIndex", + "insertText": "->Uint8ClampedArray.reduceRightWithIndex", "kind": 12, - "label": "->TypedArray.reduceRightWithIndex", + "label": "->Uint8ClampedArray.reduceRightWithIndex", "sortText": "reduceRightWithIndex", "tags": [] }, @@ -12204,14 +11082,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\nSee [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n" + "value": "\n `reduceRight(typedArray, reducer, initial)` is like `reduce` but processes the elements from right to left.\n\n See [`TypedArray.prototype.reduceRight`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight) on MDN.\n " }, - "insertText": "->TypedArray.reduceRight", + "insertText": "->Uint8ClampedArray.reduceRight", "kind": 12, - "label": "->TypedArray.reduceRight", + "label": "->Uint8ClampedArray.reduceRight", "sortText": "reduceRight", "tags": [] }, @@ -12225,14 +11103,14 @@ Path } } ], - "detail": "(t<'a>, string) => string", + "detail": "(t, string) => string", "documentation": { "kind": "markdown", - "value": "\n`joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\nSee [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.joinWith(view, \"-\") == \"1-2-3\"\n```\n" + "value": "\n `joinWith(typedArray, separator)` returns a string formed by the elements joined with `separator`.\n\n See [`TypedArray.prototype.join`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.joinWith(view, \"-\") == \"1-2-3\"\n ```\n " }, - "insertText": "->TypedArray.joinWith", + "insertText": "->Uint8ClampedArray.joinWith", "kind": 12, - "label": "->TypedArray.joinWith", + "label": "->Uint8ClampedArray.joinWith", "sortText": "joinWith", "tags": [] }, @@ -12246,14 +11124,14 @@ Path } } ], - "detail": "t<'a> => ArrayBuffer.t", + "detail": "t => ArrayBuffer.t", "documentation": { "kind": "markdown", - "value": "\n`buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\nSee [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n" + "value": "\n `buffer(typedArray)` returns the underlying `ArrayBuffer` backing this view.\n\n See [`TypedArray.prototype.buffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/buffer) on MDN.\n " }, - "insertText": "->TypedArray.buffer", + "insertText": "->Uint8ClampedArray.buffer", "kind": 12, - "label": "->TypedArray.buffer", + "label": "->Uint8ClampedArray.buffer", "sortText": "buffer", "tags": [] }, @@ -12267,14 +11145,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a) => 'b, 'b) => 'b", + "detail": "(t, ('b, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\nSee [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n" + "value": "\n `reduce(typedArray, reducer, initial)` combines the elements from left to right using `reducer`.\n\n See [`TypedArray.prototype.reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce) on MDN.\n " }, - "insertText": "->TypedArray.reduce", + "insertText": "->Uint8ClampedArray.reduce", "kind": 12, - "label": "->TypedArray.reduce", + "label": "->Uint8ClampedArray.reduce", "sortText": "reduce", "tags": [] }, @@ -12288,14 +11166,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => unit) => unit", + "detail": "(t, (int, int) => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n" + "value": "\n `forEachWithIndex(typedArray, f)` runs `f` for every element, also providing the index.\n " }, - "insertText": "->TypedArray.forEachWithIndex", + "insertText": "->Uint8ClampedArray.forEachWithIndex", "kind": 12, - "label": "->TypedArray.forEachWithIndex", + "label": "->Uint8ClampedArray.forEachWithIndex", "sortText": "forEachWithIndex", "tags": [] }, @@ -12309,14 +11187,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`copy(typedArray)` produces a shallow copy of the typed array.\n" + "value": "\n `copy(typedArray)` produces a shallow copy of the typed array.\n " }, - "insertText": "->TypedArray.copy", + "insertText": "->Uint8ClampedArray.copy", "kind": 12, - "label": "->TypedArray.copy", + "label": "->Uint8ClampedArray.copy", "sortText": "copy", "tags": [] }, @@ -12330,14 +11208,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n" + "value": "\n `someWithIndex(typedArray, predicate)` behaves like `some`, but `predicate` also receives the element index.\n " }, - "insertText": "->TypedArray.someWithIndex", + "insertText": "->Uint8ClampedArray.someWithIndex", "kind": 12, - "label": "->TypedArray.someWithIndex", + "label": "->Uint8ClampedArray.someWithIndex", "sortText": "someWithIndex", "tags": [] }, @@ -12351,14 +11229,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => int", + "detail": "(t, (int, int) => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n" + "value": "\n `findIndexWithIndex(typedArray, predicate)` is the indexed variant of `findIndex`.\n " }, - "insertText": "->TypedArray.findIndexWithIndex", + "insertText": "->Uint8ClampedArray.findIndexWithIndex", "kind": 12, - "label": "->TypedArray.findIndexWithIndex", + "label": "->Uint8ClampedArray.findIndexWithIndex", "sortText": "findIndexWithIndex", "tags": [] }, @@ -12372,36 +11250,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `slice` instead\n\n\n`sliceToEnd(typedArray, ~start)` returns the elements from `start` through the end in a new typed array.\n" - }, - "insertText": "->TypedArray.sliceToEnd", - "kind": 12, - "label": "->TypedArray.sliceToEnd", - "sortText": "sliceToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 21, "line": 41 }, - "start": { "character": 20, "line": 41 } - } - } - ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\nSee [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n" + "value": "\n `slice(typedArray, ~start, ~end)` returns a new typed array containing the elements in `[start, end)`.\n\n See [`TypedArray.prototype.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) on MDN.\n " }, - "insertText": "->TypedArray.slice", + "insertText": "->Uint8ClampedArray.slice", "kind": 12, - "label": "->TypedArray.slice", + "label": "->Uint8ClampedArray.slice", "sortText": "slice", "tags": [] }, @@ -12415,14 +11271,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\nSee [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n" + "value": "\n `findLastIndex(typedArray, predicate)` returns the index of the last matching element, or `-1` if none do.\n\n See [`TypedArray.prototype.findLastIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findLastIndex) on MDN.\n " }, - "insertText": "->TypedArray.findLastIndex", + "insertText": "->Uint8ClampedArray.findLastIndex", "kind": 12, - "label": "->TypedArray.findLastIndex", + "label": "->Uint8ClampedArray.findLastIndex", "sortText": "findLastIndex", "tags": [] }, @@ -12436,14 +11292,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => bool", + "detail": "(t, int) => bool", "documentation": { "kind": "markdown", - "value": "\n`includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\nSee [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.includes(view, 2) == true\nTypedArray.includes(view, 10) == false\n```\n" + "value": "\n `includes(typedArray, value)` returns `true` if `value` occurs in the typed array.\n\n See [`TypedArray.prototype.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.includes(view, 2) == true\n Int32Array.includes(view, 10) == false\n ```\n " }, - "insertText": "->TypedArray.includes", + "insertText": "->Uint8ClampedArray.includes", "kind": 12, - "label": "->TypedArray.includes", + "label": "->Uint8ClampedArray.includes", "sortText": "includes", "tags": [] }, @@ -12457,36 +11313,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, 'a, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `fill` instead\n\n\n`fillToEnd(typedArray, value, ~start)` fills from `start` through the end with `value`.\n\nBeware this will *mutate* the typed array.\n" - }, - "insertText": "->TypedArray.fillToEnd", - "kind": 12, - "label": "->TypedArray.fillToEnd", - "sortText": "fillToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 21, "line": 41 }, - "start": { "character": 20, "line": 41 } - } - } - ], - "detail": "(t<'a>, 'a) => t<'a>", + "detail": "(t, int) => t", "documentation": { "kind": "markdown", - "value": "\n`fillAll(typedArray, value)` fills every element with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet _ = TypedArray.fillAll(view, 9)\nTypedArray.toString(view) == \"9,9,9\"\n```\n" + "value": "\n `fillAll(typedArray, value)` fills every element with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let _ = Int32Array.fillAll(view, 9)\n Int32Array.toString(view) == \"9,9,9\"\n ```\n " }, - "insertText": "->TypedArray.fillAll", + "insertText": "->Uint8ClampedArray.fillAll", "kind": 12, - "label": "->TypedArray.fillAll", + "label": "->Uint8ClampedArray.fillAll", "sortText": "fillAll", "tags": [] }, @@ -12500,14 +11334,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => option<'a>", + "detail": "(t, int => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\nSee [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n" + "value": "\n `find(typedArray, predicate)` returns the first element that satisfies `predicate`, or `None` if nothing matches.\n\n See [`TypedArray.prototype.find`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find) on MDN.\n " }, - "insertText": "->TypedArray.find", + "insertText": "->Uint8ClampedArray.find", "kind": 12, - "label": "->TypedArray.find", + "label": "->Uint8ClampedArray.find", "sortText": "find", "tags": [] }, @@ -12521,36 +11355,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~start: int) => t<'a>", - "documentation": { - "kind": "markdown", - "value": "Deprecated: Use `subarray` instead\n\n\n`subarrayToEnd(typedArray, ~start)` returns a new view from `start` to the end of the buffer.\n" - }, - "insertText": "->TypedArray.subarrayToEnd", - "kind": 12, - "label": "->TypedArray.subarrayToEnd", - "sortText": "subarrayToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 21, "line": 41 }, - "start": { "character": 20, "line": 41 } - } - } - ], - "detail": "(t<'a>, int, 'a) => unit", + "detail": "(t, int, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\nBeware this will *mutate* the array.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2])\nTypedArray.set(view, 1, 5)\nTypedArray.get(view, 1) == Some(5)\n```\n" + "value": "\n `set(typedArray, index, item)` sets the provided `item` at `index` of `typedArray`.\n\n Beware this will *mutate* the array.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2])\n Int32Array.set(view, 1, 5)\n Int32Array.get(view, 1) == Some(5)\n ```\n " }, - "insertText": "->TypedArray.set", + "insertText": "->Uint8ClampedArray.set", "kind": 12, - "label": "->TypedArray.set", + "label": "->Uint8ClampedArray.set", "sortText": "set", "tags": [] }, @@ -12564,14 +11376,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\nSee [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n" + "value": "\n `toLocaleString(typedArray)` concatenates the elements using locale-aware formatting.\n\n See [`TypedArray.prototype.toLocaleString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString) on MDN.\n " }, - "insertText": "->TypedArray.toLocaleString", + "insertText": "->Uint8ClampedArray.toLocaleString", "kind": 12, - "label": "->TypedArray.toLocaleString", + "label": "->Uint8ClampedArray.toLocaleString", "sortText": "toLocaleString", "tags": [] }, @@ -12585,14 +11397,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n" + "value": "\n `lastIndexOfFrom(typedArray, value, fromIndex)` searches backwards starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.lastIndexOfFrom", + "insertText": "->Uint8ClampedArray.lastIndexOfFrom", "kind": 12, - "label": "->TypedArray.lastIndexOfFrom", + "label": "->Uint8ClampedArray.lastIndexOfFrom", "sortText": "lastIndexOfFrom", "tags": [] }, @@ -12606,14 +11418,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => int", + "detail": "(t, int => bool) => int", "documentation": { "kind": "markdown", - "value": "\n`findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\nSee [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n" + "value": "\n `findIndex(typedArray, predicate)` returns the index of the first element that satisfies `predicate`, or `-1` if none do.\n\n See [`TypedArray.prototype.findIndex`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex) on MDN.\n " }, - "insertText": "->TypedArray.findIndex", + "insertText": "->Uint8ClampedArray.findIndex", "kind": 12, - "label": "->TypedArray.findIndex", + "label": "->Uint8ClampedArray.findIndex", "sortText": "findIndex", "tags": [] }, @@ -12627,14 +11439,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => t<'a>", + "detail": "(t, (int, int) => bool) => t", "documentation": { "kind": "markdown", - "value": "\n`filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n" + "value": "\n `filterWithIndex(typedArray, predicate)` behaves like `filter` but also passes the index to `predicate`.\n " }, - "insertText": "->TypedArray.filterWithIndex", + "insertText": "->Uint8ClampedArray.filterWithIndex", "kind": 12, - "label": "->TypedArray.filterWithIndex", + "label": "->Uint8ClampedArray.filterWithIndex", "sortText": "filterWithIndex", "tags": [] }, @@ -12648,14 +11460,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => unit", + "detail": "(t, (int, int) => Ordering.t) => unit", "documentation": { "kind": "markdown", - "value": "\n`sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n" + "value": "\n `sort(typedArray, comparator)` sorts the values in place using `comparator`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort) on MDN.\n " }, - "insertText": "->TypedArray.sort", + "insertText": "->Uint8ClampedArray.sort", "kind": 12, - "label": "->TypedArray.sort", + "label": "->Uint8ClampedArray.sort", "sortText": "sort", "tags": [] }, @@ -12669,14 +11481,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => 'b) => t<'b>", + "detail": "(t, (int, int) => int) => t", "documentation": { "kind": "markdown", - "value": "\n`mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n" + "value": "\n `mapWithIndex(typedArray, f)` behaves like `map`, but `f` also receives the index.\n " }, - "insertText": "->TypedArray.mapWithIndex", + "insertText": "->Uint8ClampedArray.mapWithIndex", "kind": 12, - "label": "->TypedArray.mapWithIndex", + "label": "->Uint8ClampedArray.mapWithIndex", "sortText": "mapWithIndex", "tags": [] }, @@ -12690,14 +11502,14 @@ Path } } ], - "detail": "(t<'a>, 'a => bool) => bool", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\nSee [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n" + "value": "\n `every(typedArray, predicate)` returns `true` if `predicate` returns `true` for every element.\n\n See [`TypedArray.prototype.every`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every) on MDN.\n " }, - "insertText": "->TypedArray.every", + "insertText": "->Uint8ClampedArray.every", "kind": 12, - "label": "->TypedArray.every", + "label": "->Uint8ClampedArray.every", "sortText": "every", "tags": [] }, @@ -12711,14 +11523,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`length(typedArray)` returns the number of elements.\n\nSee [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.length(view) == 3\n```\n" + "value": "\n `length(typedArray)` returns the number of elements.\n\n See [`TypedArray.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/length) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.length(view) == 3\n ```\n " }, - "insertText": "->TypedArray.length", + "insertText": "->Uint8ClampedArray.length", "kind": 12, - "label": "->TypedArray.length", + "label": "->Uint8ClampedArray.length", "sortText": "length", "tags": [] }, @@ -12732,14 +11544,14 @@ Path } } ], - "detail": "(t<'a>, 'a) => int", + "detail": "(t, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\nSee [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n" + "value": "\n `indexOf(typedArray, value)` returns the first index of `value`, or `-1` when not found.\n\n See [`TypedArray.prototype.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf) on MDN.\n " }, - "insertText": "->TypedArray.indexOf", + "insertText": "->Uint8ClampedArray.indexOf", "kind": 12, - "label": "->TypedArray.indexOf", + "label": "->Uint8ClampedArray.indexOf", "sortText": "indexOf", "tags": [] }, @@ -12753,36 +11565,14 @@ Path } } ], - "deprecated": true, - "detail": "(t<'a>, ~target: int, ~start: int) => array<'a>", + "detail": "(t, int => bool) => bool", "documentation": { "kind": "markdown", - "value": "Deprecated: Use `copyWithin` instead\n\n\n`copyWithinToEnd(typedArray, ~target, ~start)` copies values from `start` through the end of the view into the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithinToEnd(view, ~target=0, ~start=2)\nTypedArray.toString(view) == \"3,4,3,4\"\n```\n" + "value": "\n `some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\n See [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n " }, - "insertText": "->TypedArray.copyWithinToEnd", + "insertText": "->Uint8ClampedArray.some", "kind": 12, - "label": "->TypedArray.copyWithinToEnd", - "sortText": "copyWithinToEnd", - "tags": [ 1 ] - }, - { - "additionalTextEdits": [ - { - "newText": "", - "range": { - "end": { "character": 21, "line": 41 }, - "start": { "character": 20, "line": 41 } - } - } - ], - "detail": "(t<'a>, 'a => bool) => bool", - "documentation": { - "kind": "markdown", - "value": "\n`some(typedArray, predicate)` returns `true` if `predicate` returns `true` for at least one element.\n\nSee [`TypedArray.prototype.some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some) on MDN.\n" - }, - "insertText": "->TypedArray.some", - "kind": 12, - "label": "->TypedArray.some", + "label": "->Uint8ClampedArray.some", "sortText": "some", "tags": [] }, @@ -12796,14 +11586,14 @@ Path } } ], - "detail": "(t<'a>, ('b, 'a, int) => 'b, 'b) => 'b", + "detail": "(t, ('b, int, int) => 'b, 'b) => 'b", "documentation": { "kind": "markdown", - "value": "\n`reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n" + "value": "\n `reduceWithIndex(typedArray, reducer, initial)` is the indexed variant of `reduce`.\n " }, - "insertText": "->TypedArray.reduceWithIndex", + "insertText": "->Uint8ClampedArray.reduceWithIndex", "kind": 12, - "label": "->TypedArray.reduceWithIndex", + "label": "->Uint8ClampedArray.reduceWithIndex", "sortText": "reduceWithIndex", "tags": [] }, @@ -12817,14 +11607,14 @@ Path } } ], - "detail": "(t<'a>, 'a => 'b) => t<'b>", + "detail": "(t, int => int) => t", "documentation": { "kind": "markdown", - "value": "\n`map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\nSee [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n" + "value": "\n `map(typedArray, f)` returns a new typed array whose elements are produced by applying `f` to each element.\n\n See [`TypedArray.prototype.map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map) on MDN.\n " }, - "insertText": "->TypedArray.map", + "insertText": "->Uint8ClampedArray.map", "kind": 12, - "label": "->TypedArray.map", + "label": "->Uint8ClampedArray.map", "sortText": "map", "tags": [] }, @@ -12838,14 +11628,14 @@ Path } } ], - "detail": "(t<'a>, ('a, 'a) => Ordering.t) => t<'a>", + "detail": "(t, (int, int) => Ordering.t) => t", "documentation": { "kind": "markdown", - "value": "\n`toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\nSee [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([3, 1, 2])\nlet sorted = TypedArray.toSorted(view, Int.compare)\nTypedArray.toString(sorted) == \"1,2,3\"\nTypedArray.toString(view) == \"3,1,2\"\n```\n" + "value": "\n `toSorted(typedArray, comparator)` returns a new typed array containing the sorted values, leaving the original untouched.\n\n See [`TypedArray.prototype.toSorted`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toSorted) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([3, 1, 2])\n let sorted = Int32Array.toSorted(view, Int.compare)\n Int32Array.toString(sorted) == \"1,2,3\"\n Int32Array.toString(view) == \"3,1,2\"\n ```\n " }, - "insertText": "->TypedArray.toSorted", + "insertText": "->Uint8ClampedArray.toSorted", "kind": 12, - "label": "->TypedArray.toSorted", + "label": "->Uint8ClampedArray.toSorted", "sortText": "toSorted", "tags": [] }, @@ -12859,14 +11649,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int) => array<'a>", + "detail": "(t, ~target: int) => array", "documentation": { "kind": "markdown", - "value": "\n`copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([10, 20, 30])\nlet _ = TypedArray.copyAllWithin(view, ~target=1)\nTypedArray.toString(view) == \"10,10,20\"\n```\n" + "value": "\n `copyAllWithin(typedArray, ~target)` copies values starting at index `0` over the positions beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([10, 20, 30])\n let _ = Int32Array.copyAllWithin(view, ~target=1)\n Int32Array.toString(view) == \"10,10,20\"\n ```\n " }, - "insertText": "->TypedArray.copyAllWithin", + "insertText": "->Uint8ClampedArray.copyAllWithin", "kind": 12, - "label": "->TypedArray.copyAllWithin", + "label": "->Uint8ClampedArray.copyAllWithin", "sortText": "copyAllWithin", "tags": [] }, @@ -12880,14 +11670,14 @@ Path } } ], - "detail": "(t<'a>, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\nSee [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n" + "value": "\n `subarray(typedArray, ~start, ~end)` returns a new view referencing the same buffer over `[start, end)`.\n\n See [`TypedArray.prototype.subarray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) on MDN.\n " }, - "insertText": "->TypedArray.subarray", + "insertText": "->Uint8ClampedArray.subarray", "kind": 12, - "label": "->TypedArray.subarray", + "label": "->Uint8ClampedArray.subarray", "sortText": "subarray", "tags": [] }, @@ -12901,14 +11691,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>) => unit", + "detail": "(t, array) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0])\nTypedArray.setArray(view, [1, 2])\nTypedArray.toString(view) == \"1,2\"\n```\n" + "value": "\n `setArray(target, source)` copies the values from `source` into `target`, mutating it.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0])\n Int32Array.setArray(view, [1, 2])\n Int32Array.toString(view) == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.setArray", + "insertText": "->Uint8ClampedArray.setArray", "kind": 12, - "label": "->TypedArray.setArray", + "label": "->Uint8ClampedArray.setArray", "sortText": "setArray", "tags": [] }, @@ -12922,14 +11712,14 @@ Path } } ], - "detail": "(t<'a>, int) => option<'a>", + "detail": "(t, int) => option", "documentation": { "kind": "markdown", - "value": "\n`get(typedArray, index)` returns the element at `index` of `typedArray`.\nReturns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nTypedArray.get(view, 0) == Some(1)\nTypedArray.get(view, 10) == None\n```\n" + "value": "\n `get(typedArray, index)` returns the element at `index` of `typedArray`.\n Returns `None` if the index does not exist in the typed array. Equivalent to doing `typedArray[index]` in JavaScript.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n Int32Array.get(view, 0) == Some(1)\n Int32Array.get(view, 10) == None\n ```\n " }, - "insertText": "->TypedArray.get", + "insertText": "->Uint8ClampedArray.get", "kind": 12, - "label": "->TypedArray.get", + "label": "->Uint8ClampedArray.get", "sortText": "get", "tags": [] }, @@ -12943,14 +11733,14 @@ Path } } ], - "detail": "(t<'a>, int, 'a) => t<'a>", + "detail": "(t, int, int) => t", "documentation": { "kind": "markdown", - "value": "\n`with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\nSee [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet updated = TypedArray.with(view, 1, 10)\nTypedArray.toString(updated) == \"1,10,3\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `with(typedArray, index, value)` returns a new typed array where the element at `index` is replaced with `value`.\n\n See [`TypedArray.prototype.with`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/with) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let updated = Int32Array.with(view, 1, 10)\n Int32Array.toString(updated) == \"1,10,3\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.with", + "insertText": "->Uint8ClampedArray.with", "kind": 12, - "label": "->TypedArray.with", + "label": "->Uint8ClampedArray.with", "sortText": "with", "tags": [] }, @@ -12964,14 +11754,14 @@ Path } } ], - "detail": "t<'a> => t<'a>", + "detail": "t => t", "documentation": { "kind": "markdown", - "value": "\n`toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\nSee [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3])\nlet reversed = TypedArray.toReversed(view)\nTypedArray.toString(reversed) == \"3,2,1\"\nTypedArray.toString(view) == \"1,2,3\"\n```\n" + "value": "\n `toReversed(typedArray)` returns a new typed array with the elements in reverse order, leaving the original untouched.\n\n See [`TypedArray.prototype.toReversed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toReversed) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3])\n let reversed = Int32Array.toReversed(view)\n Int32Array.toString(reversed) == \"3,2,1\"\n Int32Array.toString(view) == \"1,2,3\"\n ```\n " }, - "insertText": "->TypedArray.toReversed", + "insertText": "->Uint8ClampedArray.toReversed", "kind": 12, - "label": "->TypedArray.toReversed", + "label": "->Uint8ClampedArray.toReversed", "sortText": "toReversed", "tags": [] }, @@ -12985,14 +11775,14 @@ Path } } ], - "detail": "(t<'a>, ~target: int, ~start: int, ~end: int=?) => array<'a>", + "detail": "(t, ~target: int, ~start: int, ~end: int=?) => array", "documentation": { "kind": "markdown", - "value": "\n`copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.copyWithin(view, ~target=1, ~start=2, ~end=4)\nTypedArray.toString(view) == \"1,3,4,4\"\n```\n" + "value": "\n `copyWithin(typedArray, ~target, ~start, ~end)` copies the section `[start, end)` onto the range beginning at `target`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.copyWithin`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.copyWithin(view, ~target=1, ~start=2, ~end=4)\n Int32Array.toString(view) == \"1,3,4,4\"\n ```\n " }, - "insertText": "->TypedArray.copyWithin", + "insertText": "->Uint8ClampedArray.copyWithin", "kind": 12, - "label": "->TypedArray.copyWithin", + "label": "->Uint8ClampedArray.copyWithin", "sortText": "copyWithin", "tags": [] }, @@ -13006,14 +11796,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => bool", + "detail": "(t, (int, int) => bool) => bool", "documentation": { "kind": "markdown", - "value": "\n`everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n" + "value": "\n `everyWithIndex(typedArray, checker)` is like `every` but provides the element index to `checker`.\n " }, - "insertText": "->TypedArray.everyWithIndex", + "insertText": "->Uint8ClampedArray.everyWithIndex", "kind": 12, - "label": "->TypedArray.everyWithIndex", + "label": "->Uint8ClampedArray.everyWithIndex", "sortText": "everyWithIndex", "tags": [] }, @@ -13027,14 +11817,14 @@ Path } } ], - "detail": "t<'a> => string", + "detail": "t => string", "documentation": { "kind": "markdown", - "value": "\n`toString(typedArray)` returns a comma-separated string of the elements.\n\nSee [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n## Examples\n\n```rescript\nInt32Array.fromArray([1, 2])->TypedArray.toString == \"1,2\"\n```\n" + "value": "\n `toString(typedArray)` returns a comma-separated string of the elements.\n\n See [`TypedArray.prototype.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString) on MDN.\n\n ## Examples\n\n ```rescript\n Int32Array.fromArray([1, 2])->Int32Array.toString == \"1,2\"\n ```\n " }, - "insertText": "->TypedArray.toString", + "insertText": "->Uint8ClampedArray.toString", "kind": 12, - "label": "->TypedArray.toString", + "label": "->Uint8ClampedArray.toString", "sortText": "toString", "tags": [] }, @@ -13048,14 +11838,14 @@ Path } } ], - "detail": "(t<'a>, array<'a>, int) => unit", + "detail": "(t, array, int) => unit", "documentation": { "kind": "markdown", - "value": "\n`setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\nSee [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([0, 0, 0])\nTypedArray.setArrayFrom(view, [5, 6], 1)\nTypedArray.toString(view) == \"0,5,6\"\n```\n" + "value": "\n `setArrayFrom(target, source, index)` copies `source` into `target` starting at `index`.\n\n See [`TypedArray.prototype.set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([0, 0, 0])\n Int32Array.setArrayFrom(view, [5, 6], 1)\n Int32Array.toString(view) == \"0,5,6\"\n ```\n " }, - "insertText": "->TypedArray.setArrayFrom", + "insertText": "->Uint8ClampedArray.setArrayFrom", "kind": 12, - "label": "->TypedArray.setArrayFrom", + "label": "->Uint8ClampedArray.setArrayFrom", "sortText": "setArrayFrom", "tags": [] }, @@ -13069,14 +11859,14 @@ Path } } ], - "detail": "(t<'a>, 'a => unit) => unit", + "detail": "(t, int => unit) => unit", "documentation": { "kind": "markdown", - "value": "\n`forEach(typedArray, f)` runs `f` for every element in order.\n\nSee [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n" + "value": "\n `forEach(typedArray, f)` runs `f` for every element in order.\n\n See [`TypedArray.prototype.forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach) on MDN.\n " }, - "insertText": "->TypedArray.forEach", + "insertText": "->Uint8ClampedArray.forEach", "kind": 12, - "label": "->TypedArray.forEach", + "label": "->Uint8ClampedArray.forEach", "sortText": "forEach", "tags": [] }, @@ -13090,14 +11880,14 @@ Path } } ], - "detail": "(t<'a>, ('a, int) => bool) => option<'a>", + "detail": "(t, (int, int) => bool) => option", "documentation": { "kind": "markdown", - "value": "\n`findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n" + "value": "\n `findWithIndex(typedArray, predicate)` behaves like `find`, but `predicate` also receives the index.\n " }, - "insertText": "->TypedArray.findWithIndex", + "insertText": "->Uint8ClampedArray.findWithIndex", "kind": 12, - "label": "->TypedArray.findWithIndex", + "label": "->Uint8ClampedArray.findWithIndex", "sortText": "findWithIndex", "tags": [] }, @@ -13111,14 +11901,14 @@ Path } } ], - "detail": "(t<'a>, 'a, ~start: int, ~end: int=?) => t<'a>", + "detail": "(t, int, ~start: int, ~end: int=?) => t", "documentation": { "kind": "markdown", - "value": "\n`fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n## Examples\n\n```rescript\nlet view = Int32Array.fromArray([1, 2, 3, 4])\nlet _ = TypedArray.fill(view, 0, ~start=1, ~end=3)\nTypedArray.toString(view) == \"1,0,0,4\"\n```\n" + "value": "\n `fill(typedArray, value, ~start, ~end)` fills the half-open interval `[start, end)` with `value`.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.fill`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill) on MDN.\n\n ## Examples\n\n ```rescript\n let view = Int32Array.fromArray([1, 2, 3, 4])\n let _ = Int32Array.fill(view, 0, ~start=1, ~end=3)\n Int32Array.toString(view) == \"1,0,0,4\"\n ```\n " }, - "insertText": "->TypedArray.fill", + "insertText": "->Uint8ClampedArray.fill", "kind": 12, - "label": "->TypedArray.fill", + "label": "->Uint8ClampedArray.fill", "sortText": "fill", "tags": [] }, @@ -13132,14 +11922,14 @@ Path } } ], - "detail": "(t<'a>, 'a, int) => int", + "detail": "(t, int, int) => int", "documentation": { "kind": "markdown", - "value": "\n`indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n" + "value": "\n `indexOfFrom(typedArray, value, fromIndex)` searches for `value` starting at `fromIndex`.\n " }, - "insertText": "->TypedArray.indexOfFrom", + "insertText": "->Uint8ClampedArray.indexOfFrom", "kind": 12, - "label": "->TypedArray.indexOfFrom", + "label": "->Uint8ClampedArray.indexOfFrom", "sortText": "indexOfFrom", "tags": [] }, @@ -13153,14 +11943,14 @@ Path } } ], - "detail": "t<'a> => unit", + "detail": "t => unit", "documentation": { "kind": "markdown", - "value": "\n`reverse(typedArray)` reverses the elements of the view in place.\n\nBeware this will *mutate* the typed array.\n\nSee [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n" + "value": "\n `reverse(typedArray)` reverses the elements of the view in place.\n\n Beware this will *mutate* the typed array.\n\n See [`TypedArray.prototype.reverse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse) on MDN.\n " }, - "insertText": "->TypedArray.reverse", + "insertText": "->Uint8ClampedArray.reverse", "kind": 12, - "label": "->TypedArray.reverse", + "label": "->Uint8ClampedArray.reverse", "sortText": "reverse", "tags": [] }, @@ -13174,14 +11964,14 @@ Path } } ], - "detail": "t<'a> => int", + "detail": "t => int", "documentation": { "kind": "markdown", - "value": "\n`byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\nSee [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n" + "value": "\n `byteOffset(typedArray)` returns the offset in bytes from the start of the buffer.\n\n See [`TypedArray.prototype.byteOffset`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/byteOffset) on MDN.\n " }, - "insertText": "->TypedArray.byteOffset", + "insertText": "->Uint8ClampedArray.byteOffset", "kind": 12, - "label": "->TypedArray.byteOffset", + "label": "->Uint8ClampedArray.byteOffset", "sortText": "byteOffset", "tags": [] } diff --git a/tests/build_tests/super_errors/expected/instance_of_public_abbreviation.res.expected b/tests/build_tests/super_errors/expected/instance_of_public_abbreviation.res.expected new file mode 100644 index 00000000000..a390264f2f4 --- /dev/null +++ b/tests/build_tests/super_errors/expected/instance_of_public_abbreviation.res.expected @@ -0,0 +1,10 @@ + + We've found a bug for you! + /.../fixtures/instance_of_public_abbreviation.res:4:24-42 + + 2 │ // of that type an instance, and two such abbreviations could disagree + 3 │ type node + 4 │ @instanceOf("Element") type element = node + 5 │ + + A class must be declared on an abstract type or a private abbreviation: write `= private ...`, so that values of the abbreviated type are not instances of Element without a coercion, and another abbreviation cannot declare them instances of another class. \ No newline at end of file diff --git a/tests/build_tests/super_errors/expected/typed_array_cases_distinct.res.expected b/tests/build_tests/super_errors/expected/typed_array_cases_distinct.res.expected new file mode 100644 index 00000000000..8bba3c51d96 --- /dev/null +++ b/tests/build_tests/super_errors/expected/typed_array_cases_distinct.res.expected @@ -0,0 +1,11 @@ + + We've found a bug for you! + /.../fixtures/typed_array_cases_distinct.res:4:12-36 + + 2 │ @unboxed type ta = I8(Int8Array.t) | U8(Uint8Array.t) + 3 │ + 4 │ let x = I8(Uint8Array.fromArray([1])) + 5 │ + + This has type: Uint8Array.t (defined as Uint8Array.t) + But it's expected to have type: Int8Array.t (defined as Int8Array.t) \ No newline at end of file diff --git a/tests/build_tests/super_errors/fixtures/instance_of_public_abbreviation.res b/tests/build_tests/super_errors/fixtures/instance_of_public_abbreviation.res new file mode 100644 index 00000000000..b02f6a20b7e --- /dev/null +++ b/tests/build_tests/super_errors/fixtures/instance_of_public_abbreviation.res @@ -0,0 +1,4 @@ +// A class on a public abbreviation of an opaque type would make every value +// of that type an instance, and two such abbreviations could disagree +type node +@instanceOf("Element") type element = node diff --git a/tests/build_tests/super_errors/fixtures/typed_array_cases_distinct.res b/tests/build_tests/super_errors/fixtures/typed_array_cases_distinct.res new file mode 100644 index 00000000000..1cf45d5245c --- /dev/null +++ b/tests/build_tests/super_errors/fixtures/typed_array_cases_distinct.res @@ -0,0 +1,4 @@ +// Each typed array is a type of its own, so one cannot stand in for another +@unboxed type ta = I8(Int8Array.t) | U8(Uint8Array.t) + +let x = I8(Uint8Array.fromArray([1])) diff --git a/tests/tests/src/stdlib/Stdlib_TypedArrayTests.mjs b/tests/tests/src/stdlib/Stdlib_TypedArrayTests.mjs index f83a67c6989..e6116d75b14 100644 --- a/tests/tests/src/stdlib/Stdlib_TypedArrayTests.mjs +++ b/tests/tests/src/stdlib/Stdlib_TypedArrayTests.mjs @@ -84,6 +84,11 @@ assertTrue("fromLength is NOT in bytes", () => { return x.byteLength === 8; }); +assertTrue("a typed array is a TypedArray.t through a coercion", () => { + let x = new BigInt64Array(2); + return x.length === 2; +}); + function o(prim0, prim1) { return BigInt64Array.from(prim0, prim1); } diff --git a/tests/tests/src/stdlib/Stdlib_TypedArrayTests.res b/tests/tests/src/stdlib/Stdlib_TypedArrayTests.res index 64a9385bb86..693e174f057 100644 --- a/tests/tests/src/stdlib/Stdlib_TypedArrayTests.res +++ b/tests/tests/src/stdlib/Stdlib_TypedArrayTests.res @@ -37,25 +37,25 @@ let areSame = (x: bigint, y: bigint) => BigInt.toString(x) == BigInt.toString(y) // assertTrue("big ints if same then equal", () => num1 == num1) assertTrue("fromArray", () => - [num1, num2]->BigInt64Array.fromArray->TypedArray.get(1)->Option.getExn->areSame(num2) + [num1, num2]->BigInt64Array.fromArray->BigInt64Array.get(1)->Option.getExn->areSame(num2) ) assertTrue("fromBuffer", () => { let x = ArrayBuffer.make(16)->BigInt64Array.fromBuffer - x->TypedArray.set(1, num2) - x->TypedArray.get(1)->Option.getExn->areSame(num2) + x->BigInt64Array.set(1, num2) + x->BigInt64Array.get(1)->Option.getExn->areSame(num2) }) assertWillThrow("fromBuffer when too short can throw when used", () => { let x = ArrayBuffer.make(1)->BigInt64Array.fromBuffer - x->TypedArray.set(0, num1) - x->TypedArray.get(0)->Option.getExn->areSame(num1)->ignore + x->BigInt64Array.set(0, num1) + x->BigInt64Array.get(0)->Option.getExn->areSame(num1)->ignore }) assertTrue("fromBufferWithRange", () => { let x = ArrayBuffer.make(16)->BigInt64Array.fromBufferWithRange(~byteOffset=0, ~length=1) - x->TypedArray.set(0, num1) - x->TypedArray.get(0)->Option.getExn->areSame(num1) + x->BigInt64Array.set(0, num1) + x->BigInt64Array.get(0)->Option.getExn->areSame(num1) }) // assertWillThrow("testing", () => {"a"->Error.make->Error.raise}) @@ -63,12 +63,17 @@ assertTrue("fromBufferWithRange", () => { assertWillThrow("fromBufferWithRange is unsafe, out of range", () => { let x = ArrayBuffer.make(16)->BigInt64Array.fromBufferWithRange(~byteOffset=13, ~length=1) - x->TypedArray.set(0, num1) - x->TypedArray.get(0)->Option.getExn->areSame(num1)->ignore + x->BigInt64Array.set(0, num1) + x->BigInt64Array.get(0)->Option.getExn->areSame(num1)->ignore }) assertTrue("fromLength is NOT in bytes", () => { let x = BigInt64Array.fromLength(1) - TypedArray.byteLength(x) == 8 + BigInt64Array.byteLength(x) == 8 +}) + +assertTrue("a typed array is a TypedArray.t through a coercion", () => { + let x = BigInt64Array.fromLength(2) + TypedArray.length(x :> TypedArray.t) == 2 }) let o = BigInt64Array.fromArrayLikeOrIterableWithMap diff --git a/tests/tests/src/untagged_runtime_annotations_test.mjs b/tests/tests/src/untagged_runtime_annotations_test.mjs index 99d58fcefd3..442518c9e35 100644 --- a/tests/tests/src/untagged_runtime_annotations_test.mjs +++ b/tests/tests/src/untagged_runtime_annotations_test.mjs @@ -155,6 +155,16 @@ function id(x) { return x; } +function typedArrayKind(value) { + if (value instanceof Int8Array) { + return "int8"; + } else if (value instanceof Uint8Array) { + return "uint8"; + } else { + return "float64"; + } +} + function missingKind(value) { switch (typeof value) { case "string" : @@ -194,92 +204,97 @@ function sharedKind(value) { Mocha.describe("Untagged_runtime_annotations_test", () => { Mocha.test("a subclass case is not taken for its superclass", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 259, characters 7-14", "animal", describePet(new UntaggedAnimal())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 260, characters 7-14", "dog", describePet(new UntaggedDog())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 261, characters 7-14", "rex", "rex"); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 270, characters 7-14", "animal", describePet(new UntaggedAnimal())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 271, characters 7-14", "dog", describePet(new UntaggedDog())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 272, characters 7-14", "rex", "rex"); }); Mocha.test("a superclass case alone excludes the subclass", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 265, characters 7-14", "animal", onlyAnimal(new UntaggedAnimal())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 266, characters 7-14", "other", onlyAnimal(new UntaggedDog())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 276, characters 7-14", "animal", onlyAnimal(new UntaggedAnimal())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 277, characters 7-14", "other", onlyAnimal(new UntaggedDog())); }); Mocha.test("declaration order does not matter", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 270, characters 7-14", "dog", describeReversed(new UntaggedDog())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 271, characters 7-14", "animal", describeReversed(new UntaggedAnimal())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 281, characters 7-14", "dog", describeReversed(new UntaggedDog())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 282, characters 7-14", "animal", describeReversed(new UntaggedAnimal())); }); Mocha.test("a subclass upcasts to its superclass", () => { let animal = new UntaggedDog(); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 276, characters 7-14", "dog", describePet(animal)); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 287, characters 7-14", "dog", describePet(animal)); }); Mocha.test("classes reached through a module alias", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 280, characters 7-14", "animal", describeAliased(new UntaggedAnimal())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 281, characters 7-14", "dog", describeAliased(new UntaggedDog())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 291, characters 7-14", "animal", describeAliased(new UntaggedAnimal())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 292, characters 7-14", "dog", describeAliased(new UntaggedDog())); }); Mocha.test("typeOf symbol", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 285, characters 7-14", "symbol", keyKind(Symbol.for("key"))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 286, characters 7-14", "text", "text"); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 296, characters 7-14", "symbol", keyKind(Symbol.for("key"))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 297, characters 7-14", "text", "text"); }); Mocha.test("typeOf string", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 290, characters 7-14", "id", "id"); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 291, characters 7-14", "index", "index"); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 301, characters 7-14", "id", "id"); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 302, characters 7-14", "index", "index"); }); Mocha.test("a class at a dotted path", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 295, characters 7-14", "locale", localeKind(new Intl.Locale("en"))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 296, characters 7-14", "de", "de"); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 306, characters 7-14", "locale", localeKind(new Intl.Locale("en"))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 307, characters 7-14", "de", "de"); }); Mocha.test("an annotated type is not wrapped in an option", () => { let animal = new UntaggedAnimal(); - Test_utils.ok("File \"untagged_runtime_annotations_test.res\", line 301, characters 7-14", animal === animal); - Test_utils.ok("File \"untagged_runtime_annotations_test.res\", line 302, characters 7-14", animal === animal); + Test_utils.ok("File \"untagged_runtime_annotations_test.res\", line 312, characters 7-14", animal === animal); + Test_utils.ok("File \"untagged_runtime_annotations_test.res\", line 313, characters 7-14", animal === animal); }); Mocha.test("a phantom type hierarchy", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 306, characters 7-14", "animal", describePhantom(new UntaggedAnimal())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 307, characters 7-14", "dog", describePhantom(new UntaggedDog())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 317, characters 7-14", "animal", describePhantom(new UntaggedAnimal())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 318, characters 7-14", "dog", describePhantom(new UntaggedDog())); }); Mocha.test("a function case excludes class instances", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 311, characters 7-14", "callable", handlerKind(new UntaggedCallable())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 312, characters 7-14", "function", handlerKind(x => x)); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 313, characters 7-14", "other", wideHandlerKind(new UntaggedCallable())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 314, characters 7-14", "other", wideHandlerKind(new UntaggedAnimal())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 315, characters 7-14", "function", wideHandlerKind(x => x)); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 316, characters 7-14", "name", "name"); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 317, characters 7-14", "other", "other"); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 322, characters 7-14", "callable", handlerKind(new UntaggedCallable())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 323, characters 7-14", "function", handlerKind(x => x)); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 324, characters 7-14", "other", wideHandlerKind(new UntaggedCallable())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 325, characters 7-14", "other", wideHandlerKind(new UntaggedAnimal())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 326, characters 7-14", "function", wideHandlerKind(x => x)); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 327, characters 7-14", "name", "name"); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 328, characters 7-14", "other", "other"); + }); + Mocha.test("typed arrays of different classes", () => { + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 332, characters 7-14", "int8", typedArrayKind(id(new Int8Array([1])))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 333, characters 7-14", "uint8", typedArrayKind(id(new Uint8Array([1])))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 334, characters 7-14", "float64", typedArrayKind(id(new Float64Array([1])))); }); Mocha.test("a class declared over an object type", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 321, characters 7-14", "dog", objectOrNameKind(new UntaggedDog())); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 322, characters 7-14", "rex", "rex"); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 338, characters 7-14", "dog", objectOrNameKind(new UntaggedDog())); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 339, characters 7-14", "rex", "rex"); }); Mocha.test("annotations restating a structural kind", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 326, characters 7-14", "2", restatedKind(id(x => x + 1 | 0))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 327, characters 7-14", "3", restatedKind(id({ + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 343, characters 7-14", "2", restatedKind(id(x => x + 1 | 0))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 344, characters 7-14", "3", restatedKind(id({ px: 3 }))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 328, characters 7-14", "a", restatedKind(id("a"))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 329, characters 7-14", "callback", restatedAbstractKind(id(callback))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 330, characters 7-14", "point", restatedAbstractKind(id(point))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 331, characters 7-14", "4", privateOrNameKind(id({ + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 345, characters 7-14", "a", restatedKind(id("a"))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 346, characters 7-14", "callback", restatedAbstractKind(id(callback))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 347, characters 7-14", "point", restatedAbstractKind(id(point))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 348, characters 7-14", "4", privateOrNameKind(id({ px: 4 }))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 332, characters 7-14", "a", privateOrNameKind(id("a"))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 333, characters 7-14", "5", jsOrNameKind(id({ + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 349, characters 7-14", "a", privateOrNameKind(id("a"))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 350, characters 7-14", "5", jsOrNameKind(id({ pz: 5 }))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 334, characters 7-14", "b", jsOrNameKind(id("b"))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 351, characters 7-14", "b", jsOrNameKind(id("b"))); }); Mocha.test("primitive cases are tested before class checks", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 338, characters 7-14", "a", missingKind(id("a"))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 339, characters 7-14", "count", missingKind(id(1))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 355, characters 7-14", "a", missingKind(id("a"))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 356, characters 7-14", "count", missingKind(id(1))); }); Mocha.test("a primitive without an arm skips class checks", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 343, characters 7-14", "a", missingOrDefault(id("a"))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 344, characters 7-14", "other", missingOrDefault(id(1))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 360, characters 7-14", "a", missingOrDefault(id("a"))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 361, characters 7-14", "other", missingOrDefault(id(1))); }); Mocha.test("a default shared by a primitive and an object case", () => { - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 348, characters 7-14", "date!", sharedKind(id(new Date()))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 349, characters 7-14", "other!", sharedKind(id({ + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 365, characters 7-14", "date!", sharedKind(id(new Date()))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 366, characters 7-14", "other!", sharedKind(id({ x: 1 }))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 350, characters 7-14", "text!", sharedKind(id("a"))); - Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 351, characters 7-14", "other!", sharedKind(id(1))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 367, characters 7-14", "text!", sharedKind(id("a"))); + Test_utils.eq("File \"untagged_runtime_annotations_test.res\", line 368, characters 7-14", "other!", sharedKind(id(1))); }); }); @@ -305,6 +320,7 @@ export { privateOrNameKind, jsOrNameKind, id, + typedArrayKind, missingKind, missingOrDefault, sharedKind, diff --git a/tests/tests/src/untagged_runtime_annotations_test.res b/tests/tests/src/untagged_runtime_annotations_test.res index a5ae0eccd53..1309a448270 100644 --- a/tests/tests/src/untagged_runtime_annotations_test.res +++ b/tests/tests/src/untagged_runtime_annotations_test.res @@ -97,7 +97,7 @@ let localeKind = locale => // A phantom type hierarchy declares its subclasses as private abbreviations // too type nodeLike<'a> -@instanceOf("UntaggedAnimal") type animalLike<'a> = nodeLike<'a> +@instanceOf("UntaggedAnimal") type animalLike<'a> = private nodeLike<'a> type _dog<'a> @instanceOf("UntaggedDog") type dogLike<'a> = private animalLike<_dog<'a>> type _base @@ -222,6 +222,17 @@ let jsOrNameKind = value => @inline(never) let id = x => x +// Typed arrays are types of their own, each recognized by its class +@unboxed +type typedArrays = Bytes(Int8Array.t) | UnsignedBytes(Uint8Array.t) | Doubles(Float64Array.t) + +let typedArrayKind = value => + switch value { + | Bytes(_) => "int8" + | UnsignedBytes(_) => "uint8" + | Doubles(_) => "float64" + } + // No class of this name exists at run time @instanceOf("UntaggedMissingClass") type missing @@ -317,6 +328,12 @@ describe(__MODULE__, () => { eq(__LOC__, "other", wideHandlerKind(WideCount(1.))) }) + test("typed arrays of different classes", () => { + eq(__LOC__, "int8", typedArrayKind(id(Bytes(Int8Array.fromArray([1]))))) + eq(__LOC__, "uint8", typedArrayKind(id(UnsignedBytes(Uint8Array.fromArray([1]))))) + eq(__LOC__, "float64", typedArrayKind(id(Doubles(Float64Array.fromArray([1.]))))) + }) + test("a class declared over an object type", () => { eq(__LOC__, "dog", objectOrNameKind(ObjectDog(makeObjectDog()))) eq(__LOC__, "rex", objectOrNameKind(ObjectName("rex"))) diff --git a/tests/tools_tests/src/expected/StdlibMigration_TypedArray_Operations.res.expected b/tests/tools_tests/src/expected/StdlibMigration_TypedArray_Operations.res.expected index d383f7835a5..c55769d4627 100644 --- a/tests/tools_tests/src/expected/StdlibMigration_TypedArray_Operations.res.expected +++ b/tests/tools_tests/src/expected/StdlibMigration_TypedArray_Operations.res.expected @@ -1,4 +1,4 @@ -let ta = Uint8Array.fromArray([1, 2, 3, 4]) +let ta = (Uint8Array.fromArray([1, 2, 3, 4]) :> TypedArray.t) let a1 = ta->TypedArray.copyWithin(~target=1, ~start=2) let a2 = ta->TypedArray.fill(9, ~start=1) diff --git a/tests/tools_tests/src/migrate/StdlibMigration_TypedArray_Operations.res b/tests/tools_tests/src/migrate/StdlibMigration_TypedArray_Operations.res index 1be692eae0f..1aed614db9a 100644 --- a/tests/tools_tests/src/migrate/StdlibMigration_TypedArray_Operations.res +++ b/tests/tools_tests/src/migrate/StdlibMigration_TypedArray_Operations.res @@ -1,4 +1,4 @@ -let ta = Uint8Array.fromArray([1, 2, 3, 4]) +let ta = (Uint8Array.fromArray([1, 2, 3, 4]) :> TypedArray.t) let a1 = ta->TypedArray.copyWithinToEnd(~target=1, ~start=2) let a2 = ta->TypedArray.fillToEnd(9, ~start=1) diff --git a/tests/tools_tests/src/migrate/migrated/Migrated_StdlibMigration_TypedArray_Operations.res b/tests/tools_tests/src/migrate/migrated/Migrated_StdlibMigration_TypedArray_Operations.res index 9f689ac2fdc..46bb22556e4 100644 --- a/tests/tools_tests/src/migrate/migrated/Migrated_StdlibMigration_TypedArray_Operations.res +++ b/tests/tools_tests/src/migrate/migrated/Migrated_StdlibMigration_TypedArray_Operations.res @@ -1,6 +1,6 @@ // This file is autogenerated so it can be type checked. // It's the migrated version of src/migrate/StdlibMigration_TypedArray_Operations.res. -let ta = Uint8Array.fromArray([1, 2, 3, 4]) +let ta = (Uint8Array.fromArray([1, 2, 3, 4]) :> TypedArray.t) let a1 = ta->TypedArray.copyWithin(~target=1, ~start=2) let a2 = ta->TypedArray.fill(9, ~start=1)