@lssm/lib.utils-typescript 1.11.1 → 1.41.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 (96) hide show
  1. package/README.md +5 -0
  2. package/dist/index.js +1 -0
  3. package/dist/lib/AwaitedResult.js +0 -0
  4. package/dist/lib/BrowserNativeObject.js +0 -0
  5. package/dist/lib/DeepInfiniteArray.js +0 -0
  6. package/dist/lib/DeepKeepOnly.js +0 -0
  7. package/dist/lib/DeepKey.js +0 -0
  8. package/dist/lib/DeepMap.js +0 -0
  9. package/dist/lib/DeepNullable.js +0 -0
  10. package/dist/lib/DeepOr.js +0 -0
  11. package/dist/lib/DeepPartial.js +0 -0
  12. package/dist/lib/DeepReplace.js +0 -0
  13. package/dist/lib/DeepReplaceNullByUndefined.js +0 -0
  14. package/dist/lib/DeepValue.js +0 -0
  15. package/dist/lib/DictionaryFromEnum.js +0 -0
  16. package/dist/lib/DictionaryFromEnumMapping.js +0 -0
  17. package/dist/lib/EmptyRecord.js +0 -0
  18. package/dist/lib/Identified.js +0 -0
  19. package/dist/lib/IdentifiedLabel.js +0 -0
  20. package/dist/lib/IsAny.js +0 -0
  21. package/dist/lib/Json.js +0 -0
  22. package/dist/lib/KeepOnly.js +0 -0
  23. package/dist/lib/Maybe.js +0 -0
  24. package/dist/lib/MaybeArray.js +0 -0
  25. package/dist/lib/NestedValue.js +0 -0
  26. package/dist/lib/NonUndefined.js +0 -0
  27. package/dist/lib/Primitive.js +0 -0
  28. package/dist/lib/Replaced.js +0 -0
  29. package/dist/lib/ReverseMap.js +0 -0
  30. package/dist/lib/Satisfies.js +0 -0
  31. package/dist/lib/StringKey.js +0 -0
  32. package/dist/lib/StringKeysOnly.js +0 -0
  33. package/dist/staticShouldNotHappen.js +1 -0
  34. package/package.json +70 -51
  35. package/dist/index.d.mts +0 -31
  36. package/dist/index.mjs +0 -1
  37. package/dist/lib/AwaitedResult.d.mts +0 -4
  38. package/dist/lib/AwaitedResult.mjs +0 -1
  39. package/dist/lib/BrowserNativeObject.d.mts +0 -4
  40. package/dist/lib/BrowserNativeObject.mjs +0 -1
  41. package/dist/lib/DeepInfiniteArray.d.mts +0 -4
  42. package/dist/lib/DeepInfiniteArray.mjs +0 -1
  43. package/dist/lib/DeepKeepOnly.d.mts +0 -6
  44. package/dist/lib/DeepKeepOnly.mjs +0 -1
  45. package/dist/lib/DeepKey.d.mts +0 -4
  46. package/dist/lib/DeepKey.mjs +0 -1
  47. package/dist/lib/DeepMap.d.mts +0 -9
  48. package/dist/lib/DeepMap.mjs +0 -1
  49. package/dist/lib/DeepNullable.d.mts +0 -6
  50. package/dist/lib/DeepNullable.mjs +0 -1
  51. package/dist/lib/DeepOr.d.mts +0 -4
  52. package/dist/lib/DeepOr.mjs +0 -1
  53. package/dist/lib/DeepPartial.d.mts +0 -7
  54. package/dist/lib/DeepPartial.mjs +0 -1
  55. package/dist/lib/DeepReplace.d.mts +0 -4
  56. package/dist/lib/DeepReplace.mjs +0 -1
  57. package/dist/lib/DeepReplaceNullByUndefined.d.mts +0 -6
  58. package/dist/lib/DeepReplaceNullByUndefined.mjs +0 -1
  59. package/dist/lib/DeepValue.d.mts +0 -6
  60. package/dist/lib/DeepValue.mjs +0 -1
  61. package/dist/lib/DictionaryFromEnum.d.mts +0 -4
  62. package/dist/lib/DictionaryFromEnum.mjs +0 -1
  63. package/dist/lib/DictionaryFromEnumMapping.d.mts +0 -4
  64. package/dist/lib/DictionaryFromEnumMapping.mjs +0 -1
  65. package/dist/lib/EmptyRecord.d.mts +0 -6
  66. package/dist/lib/EmptyRecord.mjs +0 -1
  67. package/dist/lib/Identified.d.mts +0 -6
  68. package/dist/lib/Identified.mjs +0 -1
  69. package/dist/lib/IdentifiedLabel.d.mts +0 -8
  70. package/dist/lib/IdentifiedLabel.mjs +0 -1
  71. package/dist/lib/IsAny.d.mts +0 -4
  72. package/dist/lib/IsAny.mjs +0 -1
  73. package/dist/lib/Json.d.mts +0 -15
  74. package/dist/lib/Json.mjs +0 -1
  75. package/dist/lib/KeepOnly.d.mts +0 -4
  76. package/dist/lib/KeepOnly.mjs +0 -1
  77. package/dist/lib/Maybe.d.mts +0 -4
  78. package/dist/lib/Maybe.mjs +0 -1
  79. package/dist/lib/MaybeArray.d.mts +0 -4
  80. package/dist/lib/MaybeArray.mjs +0 -1
  81. package/dist/lib/NestedValue.d.mts +0 -7
  82. package/dist/lib/NestedValue.mjs +0 -1
  83. package/dist/lib/NonUndefined.d.mts +0 -4
  84. package/dist/lib/NonUndefined.mjs +0 -1
  85. package/dist/lib/Primitive.d.mts +0 -6
  86. package/dist/lib/Primitive.mjs +0 -1
  87. package/dist/lib/Replaced.d.mts +0 -6
  88. package/dist/lib/Replaced.mjs +0 -1
  89. package/dist/lib/ReverseMap.d.mts +0 -4
  90. package/dist/lib/ReverseMap.mjs +0 -1
  91. package/dist/lib/Satisfies.d.mts +0 -4
  92. package/dist/lib/Satisfies.mjs +0 -1
  93. package/dist/lib/StringKey.d.mts +0 -4
  94. package/dist/lib/StringKey.mjs +0 -1
  95. package/dist/lib/StringKeysOnly.d.mts +0 -6
  96. package/dist/lib/StringKeysOnly.mjs +0 -1
