xdbc 1.0.86 → 1.0.88

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/REGEX.js CHANGED
@@ -14,9 +14,7 @@ export class REGEX extends DBC {
14
14
  * fulfilled.
15
15
  *
16
16
  * @returns TRUE if the value "toCheck" complies with the {@link RegExp } "expression", otherwise FALSE. */
17
- static checkAlgorithm(
18
- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
19
- toCheck, expression) {
17
+ static checkAlgorithm(toCheck, expression) {
20
18
  if (!expression.test(toCheck)) {
21
19
  return `Value has to comply to regular expression "${expression}"`;
22
20
  }
@@ -46,9 +44,7 @@ export class REGEX extends DBC {
46
44
  *
47
45
  * @returns See {@link DBC.decPostcondition }. */
48
46
  static POST(expression, path = undefined, dbc = "WaXCode.DBC") {
49
- return DBC.decPostcondition(
50
- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
51
- (value, target, propertyKey) => {
47
+ return DBC.decPostcondition((value, target, propertyKey) => {
52
48
  return REGEX.checkAlgorithm(value, expression);
53
49
  }, dbc, path);
54
50
  }
@@ -82,9 +78,7 @@ export class REGEX extends DBC {
82
78
  * @param toCheck See {@link JSON_OP.checkAlgorithm} }.
83
79
  * @param expression See {@link JSON_OP.checkAlgorithm} }.
84
80
  */
85
- static check(
86
- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
87
- toCheck, expression) {
81
+ static check(toCheck, expression) {
88
82
  const checkResult = REGEX.checkAlgorithm(toCheck, expression);
89
83
  if (typeof checkResult === "string") {
90
84
  throw new DBC.Infringement(checkResult);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.86",
2
+ "version": "1.0.88",
3
3
  "name": "xdbc",
4
4
  "scripts": {
5
5
  "format": "biome format ./src --write",
package/src/DBC/OR.ts CHANGED
@@ -64,7 +64,7 @@ export class OR extends DBC {
64
64
  * Otherwise TRUE. */
65
65
  public static PRE(
66
66
  conditions: Array<{
67
- check: (toCheck: unknown | undefined | null) => boolean | string;
67
+ check: (toCheck: unknown | undefined | null | object) => boolean | string;
68
68
  }>,
69
69
  path: string | undefined = undefined,
70
70
  dbc = "WaXCode.DBC",
@@ -99,7 +99,7 @@ export class OR extends DBC {
99
99
  * Otherwise TRUE. */
100
100
  public static POST(
101
101
  conditions: Array<{
102
- check: (toCheck: unknown | undefined | null) => boolean | string;
102
+ check: (toCheck: unknown | undefined | null | object) => boolean | string;
103
103
  }>,
104
104
  path: string | undefined = undefined,
105
105
  dbc = "WaXCode.DBC",
package/src/DBC/REGEX.ts CHANGED
@@ -27,8 +27,7 @@ export class REGEX extends DBC {
27
27
  *
28
28
  * @returns TRUE if the value "toCheck" complies with the {@link RegExp } "expression", otherwise FALSE. */
29
29
  public static checkAlgorithm(
30
- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
31
- toCheck: any,
30
+ toCheck: unknown | null | undefined,
32
31
  expression: RegExp,
33
32
  ): boolean | string {
34
33
  if (!expression.test(toCheck as string)) {
@@ -87,8 +86,7 @@ export class REGEX extends DBC {
87
86
  descriptor: PropertyDescriptor,
88
87
  ) => PropertyDescriptor {
89
88
  return DBC.decPostcondition(
90
- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
91
- (value: any, target: object, propertyKey: string) => {
89
+ (value: string, target: object, propertyKey: string) => {
92
90
  return REGEX.checkAlgorithm(value, expression);
93
91
  },
94
92
  dbc,
@@ -124,11 +122,7 @@ export class REGEX extends DBC {
124
122
  * @param toCheck See {@link JSON_OP.checkAlgorithm} }.
125
123
  * @param expression See {@link JSON_OP.checkAlgorithm} }.
126
124
  */
127
- public static check(
128
- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
129
- toCheck: any,
130
- expression: RegExp,
131
- ) {
125
+ public static check(toCheck: unknown | null | undefined, expression: RegExp) {
132
126
  const checkResult = REGEX.checkAlgorithm(toCheck, expression);
133
127
 
134
128
  if (typeof checkResult === "string") {