From 1087a6eeca8bfd092db8f77a42f7ec0cebb0d739 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 14:36:29 +0000 Subject: [PATCH 1/2] fix(@stdlib/array/float16): add missing index signature to Float16Array class declaration The `lint_changed_files` workflow's "Lint TypeScript declarations test files" step failed for `@stdlib/array/zero-to-like` and `@stdlib/array/zeros-like` (and, latently, `@stdlib/array/zeros` and `@stdlib/array/zero-to`) with e.g.: docs/types/test.ts:32:2 error Expected type to be: Float16ArrayFallback, got: never expect-type/expect Root cause: `@stdlib/types/array`'s `Float16ArrayFallback` interface requires a `[ index: number ]: number` index signature (in addition to `buffer`, `byteLength`, `byteOffset`, `BYTES_PER_ELEMENT`, and `length`, which were already present). Under this repo's pinned `lib: ["es6"]` TypeScript configuration, `@stdlib/types/array`'s `Float16Array` conditional type resolves to `Float16ArrayFallback`, and `@stdlib/array/float16`'s `Float16Array` class declares `implements Float16ArrayInterface` but was missing that index signature, producing `TS2420: Class 'Float16Array' incorrectly implements interface 'Float16ArrayFallback'`. This compile error cascades into a `never` type anywhere a `Float16Array` instance flows through a generically-typed function, breaking `$ExpectType` checks in consumer packages. This commit adds the missing index signature to the class, matching the interface it implements verbatim. Ref: https://github.com/stdlib-js/stdlib/actions/runs/28756237389 --- lib/node_modules/@stdlib/array/float16/docs/types/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/node_modules/@stdlib/array/float16/docs/types/index.d.ts b/lib/node_modules/@stdlib/array/float16/docs/types/index.d.ts index 493137c4d3c0..9be62309f62c 100644 --- a/lib/node_modules/@stdlib/array/float16/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/array/float16/docs/types/index.d.ts @@ -416,6 +416,11 @@ declare class Float16Array implements Float16ArrayInterface { */ readonly length: number; + /** + * Indexed properties. + */ + [ index: number ]: number; + /** * Copies a sequence of elements within the array to the position starting at `target`. * From adf9c153ea24b76e599b9f4cb7d3e7d3a272dc8e Mon Sep 17 00:00:00 2001 From: Athan Date: Mon, 6 Jul 2026 15:52:11 -0700 Subject: [PATCH 2/2] refactor: reorder properties Signed-off-by: Athan --- .../@stdlib/array/float16/docs/types/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/array/float16/docs/types/index.d.ts b/lib/node_modules/@stdlib/array/float16/docs/types/index.d.ts index 9be62309f62c..e75c82558021 100644 --- a/lib/node_modules/@stdlib/array/float16/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/array/float16/docs/types/index.d.ts @@ -340,6 +340,11 @@ declare class Float16Array implements Float16ArrayInterface { */ constructor( arg?: number | ArrayLike | ArrayBuffer | Iterable, byteOffset?: number, length?: number ); + /** + * Indexed properties. + */ + [ index: number ]: number; + /** * Returns an array element located at integer position (index) `i`, with support for both nonnegative and negative integer indices. * @@ -416,11 +421,6 @@ declare class Float16Array implements Float16ArrayInterface { */ readonly length: number; - /** - * Indexed properties. - */ - [ index: number ]: number; - /** * Copies a sequence of elements within the array to the position starting at `target`. *