@adtrackify/at-tracking-event-types 1.0.33 → 1.0.35

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,11 +1,11 @@
1
1
  {
2
2
  "name": "@adtrackify/at-tracking-event-types",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
- "modules": "commonjs",
8
+ "modules": "esm",
9
9
  "scripts": {
10
10
  "clean": "rimraf dist",
11
11
  "build": "npm run clean && npm run verify && cross-env NODE_ENV=production stage=dev APP_ENV=dev node build.js",
@@ -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 ];
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
4
- "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
3
+ "target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
4
+ "module": "ES2022" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
5
5
  "allowJs": false, /* Allow javascript files to be compiled. */
6
6
  "checkJs": false /* Report errors in .js files. */,
7
7
  "outDir": "dist", /* Redirect output to the directory. */