@zayne-labs/toolkit-type-helpers 0.12.24 → 0.12.26
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/dist/esm/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ type UnmaskType<TType> = {
|
|
|
4
4
|
_: TType;
|
|
5
5
|
}["_"];
|
|
6
6
|
type NonFalsy<TType> = TType extends "" | 0 | 0n | false | null | undefined ? never : TType;
|
|
7
|
-
type PrettyOmit<TObject, Key
|
|
8
|
-
type PrettyPick<TObject, Key
|
|
7
|
+
type PrettyOmit<TObject, Key extends keyof TObject> = Prettify<Omit<TObject, Key>>;
|
|
8
|
+
type PrettyPick<TObject, Key extends keyof TObject> = Prettify<Pick<TObject, Key>>;
|
|
9
9
|
type CallbackFn<in TParams, out TResult = void> = (...params: TParams[]) => TResult;
|
|
10
10
|
type SelectorFn<TStore, TResult> = (state: TStore) => TResult;
|
|
11
11
|
type DistributiveOmit<TObject, TKeysToOmit extends keyof TObject> = TObject extends unknown ? Omit<TObject, TKeysToOmit> : never;
|
|
@@ -63,7 +63,7 @@ type ErrorMessages<TType extends number | string | symbol = never> = Partial<Rec
|
|
|
63
63
|
* @template TSecondType The second type. Properties of this type will be disallowed.
|
|
64
64
|
* @template TErrorMessages An object of custom messages to display on the properties of the second type that are disallowed.
|
|
65
65
|
*/
|
|
66
|
-
type AllowOnlyFirst<TFirstType
|
|
66
|
+
type AllowOnlyFirst<TFirstType, TSecondType, TErrorMessages extends ErrorMessages = never> = Prettify<TFirstType & { [Key in keyof Omit<TSecondType, keyof TFirstType>]?: Key extends keyof TErrorMessages ? TErrorMessages[Key] : "$all" extends keyof TErrorMessages ? TErrorMessages["$all"] : TErrorMessages extends null ? TErrorMessages : never }>;
|
|
67
67
|
/**
|
|
68
68
|
* Merges all types in an array of types into one type.
|
|
69
69
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zayne-labs/toolkit-type-helpers",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.26",
|
|
5
5
|
"description": "A collection of utility functions, types and composables used by my other projects. Nothing too fancy but can be useful.",
|
|
6
6
|
"author": "Ryan Zayne",
|
|
7
7
|
"license": "MIT",
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"exports": {
|
|
23
23
|
".": "./dist/esm/index.js",
|
|
24
|
-
"./resets/*": "./
|
|
24
|
+
"./resets/*": "./resets/*.d.ts"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
-
"dist"
|
|
27
|
+
"dist",
|
|
28
|
+
"resets"
|
|
28
29
|
],
|
|
29
30
|
"engines": {
|
|
30
31
|
"node": ">=18.x"
|
|
@@ -35,16 +36,16 @@
|
|
|
35
36
|
"@size-limit/esbuild-why": "^12.0.0",
|
|
36
37
|
"@size-limit/preset-small-lib": "^12.0.0",
|
|
37
38
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
38
|
-
"@types/node": "^25.0.
|
|
39
|
-
"@zayne-labs/tsconfig": "0.11.
|
|
39
|
+
"@types/node": "^25.0.9",
|
|
40
|
+
"@zayne-labs/tsconfig": "0.11.18",
|
|
40
41
|
"clsx": "^2.1.1",
|
|
41
42
|
"concurrently": "^9.2.1",
|
|
42
43
|
"cross-env": "^10.1.0",
|
|
43
44
|
"publint": "^0.3.16",
|
|
44
45
|
"size-limit": "^12.0.0",
|
|
45
|
-
"tsdown": "0.
|
|
46
|
+
"tsdown": "0.20.0-beta.3",
|
|
46
47
|
"typescript": "5.9.3",
|
|
47
|
-
"vitest": "4.0.
|
|
48
|
+
"vitest": "4.0.17"
|
|
48
49
|
},
|
|
49
50
|
"publishConfig": {
|
|
50
51
|
"access": "public",
|
package/dist/resets/index.js
DELETED
|
File without changes
|
|
File without changes
|