StructDecl
Interface in IR
A ModuleDecl.structs entry: a WGSL struct declaration.
import type { StructDecl } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface StructDecl { readonly name: string; readonly fields: readonly StructField[];}Description
On GLSL it becomes a
plain struct, or a flattened set of in/out globals when its fields carry
location/builtin (see StructField). Use uniformStruct or
ioStruct to derive one together with its binding and typed field access
instead of writing this shape by hand.
Instance properties
nameread onlystringfieldsread onlyreadonly StructField[]
See also
Source
src/core/ir/nodes.ts, line 492, at commit 26de7be8