TS8019
On this page

TS8019

Front-end code ARITY_MISMATCH

Wrong number of arguments, elements, or fields at a call or constructor site.

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(@location(0) uv: vec2): vec4 {
return vec4(uv, 0.)
}

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

TS8019 error, line 5: Vector constructor component count mismatch.

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 rules this enforces

Rule 2.2 Test
A compiler-internal name (§2.1) must not be authorable.
Rule 8.18 Test
A function whose parameter has a function type, written out (f: (x: f32) => f32) or through a type alias of one, takes a function: a function declared at the top of the file or of a namespace, a method, a static method, a constructor, a field that holds a function (Rule 8.16) and a local function (Rule 8.17).
Rule 9.2 Test
A builtin’s signature must be WGSL’s, checked at the call.

See also

Source

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

Edit this page Report a problem