@tixyel/streamelements 6.2.0 → 6.2.1

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/dist/index.d.ts CHANGED
@@ -2074,39 +2074,7 @@ declare namespace Helper {
2074
2074
  * console.log(floatNumber); // e.g. 3.14
2075
2075
  * ```
2076
2076
  */
2077
- const random: typeof Helper.random.number;
2078
- }
2079
- namespace utils {
2080
- /**
2081
- * Delays execution for a specified number of milliseconds.
2082
- * @param ms - The number of milliseconds to delay.
2083
- * @returns A Promise that resolves after the specified delay.
2084
- */
2085
- function delay<R extends any, M extends number>(ms: M, callback?: () => R): Promise<R | null>;
2086
- /**
2087
- * Returns typed entries of an object.
2088
- * @param obj - The object to get entries from.
2089
- * @returns An array of key-value pairs from the object.
2090
- */
2091
- const typedEntries: typeof object.entries;
2092
- /**
2093
- * Returns typed values of an object.
2094
- * @param obj - The object to get values from.
2095
- * @returns An array of values from the object.
2096
- */
2097
- const typedValues: typeof object.values;
2098
- /**
2099
- * Returns typed keys of an object.
2100
- * @param obj - The object to get keys from.
2101
- * @returns An array of keys from the object.
2102
- */
2103
- const typedKeys: typeof object.keys;
2104
- /**
2105
- * Selects an item based on weighted probabilities.
2106
- * @param items - An object where keys are items and values are their weights.
2107
- * @returns A randomly selected item based on the given probabilities.
2108
- */
2109
- function probability<K extends string, V extends number>(items: Record<K, V>): K | undefined;
2077
+ function number(min: number, max: number, float?: number): number;
2110
2078
  }
2111
2079
  namespace element {
2112
2080
  interface ScaleOptions<T extends HTMLElement> {
@@ -2613,6 +2581,38 @@ declare namespace Helper {
2613
2581
  */
2614
2582
  function call<TThis, TArgs extends unknown[], TReturn>(fn: (this: TThis, ...args: TArgs) => TReturn, thisArg: TThis, ...args: TArgs): TReturn;
2615
2583
  }
2584
+ namespace utils {
2585
+ /**
2586
+ * Delays execution for a specified number of milliseconds.
2587
+ * @param ms - The number of milliseconds to delay.
2588
+ * @returns A Promise that resolves after the specified delay.
2589
+ */
2590
+ function delay<R extends any, M extends number>(ms: M, callback?: () => R): Promise<R | null>;
2591
+ /**
2592
+ * Returns typed entries of an object.
2593
+ * @param obj - The object to get entries from.
2594
+ * @returns An array of key-value pairs from the object.
2595
+ */
2596
+ function typedEntries<K extends string, V>(obj: Record<K, V>): [K, V][];
2597
+ /**
2598
+ * Returns typed values of an object.
2599
+ * @param obj - The object to get values from.
2600
+ * @returns An array of values from the object.
2601
+ */
2602
+ function typedValues<K extends string, V>(obj: Record<K, V>): V[];
2603
+ /**
2604
+ * Returns typed keys of an object.
2605
+ * @param obj - The object to get keys from.
2606
+ * @returns An array of keys from the object.
2607
+ */
2608
+ function typedKeys<K extends string, V>(obj: Record<K, V>): K[];
2609
+ /**
2610
+ * Selects an item based on weighted probabilities.
2611
+ * @param items - An object where keys are items and values are their weights.
2612
+ * @returns A randomly selected item based on the given probabilities.
2613
+ */
2614
+ function probability<K extends string, V extends number>(items: Record<K, V>): K | undefined;
2615
+ }
2616
2616
  }
2617
2617
 
2618
2618
  declare namespace Local {