---
title: "EntryIoField: interface in Reflection, TypeShade API"
description: "EntryIoField, an interface in Reflection. One field of an entry point's stage interface: a @location(n) varying, vertex attribute or fragment draw buffer…"
url: https://typeshade.dev/api/entryiofield/
language: en
---

# `EntryIoField`

Interface in Reflection

One field of an entry point's stage interface: a `@location(n)` varying, vertex attribute or fragment draw buffer, or a `@builtin(name)` slot.

`import type { EntryIoField } from 'typeshade'`

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

## Syntax

```ts
interface EntryIoField {
  readonly name: string;
  readonly emitted: string;
  readonly type: string;
  readonly location?: number;
  readonly builtin?: string;
}
```

## Description

Where the entry spelled it as a member of a struct parameter or struct return, the field is reported flattened out of that struct; see [`EntryIo`](https://typeshade.dev/api/entryio/).

## Instance properties

**`name` read only `string`**

The field’s own identifier: a parameter’s name, a flattened struct field’s name, or `_ret` for a bare non-struct return value (the name the GLSL backend gives that output).

**`emitted` read only `string`**

The field’s name in the emitted text ([Rule 11.10](https://typeshade.dev/reference/rules/11-10/)).

**`type` read only `string`**

The DSL type key (the string [`typeKey`](https://typeshade.dev/api/typekey/) returns), the same spelling `StructLayout.fields[].type` and `VertexAttr.type` use.

**`location` optional read only `number`**

The location, written (`location<n, T>`) or given by the compiler ([Rule 6.6](https://typeshade.dev/reference/rules/6-6/), change 0135). Absent on a `@builtin` field and on an unattributed one of a module built in code; the two are told apart by whether `builtin` is set.

**`builtin` optional read only `string`**

The declared `@builtin(name)`, in WGSL’s own vocabulary (`position`, `vertex_index`, …). Builtins are reported alongside locations. A consumer that compares varyings and leaves builtins out (they are not varyings) filters on this field, and can then report that `position` was excluded because it is a builtin.

## See also

- [`EntryIo`](https://typeshade.dev/api/entryio/)
- [`typeKey`](https://typeshade.dev/api/typekey/)

## Source

[`src/core/reflect/entry-types.ts`, line 40](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/reflect/entry-types.ts#L40), at commit af54ddad5
