xdbc 1.0.213 → 1.0.215

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 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 }. */
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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.
@@ -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
  *