VariantWgslResult
On this page

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 only string
okread only boolean
failedAtoptionalread 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 only readonly string[]

Every compilation message of type 'error', formatted as L<line>: <message>. Absent when ok. 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

Edit this page Report a problem