---
title: "Editor, a category in the TypeShade API reference"
description: "Editor in the TypeShade API reference. What an editor asks the compiler for: diagnostics, completion and hover, at a source position."
url: https://typeshade.dev/api/editor/
language: en
---

# Editor

12 members

What an editor asks the compiler for: diagnostics, completion and hover, at a source position.

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

**[`HostExport`](https://typeshade.dev/api/hostexport/) Type**

One export of a shader module, as the host sees it.

**[`hostFace`](https://typeshade.dev/api/hostface/) Function**

Compute the host face of one shader module: which exports a host can call (Rule 8.20), their host types (Rule 8.21), the host view tsc reads, and the generated module a bundler reads, which runs the CPU tier's code at `f32` precision (Rule 11.7).

**[`HostFace`](https://typeshade.dev/api/hostface-interface/) Interface**

The host face of one shader module.

**[`HostFaceOptions`](https://typeshade.dev/api/hostfaceoptions/) Interface**

How hostFace is called.

**[`TypeshadeCompletionItem`](https://typeshade.dev/api/typeshadecompletionitem/) Interface**

Completion item exposed by the Typeshade language layer.

**[`TypeshadeDiagnostic`](https://typeshade.dev/api/typeshadediagnostic/) Interface**

Compiler diagnostic enriched with the source range and span that produced it.

**[`TypeshadeHover`](https://typeshade.dev/api/typeshadehover/) Interface**

Hover documentation and source span returned by the language layer.

**[`TypeshadeLanguageService`](https://typeshade.dev/api/typeshadelanguageservice/) Class**

Provides Typeshade diagnostics, completion, hover, and position mapping for editor integrations.

**[`TypeshadeLanguageServiceOptions`](https://typeshade.dev/api/typeshadelanguageserviceoptions/) Interface**

Configuration for a Typeshade language-service instance.

**[`TypeshadePosition`](https://typeshade.dev/api/typeshadeposition/) Interface**

Zero-based editor position: line and character both start at 0, following the Language Server Protocol convention.

**[`TypeshadeRange`](https://typeshade.dev/api/typeshaderange/) Interface**

A zero-based, half-open source range \[start, end), following the LSP convention.

**[`TypeshadeTextSpan`](https://typeshade.dev/api/typeshadetextspan/) Interface**

UTF-16 source span used to map Typeshade information back into an editor.
