constRef
On this page

constRef()

Function in Values

A reference to a module-level constant by name, such as one declared with constExpr.

import { constRef } from 'typeshade/core/ir'

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

Syntax

function constRef<T extends ShaderType = typeof f32T>(
name: string,
type?: T,
): ReadonlyNode<KeyOf<T>>

Parameters

name string
typeoptional T extends ShaderType

Return value

ReadonlyNode<KeyOf<T>>

Description

The type defaults to f32.

Source

src/core/ir/node.ts, line 887, at commit af54ddad5

Edit this page Report a problem