---
title: "TS8037 WORKGROUP_ARG: a TypeShade compiler error code"
description: "TS8037 WORKGROUP_ARG, an error code of the TypeShade compiler. @compute(...) with an argument that is not an array literal of one to three whole numbers…"
url: https://typeshade.dev/reference/errors/ts8037/
language: en
---

# `TS8037`

Front-end code `WORKGROUP_ARG`

`@compute(...)` with an argument that is not an array literal of one to three whole numbers: an object, a bare number, an identifier, or an empty or four-wide array. The check of the default limits is `WORKGROUP_SHAPE`.

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

```ts
"use typeshade"

declare const data: storage<array<f32>, "read_write">

@compute(64)
export function main(id: builtin<"global_invocation_id">): void {
  data[id.x] = data[id.x] * 2.
}
```

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

**TS8037** error, line 5: compute takes an array of one to three whole numbers, "`@compute([64, 1, 1])`"; "64" is not a workgroup shape.

## How to fix it

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

example.shade.ts

```ts
"use typeshade"

declare const data: storage<array<f32>, "read_write">

@compute([64])
export function main(id: builtin<"global_invocation_id">): void {
  data[id.x] = data[id.x] * 2.
}
```

## The rules this enforces

**[Rule 2.1](https://typeshade.dev/reference/rules/2-1/) Test**

Every author-facing name must come from exactly one of three sources:

**[Rule 8.7](https://typeshade.dev/reference/rules/8-7/) Test**

`@compute` carries the workgroup size as an array literal of one to three positive whole-number literals, integer module constants or `u32` override names, `x`, `y` and `z`, a missing `y` or `z` being 1, and the default is 64; every default extent reaches reflection and the manifest, and each override name reaches WGSL’s `@workgroup_size`.

## See also

- [Shader stages](https://typeshade.dev/guide/language/stages/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

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

- [`src/compiler/ts/lower/function-signature/stage.ts:104`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function-signature/stage.ts#L104)
- [`src/compiler/ts/lower/function-signature/workgroup.ts:143`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function-signature/workgroup.ts#L143)
