---
title: "ResourceKind: type in Reflection, TypeShade API reference"
description: "ResourceKind, a type in Reflection. What a bind entry is at the host API, independent of the WGSL address space or type that declared it."
url: https://typeshade.dev/api/resourcekind/
language: en
---

# `ResourceKind`

Type in Reflection

What a bind entry is at the host API, independent of the WGSL address space or type that declared it.

`import type { ResourceKind } from 'typeshade'`

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

## Syntax

```ts
type ResourceKind =
  'uniform-buffer' | 'storage-buffer' | 'texture' | 'storage-texture' | 'sampler';
```

## Description

A host switches on this field to pick its GPU resource type. `'uniform-buffer'` and `'storage-buffer'` are both backed by a buffer; the entry’s `access`, present only on a storage buffer, further splits it into read-only and read-write. `'texture'` and `'sampler'` are the two kinds a buffer-only host must reject. On the GLSL ES 3.00 backend a `'sampler'` entry is folded into its paired `'texture'` entry’s combined `sampler2D` uniform and gets no declaration of its own; it still appears in `bindGroups`, since reflection reports the module’s structure, with nothing separate for a host to bind.

## Source

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