---
title: "TS8079 HOST_RESERVED_FIELD: a TypeShade compiler error code"
description: "TS8079 HOST_RESERVED_FIELD, an error code of the TypeShade compiler. A field of the class of an exported binding that is named like a member of its host…"
url: https://typeshade.dev/reference/errors/ts8079/
language: en
---

# `TS8079`

Front-end code `HOST_RESERVED_FIELD`

A field of the class of an exported binding that is named like a member of its host accessor ([Rule 6.1](https://typeshade.dev/reference/rules/6-1/)): `set` on the class of an exported `uniform<T>` or of the element of an exported storage array, and `needsUpdate` or `dispose` on the class of an exported `uniform<T>`. The host sets a field through its accessor (`camera.pos.set(…)`), so a field of the accessor's own name cannot be reached.

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"

export class Light {
  color: vec3 = vec3(1.)
  set: f32 = 1.
}

export declare const light: uniform<Light>

@fragment
export function main(): vec4 {
  return vec4(light.color * light.set, 1.)
}
```

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

**TS8079** error, line 5: "Light.set" is named like the host accessor's own method "set": "light" is a binding the module exports, a Uniform<Light> in the host, whose fields are properties of that accessor. Rename the field (Rule 6.1).

## How to fix it

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

example.shade.ts

```ts
"use typeshade"

export class Light {
  color: vec3 = vec3(1.)
  strength: f32 = 1.
}

export declare const light: uniform<Light>

@fragment
export function main(): vec4 {
  return vec4(light.color * light.strength, 1.)
}
```

## The rule this enforces

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

A resource must be written `declare const x: uniform<T>`, `declare const x: storage<T>`, `declare const x: storage<T, "read_write">`, or `declare const x: <texture or sampler type>`.

## See also

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

## Source

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

- [`src/compiler/ts/bindings.ts:208`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/bindings.ts#L208)
