@guillaume-docquier/tools-ts 6.1.0 → 6.3.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/README.md CHANGED
@@ -68,16 +68,17 @@ pseudo-random sequences.
68
68
 
69
69
  These exports are type-only helpers for common TypeScript modeling problems.
70
70
 
71
- | Export | What it is | Use it when |
72
- | ------------------------------------------ | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
73
- | `ConstructorType` | A type for class constructors. | A function accepts a class and later uses `new` or `instanceof` against it. |
74
- | `EnumKeyType`, `EnumValueType`, `EnumType` | Broad shapes for enum-like objects. | You are writing generic utilities that operate on TypeScript enums or const-object enums. |
75
- | `Enumify` | Converts a const object into a union of its values. | A project avoids TypeScript `enum` but wants enum-like ergonomics from `as const` objects. |
76
- | `ValueOf` | Produces a union of an object's value types. | You need the values of a lookup object as a type. |
77
- | `Prettify` | Re-expands an object type for easier editor hovers. | Intersections or mapped types are correct but hard to read in tooling. |
78
- | `OmitOverUnion` | Applies `Omit` distributively across union members. | Native `Omit` collapses a discriminated union in a way that loses member-specific fields. |
79
- | `PartialProperties` | Makes selected object properties partial, not the whole object. | Only nested property objects should become partial while the parent shape stays required. |
80
- | `Mutable` | Removes `readonly` from selected properties. | You have a narrow, deliberate mutation need. Avoid this unless there is no cleaner model. |
71
+ | Export | What it is | Use it when |
72
+ | ------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
73
+ | `Branded`, `branded` | A nominal typing helper plus a runtime no-op for branding values. | Structurally identical values need distinct domain types, such as separate ID kinds. |
74
+ | `ConstructorType` | A type for class constructors. | A function accepts a class and later uses `new` or `instanceof` against it. |
75
+ | `EnumKeyType`, `EnumValueType`, `EnumType` | Broad shapes for enum-like objects. | You are writing generic utilities that operate on TypeScript enums or const-object enums. |
76
+ | `Enumify` | Converts a const object into a union of its values. | A project avoids TypeScript `enum` but wants enum-like ergonomics from `as const` objects. |
77
+ | `ValueOf` | Produces a union of an object's value types. | You need the values of a lookup object as a type. |
78
+ | `Prettify` | Re-expands an object type for easier editor hovers. | Intersections or mapped types are correct but hard to read in tooling. |
79
+ | `OmitOverUnion` | Applies `Omit` distributively across union members. | Native `Omit` collapses a discriminated union in a way that loses member-specific fields. |
80
+ | `PartialProperties` | Makes selected object properties partial, not the whole object. | Only nested property objects should become partial while the parent shape stays required. |
81
+ | `Mutable` | Removes `readonly` from selected properties. | You have a narrow, deliberate mutation need. Avoid this unless there is no cleaner model. |
81
82
 
82
83
  ### Logging
83
84
 
@@ -113,10 +114,11 @@ consistent.
113
114
 
114
115
  Use these helpers for quick profiling.
115
116
 
116
- | Export | What it is | Use it when |
117
- | ----------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------ |
118
- | `Profile.executionTime` | Wraps sync or async work and logs elapsed time. | You need quick timing instrumentation around a named operation. |
119
- | `Profile.memoryUsage` | Logs process memory usage in megabytes. | You need a snapshot of Node.js process memory for diagnostics or runtime visibility. |
117
+ | Export | What it is | Use it when |
118
+ | ----------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
119
+ | `Profile.executionTime` | Wraps sync or async work and logs elapsed time. | You need quick timing instrumentation around a named operation. |
120
+ | `Profile.memoryUsage` | Logs process memory usage in megabytes. | You need a snapshot of Node.js process memory for diagnostics or runtime visibility. |
121
+ | `Timer` | Captures performance timestamps and computes elapsed `Time` values. | You need elapsed-time measurements without logging. |
120
122
 
121
123
  ### Measurements
122
124
 
