TS8030
On this page

TS8030

Front-end code SYNTAX

A TypeScript parse error (an unclosed parenthesis, a missing brace, an unexpected token) in a "use typeshade" file, carried through as a TypeShade diagnostic so a compile() caller sees it without running tsc.

The registry text and every compiler message on these pages are the compiler's own English.

When it fires

A TypeScript parse error (an unclosed parenthesis, a missing brace, an unexpected token) in a "use typeshade" file, carried through as a TypeShade diagnostic so a compile() caller sees it without running tsc. A file with one is not lowered or emitted: before this, vec4(3.14 compiled to WGSL. The language service drops these in favour of TypeScript's own syntactic diagnostics, which carry the real TS1005-style code.

Example

example.shade.ts
"use typeshade"
@fragment
export function main(@location(0) uv: vec2): vec4 {
return vec4(uv, 0., 1.
}

Compiled at build time against the pinned compiler, this program gets:

TS8030 error, line 6: ',' expected.

How to fix it

The same program, corrected. It compiles with no diagnostic.

example.shade.ts
"use typeshade"
@fragment
export function main(@location(0) uv: vec2): vec4 {
return vec4(uv, 0., 1.)
}

The rule this enforces

Rule 10.1 Test
A "use typeshade" file must not spell a WGSL enable or requires statement.

See also

Source

Where the compiler raises this code at commit 26de7be8, one line per file:

Edit this page Report a problem