@popclip/types 1.4688.0 → 1.4892.0
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/README.md +5 -0
- package/package.json +1 -1
- package/popclip.d.ts +14 -1
package/README.md
CHANGED
package/package.json
CHANGED
package/popclip.d.ts
CHANGED
|
@@ -476,7 +476,7 @@ interface Extension<CustomOptions = Options> extends ActionProperties {
|
|
|
476
476
|
/**
|
|
477
477
|
* Exported test function for use during development.
|
|
478
478
|
*/
|
|
479
|
-
test
|
|
479
|
+
test?: TestFunction;
|
|
480
480
|
|
|
481
481
|
// the following are static properties, included for the benefit of the JSON Scheme generation
|
|
482
482
|
popclipVersion?: number;
|
|
@@ -1137,6 +1137,19 @@ interface Util {
|
|
|
1137
1137
|
| BigUint64Array,
|
|
1138
1138
|
): void;
|
|
1139
1139
|
|
|
1140
|
+
/**
|
|
1141
|
+
* Generate a random integer in range [0, max] with uniform distribution using a cryptographically secure random source.
|
|
1142
|
+
*
|
|
1143
|
+
* @example
|
|
1144
|
+
*
|
|
1145
|
+
* ```js
|
|
1146
|
+
* const coinFlip = util.randomUniform(1); // coinFlip has value 0 or 1
|
|
1147
|
+
* const dieRoll = util.randomUniform(5) + 1; // dieRoll has value from 1 to 6
|
|
1148
|
+
* ```
|
|
1149
|
+
* @param max Maximum value to generate. Supplied value will be coerced to a 32-bit unsigned integer.
|
|
1150
|
+
*/
|
|
1151
|
+
randomUniform(max: number): number;
|
|
1152
|
+
|
|
1140
1153
|
/**
|
|
1141
1154
|
* Generate a RFC 4122 version 4 UUID using a cryptographically secure random number generator.
|
|
1142
1155
|
* @returns UUID string such as "e621e1f8-c36c-495a-93fc-0c247a3e6e5f".
|