@samet-it/be-base-common 1.0.10 → 1.0.11
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.
|
@@ -47,9 +47,7 @@ class ErrorHandler {
|
|
|
47
47
|
constructor() {
|
|
48
48
|
this._CLEAR_STAT = 1000 * 60 * 60 * 24; // daily
|
|
49
49
|
this._stats = new Map();
|
|
50
|
-
|
|
51
|
-
this.started = now.getTime();
|
|
52
|
-
this.startedIso = now.toISOString();
|
|
50
|
+
this.started = new Date();
|
|
53
51
|
this._clearStats();
|
|
54
52
|
}
|
|
55
53
|
_item(value, set) {
|
|
@@ -23,8 +23,7 @@ export interface ExceptionExported {
|
|
|
23
23
|
}
|
|
24
24
|
export type ErrorItem<A, C = ExceptionLike> = A extends ClassLike<infer R> ? (R extends ExceptionLike ? C : never) : never;
|
|
25
25
|
export interface ErrorHandlerLike {
|
|
26
|
-
readonly started:
|
|
27
|
-
readonly startedIso: string;
|
|
26
|
+
readonly started: Date;
|
|
28
27
|
checkParams(exception: ExceptionLike): void;
|
|
29
28
|
export(exception: ExceptionLike): ExceptionExported;
|
|
30
29
|
cast<F extends ClassLike<ExceptionLike>>(error: Error, fnc?: F): ErrorItem<F>;
|