ScalarKey
Type in Types
The key form of Scalar without 'bool': the set accepted wherever the DSL needs an indexable or comparable native scalar, such as array indices (.at(i, elem)), bitwise-op operands, and matchExpr or Switch scrutinees.
import type { ScalarKey } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
type ScalarKey = 'f32' | 'i32' | 'u32';Description
'f64' and 'bool' are
excluded because a Switch scrutinee must become a WGSL switch, which only accepts
integer cases, and an array index or bit-op operand is never boolean.
See also
Source
src/core/ir/types.ts, line 931, at commit 26de7be8