ScalarKey
타입, 타입 분류
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'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
type ScalarKey = 'f32' | 'i32' | 'u32';설명
'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.
함께 보기
소스
src/core/ir/types.ts, 931행, 커밋 c66579bf 기준