FragmentDeclares
Interface in Emit
What a fragment declares in the program it is composed into: the manifest a composer checks its host prelude against.
import type { FragmentDeclares } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface FragmentDeclares { readonly functions: readonly string[]; readonly structs: readonly string[]; readonly bindings: readonly string[]; readonly consts: readonly string[]; readonly overrides: readonly string[]; readonly entryPoints: readonly string[];}Description
Names are the emitted spellings, so they are the ones a host actually collides with.
Instance properties
functionsread onlyreadonly string[]Helper functions defined in the fragment (entry points are listed separately).
structsread onlyreadonly string[]Plain struct types. A struct consumed as a uniform or storage binding is emitted as a block, so its name appears under
bindingsinstead.bindingsread onlyreadonly string[]Resource bindings the fragment declares, by binding name.
constsread onlyreadonly string[]Module constants.
overridesread onlyreadonly string[]Pipeline specialization constants (
overrideConst).entryPointsread onlyreadonly string[]Stage entry points. Listed whether or not they were emitted, so a composer that asked for declarations only still knows what it excluded.
Source
src/core/fragment.ts, line 29, at commit 26de7be8