@overlayed/app 0.4.2 → 0.5.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.
package/dist/index.d.ts CHANGED
@@ -28,7 +28,7 @@ creation_time: number;
28
28
 
29
29
  declare type BaseEvent = typeof BaseEvent.infer;
30
30
 
31
- declare type CustomLoggerScope = ReturnType<typeof Logger.scope>;
31
+ declare type CustomLoggerScope = ReturnType<typeof Logger.prototype.scope>;
32
32
 
33
33
  declare type ErrorEvents = ErrorPipeServerError | ErrorInvalidConfigFile;
34
34
 
@@ -130,66 +130,7 @@ export interface KeyboardKeyEvent extends WindowEvent {
130
130
  key: VirtualKey;
131
131
  }
132
132
 
133
- declare const Logger = {
134
- scope: (name: string) => {
135
- return {
136
- log: (...args: any[]) => {
137
- console.log(name, ...args);
138
- },
139
- error: (...args: any[]) => {
140
- console.error(name, ...args);
141
- },
142
- warn: (...args: any[]) => {
143
- console.warn(name, ...args);
144
- },
145
- info: (...args: any[]) => {
146
- console.info(name, ...args);
147
- },
148
- debug: (...args: any[]) => {
149
- console.debug(name, ...args);
150
- },
151
- captureSentryException: (...args: any[]) => {
152
- console.error(name, ...args);
153
- },
154
- sentryError: (...args: any[]) => {
155
- console.error(name, ...args);
156
- },
157
- sentryLog: (...args: any[]) => {
158
- console.log(name, ...args);
159
- },
160
- sentryWarn: (...args: any[]) => {
161
- console.warn(name, ...args);
162
- },
163
- };
164
- },
165
- error: (...args: any[]) => {
166
- console.error(name, ...args);
167
- },
168
- warn: (...args: any[]) => {
169
- console.warn(name, ...args);
170
- },
171
- info: (...args: any[]) => {
172
- console.info(name, ...args);
173
- },
174
- debug: (...args: any[]) => {
175
- console.debug(name, ...args);
176
- },
177
- captureSentryException: (...args: any[]) => {
178
- console.error(name, ...args);
179
- },
180
- sentryError: (...args: any[]) => {
181
- console.error(name, ...args);
182
- },
183
- sentryLog: (...args: any[]) => {
184
- console.log(name, ...args);
185
- },
186
- sentryWarn: (...args: any[]) => {
187
- console.warn(name, ...args);
188
- },
189
- sentryInfo: (...args: any[]) => {
190
- console.info(name, ...args);
191
- },
192
- };
133
+ declare const Logger = AsSingleton(LoggerClass);
193
134
 
194
135
  /** This should be kept in sync with EventEmitterManager */
195
136
  declare class Manager {
@@ -233,6 +174,10 @@ export declare type OverlayedApp<TModule extends GameModule, TKeybind extends st
233
174
  * ```
234
175
  */
235
176
  init: () => void;
177
+ /**
178
+ * Returns true if the overlayed app has been initialized.
179
+ */
180
+ initialized: boolean;
236
181
  };
237
182
 
238
183
  declare type OverlayedAppGameModules<TModule extends GameModule> = {