@augment-vir/core 31.54.3 → 31.55.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { type MaybePromise } from '../promise/maybe-promise.js';
|
|
1
2
|
/**
|
|
2
|
-
* A
|
|
3
|
+
* A function with no inputs and a return type of `Return` (which defaults to `any`).
|
|
3
4
|
*
|
|
4
5
|
* @category Function
|
|
5
6
|
* @category Package : @augment-vir/common
|
|
@@ -7,10 +8,34 @@
|
|
|
7
8
|
*/
|
|
8
9
|
export type NoInputsFunction<Return = any> = () => Return;
|
|
9
10
|
/**
|
|
10
|
-
* A
|
|
11
|
+
* A function with any inputs and a return type of `Return` (which defaults to `any`).
|
|
11
12
|
*
|
|
12
13
|
* @category Function
|
|
13
14
|
* @category Package : @augment-vir/common
|
|
14
15
|
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
15
16
|
*/
|
|
16
17
|
export type AnyFunction<Return = any> = (...args: any[]) => Return;
|
|
18
|
+
/**
|
|
19
|
+
* A function with no inputs and no outputs.
|
|
20
|
+
*
|
|
21
|
+
* @category Function
|
|
22
|
+
* @category Package : @augment-vir/common
|
|
23
|
+
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
24
|
+
*/
|
|
25
|
+
export type EmptyFunction = () => void;
|
|
26
|
+
/**
|
|
27
|
+
* An async function with no inputs and no outputs.
|
|
28
|
+
*
|
|
29
|
+
* @category Function
|
|
30
|
+
* @category Package : @augment-vir/common
|
|
31
|
+
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
32
|
+
*/
|
|
33
|
+
export type EmptyAsyncFunction = () => Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* A maybe async function with no inputs and no outputs.
|
|
36
|
+
*
|
|
37
|
+
* @category Function
|
|
38
|
+
* @category Package : @augment-vir/common
|
|
39
|
+
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
40
|
+
*/
|
|
41
|
+
export type EmptyMaybeAsyncFunction = () => MaybePromise<void>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type IsNever } from 'type-fest';
|
|
1
2
|
/**
|
|
2
3
|
* Gets all keys of an object. This is similar to
|
|
3
4
|
* [`Object.keys`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys)
|
|
@@ -25,7 +26,7 @@ export declare function getObjectTypedKeys<const ObjectGeneric>(input: ObjectGen
|
|
|
25
26
|
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
26
27
|
*/
|
|
27
28
|
export type ExtractKeysWithMatchingValues<Original, Matcher> = keyof {
|
|
28
|
-
[Key in keyof Original as Original[Key]
|
|
29
|
+
[Key in keyof Original as IsNever<Extract<Original[Key], Matcher>> extends true ? never : Key]: Key;
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
31
32
|
* Performs `keyof` on all keys within the `OriginalObject` that have values _not_ matching the
|
|
@@ -45,5 +46,5 @@ export type ExtractKeysWithMatchingValues<Original, Matcher> = keyof {
|
|
|
45
46
|
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
46
47
|
*/
|
|
47
48
|
export type ExcludeKeysWithMatchingValues<Original, Matcher> = keyof {
|
|
48
|
-
[Key in keyof Original as Original[Key]
|
|
49
|
+
[Key in keyof Original as IsNever<Extract<Original[Key], Matcher>> extends true ? Key : never]: never;
|
|
49
50
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/core",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.55.0",
|
|
4
4
|
"description": "Core augment-vir augments. Use @augment-vir/common instead.",
|
|
5
5
|
"homepage": "https://github.com/electrovir/augment-vir",
|
|
6
6
|
"bugs": {
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"test:update": "npm test update"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@date-vir/duration": "^8.
|
|
31
|
+
"@date-vir/duration": "^8.1.0",
|
|
32
32
|
"browser-or-node": "^3.0.0",
|
|
33
33
|
"diff": "^8.0.2",
|
|
34
34
|
"json5": "^2.2.3",
|
|
35
|
-
"type-fest": "^5.
|
|
35
|
+
"type-fest": "^5.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^25.0.3",
|
|
39
39
|
"c8": "^10.1.3",
|
|
40
40
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
41
41
|
"typescript": "^5.9.3"
|