@fgv/ts-random 5.1.0-14 → 5.1.0-16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rush/temp/{3e52bbe13068378e2400ce8a606faeb9c7611641.tar.log → a34da6ff833f9800742457a862fac09bdf3c4c41.tar.log} +2 -2
- package/.rush/temp/chunked-rush-logs/ts-random.build.chunks.jsonl +2 -2
- package/.rush/temp/operation/build/all.log +2 -2
- package/.rush/temp/operation/build/log-chunks.jsonl +2 -2
- package/.rush/temp/operation/build/state.json +1 -1
- package/docs/Generator/README.md +0 -9
- package/docs/Generator/classes/PseudoRandomGenerator.create.md +1 -1
- package/docs/Generator/classes/PseudoRandomGenerator.ensureRng.md +2 -2
- package/docs/Generator/classes/PseudoRandomGenerator.md +4 -4
- package/docs/Generator/classes/PseudoRandomGenerator.nextInt.md +4 -4
- package/docs/Generator/classes/PseudoRandomGenerator.pickRandom.md +2 -1
- package/docs/Generator/classes/PseudoRandomGenerator.pickSequential.md +2 -1
- package/docs/Generator/interfaces/IRandomSequencePickParams.candidates.md +1 -1
- package/docs/Generator/interfaces/IRandomSequencePickParams.md +1 -1
- package/docs/classes/PseudoRandomGenerator.create.md +1 -1
- package/docs/classes/PseudoRandomGenerator.ensureRng.md +2 -2
- package/docs/classes/PseudoRandomGenerator.md +4 -4
- package/docs/classes/PseudoRandomGenerator.nextInt.md +4 -4
- package/docs/classes/PseudoRandomGenerator.pickRandom.md +2 -1
- package/docs/classes/PseudoRandomGenerator.pickSequential.md +2 -1
- package/docs/interfaces/IRandomSequencePickParams.candidates.md +1 -1
- package/docs/interfaces/IRandomSequencePickParams.md +1 -1
- package/package.json +6 -6
- package/rush-logs/ts-random.build.cache.log +1 -1
- package/rush-logs/ts-random.build.log +2 -2
- package/docs/Generator/type-aliases/GeneratorGlobalThis.md +0 -11
- package/docs/type-aliases/GeneratorGlobalThis.md +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Start time:
|
|
2
|
-
Invoking "/usr/bin/tar -c -f /home/runner/work/fgv/fgv/common/temp/build-cache/
|
|
1
|
+
Start time: Mon Apr 13 2026 15:33:56 GMT+0000 (Coordinated Universal Time)
|
|
2
|
+
Invoking "/usr/bin/tar -c -f /home/runner/work/fgv/fgv/common/temp/build-cache/a34da6ff833f9800742457a862fac09bdf3c4c41-cb8ba97a50abd449.temp -z --files-from=-"
|
|
3
3
|
|
|
4
4
|
======= BEGIN PROCESS INPUT ======
|
|
5
5
|
.rush/temp/operation/build/all.log
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
{"kind":"O","text":" ---- build started ---- \n"}
|
|
3
3
|
{"kind":"O","text":"[build:typescript] The TypeScript compiler version 5.9.3 is newer than the latest version that was tested with Heft (5.8); it may not work correctly.\n"}
|
|
4
4
|
{"kind":"O","text":"[build:typescript] Using TypeScript version 5.9.3\n"}
|
|
5
|
-
{"kind":"O","text":" ---- build finished (
|
|
6
|
-
{"kind":"O","text":"-------------------- Finished (
|
|
5
|
+
{"kind":"O","text":" ---- build finished (8.448s) ---- \n"}
|
|
6
|
+
{"kind":"O","text":"-------------------- Finished (8.453s) --------------------\n"}
|
|
@@ -2,5 +2,5 @@ Invoking: heft build --clean
|
|
|
2
2
|
---- build started ----
|
|
3
3
|
[build:typescript] The TypeScript compiler version 5.9.3 is newer than the latest version that was tested with Heft (5.8); it may not work correctly.
|
|
4
4
|
[build:typescript] Using TypeScript version 5.9.3
|
|
5
|
-
---- build finished (
|
|
6
|
-
-------------------- Finished (
|
|
5
|
+
---- build finished (8.448s) ----
|
|
6
|
+
-------------------- Finished (8.453s) --------------------
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
{"kind":"O","text":" ---- build started ---- \n"}
|
|
3
3
|
{"kind":"O","text":"[build:typescript] The TypeScript compiler version 5.9.3 is newer than the latest version that was tested with Heft (5.8); it may not work correctly.\n"}
|
|
4
4
|
{"kind":"O","text":"[build:typescript] Using TypeScript version 5.9.3\n"}
|
|
5
|
-
{"kind":"O","text":" ---- build finished (
|
|
6
|
-
{"kind":"O","text":"-------------------- Finished (
|
|
5
|
+
{"kind":"O","text":" ---- build finished (8.448s) ---- \n"}
|
|
6
|
+
{"kind":"O","text":"-------------------- Finished (8.453s) --------------------\n"}
|
package/docs/Generator/README.md
CHANGED
|
@@ -134,15 +134,6 @@ Function that steps a random number generator state and returns the next value.
|
|
|
134
134
|
</td></tr>
|
|
135
135
|
<tr><td>
|
|
136
136
|
|
|
137
|
-
[GeneratorGlobalThis](./type-aliases/GeneratorGlobalThis.md)
|
|
138
|
-
|
|
139
|
-
</td><td>
|
|
140
|
-
|
|
141
|
-
Global context (globalThis) into which the generator can install itself for sharing.
|
|
142
|
-
|
|
143
|
-
</td></tr>
|
|
144
|
-
<tr><td>
|
|
145
|
-
|
|
146
137
|
[SequencePickParams](./type-aliases/SequencePickParams.md)
|
|
147
138
|
|
|
148
139
|
</td><td>
|
|
@@ -7,7 +7,7 @@ Creates a new pseudo-random number generator.
|
|
|
7
7
|
**Signature:**
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
static create(params
|
|
10
|
+
static create(params: IPseudoRandomGeneratorCreateParams): Result<PseudoRandomGenerator>;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
**Parameters:**
|
|
@@ -8,7 +8,7 @@ or creating a new one if not.
|
|
|
8
8
|
**Signature:**
|
|
9
9
|
|
|
10
10
|
```typescript
|
|
11
|
-
static ensureRng(rng?: PseudoRandomGenerator): PseudoRandomGenerator
|
|
11
|
+
static ensureRng(rng?: PseudoRandomGenerator): Result<PseudoRandomGenerator>;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
**Parameters:**
|
|
@@ -20,6 +20,6 @@ static ensureRng(rng?: PseudoRandomGenerator): PseudoRandomGenerator;
|
|
|
20
20
|
|
|
21
21
|
**Returns:**
|
|
22
22
|
|
|
23
|
-
[PseudoRandomGenerator](../../classes/PseudoRandomGenerator.md)
|
|
23
|
+
Result<[PseudoRandomGenerator](../../classes/PseudoRandomGenerator.md)>
|
|
24
24
|
|
|
25
25
|
A random number generator.
|
|
@@ -153,7 +153,7 @@ Generates a random float between 0 and 1.
|
|
|
153
153
|
</td></tr>
|
|
154
154
|
<tr><td>
|
|
155
155
|
|
|
156
|
-
[nextInt(
|
|
156
|
+
[nextInt(extent)](./PseudoRandomGenerator.nextInt.md)
|
|
157
157
|
|
|
158
158
|
</td><td>
|
|
159
159
|
|
|
@@ -161,7 +161,7 @@ Generates a random float between 0 and 1.
|
|
|
161
161
|
|
|
162
162
|
</td><td>
|
|
163
163
|
|
|
164
|
-
Generates a random integer between 0 and the specified
|
|
164
|
+
Generates a random integer between 0 and the specified extent (positive or negative).
|
|
165
165
|
|
|
166
166
|
</td></tr>
|
|
167
167
|
<tr><td>
|
|
@@ -226,7 +226,7 @@ Generates a random item from the given array.
|
|
|
226
226
|
|
|
227
227
|
</td><td>
|
|
228
228
|
|
|
229
|
-
Generates a sequence of values by randomly selecting from the given
|
|
229
|
+
Generates a sequence of values by randomly selecting from the given candidate
|
|
230
230
|
|
|
231
231
|
</td></tr>
|
|
232
232
|
<tr><td>
|
|
@@ -239,7 +239,7 @@ Generates a sequence of values by randomly selecting from the given candidates.
|
|
|
239
239
|
|
|
240
240
|
</td><td>
|
|
241
241
|
|
|
242
|
-
Generates a sequence of values by randomly selecting from the
|
|
242
|
+
Generates a sequence of values by randomly selecting from the supplied
|
|
243
243
|
|
|
244
244
|
</td></tr>
|
|
245
245
|
<tr><td>
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## PseudoRandomGenerator.nextInt() method
|
|
4
4
|
|
|
5
|
-
Generates a random integer between 0 and the specified
|
|
5
|
+
Generates a random integer between 0 and the specified extent (positive or negative).
|
|
6
6
|
|
|
7
7
|
**Signature:**
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
nextInt(
|
|
10
|
+
nextInt(extent?: number): number;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
**Parameters:**
|
|
14
14
|
|
|
15
15
|
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
16
|
<tbody>
|
|
17
|
-
<tr><td>
|
|
17
|
+
<tr><td>extent</td><td>number</td><td>The maximum (or minimum) value (exclusive).</td></tr>
|
|
18
18
|
</tbody></table>
|
|
19
19
|
|
|
20
20
|
**Returns:**
|
|
21
21
|
|
|
22
22
|
number
|
|
23
23
|
|
|
24
|
-
A random integer between 0 and the specified
|
|
24
|
+
A random integer between 0 and the specified extent.
|
|
@@ -7,7 +7,7 @@ Creates a new pseudo-random number generator.
|
|
|
7
7
|
**Signature:**
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
static create(params
|
|
10
|
+
static create(params: IPseudoRandomGeneratorCreateParams): Result<PseudoRandomGenerator>;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
**Parameters:**
|
|
@@ -8,7 +8,7 @@ or creating a new one if not.
|
|
|
8
8
|
**Signature:**
|
|
9
9
|
|
|
10
10
|
```typescript
|
|
11
|
-
static ensureRng(rng?: PseudoRandomGenerator): PseudoRandomGenerator
|
|
11
|
+
static ensureRng(rng?: PseudoRandomGenerator): Result<PseudoRandomGenerator>;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
**Parameters:**
|
|
@@ -20,6 +20,6 @@ static ensureRng(rng?: PseudoRandomGenerator): PseudoRandomGenerator;
|
|
|
20
20
|
|
|
21
21
|
**Returns:**
|
|
22
22
|
|
|
23
|
-
[PseudoRandomGenerator](PseudoRandomGenerator.md)
|
|
23
|
+
Result<[PseudoRandomGenerator](PseudoRandomGenerator.md)>
|
|
24
24
|
|
|
25
25
|
A random number generator.
|
|
@@ -153,7 +153,7 @@ Generates a random float between 0 and 1.
|
|
|
153
153
|
</td></tr>
|
|
154
154
|
<tr><td>
|
|
155
155
|
|
|
156
|
-
[nextInt(
|
|
156
|
+
[nextInt(extent)](./PseudoRandomGenerator.nextInt.md)
|
|
157
157
|
|
|
158
158
|
</td><td>
|
|
159
159
|
|
|
@@ -161,7 +161,7 @@ Generates a random float between 0 and 1.
|
|
|
161
161
|
|
|
162
162
|
</td><td>
|
|
163
163
|
|
|
164
|
-
Generates a random integer between 0 and the specified
|
|
164
|
+
Generates a random integer between 0 and the specified extent (positive or negative).
|
|
165
165
|
|
|
166
166
|
</td></tr>
|
|
167
167
|
<tr><td>
|
|
@@ -226,7 +226,7 @@ Generates a random item from the given array.
|
|
|
226
226
|
|
|
227
227
|
</td><td>
|
|
228
228
|
|
|
229
|
-
Generates a sequence of values by randomly selecting from the given
|
|
229
|
+
Generates a sequence of values by randomly selecting from the given candidate
|
|
230
230
|
|
|
231
231
|
</td></tr>
|
|
232
232
|
<tr><td>
|
|
@@ -239,7 +239,7 @@ Generates a sequence of values by randomly selecting from the given candidates.
|
|
|
239
239
|
|
|
240
240
|
</td><td>
|
|
241
241
|
|
|
242
|
-
Generates a sequence of values by randomly selecting from the
|
|
242
|
+
Generates a sequence of values by randomly selecting from the supplied
|
|
243
243
|
|
|
244
244
|
</td></tr>
|
|
245
245
|
<tr><td>
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## PseudoRandomGenerator.nextInt() method
|
|
4
4
|
|
|
5
|
-
Generates a random integer between 0 and the specified
|
|
5
|
+
Generates a random integer between 0 and the specified extent (positive or negative).
|
|
6
6
|
|
|
7
7
|
**Signature:**
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
nextInt(
|
|
10
|
+
nextInt(extent?: number): number;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
**Parameters:**
|
|
14
14
|
|
|
15
15
|
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
16
16
|
<tbody>
|
|
17
|
-
<tr><td>
|
|
17
|
+
<tr><td>extent</td><td>number</td><td>The maximum (or minimum) value (exclusive).</td></tr>
|
|
18
18
|
</tbody></table>
|
|
19
19
|
|
|
20
20
|
**Returns:**
|
|
21
21
|
|
|
22
22
|
number
|
|
23
23
|
|
|
24
|
-
A random integer between 0 and the specified
|
|
24
|
+
A random integer between 0 and the specified extent.
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fgv/ts-random",
|
|
3
|
-
"version": "5.1.0-
|
|
3
|
+
"version": "5.1.0-16",
|
|
4
4
|
"description": "psedo-random number generator and utilities for TypeScript",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"author": "",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@fgv/ts-
|
|
11
|
-
"@fgv/ts-
|
|
10
|
+
"@fgv/ts-json-base": "5.1.0-16",
|
|
11
|
+
"@fgv/ts-utils": "5.1.0-16"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@rushstack/heft": "1.2.7",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"@rushstack/eslint-config": "4.6.4",
|
|
21
21
|
"eslint": "^9.39.2",
|
|
22
22
|
"typedoc": "~0.28.16",
|
|
23
|
-
"@fgv/
|
|
24
|
-
"@fgv/
|
|
25
|
-
"@fgv/typedoc-compact-theme": "5.1.0-
|
|
23
|
+
"@fgv/ts-utils-jest": "5.1.0-16",
|
|
24
|
+
"@fgv/heft-dual-rig": "5.1.0-16",
|
|
25
|
+
"@fgv/typedoc-compact-theme": "5.1.0-16"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
@@ -2,5 +2,5 @@ Invoking: heft build --clean
|
|
|
2
2
|
---- build started ----
|
|
3
3
|
[build:typescript] The TypeScript compiler version 5.9.3 is newer than the latest version that was tested with Heft (5.8); it may not work correctly.
|
|
4
4
|
[build:typescript] Using TypeScript version 5.9.3
|
|
5
|
-
---- build finished (
|
|
6
|
-
-------------------- Finished (
|
|
5
|
+
---- build finished (8.448s) ----
|
|
6
|
+
-------------------- Finished (8.453s) --------------------
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
[Home](../../README.md) > [Generator](../README.md) > GeneratorGlobalThis
|
|
2
|
-
|
|
3
|
-
# Type Alias: GeneratorGlobalThis
|
|
4
|
-
|
|
5
|
-
Global context (globalThis) into which the generator can install itself for sharing.
|
|
6
|
-
|
|
7
|
-
## Type
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
type GeneratorGlobalThis = unknown
|
|
11
|
-
```
|