---
title: "PackBinding: interface in Reflection, TypeShade API"
description: "PackBinding, an interface in Reflection. One resource slot. name, space, group, binding, access and type are the fields packModule() has always given…"
url: https://typeshade.dev/api/packbinding/
language: en
---

# `PackBinding`

Interface in Reflection

One resource slot. name, space, group, binding, access and type are the fields packModule() has always given; the rest came with schema 1.

`import type { PackBinding } from 'typeshade'`

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

## Syntax

```ts
interface PackBinding {
  readonly name: string;
  readonly emitted: string;
  readonly emittedGlsl: string;
  readonly space: string;
  readonly group: number;
  readonly binding: number;
  readonly access?: 'read' | 'read_write';
  readonly type: string;
  readonly resource: PackResource;
  readonly stages: readonly ('vertex' | 'fragment' | 'compute')[];
  readonly layout?: PackLayout;
  readonly rule?: 'std140' | 'std430';
  readonly noLayout?: string;
  readonly injected?: true;
  readonly dataTexture?: PackDataTexture;
}
```

## Instance properties

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

The authored name the host binds by.

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

The name the emitted text declares it under ([Rule 11.10](https://typeshade.dev/reference/rules/11-10/)).

**`emittedGlsl` read only `string`**

The GLSL spelling, always present; equal to `emitted` where the targets agree.

**`space` read only `string`**

**`group` read only `number`**

**`binding` read only `number`**

**`access` optional read only `'read' | 'read_write'`**

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

The `typeKey` spelling: `vec4<f32>`, `array<f32>`, `texture_2d<f32>`.

**`resource` read only `PackResource`**

**`stages` read only `readonly ('vertex' | 'fragment' | 'compute')[]`**

The stages whose entries reach it, which its bind group layout’s visibility names.

**`layout` optional read only `PackLayout`**

A buffer’s byte layout, under `rule`; absent on a handle.

**`rule` optional read only `'std140' | 'std430'`**

**`noLayout` optional read only `string`**

Why a buffer has no host layout: a `bool`, a two-row matrix in a uniform.

**`injected` optional read only `true`**

A binding the emit adds, which the host binds as it binds any other: the `_fp64` guard, a 1 × 1 texture that holds 1.0, and the recorded variant’s `_console` buffer.

**`dataTexture` optional read only `PackDataTexture`**

A storage array’s data texture on WebGL2, when the GLSL ES 3.00 program reads it as one.

## Source

[`src/core/manifest-types.ts`, line 176](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/manifest-types.ts#L176), at commit af54ddad5
