@modern-js/types 2.44.0 → 2.45.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/common/babel.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ import type {
2
+ TransformOptions as BabelTransformOptions,
3
+ PluginItem as BabelPlugin,
4
+ } from '@babel/core';
5
+
1
6
  export type {
2
7
  TransformOptions as BabelTransformOptions,
3
8
  PluginItem as BabelPlugin,
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.44.0",
18
+ "version": "2.45.0",
19
19
  "types": "./index.d.ts",
20
20
  "exports": {
21
21
  ".": {
@@ -45,8 +45,8 @@
45
45
  "http-proxy-middleware": "^2.0.4",
46
46
  "jest": "^29",
47
47
  "type-fest": "2.15.0",
48
- "@scripts/build": "2.44.0",
49
- "@scripts/jest-config": "2.44.0"
48
+ "@scripts/build": "2.45.0",
49
+ "@scripts/jest-config": "2.45.0"
50
50
  },
51
51
  "sideEffects": false,
52
52
  "publishConfig": {
package/server/utils.d.ts CHANGED
@@ -4,23 +4,28 @@ import type {
4
4
  Filter as ProxyFilter,
5
5
  } from 'http-proxy-middleware';
6
6
 
7
- export type Metrics = {
8
- emitCounter: (name: string, value: number, tags: Record<string, any>) => void;
9
- emitTimer: (name: string, value: number, tags: Record<string, any>) => void;
10
- gauges: () => void;
11
- };
7
+ export interface Metrics {
8
+ emitCounter: (
9
+ name: string,
10
+ value: number,
11
+ prefix?: string,
12
+ tags?: Record<string, any>,
13
+ ) => void;
14
+ emitTimer: (
15
+ name: string,
16
+ value: number,
17
+ prefix?: string,
18
+ tags?: Record<string, any>,
19
+ ) => void;
20
+ }
12
21
 
13
- type LoggerFunction = (
14
- message?: number | string | Error,
15
- ...args: any[]
16
- ) => void;
17
- export type Logger = {
22
+ type LoggerFunction = (message: string, ...args: any[]) => void;
23
+ export interface Logger {
18
24
  error: LoggerFunction;
19
25
  info: LoggerFunction;
20
26
  warn: LoggerFunction;
21
27
  debug: LoggerFunction;
22
- log: LoggerFunction;
23
- };
28
+ }
24
29
 
25
30
  export interface ServerTiming {
26
31
  addServeTiming: (name: string, dur: number, decs?: string) => this;