param
On this page

param()

Function in Values

A function parameter reference, with the key inferred from the ShaderType.

import { param } from 'typeshade'

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

Syntax

function param<T extends ShaderType>(name: string, type: T): ReadonlyNode<KeyOf<T>>

Parameters

name string
type T extends ShaderType

Return value

ReadonlyNode<KeyOf<T>>

Description

A parameter is read-only, so .assign() on one is a tsc error.

In the guide

See also

Source

src/core/ir/node.ts, line 1104, at commit 26de7be8

Edit this page Report a problem