MetadataBlock
Defined in: src/backends/single_buffer.ts:67
A block of metadata for a single-buffer file system. This metadata maps IDs (for inodes and data) to actual offsets in the buffer. This is done since IDs are not guaranteed to be sequential.
Extends
Section titled “Extends”Int32Array<ArrayBuffer,this>
Indexable
Section titled “Indexable”[
index:number]:number
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MetadataBlock(
buffer,byteOffset?,byteLength?):MetadataBlock
Defined in: node_modules/memium/dist/decorators.d.ts:62
Parameters
Section titled “Parameters”buffer
Section titled “buffer”ArrayBufferLike
byteOffset?
Section titled “byteOffset?”number
byteLength?
Section titled “byteLength?”number
Returns
Section titled “Returns”MetadataBlock
Inherited from
Section titled “Inherited from”$from.typed(Int32Array)<ArrayBufferLike>.constructor
Properties
Section titled “Properties”_previous?
Section titled “_previous?”
protectedoptional_previous?:MetadataBlock
Defined in: src/backends/single_buffer.ts:86
[toStringTag]
Section titled “[toStringTag]”
readonly[toStringTag]:"Int32Array"
Defined in: ../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:298
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).[toStringTag]
buffer
Section titled “buffer”
readonlybuffer:ArrayBuffer
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3298
The ArrayBuffer instance referenced by the array.
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).buffer
byteLength
Section titled “byteLength”
readonlybyteLength:number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3303
The length in bytes of the array.
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).byteLength
byteOffset
Section titled “byteOffset”
readonlybyteOffset:number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3308
The offset in bytes of the array.
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).byteOffset
BYTES_PER_ELEMENT
Section titled “BYTES_PER_ELEMENT”
readonlyBYTES_PER_ELEMENT:number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3293
The size in bytes of each element in the array.
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).BYTES_PER_ELEMENT
constructor
Section titled “constructor”
readonlyconstructor: typeofMetadataBlock
Defined in: src/backends/single_buffer.ts:70
The initial value of Object.prototype.constructor is the standard built-in Object constructor.
length
Section titled “length”
readonlylength:number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3407
The length of the array.
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).length
alignment
Section titled “alignment”
readonlystaticalignment:number
Defined in: node_modules/memium/dist/structs.shared.d.ts:11
Inherited from
Section titled “Inherited from”array?
Section titled “array?”
readonlystaticoptionalarray?:TypeArrayConstructor<ArrayBufferView<ArrayBufferLike>>
Defined in: node_modules/memium/dist/types.d.ts:14
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).array
BYTES_PER_ELEMENT?
Section titled “BYTES_PER_ELEMENT?”
readonlystaticoptionalBYTES_PER_ELEMENT?:number
Defined in: node_modules/memium/dist/decorators.d.ts:65
Inherited from
Section titled “Inherited from”isDynamic?
Section titled “isDynamic?”
readonlystaticoptionalisDynamic?:boolean
Defined in: node_modules/memium/dist/structs.shared.d.ts:13
Inherited from
Section titled “Inherited from”isUnion
Section titled “isUnion”
readonlystaticisUnion:boolean
Defined in: node_modules/memium/dist/structs.shared.d.ts:12
Inherited from
Section titled “Inherited from”
staticname:string='MetadataBlock'
Defined in: src/backends/single_buffer.ts:68
Returns the name of the function. Function names are read-only and can not be changed.
Overrides
Section titled “Overrides”$from.typed(Int32Array).name
readonlystaticsize:number
Defined in: node_modules/memium/dist/types.d.ts:13
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”checksum
Section titled “checksum”Defined in: src/backends/single_buffer.ts:78
The crc32c checksum for the metadata block.
Defined in: src/backends/single_buffer.ts:95
Metadata entries.
locked
Section titled “locked”Defined in: src/backends/single_buffer.ts:120
If non-zero, this block is locked for writing.
Note a int32 is used for Atomics.wait
previous
Section titled “previous”Get Signature
Section titled “Get Signature”get previous():
MetadataBlock|undefined
Defined in: src/backends/single_buffer.ts:88
Returns
Section titled “Returns”MetadataBlock | undefined
previous_offset
Section titled “previous_offset”Defined in: src/backends/single_buffer.ts:84
Offset to the previous metadata block
timestamp
Section titled “timestamp”Defined in: src/backends/single_buffer.ts:81
The (last) time this metadata block was updated
Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”[iterator]():
ArrayIterator<number>
Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:458
Returns
Section titled “Returns”ArrayIterator<number>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).[iterator]
at(
index):number|undefined
Defined in: ../../node_modules/typescript/lib/lib.es2022.array.d.ts:78
Returns the item located at the specified index.
Parameters
Section titled “Parameters”number
The zero-based index of the desired code unit. A negative index will count back from the last item.
Returns
Section titled “Returns”number | undefined
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).at
copyWithin()
Section titled “copyWithin()”copyWithin(
target,start,end?):this
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3319
Returns the this object after copying a section of the array identified by start and end to the same array starting at position target
Parameters
Section titled “Parameters”target
Section titled “target”number
If target is negative, it is treated as length+target where length is the length of the array.
number
If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.
number
If not specified, length of the this object is used as its default value.
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).copyWithin
entries()
Section titled “entries()”entries():
ArrayIterator<[number,number]>
Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:463
Returns an array of key, value pairs for every entry in the array
Returns
Section titled “Returns”ArrayIterator<[number, number]>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).entries
every()
Section titled “every()”every(
predicate,thisArg?):boolean
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3329
Determines whether all the members of an array satisfy the specified test.
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value, index, array) => unknown
A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
thisArg?
Section titled “thisArg?”any
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).every
fill()
Section titled “fill()”fill(
value,start?,end?):this
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3339
Changes all array elements from start to end index to a static value and returns the modified array
Parameters
Section titled “Parameters”number
value to fill array section with
start?
Section titled “start?”number
index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.
number
index to stop filling the array at. If end is negative, it is treated as length+end.
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).fill
filter()
Section titled “filter()”filter(
predicate,thisArg?):Int32Array<ArrayBuffer>
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3348
Returns the elements of an array that meet the condition specified in a callback function.
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value, index, array) => any
A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
thisArg?
Section titled “thisArg?”any
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Returns
Section titled “Returns”Int32Array<ArrayBuffer>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).filter
find()
Section titled “find()”find(
predicate,thisArg?):number|undefined
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3359
Returns the value of the first element in the array where predicate is true, and undefined otherwise.
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value, index, obj) => boolean
find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
thisArg?
Section titled “thisArg?”any
If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
Returns
Section titled “Returns”number | undefined
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).find
findIndex()
Section titled “findIndex()”findIndex(
predicate,thisArg?):number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3370
Returns the index of the first element in the array where predicate is true, and -1 otherwise.
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value, index, obj) => boolean
find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.
thisArg?
Section titled “thisArg?”any
If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).findIndex
findLast()
Section titled “findLast()”Call Signature
Section titled “Call Signature”findLast<
S>(predicate,thisArg?):S|undefined
Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:510
Returns the value of the last element in the array where predicate is true, and undefined otherwise.
Type Parameters
Section titled “Type Parameters”S extends number
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value, index, array) => value is S
findLast calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLast immediately returns that element value. Otherwise, findLast returns undefined.
thisArg?
Section titled “thisArg?”any
If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
Returns
Section titled “Returns”S | undefined
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).findLast
Call Signature
Section titled “Call Signature”findLast(
predicate,thisArg?):number|undefined
Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:518
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value, index, array) => unknown
thisArg?
Section titled “thisArg?”any
Returns
Section titled “Returns”number | undefined
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).findLast
findLastIndex()
Section titled “findLastIndex()”findLastIndex(
predicate,thisArg?):number
Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:532
Returns the index of the last element in the array where predicate is true, and -1 otherwise.
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value, index, array) => unknown
findLastIndex calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
thisArg?
Section titled “thisArg?”any
If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).findLastIndex
forEach()
Section titled “forEach()”forEach(
callbackfn,thisArg?):void
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3379
Performs the specified action for each element in an array.
Parameters
Section titled “Parameters”callbackfn
Section titled “callbackfn”(value, index, array) => void
A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
thisArg?
Section titled “thisArg?”any
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).forEach
includes()
Section titled “includes()”includes(
searchElement,fromIndex?):boolean
Defined in: ../../node_modules/typescript/lib/lib.es2016.array.include.d.ts:86
Determines whether an array includes a certain element, returning true or false as appropriate.
Parameters
Section titled “Parameters”searchElement
Section titled “searchElement”number
The element to search for.
fromIndex?
Section titled “fromIndex?”number
The position in this array at which to begin searching for searchElement.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).includes
indexOf()
Section titled “indexOf()”indexOf(
searchElement,fromIndex?):number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3387
Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
Parameters
Section titled “Parameters”searchElement
Section titled “searchElement”number
The value to locate in the array.
fromIndex?
Section titled “fromIndex?”number
The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).indexOf
join()
Section titled “join()”join(
separator?):string
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3394
Adds all the elements of an array separated by the specified separator string.
Parameters
Section titled “Parameters”separator?
Section titled “separator?”string
A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).join
keys()
Section titled “keys()”keys():
ArrayIterator<number>
Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:468
Returns an list of keys in the array
Returns
Section titled “Returns”ArrayIterator<number>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).keys
lastIndexOf()
Section titled “lastIndexOf()”lastIndexOf(
searchElement,fromIndex?):number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3402
Returns the index of the last occurrence of a value in an array, or -1 if it is not present.
Parameters
Section titled “Parameters”searchElement
Section titled “searchElement”number
The value to locate in the array.
fromIndex?
Section titled “fromIndex?”number
The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).lastIndexOf
lock()
Section titled “lock()”lock():
SBLock
Defined in: src/backends/single_buffer.ts:142
Returns
Section titled “Returns”SBLock
map(
callbackfn,thisArg?):Int32Array<ArrayBuffer>
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3417
Calls a defined callback function on each element of an array, and returns an array that contains the results.
Parameters
Section titled “Parameters”callbackfn
Section titled “callbackfn”(value, index, array) => number
A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
thisArg?
Section titled “thisArg?”any
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Returns
Section titled “Returns”Int32Array<ArrayBuffer>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).map
reduce()
Section titled “reduce()”Call Signature
Section titled “Call Signature”reduce(
callbackfn):number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3429
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Parameters
Section titled “Parameters”callbackfn
Section titled “callbackfn”(previousValue, currentValue, currentIndex, array) => number
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).reduce
Call Signature
Section titled “Call Signature”reduce(
callbackfn,initialValue):number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3430
Parameters
Section titled “Parameters”callbackfn
Section titled “callbackfn”(previousValue, currentValue, currentIndex, array) => number
initialValue
Section titled “initialValue”number
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).reduce
Call Signature
Section titled “Call Signature”reduce<
U>(callbackfn,initialValue):U
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3442
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Type Parameters
Section titled “Type Parameters”U
Parameters
Section titled “Parameters”callbackfn
Section titled “callbackfn”(previousValue, currentValue, currentIndex, array) => U
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
initialValue
Section titled “initialValue”U
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
Returns
Section titled “Returns”U
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).reduce
reduceRight()
Section titled “reduceRight()”Call Signature
Section titled “Call Signature”reduceRight(
callbackfn):number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3454
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Parameters
Section titled “Parameters”callbackfn
Section titled “callbackfn”(previousValue, currentValue, currentIndex, array) => number
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).reduceRight
Call Signature
Section titled “Call Signature”reduceRight(
callbackfn,initialValue):number
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3455
Parameters
Section titled “Parameters”callbackfn
Section titled “callbackfn”(previousValue, currentValue, currentIndex, array) => number
initialValue
Section titled “initialValue”number
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).reduceRight
Call Signature
Section titled “Call Signature”reduceRight<
U>(callbackfn,initialValue):U
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3467
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Type Parameters
Section titled “Type Parameters”U
Parameters
Section titled “Parameters”callbackfn
Section titled “callbackfn”(previousValue, currentValue, currentIndex, array) => U
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
initialValue
Section titled “initialValue”U
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
Returns
Section titled “Returns”U
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).reduceRight
reverse()
Section titled “reverse()”reverse():
this
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3472
Reverses the elements in an Array.
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).reverse
set(
array,offset?):void
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3479
Sets a value or an array of values.
Parameters
Section titled “Parameters”ArrayLike<number>
A typed or untyped array of values to set.
offset?
Section titled “offset?”number
The index in the current array at which the values are to be written.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).set
slice()
Section titled “slice()”slice(
start?,end?):Int32Array<ArrayBuffer>
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3486
Returns a section of an array.
Parameters
Section titled “Parameters”start?
Section titled “start?”number
The beginning of the specified portion of the array.
number
The end of the specified portion of the array. This is exclusive of the element at the index ‘end’.
Returns
Section titled “Returns”Int32Array<ArrayBuffer>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).slice
some()
Section titled “some()”some(
predicate,thisArg?):boolean
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3496
Determines whether the specified callback function returns true for any element of an array.
Parameters
Section titled “Parameters”predicate
Section titled “predicate”(value, index, array) => unknown
A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
thisArg?
Section titled “thisArg?”any
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).some
sort()
Section titled “sort()”sort(
compareFn?):this
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3507
Sorts an array.
Parameters
Section titled “Parameters”compareFn?
Section titled “compareFn?”(a, b) => number
Function used to determine the order of the elements. It is expected to return a negative value if first argument is less than second argument, zero if they’re equal and a positive value otherwise. If omitted, the elements are sorted in ascending order.
[11,2,22,1].sort((a, b) => a - b)Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).sort
subarray()
Section titled “subarray()”subarray(
begin?,end?):Int32Array<ArrayBuffer>
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3515
Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.
Parameters
Section titled “Parameters”begin?
Section titled “begin?”number
The index of the beginning of the array.
number
The index of the end of the array.
Returns
Section titled “Returns”Int32Array<ArrayBuffer>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).subarray
toLocaleString()
Section titled “toLocaleString()”Call Signature
Section titled “Call Signature”toLocaleString():
string
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3520
Converts a number to a string by using the current locale.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).toLocaleString
Call Signature
Section titled “Call Signature”toLocaleString(
locales,options?):string
Defined in: ../../node_modules/typescript/lib/lib.es2015.core.d.ts:582
Parameters
Section titled “Parameters”locales
Section titled “locales”string | string[]
options?
Section titled “options?”NumberFormatOptions
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).toLocaleString
toReversed()
Section titled “toReversed()”toReversed():
Int32Array<ArrayBuffer>
Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:540
Copies the array and returns the copy with the elements in reverse order.
Returns
Section titled “Returns”Int32Array<ArrayBuffer>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).toReversed
toSorted()
Section titled “toSorted()”toSorted(
compareFn?):Int32Array<ArrayBuffer>
Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:552
Copies and sorts the array.
Parameters
Section titled “Parameters”compareFn?
Section titled “compareFn?”(a, b) => number
Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they’re equal, and a positive value otherwise. If omitted, the elements are sorted in ascending order.
const myNums = Int32Array.from([11, 2, -22, 1]);myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11]Returns
Section titled “Returns”Int32Array<ArrayBuffer>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).toSorted
toString()
Section titled “toString()”toString(
long?):string
Defined in: src/backends/single_buffer.ts:97
Returns a string representation of an array.
Parameters
Section titled “Parameters”boolean = false
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”$from.typed(Int32Array).toString
valueOf()
Section titled “valueOf()”valueOf():
this
Defined in: ../../node_modules/typescript/lib/lib.es5.d.ts:3528
Returns the primitive value of the specified object.
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).valueOf
values()
Section titled “values()”values():
ArrayIterator<number>
Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:473
Returns an list of values in the array
Returns
Section titled “Returns”ArrayIterator<number>
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).values
waitUnlocked()
Section titled “waitUnlocked()”waitUnlocked(
depth?):void
Defined in: src/backends/single_buffer.ts:125
Wait for the block to be unlocked.
Parameters
Section titled “Parameters”depth?
Section titled “depth?”number = 0
Returns
Section titled “Returns”void
with()
Section titled “with()”with(
index,value):Int32Array<ArrayBuffer>
Defined in: ../../node_modules/typescript/lib/lib.es2023.array.d.ts:561
Copies the array and inserts the given number at the provided index.
Parameters
Section titled “Parameters”number
The index of the value to overwrite. If the index is negative, then it replaces from the end of the array.
number
The value to insert into the copied array.
Returns
Section titled “Returns”Int32Array<ArrayBuffer>
A copy of the original array with the inserted value.
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).with
staticget(this,buffer,offset):ArrayBufferView
Defined in: node_modules/memium/dist/types.d.ts:17
Get a value from a buffer
Parameters
Section titled “Parameters”void
buffer
Section titled “buffer”ArrayBufferLike
offset
Section titled “offset”number
Returns
Section titled “Returns”ArrayBufferView
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).get
staticset(this,buffer,offset,value):void
Defined in: node_modules/memium/dist/types.d.ts:19
Set a value in a buffer
Parameters
Section titled “Parameters”void
buffer
Section titled “buffer”ArrayBufferLike
offset
Section titled “offset”number
ArrayBufferView
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”$from.typed(Int32Array).set