lisn.js
Version:
Simply handle user gestures and actions. Includes widgets.
1 lines • 3.74 kB
Source Map (JSON)
{"version":3,"file":"types.cjs","names":[],"sources":["../../../src/ts/debug/types.ts"],"sourcesContent":["/**\n * @module Debugging\n */\n\nimport { LogFunction } from \"@lisn/globals/types\";\n\n/**\n * @interface\n */\nexport type ConsoleInterface = {\n /**\n * Logs a message at level 'debug'.\n */\n readonly debug: LogFunction;\n\n /**\n * Logs a message at level 'log'.\n */\n readonly log: LogFunction;\n\n /**\n * Logs a message at level 'info'.\n */\n readonly info: LogFunction;\n\n /**\n * Logs a message at level 'warn'.\n */\n readonly warn: LogFunction;\n\n /**\n * Logs a message at level 'error'.\n */\n readonly error: LogFunction;\n};\n\nexport type LoggerInterface = ConsoleInterface & {\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 1.\n */\n readonly debug1: LogFunction;\n\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 2.\n */\n readonly debug2: LogFunction;\n\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 3.\n */\n readonly debug3: LogFunction;\n\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 4.\n */\n readonly debug4: LogFunction;\n\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 5.\n */\n readonly debug5: LogFunction;\n\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 6.\n */\n readonly debug6: LogFunction;\n\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 7.\n */\n readonly debug7: LogFunction;\n\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 8.\n */\n readonly debug8: LogFunction;\n\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 9.\n */\n readonly debug9: LogFunction;\n\n /**\n * Logs a debugging message with a special debug ID in the prefix, at level 10.\n */\n readonly debug10: LogFunction;\n\n /**\n * Returns the name of the Logger that was passed to the constructor.\n */\n readonly getName: () => string;\n\n /**\n * Returns the {@link LoggerConfig.verbosityLevel}.\n */\n readonly getVerbosityLevel: () => number;\n\n /**\n * Sets the {@link LoggerConfig.verbosityLevel}.\n */\n readonly setVerbosityLevel: (level: number) => void;\n};\n\n/**\n * @interface\n */\nexport type LoggerConfig = {\n /**\n * The name that's shown in the prefix of all emitted messages.\n */\n name?: string;\n\n /**\n * Set the verbosity level. Defaults to\n * {@link Settings.settings.verbosityLevel | settings.verbosityLevel}.\n */\n verbosityLevel?: number;\n\n /**\n * Set the remote logger URL. Defaults to\n * {@link Settings.settings.remoteLoggerURL | settings.remoteLoggerURL}.\n */\n remoteLoggerURL?: string;\n\n /**\n * Set the remote logger connection timeout.\n * See {@link Debugging.RemoteConsole | RemoteConsole}.\n */\n remoteLoggerConnectTimeout?: number;\n\n /**\n * Set whether to use remote logger on mobile devices only. Defaults to\n * {@link Settings.settings.remoteLoggerOnMobileOnly | settings.remoteLoggerOnMobileOnly}.\n */\n remoteLoggerOnMobileOnly?: boolean;\n\n /**\n * Set the ID of the logger that will be shown in debugging messages.\n * Defaults to an 8-character random string.\n */\n debugID?: string;\n\n /**\n * Log the given value when the logger is created (for debugging purposes, to\n * be able to see the debug ID of the new Logger).\n */\n logAtCreation?: unknown;\n};\n\nexport type LevelName = \"debug\" | \"log\" | \"info\" | \"warn\" | \"error\";\n"],"mappings":"","ignoreList":[]}