@@ -0,0 +1,30 @@
1
+ declare const brand: unique symbol;
2
+ declare const baseType: unique symbol;
3
+ type AnyBrand = Branded<unknown, unknown>;
4
+ type TypeOf<TBrand extends AnyBrand> = TBrand[typeof baseType];
5
+ /**
6
+ * Type utility to create branded types.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * type UserId = Branded<string, "userId">
11
+ * function getUser(userId: UserId): User {}
12
+ *
13
+ * const str = "a string"
14
+ * const userId = branded<UserId>("user id")
15
+ *
16
+ * getUser(str) // S2345: Argument of type string is not assignable to parameter of type UserId
17
+ * getUser(userId) // works!
18
+ * ```
19
+ */
20
+ export type Branded<TType, TBrand> = TType & {
21
+ [brand]: TBrand;
22
+ } & {
23
+ [baseType]: TType;
24
+ };
25
+ /**
26
+ * Brands a value.
27
+ * This is just type gymnastics to declare intent, the value is returned as-is at runtime.
28
+ */
29
+ export declare function branded<TBrand extends AnyBrand>(value: TypeOf<TBrand>): TBrand;
30
+ export {};
package/dist/Brand.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Brands a value.
3
+ * This is just type gymnastics to declare intent, the value is returned as-is at runtime.
4
+ */
5
+ export function branded(value) {
6
+ return value;
7
+ }
8
+ //# sourceMappingURL=Brand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Brand.js","sourceRoot":"","sources":["../src/Brand.ts"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,MAAM,UAAU,OAAO,CAA0B,KAAqB;IACpE,OAAO,KAAe,CAAA;AACxB,CAAC"}
package/dist/Profile.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  type BasicLogger = {
2
- info: (message: string, context?: Record<string, unknown>) => void;
2
+ debug: (message: string, context?: Record<string, unknown>) => void;
3
3
  };
