---
title: "HostFace: interface in Editor, TypeShade API reference"
description: "HostFace, an interface in Editor. The host face of one shader module. What an editor asks the compiler for: diagnostics, completion and hover…"
url: https://typeshade.dev/api/hostface-interface/
language: en
---

# `HostFace`

Interface in Editor

The host face of one shader module.

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

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

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

## Instance properties

**`diagnostics` read only `readonly TsCompilerDiagnostic[]`**

The module’s own diagnostics. When one is an error, the module does not compile and `exports`, `view` and `code` are absent: a build fails with these.

**`exports` optional read only `readonly HostExport[]`**

**`view` optional read only `string`**

The host view’s text.

**`code` optional read only `string`**

The generated module’s JavaScript.

**`files` read only `readonly string[]`**

Every file the compile read, the module first: what a bundler watches, so an edit to a file the module imports rebuilds it.

## Source

[`src/compiler/ts/host-face/contracts.ts`, line 40](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/host-face/contracts.ts#L40), at commit af54ddad5
