From 79dfefa448e42578fb02ad1804b0e9e5e9f32076 Mon Sep 17 00:00:00 2001 From: Divit Date: Thu, 9 Jul 2026 18:25:30 +0000 Subject: [PATCH 1/4] feat: add Uint64Array dtype support --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/types/index.d.ts | 111 +++++++++++++++++++++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/types/index.d.ts b/lib/node_modules/@stdlib/types/index.d.ts index 31d6378e0abc..3650f5e075aa 100644 --- a/lib/node_modules/@stdlib/types/index.d.ts +++ b/lib/node_modules/@stdlib/types/index.d.ts @@ -35,6 +35,7 @@ */ declare module '@stdlib/types/array' { import { ComplexLike, Complex32, Complex64, Complex128 } from '@stdlib/types/complex'; + import { Uint64 } from '@stdlib/types/number'; import { Remap } from '@stdlib/types/utilities'; /** @@ -492,7 +493,7 @@ declare module '@stdlib/types/array' { * @example * const x: UnsignedIntegerTypedArray = new Uint32Array( 10 ); */ - type UnsignedIntegerTypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array; + type UnsignedIntegerTypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Uint64Array; /** * A boolean typed array. @@ -835,6 +836,114 @@ declare module '@stdlib/types/array' { set( value: ArrayLike | Complex128Array | ComplexLike, i?: number ): void; } + /** + * A 64-bit unsigned integer array-like value. + * + * @example + * const buf = new Uint32Array( 8 ); + * + * const z: Uint64ArrayLike = { + * 'byteLength': 32, + * 'byteOffset': 0, + * 'BYTES_PER_ELEMENT': 8, + * 'length': 4 + * 'get': ( i: number ): obj.Uint64 => { + * return { + * 'hi': buf[ (2*i) ], + * 'lo': buf[ (2*i)+1 ], + * 'byteLength': 8, + * 'BYTES_PER_ELEMENT': 8 + * }; + * }, + * 'set': ( value: obj.Uint64, i?: number ) => { + * i = ( i ) ? i : 0; + * buf[ (2*i)] = value.hi; + * buf[ (2*i)+1 ] = value.lo; + * } + * }; + */ + interface Uint64ArrayLike extends AccessorArrayLike { + /** + * Length (in bytes) of the array. + */ + byteLength: number; + + /** + * Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`. + */ + byteOffset: number; + + /** + * Size (in bytes) of each array element. + */ + BYTES_PER_ELEMENT: number; + + /** + * Number of array elements. + */ + length: number; + + /** + * Returns an array element. + * + * @param i - element index + * @returns array element + */ + get( i: number ): Uint64 | void; + + /** + * Sets an array element. + * + * @param value - value(s) + * @param i - element index at which to start writing values (default: 0) + */ + set( value: ArrayLike | Uint64ArrayLike | Uint64, i?: number ): void; + } + + /** + * 64-bit unsigned integer array. + * + * @example + * const buf = new Uint32Array( 8 ); + * + * const z: Uint64Array = { + * 'byteLength': 32, + * 'byteOffset': 0, + * 'BYTES_PER_ELEMENT': 8, + * 'length': 4, + * 'get': ( i: number ): obj.Uint64 => { + * return { + * 'hi': buf[ (2*i) ], + * 'lo': buf[ (2*i)+1 ], + * 'byteLength': 8, + * 'BYTES_PER_ELEMENT': 8 + * }; + * }, + * 'set': ( value: obj.Uint64, i?: number ) => { + * i = ( i ) ? i : 0; + * buf[ (2*i) ] = value.hi; + * buf[ (2*i)+1 ] = value.lo; + * } + * }; + */ + interface Uint64Array extends Uint64ArrayLike { + /** + * Returns an array element. + * + * @param i - element index + * @returns array element + */ + get( i: number ): Uint64 | void; + + /** + * Sets an array element. + * + * @param value - value(s) + * @param i - element index at which to start writing values (default: 0) + */ + set( value: ArrayLike | Uint64Array | Uint64, i?: number ): void; + } + /** * A collection, which is defined as either an array, typed array, or an array-like object (excluding strings and functions). * From 606467acfa0eb164333d21fd0b08ebd754d603f2 Mon Sep 17 00:00:00 2001 From: Divit Date: Thu, 9 Jul 2026 18:36:49 +0000 Subject: [PATCH 2/4] fix: add missing comma --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/types/index.d.ts b/lib/node_modules/@stdlib/types/index.d.ts index 3650f5e075aa..6fb009d0dba5 100644 --- a/lib/node_modules/@stdlib/types/index.d.ts +++ b/lib/node_modules/@stdlib/types/index.d.ts @@ -846,7 +846,7 @@ declare module '@stdlib/types/array' { * 'byteLength': 32, * 'byteOffset': 0, * 'BYTES_PER_ELEMENT': 8, - * 'length': 4 + * 'length': 4, * 'get': ( i: number ): obj.Uint64 => { * return { * 'hi': buf[ (2*i) ], From 49b766ac2896083ca3028d9e2908cd5a2fe8b1db Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 9 Jul 2026 13:18:34 -0700 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- lib/node_modules/@stdlib/types/index.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/types/index.d.ts b/lib/node_modules/@stdlib/types/index.d.ts index 6fb009d0dba5..a0967634ac32 100644 --- a/lib/node_modules/@stdlib/types/index.d.ts +++ b/lib/node_modules/@stdlib/types/index.d.ts @@ -130,7 +130,7 @@ declare module '@stdlib/types/array' { /** * Data type for unsigned integer typed arrays. */ - type UnsignedIntegerDataType = 'uint32' | 'uint16' | 'uint8' | 'uint8c'; // "unsigned_integer" + type UnsignedIntegerDataType = 'uint64' | 'uint32' | 'uint16' | 'uint8' | 'uint8c'; // "unsigned_integer" /** * Data type for unsigned integer typed arrays. @@ -897,7 +897,7 @@ declare module '@stdlib/types/array' { * @param value - value(s) * @param i - element index at which to start writing values (default: 0) */ - set( value: ArrayLike | Uint64ArrayLike | Uint64, i?: number ): void; + set( value: ArrayLike | Uint64ArrayLike | Uint64 | bigint | number, i?: number ): void; } /** @@ -941,7 +941,7 @@ declare module '@stdlib/types/array' { * @param value - value(s) * @param i - element index at which to start writing values (default: 0) */ - set( value: ArrayLike | Uint64Array | Uint64, i?: number ): void; + set( value: ArrayLike | Uint64Array | Uint64 | bigint | number, i?: number ): void; } /** @@ -1048,6 +1048,7 @@ declare module '@stdlib/types/array' { * Mapping of unsigned integer data types to array constructors. */ type UnsignedIntegerDataTypeMap = { // eslint-disable-line @typescript-eslint/consistent-type-definitions + 'uint64': Uint64Array; 'uint32': Uint32Array; 'uint16': Uint16Array; 'uint8': Uint8Array; From 0c399e8000768359b50a67bdab49a320f38cb024 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 9 Jul 2026 13:24:12 -0700 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- lib/node_modules/@stdlib/types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/types/index.d.ts b/lib/node_modules/@stdlib/types/index.d.ts index a0967634ac32..300d14ec529b 100644 --- a/lib/node_modules/@stdlib/types/index.d.ts +++ b/lib/node_modules/@stdlib/types/index.d.ts @@ -610,7 +610,7 @@ declare module '@stdlib/types/array' { * @example * const buf = new Uint8Array( 8 ); * - * const z: Complex64Array = { + * const x: BooleanArray = { * 'byteLength': 8, * 'byteOffset': 0, * 'BYTES_PER_ELEMENT': 1,