member()
Function in Values
Low-level struct member access, base.name, with the field type given explicitly.
import { member } from 'typeshade/core/ir'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
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 2198, at commit af54ddad5