chz-telegram-bot 0.0.53 → 0.0.54

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.
@@ -1 +1 @@
1
- {"version":3,"file":"traceFactory.d.ts","sourceRoot":"","sources":["../../helpers/traceFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EACxC,UAAU,EAAE,CAAC,EACb,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAClB,OAAO,CAET"}
1
+ {"version":3,"file":"traceFactory.d.ts","sourceRoot":"","sources":["../../helpers/traceFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EACxC,UAAU,EAAE,CAAC,EACb,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAEkD,OAAO,CAC7E"}
@@ -1,11 +1,15 @@
1
+ declare const millisecondsSymbol: unique symbol;
2
+ declare const secondsSymbol: unique symbol;
3
+ declare const hoursSymbol: unique symbol;
1
4
  export type Milliseconds = number & {
2
- __brand: 'ms';
5
+ [millisecondsSymbol]: void;
3
6
  };
4
7
  export type Seconds = number & {
5
- __brand: 's';
8
+ [secondsSymbol]: void;
6
9
  };
7
10
  export type Hours = number & {
8
- __brand: 'h';
11
+ [hoursSymbol]: void;
9
12
  };
10
13
  export type HoursOfDay = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23;
14
+ export {};
11
15
  //# sourceMappingURL=timeValues.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeValues.d.ts","sourceRoot":"","sources":["../../types/timeValues.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC;AACtD,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,CAAC;AAChD,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,CAAC;AAE9C,MAAM,MAAM,UAAU,GAChB,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,CAAC"}
1
+ {"version":3,"file":"timeValues.d.ts","sourceRoot":"","sources":["../../types/timeValues.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,MAAM,CAAC;AAChD,OAAO,CAAC,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAC3C,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,MAAM,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AACnE,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG;IAAE,CAAC,aAAa,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,CAAC,WAAW,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAErD,MAAM,MAAM,UAAU,GAChB,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,CAAC"}
@@ -1,2 +1,6 @@
1
- export type TraceId = `${string}:${string}-${string}`;
1
+ declare const traceSymbol: unique symbol;
2
+ export type TraceId = `${string}:${string}-${string}` & {
3
+ [traceSymbol]: void;
4
+ };
5
+ export {};
2
6
  //# sourceMappingURL=trace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../types/trace.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../types/trace.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,MAAM,CAAC;AAEzC,MAAM,MAAM,OAAO,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,GAAG;IAAE,CAAC,WAAW,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC"}
@@ -4,6 +4,6 @@ export function createTrace<T extends object>(
4
4
  traceOwner: T,
5
5
  botName: string,
6
6
  traceName: string
7
- ): TraceId {
8
- return `${traceOwner.constructor.name}:${botName}-${traceName}`;
7
+ ) {
8
+ return `${traceOwner.constructor.name}:${botName}-${traceName}` as TraceId;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chz-telegram-bot",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "async-sema": "^3.1.1",
@@ -1,6 +1,10 @@
1
- export type Milliseconds = number & { __brand: 'ms' };
2
- export type Seconds = number & { __brand: 's' };
3
- export type Hours = number & { __brand: 'h' };
1
+ declare const millisecondsSymbol: unique symbol;
2
+ declare const secondsSymbol: unique symbol;
3
+ declare const hoursSymbol: unique symbol;
4
+
5
+ export type Milliseconds = number & { [millisecondsSymbol]: void };
6
+ export type Seconds = number & { [secondsSymbol]: void };
7
+ export type Hours = number & { [hoursSymbol]: void };
4
8
 
5
9
  export type HoursOfDay =
6
10
  | 0
package/types/trace.ts CHANGED
@@ -1 +1,3 @@
1
- export type TraceId = `${string}:${string}-${string}`;
1
+ declare const traceSymbol: unique symbol;
2
+
3
+ export type TraceId = `${string}:${string}-${string}` & { [traceSymbol]: void };