---
title: "CapSupport: interface in Backends, TypeShade API reference"
description: "CapSupport, an interface in Backends. What one capability costs on one target: the row of a backend's capProfile."
url: https://typeshade.dev/api/capsupport/
language: en
---

# `CapSupport`

Interface in Backends

What one capability costs on one target: the row of a backend's capProfile.

`import type { CapSupport } from 'typeshade'`

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

## Syntax

```ts
interface CapSupport {
  readonly directive?: string;
  readonly hostFeature?: string;
}
```

## Description

What one capability costs on one target: the row of a backend’s `capProfile`. Both fields are optional and mean different things.

An empty row (`{}`) means the target supports the capability outright, with no directive and no host activation (storage buffers on WGSL, float render targets on WebGPU).

## Instance properties

**`directive` optional read only `string`**

The token the emitted source must carry for this target to accept the feature: WGSL `enable <directive>;`, GLSL ES 3.00 `#extension <directive> : require`. When absent, the feature adds nothing to the emitted source.

**`hostFeature` optional read only `string`**

What the host must activate before pipeline creation: `gl.getExtension('<hostFeature>')` on WebGL2, a `requiredFeatures: ['<hostFeature>']` entry on WebGPU. When absent, the feature is core on that target and there is nothing to request.

## Source

[`src/core/backend.ts`, line 23](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/backend.ts#L23), at commit af54ddad5
