---
title: "emitBinding(): function in Emit, TypeShade API reference"
description: "emitBinding, a function in Emit. Emit one BindingDecl as a WGSL @group(…) @binding(…) var line."
url: https://typeshade.dev/api/emitbinding/
language: en
---

# `emitBinding()`

Function in Emit

Emit one BindingDecl as a WGSL @group(…) @binding(…) var line.

`import { emitBinding } from 'typeshade'`

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

## Syntax

```ts
const emitBinding: (b: BindingDecl) => string
```

## Parameters

**`b` `BindingDecl`**

## Return value

`string`

## Targets

| Target | Support | Notes |
| --- | --- | --- |
| WGSL (WebGPU) | Supported | Writes WGSL for WebGPU. |
| GLSL ES 3.00 (WebGL2) | Does not apply | |
| CPU oracle | Does not apply | |

## See also

- [`BindingDecl`](https://typeshade.dev/api/bindingdecl/)

## Source

[`src/core/backends/wgsl.ts`, line 180](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/backends/wgsl.ts#L180), at commit af54ddad5
