@tb-dev/utils 5.0.0 → 5.1.1

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +3 -1
  2. package/package.json +7 -7
package/dist/types.d.ts CHANGED
@@ -26,10 +26,12 @@ export type PickByValue<T, V> = {
26
26
  export type PickPartial<T, K extends keyof T> = Pick<Partial<T>, K>;
27
27
  /** Constructs a type by picking the set of properties `K` from a required version of `T`. */
28
28
  export type PickRequired<T, K extends keyof T> = Pick<Required<T>, K>;
29
- /** Removes the readonly modifier from all properties of T. */
29
+ /** Constructs a type where all properties of `T` may be written. */
30
30
  export type Writable<T> = {
31
31
  -readonly [P in keyof T]: T[P];
32
32
  };
33
+ /** Constructs a type where all properties of `T` may be written and nullish. */
34
+ export type WritablePartial<T> = Writable<PartialNullish<T>>;
33
35
  /** Constructs a type consisting of some properties of T set to partial. */
34
36
  export type WithPartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
35
37
  /** Constructs a type consisting of some properties of T set to required. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/utils",
3
- "version": "5.0.0",
3
+ "version": "5.1.1",
4
4
  "description": "TypeScript utils",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,18 +23,18 @@
23
23
  "typescript"
24
24
  ],
25
25
  "devDependencies": {
26
- "@tb-dev/eslint-config": "^6.5.0",
27
- "@types/node": "^22.13.9",
28
- "@vitest/ui": "^3.0.7",
29
- "eslint": "^9.21.0",
26
+ "@tb-dev/eslint-config": "^6.5.1",
27
+ "@types/node": "^22.13.10",
28
+ "@vitest/ui": "^3.0.8",
29
+ "eslint": "^9.22.0",
30
30
  "prettier": "^3.5.3",
31
31
  "tslib": "^2.8.1",
32
32
  "typedoc": "^0.27.9",
33
33
  "typedoc-plugin-mdn-links": "^5.0.1",
34
34
  "typescript": "^5.8.2",
35
- "vite": "^6.2.0",
35
+ "vite": "^6.2.1",
36
36
  "vite-plugin-dts": "^4.5.3",
37
- "vitest": "^3.0.7"
37
+ "vitest": "^3.0.8"
38
38
  },
39
39
  "files": [
40
40
  "dist"