rage-framework/browser/src/core/helper.ts
Danya H edafb5289e upd (fw):
- fixed inconsistent rpc build
- changed project-wide naming convention to prefix with "FW_" instead of "RageFW_"
2025-01-30 19:40:09 +00:00

22 lines
574 B
TypeScript

export class FW_Helper {
protected debugLogs_: boolean = false
protected customLogger_:
| undefined
| ((method: string, eventName: string, ...args: unknown[]) => unknown) =
undefined
constructor() {}
protected log_(
method: string,
eventName: string,
...args: unknown[]
): void {
if (this.customLogger_) {
this.customLogger_(method, eventName, ...args)
} else if (this.debugLogs_) {
console.log('[RPC](' + method + ')', eventName + ':', ...args)
}
}
}