---
title: "DeclarableCapability: type in IR, TypeShade API reference"
description: "DeclarableCapability, a type in IR. The capabilities a module may name in ModuleDecl.enables…"
url: https://typeshade.dev/api/declarablecapability/
language: en
---

# `DeclarableCapability`

Type in IR

The capabilities a module may name in ModuleDecl.enables: Capability minus the nine capabilities derived from the module's shape.

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

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

## Syntax

```ts
type DeclarableCapability = Exclude<Capability, DerivedCapability>;
```

## Description

`requiredCaps` infers each of those from what the module already says (a storage binding means `storageBuffer`, a `@compute` entry means `compute`, a multisampled texture means `msaaTextureLoad`, and so on through the texture ids, a `bgra8unorm` storage format and the packed 4x8 calls), so declaring one would at best restate the shape and at worst assert a feature the module does not use. This type makes that a compile error. The excluded list is the private `DERIVED_CAPABILITIES` (`derived-capabilities.ts`), the same list `capabilityMatrix` reads for its `declarable` column.

`clipDistances`, `primitiveIndex` and `subgroups` are on both sides and deliberately so: each is derived from a `@builtin(...)` id the module spells (§50), and each is still declarable, because a module may hold the directive for a feature it reaches another way. Deriving and declaring meet in one set, so naming one changes nothing.

Only the authoring surface narrows: `requiredCaps`, [`Capabilities`](https://typeshade.dev/api/capabilities/) and [`CapProfile`](https://typeshade.dev/api/capprofile/) keep reading the full `Capability`, because the derived ids are exactly what they must express.

## See also

- [`Capability`](https://typeshade.dev/api/capability/)
- [`Capabilities`](https://typeshade.dev/api/capabilities/)
- [`CapProfile`](https://typeshade.dev/api/capprofile/)

## Source

[`src/core/ir/nodes/capabilities.ts`, line 105](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/nodes/capabilities.ts#L105), at commit af54ddad5
