ExternRequirement
On this page

ExternRequirement

Interface in Reflection

One host-provided global a module expects, declared with externVar.

import type { ExternRequirement } from 'typeshade'

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

Syntax

interface ExternRequirement {
readonly name: string;
readonly type: string;
readonly wgsl: string;
readonly glsl: string;
readonly stage?: 'vertex' | 'fragment' | 'compute';
}

Description

type is the DSL type key (the string typeKey returns). wgsl and glsl are the per-target spellings the emit writes, and the host provides the global under those; name is the logical name the module uses. stage, when present, is the advisory stage the declaration named.

Instance properties

nameread only string
typeread only string
wgslread only string
glslread only string
stageoptionalread only 'vertex' | 'fragment' | 'compute'

See also

Source

src/core/reflect.ts, line 683, at commit 26de7be8

Edit this page Report a problem