xdbc 1.0.213 → 1.0.214
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/DBC/AE.d.ts +1 -1
- package/dist/DBC/COMPARISON/GREATER.d.ts +1 -1
- package/dist/DBC/COMPARISON/GREATER_OR_EQUAL.d.ts +1 -1
- package/dist/DBC/COMPARISON/LESS.d.ts +1 -1
- package/dist/DBC/COMPARISON/LESS_OR_EQUAL.d.ts +1 -1
- package/dist/DBC/COMPARISON.d.ts +1 -1
- package/dist/DBC/DEFINED.d.ts +1 -1
- package/dist/DBC/EQ/DIFFERENT.d.ts +1 -1
- package/dist/DBC/EQ.d.ts +1 -1
- package/dist/DBC/HasAttribute.d.ts +1 -1
- package/dist/DBC/IF.d.ts +1 -1
- package/dist/DBC/INSTANCE.d.ts +1 -1
- package/dist/DBC/JSON.OP.d.ts +1 -1
- package/dist/DBC/JSON.Parse.d.ts +1 -1
- package/dist/DBC/OR.d.ts +1 -1
- package/dist/DBC/REGEX.d.ts +1 -1
- package/dist/DBC/TYPE.d.ts +1 -1
- package/dist/DBC/UNDEFINED.d.ts +1 -1
- package/dist/DBC/ZOD.d.ts +1 -1
- package/dist/DBC.d.ts +4 -3
- package/package.json +1 -1
- package/src/DBC/AE.ts +2 -2
- package/src/DBC/DEFINED.ts +1 -1
- package/src/DBC/EQ.ts +1 -1
- package/src/DBC/HasAttribute.ts +1 -1
- package/src/DBC/IF.ts +1 -1
- package/src/DBC/INSTANCE.ts +1 -1
- package/src/DBC/JSON.OP.ts +1 -1
- package/src/DBC/JSON.Parse.ts +1 -1
- package/src/DBC/OR.ts +1 -1
- package/src/DBC/REGEX.ts +1 -1
- package/src/DBC/TYPE.ts +1 -1
- package/src/DBC/UNDEFINED.ts +1 -1
- package/src/DBC/ZOD.ts +1 -1
- package/src/DBC.ts +7 -5
package/dist/DBC/AE.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export declare class AE extends DBC {
|
|
|
59
59
|
check: (toCheck: unknown | undefined | null) => boolean | string;
|
|
60
60
|
}> | {
|
|
61
61
|
check: (toCheck: unknown | undefined | null) => boolean | string;
|
|
62
|
-
}, index?: number | undefined, idxEnd?: number | undefined, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
62
|
+
}, index?: number | undefined, idxEnd?: number | undefined, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
63
63
|
/**
|
|
64
64
|
* A method-decorator factory using the {@link AE.checkAlgorithm } with either multiple or a single one
|
|
65
65
|
* of the **realConditions** to check the tagged method's return-value against with.
|
|
@@ -3,7 +3,7 @@ import { COMPARISON } from "../COMPARISON";
|
|
|
3
3
|
export declare class GREATER extends COMPARISON {
|
|
4
4
|
equivalent: any;
|
|
5
5
|
/** See {@link COMPARISON.PRE }. */
|
|
6
|
-
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
6
|
+
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
7
7
|
/** See {@link COMPARISON.POST }. */
|
|
8
8
|
static POST(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
9
9
|
/** See {@link COMPARISON.INVARIANT }. */
|
|
@@ -3,7 +3,7 @@ import { COMPARISON } from "../COMPARISON";
|
|
|
3
3
|
export declare class GREATER_OR_EQUAL extends COMPARISON {
|
|
4
4
|
equivalent: any;
|
|
5
5
|
/** See {@link COMPARISON.PRE }. */
|
|
6
|
-
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
6
|
+
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
7
7
|
/** See {@link COMPARISON.POST }. */
|
|
8
8
|
static POST(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
9
9
|
/** See {@link COMPARISON.INVARIANT }. */
|
|
@@ -3,7 +3,7 @@ import { COMPARISON } from "../COMPARISON";
|
|
|
3
3
|
export declare class LESS extends COMPARISON {
|
|
4
4
|
equivalent: any;
|
|
5
5
|
/** See {@link COMPARISON.PRE }. */
|
|
6
|
-
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
6
|
+
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
7
7
|
/** See {@link COMPARISON.POST }. */
|
|
8
8
|
static POST(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
9
9
|
/** See {@link COMPARISON.INVARIANT }. */
|
|
@@ -3,7 +3,7 @@ import { COMPARISON } from "../COMPARISON";
|
|
|
3
3
|
export declare class LESS_OR_EQUAL extends COMPARISON {
|
|
4
4
|
equivalent: any;
|
|
5
5
|
/** See {@link COMPARISON.PRE }. */
|
|
6
|
-
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
6
|
+
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
7
7
|
/** See {@link COMPARISON.POST }. */
|
|
8
8
|
static POST(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
9
9
|
/** See {@link COMPARISON.INVARIANT }. */
|
package/dist/DBC/COMPARISON.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare class COMPARISON extends DBC {
|
|
|
28
28
|
* @param dbc See {@link DBC.decPrecondition }.
|
|
29
29
|
*
|
|
30
30
|
* @returns See {@link DBC.decPrecondition }. */
|
|
31
|
-
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
31
|
+
static PRE(equivalent: any, equalityPermitted?: boolean, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
32
32
|
/**
|
|
33
33
|
* A method-decorator factory using the {@link COMPARISON.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
34
34
|
* by the tagged method's returnvalue.
|
package/dist/DBC/DEFINED.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class DEFINED extends DBC {
|
|
|
21
21
|
* @param dbc See {@link DBC.decPrecondition }.
|
|
22
22
|
*
|
|
23
23
|
* @returns See {@link DBC.decPrecondition }. */
|
|
24
|
-
static PRE(path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
24
|
+
static PRE(path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
25
25
|
/**
|
|
26
26
|
* A method-decorator factory using the {@link DEFINED.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
27
27
|
* by the tagged method's returnvalue.
|
|
@@ -16,7 +16,7 @@ import { EQ } from "../EQ";
|
|
|
16
16
|
export declare class DIFFERENT extends EQ {
|
|
17
17
|
equivalent: any;
|
|
18
18
|
/** See {@link EQ.PRE }. Always inverts equality check. */
|
|
19
|
-
static PRE(equivalent: any, _invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
19
|
+
static PRE(equivalent: any, _invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
20
20
|
/** See {@link EQ.POST }. Always inverts equality check. */
|
|
21
21
|
static POST(equivalent: any, _invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
22
22
|
/** See {@link EQ.INVARIANT }. Always inverts equality check. */
|
package/dist/DBC/EQ.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class EQ extends DBC {
|
|
|
25
25
|
* @param dbc See {@link DBC.decPrecondition }.
|
|
26
26
|
*
|
|
27
27
|
* @returns See {@link DBC.decPrecondition }. */
|
|
28
|
-
static PRE(equivalent: any, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
28
|
+
static PRE(equivalent: any, invert?: boolean, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
29
29
|
/**
|
|
30
30
|
* A method-decorator factory using the {@link EQ.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
31
31
|
* by the tagged method's returnvalue.
|
|
@@ -24,7 +24,7 @@ export declare class HasAttribute extends DBC {
|
|
|
24
24
|
* @param dbc See {@link DBC.decPrecondition }.
|
|
25
25
|
*
|
|
26
26
|
* @returns See {@link DBC.decPrecondition }. */
|
|
27
|
-
static PRE(toCheckFor: string, invert?: boolean, path?: string | undefined, dbc?: string): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
27
|
+
static PRE(toCheckFor: string, invert?: boolean, path?: string | undefined, dbc?: string): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
28
28
|
/**
|
|
29
29
|
* A method-decorator factory using the {@link HasAttribute.checkAlgorithm } to determine whether this {@link DBC } is
|
|
30
30
|
* fulfilled by the tagged method's returnvalue.
|
package/dist/DBC/IF.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare class IF extends DBC {
|
|
|
40
40
|
check: (toCheck: unknown | undefined | null | object) => boolean | string;
|
|
41
41
|
}, inCase: {
|
|
42
42
|
check: (toCheck: unknown | undefined | null | object) => boolean | string;
|
|
43
|
-
}, path?: string | undefined, invert?: boolean, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
43
|
+
}, path?: string | undefined, invert?: boolean, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
44
44
|
/**
|
|
45
45
|
* A method-decorator factory using the {@link IF.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
46
46
|
* by the tagged method's returnvalue.
|
package/dist/DBC/INSTANCE.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare class INSTANCE extends DBC {
|
|
|
24
24
|
* @param dbc See {@link DBC.decPrecondition }.
|
|
25
25
|
*
|
|
26
26
|
* @returns See {@link DBC.decPrecondition }. */
|
|
27
|
-
static PRE(reference: any | any[], path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
27
|
+
static PRE(reference: any | any[], path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
28
28
|
/**
|
|
29
29
|
* A method-decorator factory using the {@link INSTANCE.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
30
30
|
* by the tagged method's returnvalue.
|
package/dist/DBC/JSON.OP.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare class JSON_OP extends DBC {
|
|
|
37
37
|
static PRE(necessaryProperties: Array<{
|
|
38
38
|
name: string;
|
|
39
39
|
type: string;
|
|
40
|
-
}>, checkElements?: boolean, path?: string | undefined, dbc?: string): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
40
|
+
}>, checkElements?: boolean, path?: string | undefined, dbc?: string): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
41
41
|
/**
|
|
42
42
|
* A method-decorator factory using the {@link JSON_OP.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
43
43
|
* by the tagged method's returnvalue.
|
package/dist/DBC/JSON.Parse.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare class JSON_Parse extends DBC {
|
|
|
24
24
|
* @param dbc See {@link DBC.decPrecondition }.
|
|
25
25
|
*
|
|
26
26
|
* @returns See {@link DBC.decPrecondition }. */
|
|
27
|
-
static PRE(receptor: (json: object) => void, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
27
|
+
static PRE(receptor: (json: object) => void, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
28
28
|
/**
|
|
29
29
|
* A method-decorator factory using the {@link JSON_Parse.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
30
30
|
* by the tagged method's returnvalue.
|
package/dist/DBC/OR.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export declare class OR extends DBC {
|
|
|
48
48
|
* Otherwise TRUE. */
|
|
49
49
|
static PRE(conditions: Array<{
|
|
50
50
|
check: (toCheck: unknown | undefined | null | object) => boolean | string;
|
|
51
|
-
}>, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
51
|
+
}>, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
52
52
|
/**
|
|
53
53
|
* A method-decorator factory using the {@link OR.checkAlgorithm } with either multiple or a single one
|
|
54
54
|
* of the **realConditions** to check the tagged method's return-value against with.
|
package/dist/DBC/REGEX.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare class REGEX extends DBC {
|
|
|
40
40
|
* @param dbc See {@link DBC.decPrecondition }.
|
|
41
41
|
*
|
|
42
42
|
* @returns See {@link DBC.decPrecondition }. */
|
|
43
|
-
static PRE(expression: RegExp, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
43
|
+
static PRE(expression: RegExp, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
44
44
|
/**
|
|
45
45
|
* A method-decorator factory using the {@link REGEX.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
46
46
|
* by the tagged method's returnvalue.
|
package/dist/DBC/TYPE.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class TYPE extends DBC {
|
|
|
25
25
|
* @param dbc See {@link DBC.decPrecondition }.
|
|
26
26
|
*
|
|
27
27
|
* @returns See {@link DBC.decPrecondition }. */
|
|
28
|
-
static PRE(type: string, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
28
|
+
static PRE(type: string, path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
29
29
|
/**
|
|
30
30
|
* A method-decorator factory using the {@link TYPE.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
31
31
|
* by the tagged method's returnvalue.
|
package/dist/DBC/UNDEFINED.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class UNDEFINED extends DBC {
|
|
|
21
21
|
* @param hint See {@link DBC.decPrecondition }.
|
|
22
22
|
*
|
|
23
23
|
* @returns See {@link DBC.decPrecondition }. */
|
|
24
|
-
static PRE(path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
24
|
+
static PRE(path?: string | undefined, hint?: string | undefined, dbc?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
25
25
|
/**
|
|
26
26
|
* A method-decorator factory using the {@link UNDEFINED.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
27
27
|
* by the tagged method's returnvalue.
|
package/dist/DBC/ZOD.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class ZOD extends DBC {
|
|
|
25
25
|
* @param dbc See {@link DBC.decPrecondition }.
|
|
26
26
|
*
|
|
27
27
|
* @returns See {@link DBC.decPrecondition }. */
|
|
28
|
-
static PRE(schema: z.ZodType, path?: string | undefined, dbc?: string): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
28
|
+
static PRE(schema: z.ZodType, path?: string | undefined, dbc?: string): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
29
29
|
/**
|
|
30
30
|
* A method-decorator factory using the {@link ZOD.checkAlgorithm } to determine whether this {@link DBC } is fulfilled
|
|
31
31
|
* by the tagged method's returnvalue.
|
package/dist/DBC.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare class DBC {
|
|
|
28
28
|
* @param methodName The name of the method with the parameter which's value is requested.
|
|
29
29
|
* @param index The index of the parameter which's value is requested.
|
|
30
30
|
* @param receptor The method the requested parameter-value shall be passed to when it becomes available. */
|
|
31
|
-
protected static requestParamValue(target: object, methodName: string | symbol, index: number, receptor: (value: any) => undefined): undefined;
|
|
31
|
+
protected static requestParamValue(target: object, methodName: string | symbol | undefined, index: number, receptor: (value: any) => undefined): undefined;
|
|
32
32
|
/**
|
|
33
33
|
* A decorator usable on both **methods** (including setters) and **classes**.
|
|
34
34
|
*
|
|
@@ -49,6 +49,7 @@ export declare class DBC {
|
|
|
49
49
|
* When used as a **class** decorator: a replacement constructor that performs precondition checks. */
|
|
50
50
|
static ParamvalueProvider(target: object, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
51
51
|
static ParamvalueProvider<T extends new (...args: any[]) => any>(constructor: T): T;
|
|
52
|
+
static ParamvalueProvider<T extends abstract new (...args: any[]) => any>(constructor: T): T;
|
|
52
53
|
/**
|
|
53
54
|
* A property-decorator factory serving as a **D**esign **B**y **C**ontract Invariant.
|
|
54
55
|
* This invariant aims to check the instance of the class not the value to be get or set.
|
|
@@ -94,7 +95,7 @@ export declare class DBC {
|
|
|
94
95
|
* May contain :: to separate multiple paths.
|
|
95
96
|
*
|
|
96
97
|
* @returns The **(target: object, methodName: string | symbol, parameterIndex: number ) => void** invoked by Typescript- */
|
|
97
|
-
protected static decPrecondition(check: (value: unknown, target: object, methodName: string | symbol, parameterIndex: number) => boolean | string, dbc?: string | undefined, path?: string | undefined, hint?: string | undefined): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
98
|
+
protected static decPrecondition(check: (value: unknown, target: object, methodName: string | symbol | undefined, parameterIndex: number) => boolean | string, dbc?: string | undefined, path?: string | undefined, hint?: string | undefined): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
98
99
|
/**
|
|
99
100
|
* Creates a PRE decorator from a checkAlgorithm function and its bound arguments.
|
|
100
101
|
* Reduces boilerplate across contract classes.
|
|
@@ -105,7 +106,7 @@ export declare class DBC {
|
|
|
105
106
|
* @param path See {@link DBC.decPrecondition}.
|
|
106
107
|
* @param hint See {@link DBC.decPrecondition}.
|
|
107
108
|
*/
|
|
108
|
-
static createPRE(checkFn: (...args: any[]) => boolean | string, boundArgs: any[], dbc?: string, path?: string, hint?: string): (target: object, methodName: string | symbol, parameterIndex: number) => void;
|
|
109
|
+
static createPRE(checkFn: (...args: any[]) => boolean | string, boundArgs: any[], dbc?: string, path?: string, hint?: string): (target: object, methodName: string | symbol | undefined, parameterIndex: number) => void;
|
|
109
110
|
/**
|
|
110
111
|
* Creates a POST decorator from a checkAlgorithm function and its bound arguments.
|
|
111
112
|
*
|
package/package.json
CHANGED
package/src/DBC/AE.ts
CHANGED
|
@@ -100,7 +100,7 @@ export class AE extends DBC {
|
|
|
100
100
|
dbc: string | undefined = undefined,
|
|
101
101
|
): (
|
|
102
102
|
target: object,
|
|
103
|
-
methodName: string | symbol,
|
|
103
|
+
methodName: string | symbol | undefined,
|
|
104
104
|
parameterIndex: number,
|
|
105
105
|
) => void {
|
|
106
106
|
return DBC.decPrecondition(
|
|
@@ -108,7 +108,7 @@ export class AE extends DBC {
|
|
|
108
108
|
// biome-ignore lint/suspicious/noExplicitAny: Must match DBC.decPrecondition signature
|
|
109
109
|
value: any,
|
|
110
110
|
target: object,
|
|
111
|
-
methodName: string | symbol,
|
|
111
|
+
methodName: string | symbol | undefined,
|
|
112
112
|
parameterIndex: number,
|
|
113
113
|
) => {
|
|
114
114
|
if (Array.isArray(realConditions)) {
|
package/src/DBC/DEFINED.ts
CHANGED
|
@@ -35,7 +35,7 @@ export class DEFINED extends DBC {
|
|
|
35
35
|
dbc: string | undefined = undefined,
|
|
36
36
|
): (
|
|
37
37
|
target: object,
|
|
38
|
-
methodName: string | symbol,
|
|
38
|
+
methodName: string | symbol | undefined,
|
|
39
39
|
parameterIndex: number,
|
|
40
40
|
) => void {
|
|
41
41
|
return DBC.createPRE(DEFINED.checkAlgorithm, [], dbc, path, hint);
|
package/src/DBC/EQ.ts
CHANGED
package/src/DBC/HasAttribute.ts
CHANGED
package/src/DBC/IF.ts
CHANGED
package/src/DBC/INSTANCE.ts
CHANGED
|
@@ -47,7 +47,7 @@ export class INSTANCE extends DBC {
|
|
|
47
47
|
dbc: string | undefined = undefined,
|
|
48
48
|
): (
|
|
49
49
|
target: object,
|
|
50
|
-
methodName: string | symbol,
|
|
50
|
+
methodName: string | symbol | undefined,
|
|
51
51
|
parameterIndex: number,
|
|
52
52
|
) => void {
|
|
53
53
|
const refs = Array.isArray(reference) ? reference : [reference];
|
package/src/DBC/JSON.OP.ts
CHANGED
package/src/DBC/JSON.Parse.ts
CHANGED
package/src/DBC/OR.ts
CHANGED
package/src/DBC/REGEX.ts
CHANGED
|
@@ -83,7 +83,7 @@ export class REGEX extends DBC {
|
|
|
83
83
|
dbc: string | undefined = undefined,
|
|
84
84
|
): (
|
|
85
85
|
target: object,
|
|
86
|
-
methodName: string | symbol,
|
|
86
|
+
methodName: string | symbol | undefined,
|
|
87
87
|
parameterIndex: number,
|
|
88
88
|
) => void {
|
|
89
89
|
return DBC.createPRE(REGEX.checkAlgorithm, [expression], dbc, path, hint);
|
package/src/DBC/TYPE.ts
CHANGED
|
@@ -50,7 +50,7 @@ export class TYPE extends DBC {
|
|
|
50
50
|
dbc: string | undefined = undefined,
|
|
51
51
|
): (
|
|
52
52
|
target: object,
|
|
53
|
-
methodName: string | symbol,
|
|
53
|
+
methodName: string | symbol | undefined,
|
|
54
54
|
parameterIndex: number,
|
|
55
55
|
) => void {
|
|
56
56
|
return DBC.createPRE(TYPE.checkAlgorithm, [type], dbc, path, hint);
|
package/src/DBC/UNDEFINED.ts
CHANGED
|
@@ -35,7 +35,7 @@ export class UNDEFINED extends DBC {
|
|
|
35
35
|
dbc: string | undefined = undefined,
|
|
36
36
|
): (
|
|
37
37
|
target: object,
|
|
38
|
-
methodName: string | symbol,
|
|
38
|
+
methodName: string | symbol | undefined,
|
|
39
39
|
parameterIndex: number,
|
|
40
40
|
) => void {
|
|
41
41
|
return DBC.createPRE(UNDEFINED.checkAlgorithm, [], dbc, path, hint);
|
package/src/DBC/ZOD.ts
CHANGED
|
@@ -42,7 +42,7 @@ export class ZOD extends DBC {
|
|
|
42
42
|
dbc = "WaXCode.DBC",
|
|
43
43
|
): (
|
|
44
44
|
target: object,
|
|
45
|
-
methodName: string | symbol,
|
|
45
|
+
methodName: string | symbol | undefined,
|
|
46
46
|
parameterIndex: number,
|
|
47
47
|
) => void {
|
|
48
48
|
return DBC.createPRE(ZOD.checkAlgorithm, [schema], dbc, path);
|
package/src/DBC.ts
CHANGED
|
@@ -52,7 +52,7 @@ export class DBC {
|
|
|
52
52
|
*/
|
|
53
53
|
private static getRequestKey(
|
|
54
54
|
target: object,
|
|
55
|
-
methodName: string | symbol,
|
|
55
|
+
methodName: string | symbol | undefined,
|
|
56
56
|
): string {
|
|
57
57
|
const className =
|
|
58
58
|
typeof target === "function"
|
|
@@ -72,7 +72,7 @@ export class DBC {
|
|
|
72
72
|
* @param receptor The method the requested parameter-value shall be passed to when it becomes available. */
|
|
73
73
|
protected static requestParamValue(
|
|
74
74
|
target: object,
|
|
75
|
-
methodName: string | symbol,
|
|
75
|
+
methodName: string | symbol | undefined,
|
|
76
76
|
index: number,
|
|
77
77
|
// biome-ignore lint/suspicious/noExplicitAny: Gotta be any since parameter-values may be undefined.
|
|
78
78
|
receptor: (value: any) => undefined,
|
|
@@ -119,6 +119,8 @@ export class DBC {
|
|
|
119
119
|
public static ParamvalueProvider(target: object, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
120
120
|
// biome-ignore lint/suspicious/noExplicitAny: Must handle both method and class decorator signatures
|
|
121
121
|
public static ParamvalueProvider<T extends new (...args: any[]) => any>(constructor: T): T;
|
|
122
|
+
// biome-ignore lint/suspicious/noExplicitAny: Must accept abstract class constructors
|
|
123
|
+
public static ParamvalueProvider<T extends abstract new (...args: any[]) => any>(constructor: T): T;
|
|
122
124
|
// biome-ignore lint/suspicious/noExplicitAny: Must handle both method and class decorator signatures
|
|
123
125
|
public static ParamvalueProvider(...args: any[]): any {
|
|
124
126
|
if (args.length === 1 && typeof args[0] === "function") {
|
|
@@ -400,7 +402,7 @@ export class DBC {
|
|
|
400
402
|
check: (
|
|
401
403
|
value: unknown,
|
|
402
404
|
target: object,
|
|
403
|
-
methodName: string | symbol,
|
|
405
|
+
methodName: string | symbol | undefined,
|
|
404
406
|
parameterIndex: number,
|
|
405
407
|
) => boolean | string,
|
|
406
408
|
dbc: string | undefined = undefined,
|
|
@@ -408,14 +410,14 @@ export class DBC {
|
|
|
408
410
|
hint: string | undefined = undefined,
|
|
409
411
|
): (
|
|
410
412
|
target: object,
|
|
411
|
-
methodName: string | symbol,
|
|
413
|
+
methodName: string | symbol | undefined,
|
|
412
414
|
parameterIndex: number,
|
|
413
415
|
) => void {
|
|
414
416
|
const paths = path ? path.replace(/ /g, "").split("::") : [undefined];
|
|
415
417
|
let dbcInstance: DBC | undefined;
|
|
416
418
|
return (
|
|
417
419
|
target: object,
|
|
418
|
-
methodName: string | symbol,
|
|
420
|
+
methodName: string | symbol | undefined,
|
|
419
421
|
parameterIndex: number,
|
|
420
422
|
): void => {
|
|
421
423
|
DBC.requestParamValue(
|