@builtin
On this page

@builtin

Attribute

The decorated form of builtin<N>, a WebGPU builtin value: i: builtin<"vertex_index"> for @builtin("vertex_index") i: u32.

The signature, the sentence and any message are the compiler's own text at commit af54ddad5.

Syntax

declare function builtin(name: string): (target: unknown, context?: unknown) => void

Parameters

  • name string

The declaration also names what the TypeScript decorator runtime hands a decorator, target and context. A call passes neither.

Examples

See also

Edit this page Report a problem