@guillaume-docquier/tools-ts 10.2.5 → 10.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
@@ -90,6 +90,7 @@ These exports are type-only helpers for common TypeScript modeling problems.
90
90
  | `Unbranded` | Removes a brand from a type. | An API accepts the underlying value of a branded type. |
91
91
  | `DeepUnbranded` | Removes a brand from a type recursively. | An API accepts the underlying value of a branded object. |
92
92
  | `UnbrandedProperties` | Removes brands from an object's property types. | An object input should use raw values for branded fields. |
93
+ | `MaybePromise` | A value or a promise for that value. | A callback can return its result directly or asynchronously. |
93
94
  | `ConstructorType` | A type for class constructors. | A function accepts a class and later uses `new` or `instanceof` against it. |
94
95
  | `EnumKeyType`, `EnumValueType`, `EnumType` | Broad shapes for enum-like objects. | You are writing generic utilities that operate on TypeScript enums or const-object enums. |
95
96
  | `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. |
@@ -1,3 +1,4 @@
1
+ export type MaybePromise<T> = Promise<T> | T;
1
2
  /**
2
3
  *
3
4
  * Utility type that represents the constructor of a given class or function.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guillaume-docquier/tools-ts",
3
- "version": "10.2.5",
3
+ "version": "10.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",
@@ -36,20 +36,17 @@
36
36
  "devDependencies": {
37
37
  "@guillaume-docquier/oxfmt": "^1.0.22",
38
38
  "@guillaume-docquier/oxlint": "^1.11.3",
39
- "@semantic-release/commit-analyzer": "^13.0.1",
40
39
  "@semantic-release/exec": "^7.1.0",
41
40
  "@semantic-release/github": "^12.0.11",
42
- "@semantic-release/release-notes-generator": "^14.1.1",
43
41
  "@types/node": "^26.6.6",
44
42
  "@vitest/coverage-v8": "^5.1.0",
45
- "conventional-changelog-conventionalcommits": "^9.3.1",
46
43
  "husky": "^9.1.7",
47
44
  "jiti": "^2.7.0",
48
45
  "lint-staged": "^17.6.2",
49
46
  "oxfmt": "^0.79.0",
50
47
  "oxlint": "^1.94.0",
51
48
  "oxlint-tsgolint": "^7.0.2008",
52
- "semantic-release": "^25.0.9",
49
+ "semantic-release": "^26.0.1",
53
50
  "typescript": "~7.0.2",
54
51
  "vite": "^8.3.8",
55
52
  "vitest": "^5.1.0",