ConstHandle
Interface in Layout
The handle constDecl returns: a module-level constant and its typed reference, declared together so the name is written once.
import type { ConstHandle } from 'typeshade'import type { ConstHandle } from 'typeshade/core/ir'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
interface ConstHandle<T extends ShaderType> { readonly decl: ConstDecl; readonly node: ReadonlyNode<KeyOf<T>>;}Instance properties
declread onlyConstDeclThe constant’s declaration, for
module({ consts })ormodule({ uses }).noderead onlyReadonlyNode<KeyOf<T>>The typed reference to read the constant through at call sites.
See also
Source
src/core/sot.ts, line 41, at commit af54ddad5