@infra-blocks/types 0.35.0-alpha.4 → 0.36.0-alpha.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.
- package/lib/cjs/func.d.ts +2 -2
- package/lib/esm/func.d.ts +2 -2
- package/package.json +1 -2
package/lib/cjs/func.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type AbstractConstructor<R = object, A extends any[] = any[]> = abstract
|
|
|
7
7
|
/**
|
|
8
8
|
* The async flavor of {@link Factory}.
|
|
9
9
|
*/
|
|
10
|
-
export type AsyncFactory<P extends
|
|
10
|
+
export type AsyncFactory<R, P extends any[] = any[]> = Factory<Promise<R>, P>;
|
|
11
11
|
/**
|
|
12
12
|
* The async flavor of {@link Parser}.
|
|
13
13
|
*/
|
|
@@ -40,7 +40,7 @@ export type ErrorHandler<T = unknown> = (err: T) => void;
|
|
|
40
40
|
/**
|
|
41
41
|
* A type alias for a function that creates objects of a given type.
|
|
42
42
|
*/
|
|
43
|
-
export type Factory<P extends
|
|
43
|
+
export type Factory<R, P extends any[] = any[]> = (...params: P) => R;
|
|
44
44
|
/**
|
|
45
45
|
* A type alias for parser functions.
|
|
46
46
|
*
|
package/lib/esm/func.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type AbstractConstructor<R = object, A extends any[] = any[]> = abstract
|
|
|
7
7
|
/**
|
|
8
8
|
* The async flavor of {@link Factory}.
|
|
9
9
|
*/
|
|
10
|
-
export type AsyncFactory<P extends
|
|
10
|
+
export type AsyncFactory<R, P extends any[] = any[]> = Factory<Promise<R>, P>;
|
|
11
11
|
/**
|
|
12
12
|
* The async flavor of {@link Parser}.
|
|
13
13
|
*/
|
|
@@ -40,7 +40,7 @@ export type ErrorHandler<T = unknown> = (err: T) => void;
|
|
|
40
40
|
/**
|
|
41
41
|
* A type alias for a function that creates objects of a given type.
|
|
42
42
|
*/
|
|
43
|
-
export type Factory<P extends
|
|
43
|
+
export type Factory<R, P extends any[] = any[]> = (...params: P) => R;
|
|
44
44
|
/**
|
|
45
45
|
* A type alias for parser functions.
|
|
46
46
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infra-blocks/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0-alpha.0",
|
|
4
4
|
"description": "Typescript types utility package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"type",
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"test:unit": "node --import tsx --test 'test/unit/**/*.spec.ts'"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@biomejs/biome": "^2.3.8",
|
|
42
41
|
"@infra-blocks/test": "^0.6.0",
|
|
43
42
|
"@types/node": "^24.10.1",
|
|
44
43
|
"@typescript-eslint/eslint-plugin": "^5.59.8",
|