constRef()
Function in Values
A reference to a module-level constant by name, such as one declared with constExpr.
import { constRef } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
function constRef<T extends ShaderType = typeof f32T>( name: string, type?: T,): ReadonlyNode<KeyOf<T>>Parameters
namestringtypeoptionalT extends ShaderType
Return value
ReadonlyNode<KeyOf<T>>
Description
The type defaults to f32.
In the guide
Source
src/core/ir/node.ts, line 1076, at commit 26de7be8