---
title: "ConsoleEvent: interface in Console, TypeShade API reference"
description: "ConsoleEvent, an interface in Console. A console event produced by a TypeShade CPU/debug invocation."
url: https://typeshade.dev/api/consoleevent/
language: en
---

# `ConsoleEvent`

Interface in Console

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

`import type { ConsoleEvent } from 'typeshade'`

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

## Syntax

```ts
interface ConsoleEvent {
  readonly method: ConsoleMethod;
  readonly args: readonly (CpuValue | string)[];
  readonly span?: SourceSpan;
  readonly invocation?: readonly number[];
}
```

## Instance properties

**`method` read only `ConsoleMethod`**

**`args` read only `readonly (CpuValue | string)[]`**

The arguments as the author wrote them: a value for each value, and the text of each string literal, which is a label the host keeps (surface §66).

**`span` optional read only `SourceSpan`**

**`invocation` optional read only `readonly number[]`**

Which invocation made the call, as three numbers: `global_invocation_id` for a compute entry, the pixel for a fragment entry (`[x, y, 0]`). Present on an event decoded from the GPU, on one the CPU delivers while running an entry that takes that builtin, as a parameter or as a field of a struct parameter, and on every one the call layer’s CPU tier delivers while it dispatches an entry or draws one.

## Source

[`src/core/console.ts`, line 16](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/console.ts#L16), at commit af54ddad5
