VariantWgslResult
Interface in Variants
What happened to one variant on the WGSL side.
import type { VariantWgslResult } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface VariantWgslResult { readonly key: string; readonly ok: boolean; readonly failedAt?: 'emit' | 'validate'; readonly errors?: readonly string[];}Instance properties
keyread onlystringokread onlybooleanfailedAtoptionalread only'emit' | 'validate'Which step failed. Absent when
ok.'emit'means the DSL threw before any device call.'validate'means the WGSL compiler reported errors, or the device call itself threw.errorsoptionalread onlyreadonly string[]Every compilation message of type
'error', formatted asL<line>: <message>. Absent whenok. Warnings and info messages are never counted as failures: the compiler emits them for valid shaders, and a check that fails on them is soon ignored.
Source
src/core/variant-link.ts, line 201, at commit 26de7be8