@oliversalzburg/js-utils 0.0.23-dev.1 → 0.0.23-dev.3
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/core.d.ts +15 -0
- package/package.json +2 -2
package/core.d.ts
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Describes a function that is a constructor for something.
|
|
3
3
|
* @typeParam TConstructed - The type this is a constructor for.
|
|
4
|
+
* @group Types
|
|
4
5
|
*/
|
|
5
6
|
export type ConstructorOf<TConstructed> = new (...args: Array<any>) => TConstructed;
|
|
6
7
|
/**
|
|
7
8
|
* Describes any function.
|
|
9
|
+
* @group Types
|
|
8
10
|
*/
|
|
9
11
|
export type AnyFunction = (...args: Array<any>) => any;
|
|
10
12
|
/**
|
|
11
13
|
* Describes any asynchronous function.
|
|
14
|
+
* @group Types
|
|
12
15
|
*/
|
|
13
16
|
export type AnyAsyncFunction = (...args: Array<any>) => Promise<any>;
|
|
14
17
|
/**
|
|
15
18
|
* Any constructor
|
|
19
|
+
* @group Types
|
|
16
20
|
*/
|
|
17
21
|
export type AnyConstructor = new (...args: Array<any>) => any;
|
|
18
22
|
/**
|
|
19
23
|
* Describes a function returning an instance of a given type.
|
|
20
24
|
* @typeParam TReturned - The type of the item returned by the function.
|
|
25
|
+
* @group Types
|
|
21
26
|
*/
|
|
22
27
|
export type AnyFunctionReturning<TReturned = any> = (...args: Array<any>) => TReturned;
|
|
23
28
|
/**
|
|
24
29
|
* Describes an async function returning an instance of a given type.
|
|
25
30
|
* @typeParam TReturned - The type of the item returned by the function.
|
|
31
|
+
* @group Types
|
|
26
32
|
*/
|
|
27
33
|
export type AnyAsyncFunctionReturning<TReturned = any> = (...args: Array<any>) => TReturned;
|
|
28
34
|
/**
|
|
@@ -32,5 +38,14 @@ export type AnyAsyncFunctionReturning<TReturned = any> = (...args: Array<any>) =
|
|
|
32
38
|
* **Hint**: Don't use mixins.
|
|
33
39
|
* @typeParam TTarget - The type of the classed this mixin is being
|
|
34
40
|
* mixed in with.
|
|
41
|
+
* @group Types
|
|
35
42
|
*/
|
|
36
43
|
export type Mixin<TTarget extends AnyFunctionReturning> = InstanceType<ReturnType<TTarget>>;
|
|
44
|
+
/**
|
|
45
|
+
* Recursive definition of a regular JS object, which is a key-value hash
|
|
46
|
+
* of strings to primitives, or another object of the same type.
|
|
47
|
+
* @group Types
|
|
48
|
+
*/
|
|
49
|
+
export type JsonObject = string | number | boolean | null | Array<JsonObject> | {
|
|
50
|
+
[key: string]: JsonObject;
|
|
51
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@oliversalzburg/js-utils",
|
|
4
|
-
"version": "0.0.23-dev.
|
|
4
|
+
"version": "0.0.23-dev.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Oliver Salzburg <oliver.salzburg@gmail.com>",
|
|
7
7
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@types/chai-as-promised": "7.1.8",
|
|
35
35
|
"@types/eslint": "8.44.7",
|
|
36
36
|
"@types/mocha": "10.0.6",
|
|
37
|
-
"@types/node": "20.9.
|
|
37
|
+
"@types/node": "20.9.4",
|
|
38
38
|
"@types/web": "0.0.119",
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "6.12.0",
|
|
40
40
|
"@typescript-eslint/parser": "6.12.0",
|