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 26de7be8.
Syntax
interface ConsoleEvent { readonly method: ConsoleMethod; readonly args: readonly (CpuValue | string)[]; readonly span?: SourceSpan; readonly invocation?: readonly number[];}Instance properties
methodread onlyConsoleMethodargsread onlyreadonly (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).
spanoptionalread onlySourceSpaninvocationoptionalread onlyreadonly number[]Which invocation made the call, as three numbers:
global_invocation_idfor 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, at commit 26de7be8