---
title: "TS8079 HOST_RESERVED_FIELD: TypeShade 컴파일러가 진단에 붙이는 오류 코드"
description: "TS8079 HOST_RESERVED_FIELD, TypeShade 컴파일러의 오류 코드입니다. 내보낸 바인딩의 클래스에 있는 필드 이름이 호스트 접근자의 멤버와 같습니다(규칙 6.1)."
url: https://typeshade.dev/ko/reference/errors/ts8079/
language: ko
---

# `TS8079`

프런트엔드 코드 `HOST_RESERVED_FIELD`

내보낸 바인딩의 클래스에 있는 필드 이름이 호스트 접근자의 멤버와 같습니다([규칙 6.1](https://typeshade.dev/ko/reference/rules/6-1/)). 내보낸 `uniform<T>`의 클래스나 내보낸 스토리지 배열 원소의 클래스에서는 `set`, 내보낸 `uniform<T>`의 클래스에서는 `needsUpdate`와 `dispose`가 그렇습니다. 호스트는 접근자로 필드를 설정하므로(`camera.pos.set(…)`) 접근자와 같은 이름의 필드에는 닿을 수 없습니다.

레지스트리에는 이 상수에 대한 문서 주석이 없습니다. 그래서 위 설명은 컴파일러가 이 코드와 함께 내는 메시지를 보고 이 사이트가 쓴 것입니다.

레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.

## 예제

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.)
}
```

빌드할 때 고정된 컴파일러로 이 프로그램을 컴파일하면 다음 진단이 나옵니다.

**TS8079** error, 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).

## 고치는 법

같은 프로그램을 고친 모습입니다. 진단 없이 컴파일됩니다.

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.)
}
```

## 이 코드가 적용하는 규칙

**[규칙 6.1](https://typeshade.dev/ko/reference/rules/6-1/) 테스트**

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>`.

## 함께 보기

- [리소스](https://typeshade.dev/ko/guide/language/resources/)
- [오류 코드](https://typeshade.dev/ko/reference/errors/)

## 소스

커밋 af54ddad5에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.

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