---
title: "CapSupportKind: type in Backends, TypeShade API reference"
description: "CapSupportKind, a type in Backends. How one backend supports one capability. - 'native': supported, with nothing to emit and nothing for the host to turn on."
url: https://typeshade.dev/api/capsupportkind/
language: en
---

# `CapSupportKind`

Type in Backends

How one backend supports one capability. - 'native': supported, with nothing to emit and nothing for the host to turn on. - 'directive': supported, and the emitted source declares it.

`import type { CapSupportKind } from 'typeshade'`

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

## Syntax

```ts
type CapSupportKind = 'native' | 'directive' | 'host-feature' | 'unsupported';
```

## Description

The emitter writes the line.

- `'host-feature'`: supported, and the host must activate it before pipeline creation (a WebGPU device feature or a WebGL2 extension). [`hostFeaturesFor`](https://typeshade.dev/api/hostfeaturesfor/) looks it up.
- `'unsupported'`: the target has no row, and emit throws [`UnsupportedFeatureError`](https://typeshade.dev/api/unsupportedfeatureerror/) ([`SD0030`](https://typeshade.dev/reference/errors/sd0030/)) before writing any source.

A row can be both directive and host-feature; `'directive'` wins in that case, because it is the half a reader of the emitted source can see.

## See also

- [`hostFeaturesFor`](https://typeshade.dev/api/hostfeaturesfor/)
- [`UnsupportedFeatureError`](https://typeshade.dev/api/unsupportedfeatureerror/)

## Source

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