package/README.md CHANGED
@@ -56,6 +56,11 @@ const update: DeepPartial<User> = {
56
56
 
57
57
 
58
58
 
59
+
60
+
61
+
62
+
63
+
59
64
 
60
65
 
61
66
 
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import{staticShouldNotHappen as e}from"./staticShouldNotHappen.js";export{e as staticShouldNotHappen};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ function e(e){throw Error(`Missing switch value ${e?.toString?.()}`)}export{e as staticShouldNotHappen};
package/package.json CHANGED
@@ -1,77 +1,96 @@
1
1
  {
2
2
  "name": "@lssm/lib.utils-typescript",
3
- "version": "1.11.1",
3
+ "version": "1.41.1",
4
4
  "scripts": {
5
5
  "clean": "rm -rf dist",
6
6
  "lint": "bun run lint:fix",
7
7
  "lint:fix": "eslint src --fix",
8
8
  "lint:check": "eslint src",
9
9
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
10
+ "publish:pkg:canary": "bun publish:pkg --tag canary",
10
11
  "build": "bun build:bundle && bun build:types",
11
12
  "build:bundle": "tsdown",
12
13
  "build:types": "tsc --noEmit",
13
14
  "dev": "bun build:bundle --watch"
14
15
  },
15
16
  "devDependencies": {
16
- "@lssm/tool.typescript": "0.11.1",
17
- "@lssm/tool.tsdown": "0.12.1",
18
- "tsdown": "^0.16.6",
17
+ "@lssm/tool.typescript": "1.41.1",
18
+ "@lssm/tool.tsdown": "1.41.1",
19
+ "tsdown": "^0.17.4",
19
20
  "typescript": "^5.9.3"
20
21
  },
21
22
  "type": "module",
22
- "main": "./dist/index.mjs",
23
- "module": "./dist/index.mjs",
23
+ "main": "./dist/index.js",
24
+ "module": "./dist/index.js",
24
25
  "types": "./dist/index.d.mts",
25
26
  "exports": {
26
- ".": "./dist/index.mjs",
27
- "./lib/AwaitedResult": "./dist/lib/AwaitedResult.mjs",
28
- "./lib/BrowserNativeObject": "./dist/lib/BrowserNativeObject.mjs",
29
- "./lib/DeepInfiniteArray": "./dist/lib/DeepInfiniteArray.mjs",
30
- "./lib/DeepKeepOnly": "./dist/lib/DeepKeepOnly.mjs",
31
- "./lib/DeepKey": "./dist/lib/DeepKey.mjs",
32
- "./lib/DeepMap": "./dist/lib/DeepMap.mjs",
33
- "./lib/DeepNullable": "./dist/lib/DeepNullable.mjs",
34
- "./lib/DeepOr": "./dist/lib/DeepOr.mjs",
35
- "./lib/DeepPartial": "./dist/lib/DeepPartial.mjs",
36
- "./lib/DeepReplace": "./dist/lib/DeepReplace.mjs",
37
- "./lib/DeepReplaceNullByUndefined": "./dist/lib/DeepReplaceNullByUndefined.mjs",
38
- "./lib/DeepValue": "./dist/lib/DeepValue.mjs",
39
- "./lib/DictionaryFromEnum": "./dist/lib/DictionaryFromEnum.mjs",
40
- "./lib/DictionaryFromEnumMapping": "./dist/lib/DictionaryFromEnumMapping.mjs",
41
- "./lib/EmptyRecord": "./dist/lib/EmptyRecord.mjs",
42
- "./lib/Identified": "./dist/lib/Identified.mjs",
43
- "./lib/IdentifiedLabel": "./dist/lib/IdentifiedLabel.mjs",
44
- "./lib/IsAny": "./dist/lib/IsAny.mjs",
45
- "./lib/Json": "./dist/lib/Json.mjs",
46
- "./lib/KeepOnly": "./dist/lib/KeepOnly.mjs",
47
- "./lib/Maybe": "./dist/lib/Maybe.mjs",
48
- "./lib/MaybeArray": "./dist/lib/MaybeArray.mjs",
49
- "./lib/NestedValue": "./dist/lib/NestedValue.mjs",
50
- "./lib/NonUndefined": "./dist/lib/NonUndefined.mjs",
51
- "./lib/Primitive": "./dist/lib/Primitive.mjs",
52
- "./lib/Replaced": "./dist/lib/Replaced.mjs",
53
- "./lib/ReverseMap": "./dist/lib/ReverseMap.mjs",
54
- "./lib/Satisfies": "./dist/lib/Satisfies.mjs",
55
- "./lib/StringKey": "./dist/lib/StringKey.mjs",
56
- "./lib/StringKeysOnly": "./dist/lib/StringKeysOnly.mjs",
27
+ ".": "./src/index.ts",
28
+ "./lib/AwaitedResult": "./src/lib/AwaitedResult.ts",
29
+ "./lib/BrowserNativeObject": "./src/lib/BrowserNativeObject.ts",
30
+ "./lib/DeepInfiniteArray": "./src/lib/DeepInfiniteArray.ts",
31
+ "./lib/DeepKeepOnly": "./src/lib/DeepKeepOnly.ts",
32
+ "./lib/DeepKey": "./src/lib/DeepKey.ts",
33
+ "./lib/DeepMap": "./src/lib/DeepMap.ts",
34
+ "./lib/DeepNullable": "./src/lib/DeepNullable.ts",
35
+ "./lib/DeepOr": "./src/lib/DeepOr.ts",
36
+ "./lib/DeepPartial": "./src/lib/DeepPartial.ts",
37
+ "./lib/DeepReplace": "./src/lib/DeepReplace.ts",
38
+ "./lib/DeepReplaceNullByUndefined": "./src/lib/DeepReplaceNullByUndefined.ts",
39
+ "./lib/DeepValue": "./src/lib/DeepValue.ts",
40
+ "./lib/DictionaryFromEnum": "./src/lib/DictionaryFromEnum.ts",
41
+ "./lib/DictionaryFromEnumMapping": "./src/lib/DictionaryFromEnumMapping.ts",
42
+ "./lib/EmptyRecord": "./src/lib/EmptyRecord.ts",
43
+ "./lib/Identified": "./src/lib/Identified.ts",
44
+ "./lib/IdentifiedLabel": "./src/lib/IdentifiedLabel.ts",
45
+ "./lib/IsAny": "./src/lib/IsAny.ts",
46
+ "./lib/Json": "./src/lib/Json.ts",
47
+ "./lib/KeepOnly": "./src/lib/KeepOnly.ts",
48
+ "./lib/Maybe": "./src/lib/Maybe.ts",
49
+ "./lib/MaybeArray": "./src/lib/MaybeArray.ts",
50
+ "./lib/NestedValue": "./src/lib/NestedValue.ts",
51
+ "./lib/NonUndefined": "./src/lib/NonUndefined.ts",
52
+ "./lib/Primitive": "./src/lib/Primitive.ts",
53
+ "./lib/Replaced": "./src/lib/Replaced.ts",
54
+ "./lib/ReverseMap": "./src/lib/ReverseMap.ts",
55
+ "./lib/Satisfies": "./src/lib/Satisfies.ts",
56
+ "./lib/StringKey": "./src/lib/StringKey.ts",
57
+ "./lib/StringKeysOnly": "./src/lib/StringKeysOnly.ts",
57
58
  "./*": "./*"
58
59
  },
59
60
  "publishConfig": {
60
61
  "exports": {
61
- ".": {
62
- "types": "./dist/index.d.ts",
63
- "import": "./dist/index.js",
64
- "require": "./dist/index.cjs",
65
- "default": "./dist/index.js"
66
- },
67
- "./*": {
68
- "types": "./dist/*.d.ts",
69
- "import": "./dist/*.js",
70
- "require": "./dist/*.cjs",
71
- "default": "./dist/*.js"
72
- },
73
- "./*.css": "./dist/*.css",
74
- "./package.json": "./package.json"
62
+ ".": "./dist/index.js",
63
+ "./lib/AwaitedResult": "./dist/lib/AwaitedResult.js",
64
+ "./lib/BrowserNativeObject": "./dist/lib/BrowserNativeObject.js",
65
+ "./lib/DeepInfiniteArray": "./dist/lib/DeepInfiniteArray.js",
66
+ "./lib/DeepKeepOnly": "./dist/lib/DeepKeepOnly.js",
67
+ "./lib/DeepKey": "./dist/lib/DeepKey.js",
68
+ "./lib/DeepMap": "./dist/lib/DeepMap.js",
69
+ "./lib/DeepNullable": "./dist/lib/DeepNullable.js",
70
+ "./lib/DeepOr": "./dist/lib/DeepOr.js",
71
+ "./lib/DeepPartial": "./dist/lib/DeepPartial.js",
72
+ "./lib/DeepReplace": "./dist/lib/DeepReplace.js",
73
+ "./lib/DeepReplaceNullByUndefined": "./dist/lib/DeepReplaceNullByUndefined.js",
74
+ "./lib/DeepValue": "./dist/lib/DeepValue.js",
75
+ "./lib/DictionaryFromEnum": "./dist/lib/DictionaryFromEnum.js",
76
+ "./lib/DictionaryFromEnumMapping": "./dist/lib/DictionaryFromEnumMapping.js",
77
+ "./lib/EmptyRecord": "./dist/lib/EmptyRecord.js",
78
+ "./lib/Identified": "./dist/lib/Identified.js",
79
+ "./lib/IdentifiedLabel": "./dist/lib/IdentifiedLabel.js",
80
+ "./lib/IsAny": "./dist/lib/IsAny.js",
81
+ "./lib/Json": "./dist/lib/Json.js",
82
+ "./lib/KeepOnly": "./dist/lib/KeepOnly.js",
83
+ "./lib/Maybe": "./dist/lib/Maybe.js",
84
+ "./lib/MaybeArray": "./dist/lib/MaybeArray.js",
85
+ "./lib/NestedValue": "./dist/lib/NestedValue.js",
86
+ "./lib/NonUndefined": "./dist/lib/NonUndefined.js",
87
+ "./lib/Primitive": "./dist/lib/Primitive.js",
88
+ "./lib/Replaced": "./dist/lib/Replaced.js",
89
+ "./lib/ReverseMap": "./dist/lib/ReverseMap.js",
90
+ "./lib/Satisfies": "./dist/lib/Satisfies.js",
91
+ "./lib/StringKey": "./dist/lib/StringKey.js",
92
+ "./lib/StringKeysOnly": "./dist/lib/StringKeysOnly.js",
93
+ "./*": "./*"
75
94
  },
76
95
  "access": "public"
77
96
  },
package/dist/index.d.mts DELETED
@@ -1,31 +0,0 @@
1
- import { AwaitedResult } from "./lib/AwaitedResult.mjs";
2
- import { BrowserNativeObject } from "./lib/BrowserNativeObject.mjs";
3
- import { DeepInfiniteArray } from "./lib/DeepInfiniteArray.mjs";
4
- import { KeepOnly } from "./lib/KeepOnly.mjs";
5
- import { DeepKeepOnly } from "./lib/DeepKeepOnly.mjs";
6
- import { DeepKey } from "./lib/DeepKey.mjs";
7
- import { IsAny } from "./lib/IsAny.mjs";
8
- import { NestedValue } from "./lib/NestedValue.mjs";
9
- import { NonUndefined } from "./lib/NonUndefined.mjs";
10
- import { DeepMap } from "./lib/DeepMap.mjs";
11
- import { DeepOr } from "./lib/DeepOr.mjs";
12
- import { DeepNullable } from "./lib/DeepNullable.mjs";
13
- import { DeepPartial } from "./lib/DeepPartial.mjs";
14
- import { DeepReplace } from "./lib/DeepReplace.mjs";
15
- import { DeepReplaceNullByUndefined } from "./lib/DeepReplaceNullByUndefined.mjs";
16
- import { DeepValue } from "./lib/DeepValue.mjs";
17
- import { DictionaryFromEnum } from "./lib/DictionaryFromEnum.mjs";
18
- import { DictionaryFromEnumMapping } from "./lib/DictionaryFromEnumMapping.mjs";
19
- import { AnyRecord, EmptyRecord, UnknownRecord } from "./lib/EmptyRecord.mjs";
20
- import { Identified } from "./lib/Identified.mjs";
21
- import { IdentifiedLabel } from "./lib/IdentifiedLabel.mjs";
22
- import { ExtendedJsonObject, JSONArray, JSONObject, JSONValue, NonJsonArray, NonJsonObject, NonJsonValue, PrimitiveJSONValue } from "./lib/Json.mjs";
23
- import { Maybe } from "./lib/Maybe.mjs";
24
- import { MaybeArray } from "./lib/MaybeArray.mjs";
25
- import { Primitive } from "./lib/Primitive.mjs";
26
- import { Replaced } from "./lib/Replaced.mjs";
27
- import { ReverseMap } from "./lib/ReverseMap.mjs";
28
- import { Satisfies } from "./lib/Satisfies.mjs";
29
- import { StringKey } from "./lib/StringKey.mjs";
30
- import { StringKeysOnly } from "./lib/StringKeysOnly.mjs";
31
- export { AnyRecord, AwaitedResult, BrowserNativeObject, DeepInfiniteArray, DeepKeepOnly, DeepKey, DeepMap, DeepNullable, DeepOr, DeepPartial, DeepReplace, DeepReplaceNullByUndefined, DeepValue, DictionaryFromEnum, DictionaryFromEnumMapping, EmptyRecord, ExtendedJsonObject, Identified, IdentifiedLabel, IsAny, JSONArray, JSONObject, JSONValue, KeepOnly, Maybe, MaybeArray, NestedValue, NonJsonArray, NonJsonObject, NonJsonValue, NonUndefined, Primitive, PrimitiveJSONValue, Replaced, ReverseMap, Satisfies, StringKey, StringKeysOnly, UnknownRecord };
package/dist/index.mjs DELETED
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/AwaitedResult.d.ts
2
- type AwaitedResult<T extends (...args: any) => any> = Awaited<ReturnType<T>>;
3
- //#endregion
4
- export { AwaitedResult };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/BrowserNativeObject.d.ts
2
- declare type BrowserNativeObject = Date | FileList | File;
3
- //#endregion
4
- export { BrowserNativeObject };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/DeepInfiniteArray.d.ts
2
- declare type DeepInfiniteArray<T> = (T | DeepInfiniteArray<T>)[];
3
- //#endregion
4
- export { DeepInfiniteArray };
@@ -1 +0,0 @@
1
- export{};
@@ -1,6 +0,0 @@
1
- import { KeepOnly } from "./KeepOnly.mjs";
2
-
3
- //#region src/lib/DeepKeepOnly.d.ts
4
- type DeepKeepOnly<T, KeepType> = T | (T extends (infer U)[] ? KeepOnly<U, KeepType>[] : T extends Map<infer K, infer V> ? Map<KeepOnly<K, KeepType>, KeepOnly<V, KeepType>> : T extends Set<infer M> ? Set<KeepOnly<M, KeepType>> : KeepOnly<T, KeepType>);
5
- //#endregion
6
- export { DeepKeepOnly };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/DeepKey.d.ts
2
- type DeepKey<T, K extends keyof T = keyof T> = K extends string | number ? T[K] extends infer R ? `${K}` | (R extends Record<string, unknown> ? `${K}.${DeepKey<R>}` : never) : never : never;
3
- //#endregion
4
- export { DeepKey };
@@ -1 +0,0 @@
1
- export{};
@@ -1,9 +0,0 @@
1
- import { BrowserNativeObject } from "./BrowserNativeObject.mjs";
2
- import { IsAny } from "./IsAny.mjs";
3
- import { NestedValue } from "./NestedValue.mjs";
4
- import { NonUndefined } from "./NonUndefined.mjs";
5
-
6
- //#region src/lib/DeepMap.d.ts
7
- declare type DeepMap<T, TValue> = IsAny<T> extends true ? any : T extends BrowserNativeObject | NestedValue ? TValue : T extends object ? { [K in keyof T]: DeepMap<NonUndefined<T[K]>, TValue> } : TValue;
8
- //#endregion
9
- export { DeepMap };
@@ -1 +0,0 @@
1
- export{};
@@ -1,6 +0,0 @@
1
- import { DeepOr } from "./DeepOr.mjs";
2
-
3
- //#region src/lib/DeepNullable.d.ts
4
- type DeepNullable<T> = DeepOr<T, null>;
5
- //#endregion
6
- export { DeepNullable };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/DeepOr.d.ts
2
- type DeepOr<T, OrValue> = T | (T extends (infer U)[] ? DeepOr<U, OrValue>[] : T extends Map<infer K, infer V> ? Map<DeepOr<K, OrValue>, DeepOr<V, OrValue>> : T extends Set<infer M> ? Set<DeepOr<M, OrValue>> : T extends object ? { [K in keyof T]: DeepOr<T[K], OrValue> | OrValue } : T);
3
- //#endregion
4
- export { DeepOr };
@@ -1 +0,0 @@
1
- export{};
@@ -1,7 +0,0 @@
1
- //#region src/lib/DeepPartial.d.ts
2
- /**
3
- * Same as Partial<T> but goes deeper and makes Partial<T> all its properties and sub-properties.
4
- */
5
- type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P] };
6
- //#endregion
7
- export { DeepPartial };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/DeepReplace.d.ts
2
- type DeepReplace<T, Search, Replace> = T extends (infer ArrayItemT)[] ? DeepReplace<ArrayItemT, Search, Replace>[] : T extends Map<infer MapKey, infer MapT> ? Map<DeepReplace<MapKey, Search, Replace>, DeepReplace<MapT, Search, Replace>> : T extends Set<infer SetT> ? Set<DeepReplace<SetT, Search, Replace>> : T extends object ? { [ObjKey in keyof T]: DeepReplace<T[ObjKey], Search, Replace> } : T extends Search ? Replace : T;
3
- //#endregion
4
- export { DeepReplace };
@@ -1 +0,0 @@
1
- export{};
@@ -1,6 +0,0 @@
1
- import { DeepReplace } from "./DeepReplace.mjs";
2
-
3
- //#region src/lib/DeepReplaceNullByUndefined.d.ts
4
- type DeepReplaceNullByUndefined<T> = DeepReplace<T, null, undefined>;
5
- //#endregion
6
- export { DeepReplaceNullByUndefined };
@@ -1 +0,0 @@
1
- export{};
@@ -1,6 +0,0 @@
1
- import { DeepKey } from "./DeepKey.mjs";
2
-
3
- //#region src/lib/DeepValue.d.ts
4
- type DeepValue<T, P extends DeepKey<T>> = P extends `${infer K}.${infer Rest}` ? T[(K extends `${infer R extends number}` ? R : K) & keyof T] extends infer S ? S extends never ? never : Rest extends DeepKey<S> ? DeepValue<S, Rest> : never : never : T[(P extends `${infer R extends number}` ? R : P) & keyof T];
5
- //#endregion
6
- export { DeepValue };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/DictionaryFromEnum.d.ts
2
- type DictionaryFromEnum<Enum, ObjMapping> = Record<keyof Enum, ObjMapping>;
3
- //#endregion
4
- export { DictionaryFromEnum };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/DictionaryFromEnumMapping.d.ts
2
- type DictionaryFromEnumMapping<Enum, Mapped, Mapping extends Record<keyof Enum, Mapped>> = { [k in keyof Enum]: Mapping[k] };
3
- //#endregion
4
- export { DictionaryFromEnumMapping };
@@ -1 +0,0 @@
1
- export{};
@@ -1,6 +0,0 @@
1
- //#region src/lib/EmptyRecord.d.ts
2
- type EmptyRecord = Record<string, never>;
3
- type UnknownRecord = Record<string, unknown>;
4
- type AnyRecord = Record<string, any>;
5
- //#endregion
6
- export { AnyRecord, EmptyRecord, UnknownRecord };
@@ -1 +0,0 @@
1
- export{};
@@ -1,6 +0,0 @@
1
- //#region src/lib/Identified.d.ts
2
- interface Identified {
3
- id: string;
4
- }
5
- //#endregion
6
- export { Identified };
@@ -1 +0,0 @@
1
- export{};
@@ -1,8 +0,0 @@
1
- import { Identified } from "./Identified.mjs";
2
-
3
- //#region src/lib/IdentifiedLabel.d.ts
4
- type IdentifiedLabel = Identified & {
5
- label: string;
6
- };
7
- //#endregion
8
- export { IdentifiedLabel };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/IsAny.d.ts
2
- declare type IsAny<T> = 0 extends 1 & T ? true : false;
3
- //#endregion
4
- export { IsAny };
@@ -1 +0,0 @@
1
- export{};
@@ -1,15 +0,0 @@
1
- //#region src/lib/Json.d.ts
2
- declare type PrimitiveJSONValue = string | number | boolean | undefined | null;
3
- declare type JSONValue = PrimitiveJSONValue | JSONArray | JSONObject;
4
- interface JSONArray extends Array<JSONValue> {}
5
- interface JSONObject {
6
- [key: string]: JSONValue;
7
- }
8
- declare type NonJsonValue<ExtraTypes> = PrimitiveJSONValue | NonJsonArray<ExtraTypes> | NonJsonObject<ExtraTypes> | ExtraTypes;
9
- interface NonJsonArray<ExtraTypes> extends Array<NonJsonValue<ExtraTypes>> {}
10
- interface NonJsonObject<ExtraTypes> {
11
- [key: string]: NonJsonValue<ExtraTypes>;
12
- }
13
- type ExtendedJsonObject = NonJsonObject<bigint | Date>;
14
- //#endregion
15
- export { ExtendedJsonObject, JSONArray, JSONObject, JSONValue, NonJsonArray, NonJsonObject, NonJsonValue, PrimitiveJSONValue };
package/dist/lib/Json.mjs DELETED
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/KeepOnly.d.ts
2
- type KeepOnly<T, KeepType> = T extends object ? { [K in keyof T]: KeepOnly<T[K], KeepType> } : T extends KeepType ? T : never;
3
- //#endregion
4
- export { KeepOnly };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/Maybe.d.ts
2
- type Maybe<T> = T | null;
3
- //#endregion
4
- export { Maybe };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/MaybeArray.d.ts
2
- type MaybeArray<T> = T | T[];
3
- //#endregion
4
- export { MaybeArray };
@@ -1 +0,0 @@
1
- export{};
@@ -1,7 +0,0 @@
1
- //#region src/lib/NestedValue.d.ts
2
- declare const $NestedValue: unique symbol;
3
- declare type NestedValue<TValue extends object = object> = {
4
- [$NestedValue]: never;
5
- } & TValue;
6
- //#endregion
7
- export { NestedValue };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/NonUndefined.d.ts
2
- declare type NonUndefined<T> = T extends undefined ? never : T;
3
- //#endregion
4
- export { NonUndefined };
@@ -1 +0,0 @@
1
- export{};
@@ -1,6 +0,0 @@
1
- import { PrimitiveJSONValue } from "./Json.mjs";
2
-
3
- //#region src/lib/Primitive.d.ts
4
- declare type Primitive = PrimitiveJSONValue | symbol | bigint;
5
- //#endregion
6
- export { Primitive };
@@ -1 +0,0 @@
1
- export{};
@@ -1,6 +0,0 @@
1
- import { Primitive } from "./Primitive.mjs";
2
-
3
- //#region src/lib/Replaced.d.ts
4
- type Replaced<T, TReplace, TWith, TKeep = Primitive> = T extends TReplace | TKeep ? T extends TReplace ? TWith | Exclude<T, TReplace> : T : { [P in keyof T]: Replaced<T[P], TReplace, TWith, TKeep> };
5
- //#endregion
6
- export { Replaced };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/ReverseMap.d.ts
2
- type ReverseMap<T extends Record<keyof T, keyof any>> = { [K in keyof T as T[K]]: K };
3
- //#endregion
4
- export { ReverseMap };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/Satisfies.d.ts
2
- declare type Satisfies<ConstraintShape, ToValidate> = ConstraintShape extends ConstraintShape ? ToValidate : never;
3
- //#endregion
4
- export { Satisfies };
@@ -1 +0,0 @@
1
- export{};
@@ -1,4 +0,0 @@
1
- //#region src/lib/StringKey.d.ts
2
- type StringKey<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
3
- //#endregion
4
- export { StringKey };
@@ -1 +0,0 @@
1
- export{};
@@ -1,6 +0,0 @@
1
- import { StringKey } from "./StringKey.mjs";
2
-
3
- //#region src/lib/StringKeysOnly.d.ts
4
- type StringKeysOnly<T> = Pick<T, StringKey<T>>;
5
- //#endregion
6
- export { StringKeysOnly };
@@ -1 +0,0 @@
1
- export{};