FragmentDeclares
On this page

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 only readonly string[]

Helper functions defined in the fragment (entry points are listed separately).

structsread only readonly string[]

Plain struct types. A struct consumed as a uniform or storage binding is emitted as a block, so its name appears under bindings instead.

bindingsread only readonly string[]

Resource bindings the fragment declares, by binding name.

constsread only readonly string[]

Module constants.

overridesread only readonly string[]

Pipeline specialization constants (overrideConst).

entryPointsread only readonly 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

Edit this page Report a problem