SD0006
Core code
component access on a non-vector
The registry text and every compiler message on these pages are the compiler's own English.
In the front end
A "use typeshade" file never reaches this check with the same mistake: the front end refuses it first, under its own code. This program, compiled at build time, gets:
"use typeshade"
@fragmentexport function main(uv: location<0, vec2>): vec4 { const s = uv.x return vec4(s.x, 0., 0., 1.)} TS8022 error, line 6: .x on f32 — swizzle requires vec2/vec3/vec4.
See also
-
TS8022UNKNOWN_NAME - A reference to a name that TypeShade cannot resolve and that is not a function call (
UNKNOWN_FN) or a type name (UNKNOWN_TYPE). A name that the library declares for TypeScript's own use (Object,Math,Symbol), or that the file declares as an enum, a namespace, a class or a type, and that is read as a value, says what it is.
Source
Where the compiler raises this code at commit af54ddad5, one line per file: