From c103d25343db47d2ff8c8b33bd2c3cad5461ddae Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Jul 2026 14:27:12 +0000 Subject: [PATCH 1/2] fix(@stdlib/random/streams/triangular): correct undefined `RandomStream` in TypeScript doctest examples The job `Lint Random Files` failed after its daily random file sample included this package's type declarations, with the doctest runner throwing `RandomStream is not defined` while executing the `@example` blocks. Root cause: the module's default export is the lowercase `randomStream` constant; `RandomStream` only exists as a TypeScript type name. Several `@example` blocks in the `declare class RandomStream` and `interface Constructor` sections called `new RandomStream(...)` or `RandomStream.factory(...)` / `RandomStream.objectMode(...)` without first aliasing or referencing the actual runtime export, unlike sibling packages (e.g. `random/streams/minstd`) and this file's own final `randomStream` doc block, which alias `RandomStream` to `randomStream` before `new` calls and call `.factory`/`.objectMode` on the lowercase export directly. This commit adds the missing `var RandomStream = randomStream;` alias before each `new RandomStream(...)` call and switches the static `.factory`/`.objectMode` calls to the lowercase `randomStream` export, matching the established sibling convention. Classified as `fix` rather than `docs` per this repo's commit taxonomy, since TypeScript declaration files are part of a package's public API. Ref: https://github.com/stdlib-js/stdlib/actions/runs/28556769910 --- .../random/streams/triangular/docs/types/index.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/random/streams/triangular/docs/types/index.d.ts b/lib/node_modules/@stdlib/random/streams/triangular/docs/types/index.d.ts index bcb0ec9c7228..d4595709adb6 100644 --- a/lib/node_modules/@stdlib/random/streams/triangular/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/random/streams/triangular/docs/types/index.d.ts @@ -106,6 +106,7 @@ declare class RandomStream extends Readable { * 'iter': 10 * }; * + * var RandomStream = randomStream; * var stream = new RandomStream( 2.0, 5.0, 4.0, opts ); * * stream.pipe( inspectStream( log ) ); @@ -190,6 +191,7 @@ declare class RandomStream extends Readable { * @param error - error * * @example + * var RandomStream = randomStream; * var stream = new RandomStream( 2.0, 5.0, 4.0 ); * stream.on( 'error', onError ); * @@ -227,6 +229,7 @@ interface Constructor { * 'iter': 10 * }; * + * var RandomStream = randomStream; * var stream = new RandomStream( 2.0, 5.0, 4.0, opts ); * * stream.pipe( inspectStream( log ) ); @@ -279,7 +282,7 @@ interface Constructor { * 'highWaterMark': 64 * }; * - * var createStream = RandomStream.factory( 2.0, 5.0, 4.0, opts ); + * var createStream = randomStream.factory( 2.0, 5.0, 4.0, opts ); * * // Create 10 identically configured streams... * var streams = []; @@ -304,7 +307,7 @@ interface Constructor { * 'highWaterMark': 64 * }; * - * var createStream = RandomStream.factory( opts ); + * var createStream = randomStream.factory( opts ); * * // Create 10 identically configured streams... * var streams = []; @@ -338,7 +341,7 @@ interface Constructor { * 'iter': 10 * }; * - * var stream = RandomStream.objectMode( 2.0, 5.0, 4.0, opts ); + * var stream = randomStream.objectMode( 2.0, 5.0, 4.0, opts ); * * stream.pipe( inspectStream.objectMode( log ) ); */ From f966ded43974b58ff436806378acd662cffe6d43 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Jul 2026 14:38:43 +0000 Subject: [PATCH 2/2] test(@stdlib/random/streams/triangular): drop unused bindings in `$ExpectError` blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Lint Changed Files` failed on this PR with `@typescript-eslint/no-unused-vars` on `test.ts`, which the workflow also lints whenever the corresponding `index.d.ts` changes. The flagged `const s1 = new RandomStream(...)` bindings exist only to satisfy `$ExpectError` (the compiler error is expected at the `new` call itself), so the assignment is unnecessary — `new RandomStream(...)` is a valid standalone expression statement and triggers the identical compiler diagnostic on the same line. Dropping the unused bindings fixes the lint error without changing what is being type-tested. This pattern is pre-existing and widespread across sibling `random/streams/*` packages; only this file was touched, since it is the one flagged by CI. --- .../random/streams/triangular/docs/types/test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/random/streams/triangular/docs/types/test.ts b/lib/node_modules/@stdlib/random/streams/triangular/docs/types/test.ts index 2d071fedf865..bbc43d4e9077 100644 --- a/lib/node_modules/@stdlib/random/streams/triangular/docs/types/test.ts +++ b/lib/node_modules/@stdlib/random/streams/triangular/docs/types/test.ts @@ -82,8 +82,8 @@ import RandomStream = require( './index' ); // The compiler throws an error if the constructor is provided invalid input arguments... { - const s1 = new RandomStream( '2.0', 5.0, 4.0 ); // $ExpectError - const s2 = new RandomStream( 2.0, '5.0', 4.0 ); // $ExpectError + new RandomStream( '2.0', 5.0, 4.0 ); // $ExpectError + new RandomStream( 2.0, '5.0', 4.0 ); // $ExpectError } // The compiler throws an error if the `objectMode` method is provided invalid input arguments... @@ -124,9 +124,9 @@ import RandomStream = require( './index' ); // The compiler throws an error if the constructor is provided insufficient arguments... { - const s1 = new RandomStream(); // $ExpectError - const s2 = new RandomStream( 2.0 ); // $ExpectError - const s3 = new RandomStream( 2.0, 5.0 ); // $ExpectError + new RandomStream(); // $ExpectError + new RandomStream( 2.0 ); // $ExpectError + new RandomStream( 2.0, 5.0 ); // $ExpectError } // The compiler throws an error if the `objectMode` method is provided insufficient arguments...