@epigraph/epigraph-std-lib 2.0.1 → 2.2.0

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.
@@ -17,6 +17,32 @@ export declare enum LogTypes {
17
17
  Warn = "warn",
18
18
  Error = "error"
19
19
  }
20
+ export interface ILoggerInfo {
21
+ title: string;
22
+ details?: any;
23
+ contextOverride?: string | undefined;
24
+ }
25
+ export interface ILoggerWarning {
26
+ title: string;
27
+ details?: any;
28
+ contextOverride?: string | undefined;
29
+ }
30
+ export interface ILoggerError {
31
+ title: string;
32
+ details?: any;
33
+ contextOverride?: string | undefined;
34
+ }
35
+ export interface ILoggerTable {
36
+ title: string;
37
+ details?: any;
38
+ contextOverride?: string | undefined;
39
+ logType?: LogTypes;
40
+ }
41
+ export interface ILoggerGroup {
42
+ title: string;
43
+ contextOverride?: string | undefined;
44
+ logType?: LogTypes;
45
+ }
20
46
  /**
21
47
  * Epigraph's Logger class that provides various modes and functionalities to easily
22
48
  * manage logging within our solutions in a consistent manner.
@@ -53,7 +79,7 @@ declare class EpigraphLogger {
53
79
  * paramater to make it easy to debug. If not provided, the default context would be used
54
80
  * that was provided at the time of initialisation of this class.
55
81
  */
56
- info(title?: string, details?: any, contextOverride?: string | undefined): void;
82
+ info({ title, details, contextOverride }: ILoggerInfo): void;
57
83
  /**
58
84
  * A warning log type that let's the user know that some action that could be dangerous was just
59
85
  * performed and might need attention.
@@ -65,7 +91,7 @@ declare class EpigraphLogger {
65
91
  * paramater to make it easy to debug. If not provided, the default context would be used
66
92
  * that was provided at the time of initialisation of this class.
67
93
  */
68
- warn(title?: string, details?: any, contextOverride?: string | undefined): void;
94
+ warn({ title, details, contextOverride }: ILoggerWarning): void;
69
95
  /**
70
96
  * A critical error log type that let's the user know that some action that was unexpected and required immediate attention.
71
97
  *
@@ -76,7 +102,7 @@ declare class EpigraphLogger {
76
102
  * paramater to make it easy to debug. If not provided, the default context would be used
77
103
  * that was provided at the time of initialisation of this class.
78
104
  */
79
- error(title?: string, details?: any, contextOverride?: string | undefined): void;
105
+ error({ title, details, contextOverride }: ILoggerError): void;
80
106
  /**
81
107
  * A table log type that can show an object in an organised manner within the console.
82
108
  * This is primarily for the visual purposes and doesn't provide any additional functionality
@@ -90,7 +116,7 @@ declare class EpigraphLogger {
90
116
  * that was provided at the time of initialisation of this class.
91
117
  * @param {LogTypes} logType A
92
118
  */
93
- table(title?: string, details?: any, contextOverride?: string | undefined, logType?: LogTypes): void;
119
+ table({ title, details, contextOverride, logType, }: ILoggerTable): void;
94
120
  /**
95
121
  * Begins an expanded group with the browser's console window.
96
122
  * NOTE: Please remember to close this group once done using EpigraphLogger.groupEnd();
@@ -104,7 +130,7 @@ declare class EpigraphLogger {
104
130
  * info but this parameter allows the user to override this.
105
131
  * @returns {void}
106
132
  */
107
- group(title: string, contextOverride?: string | undefined, logType?: LogTypes): void;
133
+ group({ title, contextOverride, logType, }: ILoggerGroup): void;
108
134
  /**
109
135
  * Begins a collapsed group with the browser's console window.
110
136
  * NOTE: Please remember to close this group once done using EpigraphLogger.groupEnd();
@@ -118,7 +144,7 @@ declare class EpigraphLogger {
118
144
  * info but this parameter allows the user to override this.
119
145
  * @returns {void}
120
146
  */
121
- groupCollapsed(title: string, contextOverride?: string | undefined, logType?: LogTypes): void;
147
+ groupCollapsed({ title, contextOverride, logType, }: ILoggerGroup): void;
122
148
  /**
123
149
  * Similar to the console.groupEnd(). Useful for ending either a group or
124
150
  * groupCollapse that was initialised by this logger.