@tb-dev/utils 2.0.1 → 2.1.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.
Files changed (2) hide show
  1. package/dist/types.d.ts +6 -3
  2. package/package.json +9 -9
package/dist/types.d.ts CHANGED
@@ -11,13 +11,15 @@ export type MaybePromise<T> = T | PromiseLike<T>;
11
11
  export type MaybeSet<T> = T | Set<T>;
12
12
  /** Something may be nullish. */
13
13
  export type Nullish<T> = T | null | undefined;
14
+ /** Constructs a type where all properties of `T` may be null. */
15
+ export type PartialNull<T> = {
16
+ [P in keyof T]: T[P] | null;
17
+ };
14
18
  /** Constructs a type where all properties of `T` may be nullish. */
15
19
  export type PartialNullish<T> = {
16
20
  [P in keyof T]?: Nullish<T[P]>;
17
21
  };
18
- /**
19
- * Like `Pick`, but constructs the type based on the values.
20
- */
22
+ /** Like `Pick`, but constructs the type based on the values. */
21
23
  export type PickByValue<T, V> = {
22
24
  [P in keyof T as T[P] extends V ? P : never]: T[P];
23
25
  };
@@ -25,6 +27,7 @@ export type PickByValue<T, V> = {
25
27
  export type PickPartial<T, K extends keyof T> = Pick<Partial<T>, K>;
26
28
  /** Constructs a type by picking the set of properties `K` from a required version of `T`. */
27
29
  export type PickRequired<T, K extends keyof T> = Pick<Required<T>, K>;
30
+ /** Constructs a type where all properties of `T` are strings. */
28
31
  export type StringifyObject<T> = {
29
32
  [P in keyof T]: string;
30
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/utils",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "TypeScript utils",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,17 +27,17 @@
27
27
  "*.{?(c|m)@(j|t)s,vue}": "pnpm run lint"
28
28
  },
29
29
  "devDependencies": {
30
- "@tb-dev/eslint-config": "^3.8.10",
31
- "@types/node": "^20.14.11",
30
+ "@tb-dev/eslint-config": "^4.4.2",
31
+ "@types/node": "^22.1.0",
32
32
  "eslint": "^8.57.0",
33
- "husky": "^9.1.0",
34
- "lint-staged": "^15.2.7",
33
+ "husky": "^9.1.4",
34
+ "lint-staged": "^15.2.8",
35
35
  "prettier": "^3.3.3",
36
36
  "tslib": "^2.6.3",
37
- "typedoc": "^0.26.4",
38
- "typedoc-plugin-mdn-links": "^3.2.4",
39
- "typescript": "^5.5.3",
40
- "vite": "^5.3.4",
37
+ "typedoc": "^0.26.5",
38
+ "typedoc-plugin-mdn-links": "^3.2.7",
39
+ "typescript": "^5.5.4",
40
+ "vite": "^5.3.5",
41
41
  "vite-plugin-dts": "^3.9.1"
42
42
  },
43
43
  "files": [