ConstHandle
On this page

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'

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

Syntax

interface ConstHandle<T extends ShaderType> {
readonly decl: ConstDecl;
readonly node: ReadonlyNode<KeyOf<T>>;
}

Instance properties

declread only ConstDecl

The constant’s declaration, for module({ consts }) or module({ uses }).

noderead only ReadonlyNode<KeyOf<T>>

The typed reference to read the constant through at call sites.

See also

Source

src/core/sot.ts, line 41, at commit 26de7be8

Edit this page Report a problem