@creejs/commons-lang 2.1.23 → 2.1.24
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/cjs/index-dev.cjs +34 -0
- package/dist/cjs/index-dev.cjs.map +1 -1
- package/dist/cjs/index-min.cjs +1 -1
- package/dist/cjs/index-min.cjs.map +1 -1
- package/dist/esm/index-dev.js +34 -0
- package/dist/esm/index-dev.js.map +1 -1
- package/dist/esm/index-min.js +1 -1
- package/dist/esm/index-min.js.map +1 -1
- package/dist/umd/index.dev.js +34 -0
- package/dist/umd/index.dev.js.map +1 -1
- package/dist/umd/index.min.js +1 -1
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +1 -1
- package/types/_error.d.ts +22 -0
package/package.json
CHANGED
package/types/_error.d.ts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @class _Error
|
|
3
|
+
*/
|
|
1
4
|
export default class _Error extends Error {
|
|
5
|
+
static get Code(): {
|
|
6
|
+
NOT_FOUND: number;
|
|
7
|
+
NOT_SUPPORTED: number;
|
|
8
|
+
NOT_IMPL: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Checks if the given value is an _ErrorLike object
|
|
12
|
+
* @param {{[key:string]:any}} err - The value to checke
|
|
13
|
+
* @returns {boolean} True if the value is error-like
|
|
14
|
+
*/
|
|
15
|
+
static isErrorLike(err: {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}): boolean;
|
|
2
18
|
/**
|
|
3
19
|
* Creates and returns a 404 Not Found error instance with the given message.
|
|
4
20
|
* @param {string} message - The error message to include.
|
|
@@ -26,5 +42,11 @@ export default class _Error extends Error {
|
|
|
26
42
|
* @param {number|string} code - Error code
|
|
27
43
|
*/
|
|
28
44
|
constructor(message: string, code: number | string);
|
|
45
|
+
_type: string;
|
|
29
46
|
code: string | number;
|
|
30
47
|
}
|
|
48
|
+
export type _ErrorLike = {
|
|
49
|
+
type: string;
|
|
50
|
+
message: string;
|
|
51
|
+
_code: number;
|
|
52
|
+
};
|