@adtrackify/at-tracking-event-types 1.0.31 → 1.0.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adtrackify/at-tracking-event-types",
3
- "version": "1.0.31",
3
+ "version": "1.0.34",
4
4
  "description": "",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -1 +1,2 @@
1
- export * from './types';
1
+ export * from './types';
2
+ export * from './utils';
@@ -196,7 +196,9 @@ export const choasFake = <T>(input?: T): T | undefined | null => {
196
196
  }
197
197
  };
198
198
 
199
- export function randomEnum<T>(anEnum: T): T[ keyof T ] {
199
+ export function randomEnum<T extends {
200
+ [ s: string ]: unknown;
201
+ }>(anEnum: T): T[ keyof T ] {
200
202
  const enumValues = (Object.values(anEnum) as unknown) as T[ keyof T ][];
201
203
  const randomIndex = Math.floor(Math.random() * enumValues.length);
202
204
  return enumValues[ randomIndex ];