@sohanemon/utils 4.1.4 → 4.1.6

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.
@@ -7,6 +7,9 @@ export type SelectivePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T
7
7
  export type DeepRequired<T> = T extends Function ? T : T extends Array<infer U> ? Array<DeepRequired<U>> : T extends object ? {
8
8
  [K in keyof T]-?: DeepRequired<T[K]>;
9
9
  } : T;
10
+ export type Never<T> = {
11
+ [K in keyof T]: never;
12
+ };
10
13
  export type DeepReadonly<T> = T extends Function ? T : T extends Array<infer U> ? ReadonlyArray<DeepReadonly<U>> : T extends object ? {
11
14
  readonly [K in keyof T]: DeepReadonly<T[K]>;
12
15
  } : T;
@@ -24,3 +27,6 @@ export type Diff<T, U> = Omit<T, keyof U> & Omit<U, keyof T>;
24
27
  export type Intersection<T extends object, U extends object> = Pick<T, Extract<keyof T, keyof U> & Extract<keyof U, keyof T>>;
25
28
  export type Merge<T extends object, U extends object, I = Diff<T, U> & Intersection<U, T> & Diff<U, T>> = Pick<I, keyof I>;
26
29
  export type Substract<T extends object, U extends object> = Omit<T, keyof U>;
30
+ export type AllOrNone<T> = T | {
31
+ [P in keyof T]?: never;
32
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sohanemon/utils",
3
- "version": "4.1.4",
3
+ "version": "4.1.6",
4
4
  "author": "Sohan Emon <sohanemon@outlook.com>",
5
5
  "description": "",
6
6
  "type": "module",
@@ -15,19 +15,33 @@
15
15
  },
16
16
  "typesVersions": {
17
17
  "*": {
18
- "core": ["dist/index.d.ts"],
19
- "types": ["dist/types/index.d.ts"],
20
- "hooks": ["dist/hooks/index.d.ts"],
21
- "components": ["dist/components/index.d.ts"]
18
+ "core": [
19
+ "dist/index.d.ts"
20
+ ],
21
+ "types": [
22
+ "dist/types/index.d.ts"
23
+ ],
24
+ "hooks": [
25
+ "dist/hooks/index.d.ts"
26
+ ],
27
+ "components": [
28
+ "dist/components/index.d.ts"
29
+ ]
22
30
  }
23
31
  },
24
- "files": ["dist", "README.md"],
32
+ "files": [
33
+ "dist",
34
+ "README.md"
35
+ ],
25
36
  "scripts": {
26
37
  "build": "tsc",
27
38
  "build:watch": "tsc --watch",
28
39
  "export": "tsc && npm publish"
29
40
  },
30
- "keywords": ["utils", "cn"],
41
+ "keywords": [
42
+ "utils",
43
+ "cn"
44
+ ],
31
45
  "license": "ISC",
32
46
  "devDependencies": {
33
47
  "@types/node": "^22.4.0",