CapProfile
On this page

CapProfile

Type in Backends

A backend's capability table, and the single authority for what its target supports.

import type { CapProfile } from 'typeshade'

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

Syntax

type CapProfile = Readonly<Partial<Record<Capability, CapSupport>>>;

Description

Membership is support: a capability with a row can be emitted on this target, and a capability without one makes emit throw UnsupportedFeatureError naming it. Everything else is derived from the same rows: coverage from the keys (Capabilities.fromProfile), the source directive header from each row’s directive, and the host activation list from each row’s hostFeature (hostFeaturesFor), so the three cannot disagree.

See also

Source

src/core/backend.ts, line 57, at commit 26de7be8

Edit this page Report a problem