---
title: "Console, a category in the TypeShade API reference"
description: "Console in the TypeShade API reference. What a shader says through console.log: the events the CPU delivers, and the decoder for the ones the GPU records."
url: https://typeshade.dev/api/console/
language: en
---

# Console

8 members

What a shader says through console.log: the events the CPU delivers, and the decoder for the ones the GPU records.

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

**[`CONSOLE_METHODS`](https://typeshade.dev/api/consolemethods/) Constant**

The JavaScript Console API methods TypeShade recognizes in shader source today.

**[`ConsoleEvent`](https://typeshade.dev/api/consoleevent/) Interface**

A console event produced by a TypeShade CPU/debug invocation.

**[`ConsoleLog`](https://typeshade.dev/api/consolelog/) Interface**

Where the console buffer is bound and what each entry in it means.

**[`ConsoleMethod`](https://typeshade.dev/api/consolemethod/) Type**

Console methods currently lowered by the TypeShade source compiler.

**[`ConsoleSink`](https://typeshade.dev/api/consolesink/) Type**

Host callback used by the Playground, tests, and editor debug adapters.

**[`ConsoleSite`](https://typeshade.dev/api/consolesite/) Interface**

One console call the WGSL records: its method, where it was written, its arguments in the order written, and the words its entry takes.

**[`decodeConsole`](https://typeshade.dev/api/decodeconsole/) Function**

Decode a console buffer the host copied back into the events the CPU sink would receive.

**[`isConsoleMethod`](https://typeshade.dev/api/isconsolemethod/) Function**

Whether name is one of the console methods the source compiler lowers, narrowing it to ConsoleMethod.
