---
title: "UsesHandle: type in Authoring, TypeShade API reference"
description: "UsesHandle, a type in Authoring. A declarator handle accepted by module({ uses }): anything that carries its own declaration or binding."
url: https://typeshade.dev/api/useshandle/
language: en
---

# `UsesHandle`

Type in Authoring

A declarator handle accepted by module({ uses }): anything that carries its own declaration or binding.

`import type { UsesHandle } from 'typeshade'`
`import type { UsesHandle } from 'typeshade/core/ir'`

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

## Syntax

```ts
type UsesHandle =
  | { readonly struct: StructDecl; readonly binding: BindingDecl }
  | { readonly decl: StructDecl | ConstDecl }
  | { readonly binding: BindingDecl; readonly elementDecl?: StructDecl };
```

## Description

[`uniformStruct`](https://typeshade.dev/api/uniformstruct/) returns `{ struct, binding }`; [`ioStruct`](https://typeshade.dev/api/iostruct/), [`structDecl`](https://typeshade.dev/api/structdecl/) and [`constDecl`](https://typeshade.dev/api/constdecl/) return `{ decl }`; [`storageBuffer`](https://typeshade.dev/api/storagebuffer/) returns `{ binding }` plus an `elementDecl` for a struct element; [`resource`](https://typeshade.dev/api/resource/) returns `{ binding }`.

## See also

- [`uniformStruct`](https://typeshade.dev/api/uniformstruct/)
- [`ioStruct`](https://typeshade.dev/api/iostruct/)
- [`structDecl`](https://typeshade.dev/api/structdecl/)
- [`constDecl`](https://typeshade.dev/api/constdecl/)
- [`storageBuffer`](https://typeshade.dev/api/storagebuffer/)
- [`resource`](https://typeshade.dev/api/resource/)

## Source

[`src/core/ir/builder.ts`, line 877](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/builder.ts#L877), at commit af54ddad5
