member
On this page

member()

Function in Values

Low-level struct member access, base.name, with the field type given explicitly.

import { member } from 'typeshade'

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

Syntax

const member: <T extends ShaderType>(
base: ReadonlyNode,
name: string,
type: T,
) => Node<KeyOf<T>>

Parameters

base ReadonlyNode
name string
type T extends ShaderType

Return value

Node<KeyOf<T>>

Description

Shaders normally read fields through the typed getters a struct declaration provides; this is the primitive those getters build on.

Source

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

Edit this page Report a problem