---
title: "HostFace: TypeShade 셰이더 API의 편집기 분류 인터페이스 참조 문서"
description: "HostFace, TypeShade API의 편집기 분류에 속하는 인터페이스입니다. 셰이더 모듈 하나의 호스트 인터페이스(host face)입니다."
url: https://typeshade.dev/ko/api/hostface-interface/
language: ko
---

# `HostFace`

인터페이스, 편집기 분류

셰이더 모듈 하나의 호스트 인터페이스(host face)입니다.

`import type { HostFace } from 'typeshade/language-service'`

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

```ts
interface HostFace {
  readonly diagnostics: readonly TsCompilerDiagnostic[];
  readonly exports?: readonly HostExport[];
  readonly view?: string;
  readonly code?: string;
  readonly files: readonly string[];
}
```

## 인스턴스 속성

**`diagnostics` 읽기 전용 `readonly TsCompilerDiagnostic[]`**

모듈 자체의 진단입니다. 그중 하나라도 오류이면 모듈은 컴파일되지 않고 `exports`, `view`, `code`가 없습니다. 이때 빌드는 이 진단을 내며 실패합니다.

**`exports` 선택 사항 읽기 전용 `readonly HostExport[]`**

**`view` 선택 사항 읽기 전용 `string`**

호스트 뷰의 텍스트입니다.

**`code` 선택 사항 읽기 전용 `string`**

생성 모듈의 JavaScript입니다.

**`files` 읽기 전용 `readonly string[]`**

컴파일이 읽은 모든 파일로, 모듈 자신이 맨 앞에 옵니다. 번들러가 감시하는 목록이라서, 모듈이 가져오는 파일을 고치면 모듈이 다시 빌드됩니다.

## 소스

[`src/compiler/ts/host-face/contracts.ts`, 40행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/host-face/contracts.ts#L40), 커밋 af54ddad5 기준
