---
title: "TS8024 BUILTIN_NAME: an error code of the TypeShade compiler"
description: "TS8024 BUILTIN_NAME, an error code of the TypeShade compiler. A @builtin(\"...\") with a malformed name argument, or with an id outside WGSL's builtin vocabulary."
url: https://typeshade.dev/reference/errors/ts8024/
language: en
---

# `TS8024`

Front-end code `BUILTIN_NAME`

A `@builtin("...")` with a malformed name argument, or with an id outside WGSL's builtin vocabulary.

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"

@fragment
export function main(p: builtin<"frag_coord", vec4>): vec4 {
  return vec4(p.xy / 512., 0., 1.)
}
```

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

**TS8024** error, line 4: Unknown builtin "frag\_coord". Supported names: `vertex_index`, `instance_index`, position, `front_facing`, `frag_depth`, `sample_index`, `sample_mask`, `primitive_index`, `local_invocation_id`, `local_invocation_index`, `global_invocation_id`, `workgroup_id`, `num_workgroups`, `subgroup_invocation_id`, `subgroup_size`, `subgroup_id`, `num_subgroups`, `clip_distances`.

## How to fix it

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

example.shade.ts

```ts
"use typeshade"

@fragment
export function main(p: builtin<"position">): vec4 {
  return vec4(p.xy / 512., 0., 1.)
}
```

## The rule this enforces

**[Rule 6.6](https://typeshade.dev/reference/rules/6-6/) Test**

An entry point’s inputs and outputs are explicit parameters and return values.

## 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/builtin-check.ts:243`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/builtin-check.ts#L243) (2 sites)
- [`src/language-service/diagnostics.ts:91`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/language-service/diagnostics.ts#L91)
- [`src/language-service/diagnostics/refusal-tables.ts:8`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/language-service/diagnostics/refusal-tables.ts#L8)
- [`src/language-service/diagnostics/refused-attributes.ts:104`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/language-service/diagnostics/refused-attributes.ts#L104) (3 sites)
