hostFace()
Function in Editor
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).
import { hostFace } from 'typeshade/language-service'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
function hostFace(source: string, options: HostFaceOptions): HostFaceParameters
sourcestringoptionsHostFaceOptions
Return value
Description
A module with an error diagnostic has no face: the result carries the diagnostics alone.
The Vite plugin and tshc sync call it, and typeshade/language-service exports it for a
tool that runs host code without Vite (change 0062): readDocument reads each file the module
imports from where the tool keeps it.
In the guide
Source
src/compiler/ts/host-face.ts, line 91, at commit af54ddad5