Debug.d.ts 937 B

12345678910111213141516171819202122232425262728293031
  1. export declare class Debug {
  2. static maxLogs: number;
  3. static logs: Log[];
  4. private static _onAddLogCallbacks;
  5. private static _onClearLogsCallbacks;
  6. static clear(): void;
  7. static log(message: string): void;
  8. static logError(message: string): void;
  9. static logWarning(message: string): void;
  10. private static addLog;
  11. static onAddLog(callback: (log: Log) => void): {
  12. stop: () => void;
  13. };
  14. static onClearLogs(callback: () => void): {
  15. stop: () => void;
  16. };
  17. private static flushOnAddLogCallbacks;
  18. private static flushOnClearLogsCallbacks;
  19. }
  20. export declare class Log {
  21. message: string;
  22. protected _type: 'Log' | 'Error' | 'Warning';
  23. get type(): "Log" | "Error" | "Warning";
  24. constructor(message: string);
  25. }
  26. export declare class Error extends Log {
  27. constructor(message: string);
  28. }
  29. export declare class Warning extends Log {
  30. constructor(message: string);
  31. }