4
+ /**
5
+ * Basic utilities for profiling. Useful for quick debugging, not really production ready.
6
+ */
4
7
  export declare const Profile: {
5
8
  executionTime: typeof executionTime;
6
9
  /**
package/dist/Profile.js CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Basic utilities for profiling. Useful for quick debugging, not really production ready.
3
+ */
1
4
  export const Profile = {
2
5
  // You can't overload while defining object properties, which is why the function implementation is not inlined
3
6
  executionTime,
@@ -6,7 +9,7 @@ export const Profile = {
6
9
  */
7
10
  memoryUsage(logger = console) {
8
11
  const memoryUsage = process.memoryUsage(); // info in bytes
9
- logger.info("memory usage", {
12
+ logger.debug("memory usage", {
10
13
  /**
11
14
  * Resident Set Size, the total memory allocated for the whole process.
12
15
  * In Railway, this is what you pay for.
@@ -45,7 +48,7 @@ function executionTime(label, action, logger = console) {
45
48
  return result;
46
49
  }
47
50
  function logExecutionTime(label, startedAt, logger) {
48
- logger.info(`${label}: ${(performance.now() - startedAt).toFixed(2)}ms`);
51
+ logger.debug(label, { executionTimeMs: (performance.now() - startedAt).toFixed(2) });
49
52
  }
50
53
  function bytesToMb(bytes) {
51
54
  return `${Math.round(bytes / 1024 / 1024).toFixed(2)} MB`;
@@ -1 +1 @@
1
- {"version":3,"file":"Profile.js","sourceRoot":"","sources":["../src/Profile.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,+GAA+G;IAC/G,aAAa;IAEb;;OAEG;IACH,WAAW,CAAC,SAAsB,OAAO;QACvC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,CAAA,CAAC,gBAAgB;QAE1D,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE;YAC1B;;;;;eAKG;YACH,GAAG,EAAE,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC;YAC/B;;eAEG;YACH,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC;YAC3C;;eAEG;YACH,QAAQ,EAAE,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC;YACzC;;eAEG;YACH,QAAQ,EAAE,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC;YACzC;;eAEG;YACH,YAAY,EAAE,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC;SAClD,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAYD,SAAS,aAAa,CAAI,KAAa,EAAE,MAAsC,EAAE,SAAsB,OAAO;IAC5G,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAA;IACnC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAA;IACvB,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;YACzB,gBAAgB,CAAC,KAAK,EA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AAYD,SAAS,aAAa,CAAI,KAAa,EAAE,MAAsC,EAAE,SAAsB,OAAO;IAC5G,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAA;IACnC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAA;IACvB,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;YACzB,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;IAC1C,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,SAAiB,EAAE,MAAmB;IAC7E,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,eAAe,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACtF,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAA;AAC3D,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { Time } from "./measurements/Time.js";
2
+ /**
3
+ * Utilities to measure time elapsed easily. Uses Performance under the hood.
4
+ */
5
+ export declare const Timer: {
6
+ /**
7
+ * Captures a start time
8
+ */
9
+ start(): Time;
10
+ /**
11
+ * Returns the time elapsed since another time
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const startTime = Timer.start()
16
+ * // do things
17
+ * const elapsed = Timer.since(startTime)
18
+ * ```
19
+ */
20
+ since(time: Time): Time;
21
+ };
package/dist/Timer.js ADDED
@@ -0,0 +1,26 @@
1
+ import { Time, UnitOfTime } from "./measurements/Time.js";
2
+ /**
3
+ * Utilities to measure time elapsed easily. Uses Performance under the hood.
4
+ */
5
+ export const Timer = {
6
+ /**
7
+ * Captures a start time
8
+ */
9
+ start() {
10
+ return Time.create(performance.now(), UnitOfTime.MILLISECONDS);
11
+ },
12
+ /**
13
+ * Returns the time elapsed since another time
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const startTime = Timer.start()
18
+ * // do things
19
+ * const elapsed = Timer.since(startTime)
20
+ * ```
21
+ */
22
+ since(time) {
23
+ return Time.subtract(Timer.start(), time);
24
+ },
25
+ };
26
+ //# sourceMappingURL=Timer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timer.js","sourceRoot":"","sources":["../src/Timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEzD;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,IAAU;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;CACF,CAAA"}
@@ -29,3 +29,5 @@ export { createRng, type Rng, type Generator } from "./rng/rng.js";
29
29
  export { mulberry32Prng } from "./rng/mulberry32prng.js";
30
30
  export { Datetime } from "./Datetime.js";
31
31
  export { Time, UnitOfTime } from "./measurements/Time.js";
32
+ export { Timer } from "./Timer.js";
33
+ export { type Branded, branded } from "./Brand.js";
@@ -24,4 +24,6 @@ export { createRng } from "./rng/rng.js";
24
24
  export { mulberry32Prng } from "./rng/mulberry32prng.js";
25
25
  export { Datetime } from "./Datetime.js";
26
26
  export { Time, UnitOfTime } from "./measurements/Time.js";
27
+ export { Timer } from "./Timer.js";
28
+ export { branded } from "./Brand.js";
27
29
  //# sourceMappingURL=entry.tools-ts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entry.tools-ts.js","sourceRoot":"","sources":["../src/entry.tools-ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAI5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,MAAM,EAA8B,MAAM,aAAa,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAA;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAKvE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACx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AAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAA;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAKvE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,SAAS,EAA4B,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAgB,OAAO,EAAE,MAAM,YAAY,CAAA"}
@@ -34,4 +34,12 @@ export declare const Time: {
34
34
  * @param newUnit The unit of time to get the value of the time in.
35
35
  */
36
36
  in(time: Time, newUnit: UnitOfTime): number;
37
+ /**
38
+ * Adds 2 times together. The unit of the first time will be used.
39
+ */
40
+ add(timeA: Time, timeB: Time): Time;
41
+ /**
42
+ * Subtracts 2 times. The unit of the first time will be used.
43
+ */
44
+ subtract(timeA: Time, timeB: Time): Time;
37
45
  };
@@ -49,5 +49,17 @@ export const Time = {
49
49
  in(time, newUnit) {
50
50
  return (time.value * TIME_PER_SECONDS[newUnit]) / TIME_PER_SECONDS[time.unit];
51
51
  },
52
+ /**
53
+ * Adds 2 times together. The unit of the first time will be used.
54
+ */
55
+ add(timeA, timeB) {
56
+ return Time.create(timeA.value + Time.in(timeB, timeA.unit), timeA.unit);
57
+ },
58
+ /**
59
+ * Subtracts 2 times. The unit of the first time will be used.
60
+ */
61
+ subtract(timeA, timeB) {
62
+ return Time.create(timeA.value - Time.in(timeB, timeA.unit), timeA.unit);
63
+ },
52
64
  };
53
65
  //# sourceMappingURL=Time.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Time.js","sourceRoot":"","sources":["../../src/measurements/Time.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2CAA6B,CAAA;IAC7B,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,6BAAe,CAAA;AACjB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAED;;;GAGG;AACH,MAAM,gBAAgB,GAA+B;IACnD,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,IAAI;IAC/B,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;IACvB,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE;IAC5B,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE;CAChC,CAAA;AAOD;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,MAAM,EAAE,CAAC,KAAa,EAAE,IAAgB,EAAE,EAAE;QAC1C,OAAO;YACL,KAAK;YACL,IAAI;SACL,CAAA;IACH,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,IAAU,EAAE,OAAmB;QACrC,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;YAC7B,IAAI,EAAE,OAAO;SACd,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,EAAE,CAAC,IAAU,EAAE,OAAmB;QAChC,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/E,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"Time.js","sourceRoot":"","sources":["../../src/measurements/Time.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2CAA6B,CAAA;IAC7B,iCAAmB,C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C,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAC1E,CAAC;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guillaume-docquier/tools-ts",
3
- "version": "6.1.0",
3
+ "version": "6.3.0",
4
4
  "description": "My personal collection of typescript tools",
5
5
  "homepage": "https://github.com/Guillaume-Docquier/tools-ts",
6
6
  "license": "MIT",