TS8068
On this page

TS8068

Front-end code RESERVED_NAME

eval or arguments bound by a variable, a parameter or a function, which ECMAScript's strict mode, and TypeScript with it, lets no declaration do (Rule 2.1).

The registry has no documentation comment for this constant, so the line above is written by this site from the messages the compiler raises it with.

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

Example

example.shade.ts
"use typeshade"
@fragment
export function main(uv: location<0, vec2>): vec4 {
const arguments = uv.x * 0.5
return vec4(uv * arguments, 0., 1.)
}

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

TS8068 error, line 5: "arguments" is reserved in ECMAScript's strict mode, which every "use typeshade" file is in, so a local of that name cannot be declared. Rename it.

How to fix it

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

example.shade.ts
"use typeshade"
@fragment
export function main(uv: location<0, vec2>): vec4 {
const w = uv.x * 0.5
return vec4(uv * w, 0., 1.)
}

The rules this enforces

Rule 2.1 Test
Every author-facing name must come from exactly one of three sources:
Rule 12.6 Test
A requirement the front end can check must be checked at the front end, in the author’s words, and not left to Tint or a driver.

See also

Source

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

Edit this page Report a problem