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
baseReadonlyNodenamestringtypeT extends ShaderType
Return value
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