---
title: "member(): IR builder function in typeshade/core/ir"
description: "member, an IR builder function in typeshade/core/ir. Low-level struct member access, base.name, with the field type given explicitly."
url: https://typeshade.dev/api/member/
language: en
---

# `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

```ts
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 2198](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L2198), at commit af54ddad5
