HostFace
On this page

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

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

Instance properties

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

exportsoptionalread only readonly HostExport[]
viewoptionalread only string

The host view’s text.

codeoptionalread only string

The generated module’s JavaScript.

filesread 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, at commit af54ddad5

Edit this page Report a problem