xdbc 1.0.113 → 1.0.115
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/DEFINED.js +4 -3
- package/dist/DBC/INSTANCE.js +5 -3
- package/package.json +1 -1
- package/src/DBC/DEFINED.ts +5 -4
- package/src/DBC/INSTANCE.ts +5 -3
package/dist/DBC/DEFINED.js
CHANGED
|
@@ -77,18 +77,19 @@ export class DEFINED extends DBC {
|
|
|
77
77
|
/**
|
|
78
78
|
* Invokes the {@link DEFINED.checkAlgorithm } passing the value **toCheck** and the {@link DEFINED.type } .
|
|
79
79
|
*
|
|
80
|
-
* @param toCheck
|
|
80
|
+
* @param toCheck See {@link DEFINED.checkAlgorithm }.
|
|
81
|
+
* @param id A {@link string } identifying this {@link INSTANCE } via the {@link DBC.Infringement }-Message.
|
|
81
82
|
*
|
|
82
83
|
* @returns The **CANDIDATE** **toCheck** doesn't fulfill this {@link DEFINED }.
|
|
83
84
|
*
|
|
84
85
|
* @throws A {@link DBC.Infringement } if the **CANDIDATE** **toCheck** does not fulfill this {@link DEFINED }.*/
|
|
85
|
-
static tsCheck(toCheck) {
|
|
86
|
+
static tsCheck(toCheck, id = undefined) {
|
|
86
87
|
const result = DEFINED.checkAlgorithm(toCheck);
|
|
87
88
|
if (result === true) {
|
|
88
89
|
return toCheck;
|
|
89
90
|
}
|
|
90
91
|
else {
|
|
91
|
-
throw new DBC.Infringement(result);
|
|
92
|
+
throw new DBC.Infringement(`${id ? `(${id}) ` : ""}${result}`);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
/** Creates this {@link DEFINED }. */
|
package/dist/DBC/INSTANCE.js
CHANGED
|
@@ -84,18 +84,20 @@ export class INSTANCE extends DBC {
|
|
|
84
84
|
/**
|
|
85
85
|
* Invokes the {@link INSTANCE.checkAlgorithm } passing the value **toCheck** and the {@link INSTANCE.reference } .
|
|
86
86
|
*
|
|
87
|
-
* @param See {@link INSTANCE.checkAlgorithm }.
|
|
87
|
+
* @param toCheck See {@link INSTANCE.checkAlgorithm }.
|
|
88
|
+
* @param reference See {@link INSTANCE.checkAlgorithm }.
|
|
89
|
+
* @param id A {@link string } identifying this {@link INSTANCE } via the {@link DBC.Infringement }-Message.
|
|
88
90
|
*
|
|
89
91
|
* @returns The **CANDIDATE** **toCheck** doesn't fulfill this {@link INSTANCE }.
|
|
90
92
|
*
|
|
91
93
|
* @throws A {@link DBC.Infringement } if the **CANDIDATE** **toCheck** does not fulfill this {@link DEFINED }. */
|
|
92
|
-
static tsCheck(toCheck, reference) {
|
|
94
|
+
static tsCheck(toCheck, reference, id = undefined) {
|
|
93
95
|
const result = INSTANCE.checkAlgorithm(toCheck, reference);
|
|
94
96
|
if (result === true) {
|
|
95
97
|
return toCheck;
|
|
96
98
|
}
|
|
97
99
|
else {
|
|
98
|
-
throw new DBC.Infringement(result);
|
|
100
|
+
throw new DBC.Infringement(`${id ? `(${id}) ` : ""}${result}`);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
/**
|
package/package.json
CHANGED
package/src/DBC/DEFINED.ts
CHANGED
|
@@ -110,19 +110,20 @@ export class DEFINED extends DBC {
|
|
|
110
110
|
/**
|
|
111
111
|
* Invokes the {@link DEFINED.checkAlgorithm } passing the value **toCheck** and the {@link DEFINED.type } .
|
|
112
112
|
*
|
|
113
|
-
* @param toCheck
|
|
114
|
-
*
|
|
113
|
+
* @param toCheck See {@link DEFINED.checkAlgorithm }.
|
|
114
|
+
* @param id A {@link string } identifying this {@link INSTANCE } via the {@link DBC.Infringement }-Message.
|
|
115
|
+
*
|
|
115
116
|
* @returns The **CANDIDATE** **toCheck** doesn't fulfill this {@link DEFINED }.
|
|
116
117
|
*
|
|
117
118
|
* @throws A {@link DBC.Infringement } if the **CANDIDATE** **toCheck** does not fulfill this {@link DEFINED }.*/
|
|
118
|
-
public static tsCheck<CANDIDATE>( toCheck : CANDIDATE | undefined | null ) : CANDIDATE {
|
|
119
|
+
public static tsCheck<CANDIDATE>( toCheck : CANDIDATE | undefined | null, id : string | undefined = undefined ) : CANDIDATE {
|
|
119
120
|
const result = DEFINED.checkAlgorithm(toCheck );
|
|
120
121
|
|
|
121
122
|
if( result === true ) {
|
|
122
123
|
return toCheck as CANDIDATE ;
|
|
123
124
|
}
|
|
124
125
|
else {
|
|
125
|
-
throw new DBC.Infringement( result as string );
|
|
126
|
+
throw new DBC.Infringement( `${id?`(${id}) `:""}${result as string }`);
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
/** Creates this {@link DEFINED }. */
|
package/src/DBC/INSTANCE.ts
CHANGED
|
@@ -115,19 +115,21 @@ export class INSTANCE extends DBC {
|
|
|
115
115
|
/**
|
|
116
116
|
* Invokes the {@link INSTANCE.checkAlgorithm } passing the value **toCheck** and the {@link INSTANCE.reference } .
|
|
117
117
|
*
|
|
118
|
-
* @param See {@link INSTANCE.checkAlgorithm }.
|
|
118
|
+
* @param toCheck See {@link INSTANCE.checkAlgorithm }.
|
|
119
|
+
* @param reference See {@link INSTANCE.checkAlgorithm }.
|
|
120
|
+
* @param id A {@link string } identifying this {@link INSTANCE } via the {@link DBC.Infringement }-Message.
|
|
119
121
|
*
|
|
120
122
|
* @returns The **CANDIDATE** **toCheck** doesn't fulfill this {@link INSTANCE }.
|
|
121
123
|
*
|
|
122
124
|
* @throws A {@link DBC.Infringement } if the **CANDIDATE** **toCheck** does not fulfill this {@link DEFINED }. */
|
|
123
|
-
public static tsCheck < CANDIDATE > ( toCheck : any, reference : any ) : CANDIDATE {
|
|
125
|
+
public static tsCheck < CANDIDATE > ( toCheck : any, reference : any, id : string | undefined = undefined ) : CANDIDATE {
|
|
124
126
|
const result = INSTANCE.checkAlgorithm(toCheck, reference);
|
|
125
127
|
|
|
126
128
|
if( result === true ) {
|
|
127
129
|
return toCheck ;
|
|
128
130
|
}
|
|
129
131
|
else {
|
|
130
|
-
throw new DBC.Infringement( result as string );
|
|
132
|
+
throw new DBC.Infringement( `${id?`(${id}) `:""}${result as string }`);
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
135
|
/**
|