@taicode/common-base 1.7.4 → 1.7.5
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/output/error/error.d.ts +104 -67
- package/output/error/error.d.ts.map +1 -1
- package/output/error/error.js +85 -59
- package/output/error/error.test.d.ts +0 -17
- package/output/error/error.test.d.ts.map +1 -1
- package/output/error/error.test.js +172 -99
- package/output/error/index.d.ts +2 -1
- package/output/error/index.d.ts.map +1 -1
- package/output/error/index.js +1 -1
- package/output/events/disposer.d.ts +6 -0
- package/output/events/disposer.d.ts.map +1 -0
- package/output/events/disposer.js +19 -0
- package/output/events/disposer.test.d.ts +2 -0
- package/output/events/disposer.test.d.ts.map +1 -0
- package/output/events/disposer.test.js +192 -0
- package/output/events/event-emitter.d.ts +33 -0
- package/output/events/event-emitter.d.ts.map +1 -0
- package/output/events/event-emitter.js +66 -0
- package/output/events/event-emitter.test.d.ts +2 -0
- package/output/events/event-emitter.test.d.ts.map +1 -0
- package/output/events/event-emitter.test.js +213 -0
- package/output/events/index.d.ts +3 -0
- package/output/events/index.d.ts.map +1 -0
- package/output/events/index.js +3 -0
- package/output/logger/formatter.d.ts +0 -1
- package/output/logger/formatter.d.ts.map +1 -1
- package/output/logger/formatter.js +1 -17
- package/output/logger/formatter.test.d.ts +0 -24
- package/output/logger/formatter.test.d.ts.map +1 -1
- package/output/logger/formatter.test.js +11 -30
- package/output/logger/logger.test.d.ts +0 -19
- package/output/logger/logger.test.d.ts.map +1 -1
- package/output/logger/logger.test.js +6 -16
- package/package.json +3 -2
package/output/error/error.d.ts
CHANGED
|
@@ -1,85 +1,122 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 错误类型模块
|
|
3
|
-
* key 为错误的类型
|
|
4
|
-
* value 为错误的上下文类型
|
|
5
|
-
* 错误的上下文可以帮助系统更好的理解和处理错误
|
|
6
|
-
* 一般存放的是错误发生时的关键信息,例如请求的路径,参数等等
|
|
7
|
-
* 输入错误时输入的字段信息,校验规则等等
|
|
8
|
-
* 可以通过模块声明合并来定义全局错误类型:
|
|
9
3
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* interface UserErrorTypes {
|
|
14
|
-
* 'validation-failed': { field?: string; value?: unknown; rule?: string }
|
|
15
|
-
* 'permission-denied': { resource?: string; action?: string; userId?: string }
|
|
16
|
-
* 'not-found': { id?: string; type?: string; query?: Record<string, unknown> }
|
|
17
|
-
* }
|
|
4
|
+
* 提供两种错误类型:
|
|
5
|
+
* - UserError: 用户可见的错误(如验证失败、权限不足等)
|
|
6
|
+
* - SystemError: 系统内部错误(如数据库错误、网络错误等)
|
|
18
7
|
*
|
|
19
|
-
*
|
|
20
|
-
* 'database-error': { query?: string; table?: string; operation?: string }
|
|
21
|
-
* 'network-error': { url?: string; method?: string; status?: number }
|
|
22
|
-
* 'service-unavailable': { service?: string; endpoint?: string; retryAfter?: number }
|
|
23
|
-
* }
|
|
24
|
-
* }
|
|
8
|
+
* **错误类型命名规范**:推荐使用全大写、下划线分割的风格(如 `VALIDATION_FAILED`)
|
|
25
9
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // 1. 使用 define 方法定义类型安全的错误类
|
|
13
|
+
* const MyUserError = UserError.define({
|
|
14
|
+
* 'VALIDATION_FAILED': {} as { field?: string; value?: unknown },
|
|
15
|
+
* 'PERMISSION_DENIED': {} as { resource?: string; action?: string },
|
|
16
|
+
* 'NOT_FOUND': {} as { id?: string; type?: string }
|
|
31
17
|
* })
|
|
32
|
-
*
|
|
33
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* // type 会被自动推导和限制
|
|
20
|
+
* const error = new MyUserError('VALIDATION_FAILED', {
|
|
34
21
|
* field: 'email',
|
|
35
|
-
* value: 'invalid
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* }
|
|
22
|
+
* value: 'invalid@'
|
|
23
|
+
* }, '验证失败')
|
|
24
|
+
*
|
|
25
|
+
* // 获取所有定义的错误类型
|
|
26
|
+
* console.log(MyUserError.types) // ['VALIDATION_FAILED', 'PERMISSION_DENIED', 'NOT_FOUND']
|
|
27
|
+
*
|
|
28
|
+
* // 2. 直接使用基础错误类
|
|
29
|
+
* const error2 = new UserError('CUSTOM_ERROR', undefined, '自定义错误')
|
|
30
|
+
* const error3 = new SystemError('DATABASE_ERROR', undefined, '数据库错误')
|
|
31
|
+
*
|
|
32
|
+
* // 3. 使用类型守卫检查错误
|
|
33
|
+
* if (MyUserError.is(error)) {
|
|
34
|
+
* console.log(error.type, error.context)
|
|
35
|
+
* }
|
|
49
36
|
* ```
|
|
50
37
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
38
|
+
/**
|
|
39
|
+
* 错误上下文接口
|
|
40
|
+
* 可以通过交叉类型扩展自定义属性
|
|
41
|
+
*/
|
|
42
|
+
export interface ErrorContext {
|
|
43
|
+
/** 导致此错误的原因 */
|
|
53
44
|
cause?: unknown;
|
|
45
|
+
/** 允许扩展其他属性 */
|
|
46
|
+
[key: string]: unknown;
|
|
54
47
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export
|
|
60
|
-
export type SystemErrorType = keyof SystemErrorTypes extends never ? string : Extract<keyof SystemErrorTypes, string>;
|
|
61
|
-
export type UserErrorContext<T extends string> = T extends keyof UserErrorTypes ? UserErrorTypes[T] & ErrorContext : ErrorContext;
|
|
62
|
-
export type SystemErrorContext<T extends string> = T extends keyof SystemErrorTypes ? SystemErrorTypes[T] & ErrorContext : ErrorContext;
|
|
63
|
-
/** 用户可见的错误 */
|
|
64
|
-
export declare class UserError<T extends UserErrorType = UserErrorType> extends Error {
|
|
48
|
+
/**
|
|
49
|
+
* 用户可见的错误
|
|
50
|
+
* 用于表示用户操作导致的错误,如验证失败、权限不足等
|
|
51
|
+
*/
|
|
52
|
+
export declare class UserError<T extends string = string> extends Error {
|
|
65
53
|
type: T;
|
|
54
|
+
context?: ErrorContext | undefined;
|
|
66
55
|
message: string;
|
|
67
|
-
context?:
|
|
68
|
-
|
|
69
|
-
|
|
56
|
+
constructor(type: T, context?: ErrorContext | undefined, message?: string);
|
|
57
|
+
static is<T extends string = string>(error: unknown): error is UserError<T>;
|
|
58
|
+
/**
|
|
59
|
+
* 定义一个绑定了特定错误类型的 UserError 类
|
|
60
|
+
* @param errorTypes 错误类型定义对象,key 为错误类型,value 为上下文类型
|
|
61
|
+
* @returns 返回绑定了特定类型的 UserError 类
|
|
62
|
+
*/
|
|
63
|
+
static define<Types extends Record<string, ErrorContext>>(errorTypes: Types): {
|
|
64
|
+
new (type: Extract<keyof Types, string>, context?: Types[Extract<keyof Types, string>], message?: string): {
|
|
65
|
+
readonly type: Extract<keyof Types, string>;
|
|
66
|
+
readonly context?: Types[Extract<keyof Types, string>];
|
|
67
|
+
name: string;
|
|
68
|
+
message: string;
|
|
69
|
+
stack?: string;
|
|
70
|
+
cause?: unknown;
|
|
71
|
+
};
|
|
72
|
+
/** 获取所有定义的错误类型 */
|
|
73
|
+
readonly types: Extract<keyof Types, string>[];
|
|
74
|
+
is(error: unknown): error is {
|
|
75
|
+
readonly type: Extract<keyof Types, string>;
|
|
76
|
+
readonly context?: Types[Extract<keyof Types, string>];
|
|
77
|
+
name: string;
|
|
78
|
+
message: string;
|
|
79
|
+
stack?: string;
|
|
80
|
+
cause?: unknown;
|
|
81
|
+
};
|
|
82
|
+
isError(error: unknown): error is Error;
|
|
83
|
+
};
|
|
70
84
|
}
|
|
71
|
-
/**
|
|
72
|
-
|
|
85
|
+
/**
|
|
86
|
+
* 系统内部错误
|
|
87
|
+
* 用于表示系统层面的错误,如数据库错误、网络错误等
|
|
88
|
+
*/
|
|
89
|
+
export declare class SystemError<T extends string = string> extends Error {
|
|
73
90
|
type: T;
|
|
74
|
-
message: string;
|
|
75
|
-
context?: SystemErrorContext<T> | undefined;
|
|
76
|
-
constructor(type: T, message?: string, context?: SystemErrorContext<T> | undefined);
|
|
77
|
-
static is<T extends SystemErrorType = SystemErrorType>(error: unknown): error is SystemError<T>;
|
|
78
|
-
}
|
|
79
|
-
export declare class UnknownError extends Error {
|
|
80
91
|
context?: ErrorContext | undefined;
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
message: string;
|
|
93
|
+
constructor(type: T, context?: ErrorContext | undefined, message?: string);
|
|
94
|
+
static is<T extends string = string>(error: unknown): error is SystemError<T>;
|
|
95
|
+
/**
|
|
96
|
+
* 定义一个绑定了特定错误类型的 SystemError 类
|
|
97
|
+
* @param errorTypes 错误类型定义对象,key 为错误类型,value 为上下文类型
|
|
98
|
+
* @returns 返回绑定了特定类型的 SystemError 类
|
|
99
|
+
*/
|
|
100
|
+
static define<Types extends Record<string, ErrorContext>>(errorTypes: Types): {
|
|
101
|
+
new (type: Extract<keyof Types, string>, context?: Types[Extract<keyof Types, string>], message?: string): {
|
|
102
|
+
readonly type: Extract<keyof Types, string>;
|
|
103
|
+
readonly context?: Types[Extract<keyof Types, string>];
|
|
104
|
+
name: string;
|
|
105
|
+
message: string;
|
|
106
|
+
stack?: string;
|
|
107
|
+
cause?: unknown;
|
|
108
|
+
};
|
|
109
|
+
/** 获取所有定义的错误类型 */
|
|
110
|
+
readonly types: Extract<keyof Types, string>[];
|
|
111
|
+
is(error: unknown): error is {
|
|
112
|
+
readonly type: Extract<keyof Types, string>;
|
|
113
|
+
readonly context?: Types[Extract<keyof Types, string>];
|
|
114
|
+
name: string;
|
|
115
|
+
message: string;
|
|
116
|
+
stack?: string;
|
|
117
|
+
cause?: unknown;
|
|
118
|
+
};
|
|
119
|
+
isError(error: unknown): error is Error;
|
|
120
|
+
};
|
|
83
121
|
}
|
|
84
|
-
export {};
|
|
85
122
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../source/error/error.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../source/error/error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,eAAe;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,eAAe;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;;GAGG;AACH,qBAAa,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;IAEpD,IAAI,EAAE,CAAC;IACP,OAAO,CAAC,EAAE,YAAY;IACtB,OAAO,EAAE,MAAM;gBAFf,IAAI,EAAE,CAAC,EACP,OAAO,CAAC,EAAE,YAAY,YAAA,EACtB,OAAO,GAAE,MAAW;IAM7B,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,CAAC;IAI3E;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,UAAU,EAAE,KAAK;2DAY3D,KAAK,8BAAW,YACjB,MAAM;;+BARS,KAAK,8BAAW;;;;;;QAE1C,kBAAkB;wBACiC,8BAAW;kBAa7C,OAAO,GAAG,KAAK;;+BAhBN,KAAK,8BAAW;;;;;SAgBQ;;;CAKvD;AAED;;;GAGG;AACH,qBAAa,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;IAEtD,IAAI,EAAE,CAAC;IACP,OAAO,CAAC,EAAE,YAAY;IACtB,OAAO,EAAE,MAAM;gBAFf,IAAI,EAAE,CAAC,EACP,OAAO,CAAC,EAAE,YAAY,YAAA,EACtB,OAAO,GAAE,MAAW;IAM7B,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC;IAI7E;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,UAAU,EAAE,KAAK;2DAY3D,KAAK,8BAAW,YACjB,MAAM;;+BARS,KAAK,8BAAW;;;;;;QAE1C,kBAAkB;wBACiC,8BAAW;kBAa7C,OAAO,GAAG,KAAK;;+BAhBN,KAAK,8BAAW;;;;;SAgBU;;;CAKzD"}
|
package/output/error/error.js
CHANGED
|
@@ -1,93 +1,119 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 错误类型模块
|
|
3
|
-
* key 为错误的类型
|
|
4
|
-
* value 为错误的上下文类型
|
|
5
|
-
* 错误的上下文可以帮助系统更好的理解和处理错误
|
|
6
|
-
* 一般存放的是错误发生时的关键信息,例如请求的路径,参数等等
|
|
7
|
-
* 输入错误时输入的字段信息,校验规则等等
|
|
8
|
-
* 可以通过模块声明合并来定义全局错误类型:
|
|
9
3
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* interface UserErrorTypes {
|
|
14
|
-
* 'validation-failed': { field?: string; value?: unknown; rule?: string }
|
|
15
|
-
* 'permission-denied': { resource?: string; action?: string; userId?: string }
|
|
16
|
-
* 'not-found': { id?: string; type?: string; query?: Record<string, unknown> }
|
|
17
|
-
* }
|
|
4
|
+
* 提供两种错误类型:
|
|
5
|
+
* - UserError: 用户可见的错误(如验证失败、权限不足等)
|
|
6
|
+
* - SystemError: 系统内部错误(如数据库错误、网络错误等)
|
|
18
7
|
*
|
|
19
|
-
*
|
|
20
|
-
* 'database-error': { query?: string; table?: string; operation?: string }
|
|
21
|
-
* 'network-error': { url?: string; method?: string; status?: number }
|
|
22
|
-
* 'service-unavailable': { service?: string; endpoint?: string; retryAfter?: number }
|
|
23
|
-
* }
|
|
24
|
-
* }
|
|
8
|
+
* **错误类型命名规范**:推荐使用全大写、下划线分割的风格(如 `VALIDATION_FAILED`)
|
|
25
9
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // 1. 使用 define 方法定义类型安全的错误类
|
|
13
|
+
* const MyUserError = UserError.define({
|
|
14
|
+
* 'VALIDATION_FAILED': {} as { field?: string; value?: unknown },
|
|
15
|
+
* 'PERMISSION_DENIED': {} as { resource?: string; action?: string },
|
|
16
|
+
* 'NOT_FOUND': {} as { id?: string; type?: string }
|
|
31
17
|
* })
|
|
32
|
-
*
|
|
33
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* // type 会被自动推导和限制
|
|
20
|
+
* const error = new MyUserError('VALIDATION_FAILED', {
|
|
34
21
|
* field: 'email',
|
|
35
|
-
* value: 'invalid
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* }
|
|
22
|
+
* value: 'invalid@'
|
|
23
|
+
* }, '验证失败')
|
|
24
|
+
*
|
|
25
|
+
* // 获取所有定义的错误类型
|
|
26
|
+
* console.log(MyUserError.types) // ['VALIDATION_FAILED', 'PERMISSION_DENIED', 'NOT_FOUND']
|
|
27
|
+
*
|
|
28
|
+
* // 2. 直接使用基础错误类
|
|
29
|
+
* const error2 = new UserError('CUSTOM_ERROR', undefined, '自定义错误')
|
|
30
|
+
* const error3 = new SystemError('DATABASE_ERROR', undefined, '数据库错误')
|
|
31
|
+
*
|
|
32
|
+
* // 3. 使用类型守卫检查错误
|
|
33
|
+
* if (MyUserError.is(error)) {
|
|
34
|
+
* console.log(error.type, error.context)
|
|
35
|
+
* }
|
|
49
36
|
* ```
|
|
50
37
|
*/
|
|
51
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* 用户可见的错误
|
|
40
|
+
* 用于表示用户操作导致的错误,如验证失败、权限不足等
|
|
41
|
+
*/
|
|
52
42
|
export class UserError extends Error {
|
|
53
43
|
type;
|
|
54
|
-
message;
|
|
55
44
|
context;
|
|
56
|
-
|
|
45
|
+
message;
|
|
46
|
+
constructor(type, context, message = '') {
|
|
57
47
|
super(message, context);
|
|
58
48
|
this.type = type;
|
|
59
|
-
this.message = message;
|
|
60
49
|
this.context = context;
|
|
50
|
+
this.message = message;
|
|
61
51
|
this.name = 'UserError';
|
|
62
52
|
}
|
|
63
53
|
static is(error) {
|
|
64
54
|
return error instanceof UserError;
|
|
65
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* 定义一个绑定了特定错误类型的 UserError 类
|
|
58
|
+
* @param errorTypes 错误类型定义对象,key 为错误类型,value 为上下文类型
|
|
59
|
+
* @returns 返回绑定了特定类型的 UserError 类
|
|
60
|
+
*/
|
|
61
|
+
static define(errorTypes) {
|
|
62
|
+
return class BoundUserError extends Error {
|
|
63
|
+
type;
|
|
64
|
+
context;
|
|
65
|
+
/** 获取所有定义的错误类型 */
|
|
66
|
+
static types = Object.keys(errorTypes);
|
|
67
|
+
constructor(type, context, message = '') {
|
|
68
|
+
super(message, context);
|
|
69
|
+
this.name = 'UserError';
|
|
70
|
+
this.type = type;
|
|
71
|
+
this.context = context;
|
|
72
|
+
}
|
|
73
|
+
static is(error) {
|
|
74
|
+
return error instanceof BoundUserError;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
66
78
|
}
|
|
67
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* 系统内部错误
|
|
81
|
+
* 用于表示系统层面的错误,如数据库错误、网络错误等
|
|
82
|
+
*/
|
|
68
83
|
export class SystemError extends Error {
|
|
69
84
|
type;
|
|
70
|
-
message;
|
|
71
85
|
context;
|
|
72
|
-
|
|
86
|
+
message;
|
|
87
|
+
constructor(type, context, message = '') {
|
|
73
88
|
super(message, context);
|
|
74
89
|
this.type = type;
|
|
75
|
-
this.message = message;
|
|
76
90
|
this.context = context;
|
|
91
|
+
this.message = message;
|
|
77
92
|
this.name = 'SystemError';
|
|
78
93
|
}
|
|
79
94
|
static is(error) {
|
|
80
95
|
return error instanceof SystemError;
|
|
81
96
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
97
|
+
/**
|
|
98
|
+
* 定义一个绑定了特定错误类型的 SystemError 类
|
|
99
|
+
* @param errorTypes 错误类型定义对象,key 为错误类型,value 为上下文类型
|
|
100
|
+
* @returns 返回绑定了特定类型的 SystemError 类
|
|
101
|
+
*/
|
|
102
|
+
static define(errorTypes) {
|
|
103
|
+
return class BoundSystemError extends Error {
|
|
104
|
+
type;
|
|
105
|
+
context;
|
|
106
|
+
/** 获取所有定义的错误类型 */
|
|
107
|
+
static types = Object.keys(errorTypes);
|
|
108
|
+
constructor(type, context, message = '') {
|
|
109
|
+
super(message, context);
|
|
110
|
+
this.name = 'SystemError';
|
|
111
|
+
this.type = type;
|
|
112
|
+
this.context = context;
|
|
113
|
+
}
|
|
114
|
+
static is(error) {
|
|
115
|
+
return error instanceof BoundSystemError;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
92
118
|
}
|
|
93
119
|
}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
declare module './error' {
|
|
2
|
-
interface UserErrorTypes {
|
|
3
|
-
VALIDATION_ERROR: unknown;
|
|
4
|
-
TEST_ERROR: unknown;
|
|
5
|
-
USER_ERROR: unknown;
|
|
6
|
-
REQUIRED_FIELD: unknown;
|
|
7
|
-
INVALID_FORMAT: unknown;
|
|
8
|
-
OUT_OF_RANGE: unknown;
|
|
9
|
-
}
|
|
10
|
-
interface SystemErrorTypes {
|
|
11
|
-
DATABASE_ERROR: unknown;
|
|
12
|
-
NETWORK_ERROR: unknown;
|
|
13
|
-
FILE_ERROR: unknown;
|
|
14
|
-
TEST_ERROR: unknown;
|
|
15
|
-
SYSTEM_ERROR: unknown;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
1
|
export {};
|
|
19
2
|
//# sourceMappingURL=error.test.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.test.d.ts","sourceRoot":"","sources":["../../source/error/error.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error.test.d.ts","sourceRoot":"","sources":["../../source/error/error.test.ts"],"names":[],"mappings":""}
|