# console Locked, prototype-pollution-resistant copies of the global `console` methods, pre-bound to the original console object. [`log`](https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console/#api-log), [`warn`](https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console/#api-warn), [`error`](https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console/#api-error), [`info`](https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console/#api-info), [`debug`](https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console/#api-debug), [`trace`](https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console/#api-trace), [`dir`](https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console/#api-dir), [`table`](https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console/#api-table), `assert`, `group*`, `time*`, and the rest of the `console` surface are captured (and `.bind()`-ed) at module-load time and frozen into a tamper-proof namespace, so diagnostic output keeps reaching the real console even if `globalThis.console` is later patched. Effective only when imported before any untrusted code has had a chance to mutate the prototype chain. ## API Reference ### Variables #### assert (Safe copy) Writes an error message to the console if the assertion is false. ```typescript const assert: any ``` **Value** `...` #### clear (Safe copy) Clears the console. ```typescript const clear: any ``` **Value** `...` #### Console (Safe copy) Namespace object containing all Console methods. Note: Importing this imports all methods in this namespace (no tree-shaking). ```typescript const Console: Readonly<{ assert: any; clear: any; count: any; countReset: any; debug: any; dir: any; error: any; group: any; groupCollapsed: any; groupEnd: any; info: any; log: any; table: any; time: any; timeEnd: any; timeLog: any; trace: any; warn: any }> ``` **Value** `...` #### count (Safe copy) Logs the number of times that this particular call to count() has been called. ```typescript const count: any ``` **Value** `...` #### countReset (Safe copy) Resets the counter used with console.count(). ```typescript const countReset: any ``` **Value** `...` #### debug (Safe copy) Outputs a debug message to the console. ```typescript const debug: any ``` **Value** `...` #### dir (Safe copy) Displays an interactive listing of the properties of a specified object. ```typescript const dir: any ``` **Value** `...` #### error (Safe copy) Outputs an error message to the console. ```typescript const error: any ``` **Value** `...` #### group (Safe copy) Creates a new inline group in the console. ```typescript const group: any ``` **Value** `...` #### groupCollapsed (Safe copy) Creates a new inline group in the console that is initially collapsed. ```typescript const groupCollapsed: any ``` **Value** `...` #### groupEnd (Safe copy) Exits the current inline group. ```typescript const groupEnd: any ``` **Value** `...` #### info (Safe copy) Outputs an informational message to the console. ```typescript const info: any ``` **Value** `...` #### log (Safe copy) Outputs a message to the console. ```typescript const log: any ``` **Value** `...` #### table (Safe copy) Displays tabular data as a table. ```typescript const table: any ``` **Value** `...` #### time (Safe copy) Starts a timer with a name specified as an input parameter. ```typescript const time: any ``` **Value** `...` #### timeEnd (Safe copy) Stops a timer that was previously started. ```typescript const timeEnd: any ``` **Value** `...` #### timeLog (Safe copy) Logs the current value of a timer that was previously started. ```typescript const timeLog: any ``` **Value** `...` #### trace (Safe copy) Outputs a stack trace to the console. ```typescript const trace: any ``` **Value** `...` #### warn (Safe copy) Outputs a warning message to the console. ```typescript const warn: any ``` **Value** `...` --- Canonical page: https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console/ This file: https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/console.md Documentation index: https://www.hyperfrontend.dev/llms.txt